首页 全部提示词 Coding

重力转换:低多边形物理平台游戏

Gravity Shift: Low-Poly Physics Platformer

文本 @loshu2000 383 字符 在 prompts.chat 查看 译文有问题?

中文译文

游戏概念:一款名为“Gravity Shift”的解谜平台游戏,玩家通过旋转整个世界来穿越一个3D低多边形迷宫。环境采用极简风格,使用柔和渐变和锐利的几何形状。 技术提示词: 使用Three.js和Cannon.js构建一个3D平台游戏。世界是一个立方体形状的迷宫。当用户按下“R”时,将world.gravity向量旋转90度。

JavaScript // 重力旋转逻辑 world.gravity.set(0, -9.82, 0); // 默认值 function rotateGravity() { let newG = new CANNON.Vec3(-world.gravity.y, world.gravity.x, 0); world.gravity.copy(newG); } 使用Lerp加入平滑的相机插值,以便在切换期间跟随玩家的刚体。

English original

Game Concept: A puzzle-platformer named "Gravity Shift" where players rotate the entire world to navigate a 3D low-poly labyrinth. The environment is minimalist, using pastel gradients and sharp geometric shapes. Technical Prompt: Build a 3D platformer using Three.js and Cannon.js. The world is a cube-shaped maze. When the user presses 'R', rotate the world.gravity vector by 90 degrees.

JavaScript // Gravity rotation logic world.gravity.set(0, -9.82, 0); // Default function rotateGravity() { let newG = new CANNON.Vec3(-world.gravity.y, world.gravity.x, 0); world.gravity.copy(newG); } Include smooth camera interpolation using Lerp to follow the player's rigid body during shifts.