threepipe
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

TransformControlsPlugin.md 1.5KB

12345678910111213141516171819202122232425262728293031323334353637
  1. ---
  2. prev:
  3. text: 'InteractionPromptPlugin'
  4. link: './InteractionPromptPlugin'
  5. next:
  6. text: 'ContactShadowGroundPlugin'
  7. link: './ContactShadowGroundPlugin'
  8. ---
  9. # TransformControlsPlugin
  10. [//]: # (todo: image)
  11. [Example](https://threepipe.org/examples/#transform-controls-plugin/) —
  12. [Source Code](https://github.com/repalash/threepipe/blob/master/src/plugins/interaction/TransformControlsPlugin.ts) —
  13. [API Reference](https://threepipe.org/docs/classes/TransformControlsPlugin.html)
  14. Transform Controls Plugin adds support for moving, rotating and scaling objects in the viewer with interactive widgets.
  15. Under the hood, TransformControlsPlugin uses [TransformControls2](https://threepipe.org/docs/classes/TransformControls2) to provide the interactive controls, it is a extended version of three.js [TransformControls](https://threejs.org/docs/#examples/en/controls/TransformControls).
  16. When the plugin is added to the viewer, it interfaces with the [PickingPlugin](#pickingplugin) and shows the control gizmos when an object is selected and hides them when the object is unselected.
  17. If the `PickingPlugin` is not added to the viewer before the `TransformControlsPlugin`, it is added automatically with the plugin.
  18. ```typescript
  19. import {ThreeViewer, TransformControlsPlugin} from 'threepipe'
  20. const viewer = new ThreeViewer({...})
  21. const transfromControlsPlugin = viewer.addPluginSync(new TransformControlsPlugin())
  22. // Get the underlying transform controls
  23. console.log(transfromControlsPlugin.transformControls)
  24. ```