Class: Culler

Culler

The Culler class is responsible for managing and culling containers.

Culled containers will not be rendered, and their children will not be processed. This can be useful for performance optimization when dealing with large scenes.

new Culler ()

The Culler class is responsible for managing and culling containers.

Example

 import { Culler, Container } from 'pixi.js';

 const culler = new Culler();
 const stage = new Container();

 ... set up stage ...

 culler.cull(stage, { x: 0, y: 0, width: 800, height: 600 });
 renderer.render(stage);

Members

shared static

A shared instance of the Culler class.

Methods

cull (container, view, skipUpdateTransform)

Culls the children of a specific container based on the given view. This will also cull items that are not being explicitly managed by the culler.

Name Type Default Description
container Container

The container to cull.

view RectangleLike

The view rectangle.

skipUpdateTransform boolean true

Whether to skip updating the transform.