Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我开始学习 Three.js。你如何在这个演示中以恒定速度旋转立方体而不是用鼠标旋转它?
代替:
plane.rotation.y = cube.rotation.y += ( targetRotation - cube.rotation.y ) * 0.05;
尝试类似:
plane.rotation.y = cube.rotation.y += ROTATION_STEP;
通过ROTATION_STEP您可以控制立方体旋转的速度和方向。
ROTATION_STEP