threepipe
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

plugin-blueprintjs.md 1.6KB

1 ano atrás
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ---
  2. prev:
  3. text: '@threepipe/plugin-tweakpane'
  4. link: './plugin-tweakpane'
  5. next:
  6. text: '@threepipe/plugin-tweakpane-editor'
  7. link: './plugin-tweakpane-editor'
  8. ---
  9. # @threepipe/plugin-blueprintjs
  10. [Blueprint.js](https://blueprintjs.com/) UI plugin for ThreePipe
  11. [//]: # (todo: image)
  12. [Example](https://threepipe.org/examples/#blueprintjs-ui-plugin/) —
  13. [Source Code](https://github.com/repalash/threepipe/blob/master/plugins/blueprintjs/src/BlueprintJsUiPlugin.ts) —
  14. [API Reference](https://threepipe.org/plugins/blueprintjs/docs/classes/BlueprintJsUiPlugin.html)
  15. [![NPM Package](https://img.shields.io/npm/v/@threepipe/plugin-blueprintjs.svg)](https://www.npmjs.com/package/@threepipe/plugin-blueprintjs)
  16. ```bash
  17. npm install @threepipe/plugin-blueprintjs
  18. ```
  19. BlueprintJsUiPlugin adds support for using [uiconfig-blueprint](https://github.com/repalash/uiconfig-blueprint)
  20. to create a configuration UI in applications using the [BlueprintJs](https://blueprintjs.com/) library.
  21. The plugin takes the [uiconfig](https://github.com/repalash/uiconfig.js)
  22. that's defined in the viewer and all the objects to automatically render a UI in the browser.
  23. ```typescript
  24. import {IObject3D, ThreeViewer, TonemapPlugin} from 'threepipe'
  25. import {BlueprintJsUiPlugin} from '@threepipe/plugin-blueprintjs'
  26. const viewer = new ThreeViewer({...})
  27. // Add the plugin
  28. const plugin = viewer.addPluginSync(new BlueprintJsUiPlugin(true)) // true to show expanded the UI by default
  29. // Add the UI for the viewer
  30. plugin.appendChild(viewer.uiConfig)
  31. // Add UI for some plugins
  32. plugin.setupPlugins(TonemapPlugin, DropzonePlugin)
  33. ```