How to use the three-freeform-controls.ControlsManager function in three-freeform-controls

To help you get started, we’ve selected a few three-freeform-controls examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rapyuta-robotics / amphion / src / viz / InteractiveMarkers.js View on Github external
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;
      },