Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
initFreeformControls() {
const { camera, controls, renderer, scene } = this.viewer;
this.freeformControls = new ControlsManager(camera, renderer.domElement);
scene.add(this.freeformControls);
this.freeformControls.listen(RAYCASTER_EVENTS.DRAG_START, () => {
controls.enabled = false;
});
this.freeformControls.listen(RAYCASTER_EVENTS.DRAG, (object, handleName) =>
this.debouncedPublish(object, handleName),
);
this.freeformControls.listen(
RAYCASTER_EVENTS.DRAG_STOP,
(object, handleName) => {
this.debouncedPublish(object, handleName);
controls.enabled = true;
},
);
}