|
@@ -89,6 +89,7 @@
|
|
|
camera.position.z = 200;
|
|
|
|
|
|
const controls = new OrbitControls( camera, renderer.domElement );
|
|
|
+ controls.addEventListener( 'change', render ); // use if there is no animation loop
|
|
|
controls.enablePan = false;
|
|
|
controls.enableZoom = false;
|
|
|
|
|
@@ -133,7 +134,7 @@
|
|
|
|
|
|
//
|
|
|
|
|
|
- animate();
|
|
|
+ render();
|
|
|
|
|
|
} );
|
|
|
|
|
@@ -144,6 +145,7 @@
|
|
|
gui.add( API, 'thickness', 0, 4 ).onChange( function () {
|
|
|
|
|
|
mesh2.material.uniforms.thickness.value = API.thickness;
|
|
|
+ render();
|
|
|
|
|
|
} );
|
|
|
|
|
@@ -185,9 +187,7 @@
|
|
|
|
|
|
}
|
|
|
|
|
|
- function animate() {
|
|
|
-
|
|
|
- requestAnimationFrame( animate );
|
|
|
+ function render() {
|
|
|
|
|
|
renderer.render( scene, camera );
|
|
|
|