中文译文
游戏概念:一款设定在数字虚空中的快节奏街机式“躲避类”游戏。玩家控制一个核心能量火花,在由 10,000 多个蓝色和紫色粒子组成的、类似流体的星云中穿行,这些粒子会对玩家的存在作出反应。 技术提示词: 创建一个 Three.js 场景,包含一个拥有 15,000 个粒子的 Points 系统。使用自定义 ShaderMaterial 实现发光效果。实现一种排斥逻辑,使粒子从鼠标光标处飞散开。
JavaScript // 核心排斥数学 let dist = particlePos.distanceTo(mousePos); if (dist < 5) { direction.subVectors(particlePos, mousePos).normalize(); particlePos.addScaledVector(direction, 0.2); } 包含一个用于后处理的 BloomPass,并通过以下方式确保 60FPS 性能:
English original
Game Concept: A fast-paced arcade "dodge-em-up" set in a digital void. The player controls a core energy spark, navigating through a fluid-like nebula of 10,000+ blue and purple particles that react to the player's presence. Technical Prompt: Create a Three.js scene featuring a Points system with 15,000 particles. Use a custom ShaderMaterial for a glow effect. Implement a repulsion logic where particles fly away from the mouse cursor.
JavaScript // Core repulsion math let dist = particlePos.distanceTo(mousePos); if (dist < 5) { direction.subVectors(particlePos, mousePos).normalize(); particlePos.addScaledVector(direction, 0.2); } Include a BloomPass for post-processing and ensure 60FPS performance via