Vignette Effect
Updated
Darkens the edges of the image.
- Type
comp-vignette-effect- Script class
VignetteEffectComponent- Per entity
- One
- Version
- 1.3.0
Read about it in Colour effects: what it does, how to use it from a script, and examples.
Properties
Section titled “Properties”The props the runtime declares for this component, with their defaults and accepted ranges.
| Prop | Default | Range |
|---|---|---|
darkness |
0.5 |
0 ≤ x ≤ 1 |
offset |
0.5 |
0 ≤ x ≤ 1 |
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Flash the screen when the player is hurtOn player/hurt, the camera's Vignette darkens sharply and eases back with a tween, while its Glitch effect tears the image for 400 ms.
Press Hurt to flash the screen. Drag to orbit the camera, scroll to zoom.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(VignetteEffectComponent); if (component) log(component.props);}