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.

VignettePlugin.md 1.1KB


prev:

text: 'FrameFadePlugin'
link: './FrameFadePlugin'

next:

text: 'ChromaticAberrationPlugin'
link: './ChromaticAberrationPlugin'

VignettePlugin

ExampleSource CodeAPI Reference

VignettePlugin adds a post-processing material extension to the ScreenPass in render manager that applies a vignette effect to the final render. The parameters power and color can be changed to customize the effect.

import {ThreeViewer, VignettePlugin} from 'threepipe'

const viewer = new ThreeViewer({...})

const vignettePlugin = viewer.addPluginSync(VignettePlugin)

// Change the vignette color
vignettePlugin.power = 1
vignettePlugin.color = new Color(0.5, 0, 0)

// or 
// vignettePlugin.color.set('#ff0000'); vignettePlugin.setDirty() // Call setDirty to tell the plugin that color has changed