Controls whether this object should be culled when out of view. When true, the object will not be rendered if its bounds are outside the visible area.
Controls whether children of this container can be culled. When false, skips recursive culling checks for better performance.
const container = new Container();
// Enable container culling
container.cullable = true;
// Disable child culling for performance
container.cullableChildren = false;
// Children will always render if container is visible
container.addChild(sprite1, sprite2, sprite3);
Custom shape used for culling calculations instead of object bounds. Defined in local space coordinates relative to the object.
Setting this to a custom Rectangle allows you to define a specific area for culling, which can improve performance by avoiding expensive bounds calculations.
const container = new Container();
// Define custom culling boundary
container.cullArea = new Rectangle(0, 0, 800, 600);
// Reset to use object bounds
container.cullArea = null;
The CullingMixin interface provides properties and methods for managing culling behavior of a display object. Culling is the process of determining whether an object should be rendered based on its visibility within the current view or frame.
Key Features:
Example