Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / CullReason

Variable: CullReason ​

ts
const CullReason: {
  Streaming: 1;
  Distance: 2;
  Occlusion: 4;
  Lod: 8;
};

Defined in: render/culling.ts:10

Why the engine isn't drawing an object. Several systems hide things for their own reasons (out of streaming range, too far, behind a wall), and an object shows again only when none of them still wants it hidden. None of this is the entity's own visibility (Object3DRef.visibility), which stays what the game set: scripts, physics and audio carry on as before.

Type Declaration ​

NameTypeDefault valueDescriptionDefined in
Streaming11Its streaming cell is out of range.render/culling.ts:12
Distance22Beyond its cull distance, or smaller on screen than its LOD allows.render/culling.ts:14
Occlusion44Behind an occluder.render/culling.ts:16
Lod88A level of detail that isn't the current one.render/culling.ts:18