Variable: DepthOccludable
constDepthOccludable:Component<{mode: {default:string;enum: {HardOcclusion:string;MinMaxSoftOcclusion:string;SoftOcclusion:string; };type:Enum; }; }>
Defined in: packages/core/src/depth/depth-occludable.ts:37
Component for entities that should be occluded by real-world depth. Add this component to entities that should be hidden when behind real-world surfaces. NOTE: The depth occlusion feature may not be compatible with custom shaders.
Example
ts
// Create an entity with soft occlusion (default)
const entity = world.createTransformEntity(mesh);
entity.addComponent(DepthOccludable);
// Create an entity with hard occlusion (no blur)
entity.addComponent(DepthOccludable, { mode: OcclusionShadersMode.HardOcclusion });