Skip to content

Commit

Permalink
Add auto rotation to model
Browse files Browse the repository at this point in the history
  • Loading branch information
cmahnke committed Jul 14, 2024
1 parent 0ce0268 commit 31aae9a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/js/hdr-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 31aae9a

Please sign in to comment.