How to use the three-freeform-controls.ANCHOR_MODE.INHERIT 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 / utils / interactiveMarkerManager.js View on Github external
controls.forEach((control, index) => {
      // cannot rely on the control.name being present or unique
      const key = name;
      if (this.contolsManagerMap[key] === undefined) {
        this.contolsManagerMap[key] = [];
      }
      if (this.contolsManagerMap[key].length !== controls.length) {
        const attachMode =
          control.orientation_mode ===
          INTERACTIVE_MARKER_ORIENTATION_MODES.FIXED
            ? ANCHOR_MODE.FIXED
            : ANCHOR_MODE.INHERIT;
        const controlsManager = freeformControls.anchor(object, {
          separationT: {
            x: 0.4,
            y: 0.4,
            z: 0.4,
          },
          orientation: control.orientation,
          mode: attachMode,
          hideOtherHandlesOnSelect: this.hideOtherHandlesOnSelect,
          hideOtherControlsInstancesOnSelect: this
            .hideOtherControlsInstancesOnSelect,
          showHelperPlane: true,
        });
        controlsManager.scale.set(scale, scale, scale);
        controlsManager.visible = visible;