From 01d3b076066759cbdda3d7111d19a0237d76647f Mon Sep 17 00:00:00 2001 From: Shawn Xie Date: Fri, 12 Jul 2024 17:59:12 +0800 Subject: [PATCH] refactor(examples): replace `Y+` option with `rotateX` --- examples/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/index.html b/examples/index.html index 40758fc..e8db28a 100644 --- a/examples/index.html +++ b/examples/index.html @@ -116,9 +116,9 @@ } }); - const params = { 'Y+': false }; + const params = { 'rotateX': 0 }; const gui = new GUI(); - gui.add(params, 'Y+'); + gui.add(params, 'rotateX', [-90, 0, 90]); function loop(count) { requestAnimationFrame(loop); @@ -126,7 +126,7 @@ controller.update(); if (mesh) { - mesh.euler.x = params['Y+'] ? -Math.PI / 2 : 0; + mesh.euler.x = params.rotateX / 180 * Math.PI; mesh.update(camera, width, height); }