ghost
ghost(
tex,uv,offsets,baseOpacity?,fadeWithDistance?):Node<"vec4">
Defined in: packages/nodes/src/vfx/afterimage.ts:108
Multiple ghost/clone effect at offset positions. Creates several semi-transparent copies at fixed offsets.
Parameters
Section titled “Parameters”Source texture
Node <"vec2">
UV coordinates
offsets
Section titled “offsets”[number, number][]
Array of offset positions for ghosts
baseOpacity?
Section titled “baseOpacity?”FloatInput = 0.3
Opacity of each ghost (default: 0.3)
fadeWithDistance?
Section titled “fadeWithDistance?”boolean = true
Fade ghosts based on offset distance
Returns
Section titled “Returns”Node <"vec4">
Color with ghost clones
Example
Section titled “Example”const ghosts = ghost(texture, uv, [[0.02, 0], [0.04, 0], [0.06, 0]], 0.3)