You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run this code, I see nothing but a black screen with no error messages in the console. Running the same code, but using the OrbitControls instead of the FirstPersonControls works however:
My first suggestion would not be to assign the controls to the controls property on the viewer object. Just make an external variable. Next, you need to be calling the update() function on the controls with a time delta parameter. Try something like:
let controls;
const clock = new THREE.Clock();
viewer.addSplatScene(path)
.then(() => {
viewer.start();
requestAnimationFrame(update);
controls = new GaussianSplats3D.FirstPersonControls(viewer.camera, viewer.renderer.domElement);
});
function update() {
requestAnimationFrame(update);
const delta = clock.getDelta();
controls.update(delta);
}
Hi, I'm trying to use a different control than the built in OrbitControls. My code is something like this:
When I run this code, I see nothing but a black screen with no error messages in the console. Running the same code, but using the
OrbitControls
instead of theFirstPersonControls
works however:How can I any other control than OrbitControls?
The text was updated successfully, but these errors were encountered: