Allow mutable settings to scene camera with OrbitControls #5101
fluwer
started this conversation in
Ideas / Feature Requests
Replies: 1 comment 2 replies
-
Hi @fluwer, Currently there's no easy way to configure the camera controls. Especially because the But here is a workaround. We can re-define the scene.on('init', js_handler=f'''() => {{
const scene = getElement({scene.id});
let _controls = scene.controls;
Object.defineProperty(scene, 'controls', {{
configurable: true,
enumerable: true,
get() {{ return _controls; }},
set(newControls) {{
_controls = newControls;
newControls.enableZoom = false;
newControls.enableRotate = false;
newControls.enablePan = false;
}},
}});
}}''') |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How can I limit the camera's capabilities? For example, use:
Beta Was this translation helpful? Give feedback.
All reactions