threepipe
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1 год назад
123456789101112131415161718192021222324252627282930313233343536373839
  1. ---
  2. prev:
  3. text: 'FileTransferPlugin'
  4. link: './FileTransferPlugin'
  5. next:
  6. text: 'InteractionPromptPlugin'
  7. link: './InteractionPromptPlugin'
  8. ---
  9. # LoadingScreenPlugin
  10. [//]: # (todo: image)
  11. [Example](https://threepipe.org/examples/#loading-screen-plugin/) —
  12. [Source Code](https://github.com/repalash/threepipe/blob/master/src/plugins/interaction/LoadingScreenPlugin.ts) —
  13. [API Reference](https://threepipe.org/docs/classes/LoadingScreenPlugin.html)
  14. Loading Screen Plugin adds configurable overlay with a logo, loading text, spinner and the list of loading items. It also provides options to minimize and maximize the loading popup when there is no objects in the scene.
  15. The overlay is automatically added to the viewer container and shown when any files are loading. Behaviour can be configured to change how its shown and hidden, and can even be triggered programmatically.
  16. ```typescript
  17. import {ThreeViewer, LoadingScreenPlugin} from 'threepipe'
  18. const viewer = new ThreeViewer({...})
  19. const loadingScreen = viewer.addPluginSync(new LoadingScreenPlugin())
  20. loadingScreen.loadingTextHeader = 'Loading Helmet 3D Model'
  21. loadingScreen.errorTextHeader = 'Error Loading Helmet 3D Model'
  22. loadingScreen.showFileNames = true
  23. loadingScreen.showProcessStates = true
  24. loadingScreen.showProgress = true
  25. loadingScreen.backgroundOpacity = 0.4 // 0-1
  26. loadingScreen.backgroundBlur = 28 // px
  27. ```
  28. See also the base class [AAssetManagerProcessStatePlugin](https://threepipe.org/docs/classes/AAssetManagerProcessStatePlugin.html) to write a custom loading plugin.