Log inGet started
Package

ecs.module

Newest version

This package holds more than this page lists. See all of its files in its world.

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. 0 leaves the entity visible at any distance.

Usage

ecs.insertSync(id, ecs.VisibilityRange{ near = 0, far = 120 })
ecs.set(id, ecs.VisibilityRange{ far = 300 })