threepipe
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

EditorViewWidgetPlugin.md 970B

преди 1 година
123456789101112131415161718192021222324252627282930313233
  1. ---
  2. prev:
  3. text: 'VirtualCamerasPlugin'
  4. link: './VirtualCamerasPlugin'
  5. next:
  6. text: 'Object3DWidgetsPlugin'
  7. link: './Object3DWidgetsPlugin'
  8. ---
  9. # EditorViewWidgetPlugin
  10. [//]: # (todo: image)
  11. [Example](https://threepipe.org/examples/#editor-view-widget-plugin/) —
  12. [Source Code](https://github.com/repalash/threepipe/blob/master/src/plugins/interaction/EditorViewWidgetPlugin.ts) —
  13. [API Reference](https://threepipe.org/docs/classes/EditorViewWidgetPlugin.html)
  14. EditorViewWidgetPlugin adds a ViewHelper in the parent of the viewer canvas to show the current camera view and allow the user to change the camera view to one of the primary world axes.
  15. Simply add the plugin to the viewer to see the widget.
  16. ```typescript
  17. import {ThreeViewer, EditorViewWidgetPlugin} from 'threepipe'
  18. const viewer = new ThreeViewer({...})
  19. const plugin = viewer.addPluginSync(new EditorViewWidgetPlugin())
  20. // to hide the widget
  21. plugin.enabled = false
  22. ```