()
| 94 | test.scene.add(boxMesh); |
| 95 | |
| 96 | const animate = () => { |
| 97 | physicsWorld.fixedStep(); |
| 98 | cannonDebugger.update(); |
| 99 | boxMesh.position.copy(boxBody.position); |
| 100 | boxMesh.quaternion.copy(boxBody.quaternion); |
| 101 | sphereMesh.position.copy(sphereBody.position); |
| 102 | sphereMesh.quaternion.copy(sphereBody.quaternion); |
| 103 | window.requestAnimationFrame(animate); |
| 104 | }; |
| 105 | animate(); |
| 106 | }, []); |
| 107 |