Closed fand closed 2 months ago
This PR addes VFXProps.zIndex, which allows users to specify the rendering order of the elements.
VFXProps.zIndex
VFX-JS renders elements in ascending order by the zIndex. Elements that have the same zIndex will be rendered by the order they were added.
zIndex
For example, when we add elements like this:
vfx.add(a, { shader }); vfx.add(b, { shader, zIndex: -1 }); vfx.add(c, { shader, zIndex: 1 }); vfx.add(d, { shader, zIndex: 1 });
Then the rendering order will be b -> a -> c -> d.
b -> a -> c -> d
This PR solves #79 .
The latest updates on your projects. Learn more about Vercel for Git ↗︎
This PR addes
VFXProps.zIndex
, which allows users to specify the rendering order of the elements.VFX-JS renders elements in ascending order by the
zIndex
. Elements that have the samezIndex
will be rendered by the order they were added.For example, when we add elements like this:
Then the rendering order will be
b -> a -> c -> d
.This PR solves #79 .