Constructor
new RenderCollector()
Creates a new RenderCollector instance. In most cases, RenderCollector does not need to be created manually, as Scene will automatically create one. See Scene#collector.
Members
lightingNeedsUpdate :boolean
Setting this property to true
indicates the lighting data needs to be updated. Lighting data updates are triggered by the RenderCollector#traverseAndCollect method.
- boolean
- Default Value
- false
skeletonNeedsUpdate :boolean
Setting this property to true
indicates all skeletons in the scene should be updated. Skeleton updates are triggered by the RenderCollector#traverseAndCollect method.
- boolean
- Default Value
- false
Methods
checkVisibility(object, camera) → {boolean}
Visibility checking function called during scene traversal. Determines whether an object should be included in the render queue. Can be overridden to implement custom culling logic (LOD, distance, etc.).
Name | Type | Description |
---|---|---|
object | Object3D | The object to test for visibility. |
camera | Camera | The camera to test against. |
True if the object should be rendered, false to cull it.
- Type:
- boolean
// Custom visibility check that always returns true
collector.checkVisibility = function(object, camera) {
return true;
};
getRenderQueue(camera) → {RenderQueue}
Get the RenderQueue for the scene and camera. If the RenderQueue for the camera does not exist, it will be created.
Name | Type | Description |
---|---|---|
camera | Camera | The render camera. |
The target render queue.
- Type:
- RenderQueue
getRenderStates(camera) → {RenderStates}
Get the RenderStates for the scene and camera. If the RenderStates for the camera does not exist, it will be created.
Name | Type | Description |
---|---|---|
camera | Camera | The render camera. |
The target render states.
- Type:
- RenderStates
traverseAndCollect(scene, camera) → {RenderQueue}
Traverse the scene and collect all renderable objects, lights and skeletons. This method will update the RenderQueue and RenderStates for the camera.
Name | Type | Description |
---|---|---|
scene | Scene | The scene to traverse. |
camera | Camera | The camera to collect renderable objects for. |
The collected render queue.
- Type:
- RenderQueue