Builtin Library
README.md
ecs.VisibilityRange
Spec for the VisibilityRange component, which maps to the native VisibilityRange. Restricts an entity to a band of camera distances, so it is drawn only while the camera is inside that band.
Fields
near— closest camera distance at which the entity is drawn.far— furthest camera distance at which the entity is drawn.0leaves the entity visible at any distance.
Usage
ecs.insertSync(id, ecs.VisibilityRange{ near = 0, far = 120 })
ecs.set(id, ecs.VisibilityRange{ far = 300 })