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.

VignettePlugin.md 1.1KB

123456789101112131415161718192021222324252627282930313233343536
  1. ---
  2. prev:
  3. text: 'FrameFadePlugin'
  4. link: './FrameFadePlugin'
  5. next:
  6. text: 'ChromaticAberrationPlugin'
  7. link: './ChromaticAberrationPlugin'
  8. ---
  9. # VignettePlugin
  10. [//]: # (todo: image)
  11. [Example](https://threepipe.org/examples/#vignette-plugin/) —
  12. [Source Code](https://github.com/repalash/threepipe/blob/master/src/plugins/postprocessing/VignettePlugin.ts) —
  13. [API Reference](https://threepipe.org/docs/classes/VignettePlugin.html)
  14. VignettePlugin adds a post-processing material extension to the ScreenPass in render manager
  15. that applies a vignette effect to the final render. The parameters `power` and `color` can be changed to customize the effect.
  16. ```typescript
  17. import {ThreeViewer, VignettePlugin} from 'threepipe'
  18. const viewer = new ThreeViewer({...})
  19. const vignettePlugin = viewer.addPluginSync(VignettePlugin)
  20. // Change the vignette color
  21. vignettePlugin.power = 1
  22. vignettePlugin.color = new Color(0.5, 0, 0)
  23. // or
  24. // vignettePlugin.color.set('#ff0000'); vignettePlugin.setDirty() // Call setDirty to tell the plugin that color has changed
  25. ```