Skip to content

Scanline Effect

Updated

Horizontal lines over the image, like an old screen.

Type
comp-scanline-effect
Script class
ScanlineEffectComponent
Per entity
One
Version
1.3.0

Read about it in Stylize 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
density 1.25 -2 ≤ x ≤ 2
intensity 0.5 0 ≤ x ≤ 1
scrollSpeed 0 -5 ≤ x ≤ 5

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(ScanlineEffectComponent);
if (component) log(component.props);
}