From 31aae9ab76506d2ca20277b1738cea4b04d50b67 Mon Sep 17 00:00:00 2001 From: Christian Mahnke Date: Sun, 14 Jul 2024 21:31:18 +0200 Subject: [PATCH] Add auto rotation to model --- assets/js/hdr-model.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/js/hdr-model.js b/assets/js/hdr-model.js index 6df696df5d..128205a6ca 100644 --- a/assets/js/hdr-model.js +++ b/assets/js/hdr-model.js @@ -85,6 +85,8 @@ export function initModel(canvas, modelUrl, replacements) { renderer.setAnimationLoop(animate); renderer.setClearColor(0x000000, 0); controls = new OrbitControls(camera, renderer.domElement); + controls.autoRotate = true; + controls.autoRotateSpeed = .15; controls.minPolarAngle = 0; controls.maxPolarAngle = Math.PI * 0.5;