Skip to content

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.

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

Run it in the browser, read its scripts, and download it as an XR Creator project.

#pragma lifecycle(startup)
function startup() {
const component = self.parent.getComponent(VignetteEffectComponent);
if (component) log(component.props);
}