|
@@ -137,26 +137,28 @@
|
|
|
controls.update();
|
|
|
|
|
|
animate();
|
|
|
+
|
|
|
+ setInterval( () => {
|
|
|
|
|
|
- }
|
|
|
+ let index = Math.floor( Math.random() * boxes.count );
|
|
|
|
|
|
- function animate() {
|
|
|
+ position.set( 0, Math.random() + 1, 0 );
|
|
|
+ physics.setMeshPosition( boxes, position, index );
|
|
|
|
|
|
- requestAnimationFrame( animate );
|
|
|
+ //
|
|
|
|
|
|
- //
|
|
|
+ index = Math.floor( Math.random() * spheres.count );
|
|
|
|
|
|
- let index = Math.floor( Math.random() * boxes.count );
|
|
|
+ position.set( 0, Math.random() + 1, 0 );
|
|
|
+ physics.setMeshPosition( spheres, position, index );
|
|
|
|
|
|
- position.set( 0, Math.random() + 1, 0 );
|
|
|
- physics.setMeshPosition( boxes, position, index );
|
|
|
+ }, 17 );
|
|
|
|
|
|
- //
|
|
|
+ }
|
|
|
|
|
|
- index = Math.floor( Math.random() * spheres.count );
|
|
|
+ function animate() {
|
|
|
|
|
|
- position.set( 0, Math.random() + 1, 0 );
|
|
|
- physics.setMeshPosition( spheres, position, index );
|
|
|
+ requestAnimationFrame( animate );
|
|
|
|
|
|
renderer.render( scene, camera );
|
|
|
|