Skip to content

Shock Wave Effect

Updated

A ring that ripples the image outward from a world point, like a blast, set off by a script.

Type
comp-shock-wave-effect
Script class
ShockWaveEffectComponent
Per entity
One
Version
1.3.0

Read about it in Light and lens 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
amplitude 0.05 -0.25 ≤ x ≤ 0.25
maxRadius 1 0 ≤ x ≤ 10
position [0,0,0]
position.0
position.1
position.2
speed 2 0 ≤ x ≤ 10
waveSize 0.2 0.001 ≤ x ≤ 2

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