From 7ce01a427d8cefe6c1a675ee13e50668f95a1995 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Fri, 11 Feb 2022 16:41:03 -0500 Subject: [PATCH] Examples: Improved webgl_materials_car. --- examples/webgl_materials_car.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/webgl_materials_car.html b/examples/webgl_materials_car.html index 52e4892b0098f5..a1e8c7a241e6b2 100644 --- a/examples/webgl_materials_car.html +++ b/examples/webgl_materials_car.html @@ -88,6 +88,8 @@ camera.position.set( 4.25, 1.4, - 4.5 ); controls = new OrbitControls( camera, container ); + controls.enableDamping = true; + controls.maxDistance = 9; controls.target.set( 0, 0.5, 0 ); controls.update(); @@ -197,6 +199,8 @@ function render() { + controls.update(); + const time = - performance.now() / 1000; for ( let i = 0; i < wheels.length; i ++ ) {