CullerRenderer
A base renderer to determine visibility on screen.
Extended by
Implements
Configurable
<CullerRendererConfigManager
,CullerRendererConfig
>
Properties
buffer
buffer:
Uint8Array
The buffer when the result of the visibility check is stored.
bufferSize
bufferSize:
number
=1
The size of the buffer where the result of the visibility check is stored.
components
components:
Components
The components instance to which this renderer belongs.
config
config:
CullerRendererConfigManager
Implementation of
enabled
enabled:
boolean
=true
Whether this renderer is active or not. If not, it won't render anything.
isSetup
isSetup:
boolean
=false
Implementation of
needsUpdate
needsUpdate:
boolean
=false
Needs to check whether there are objects that need to be hidden or shown. You can bind this to the camera movement, to a certain interval, etc.
onDisposed
readonly
onDisposed:Event
<string
>
onSetup
readonly
onSetup:Event
<unknown
>
Implementation of
onViewUpdated
readonly
onViewUpdated:Event
<any
> |AsyncEvent
<any
>
Fires after making the visibility check to the meshes. It lists the meshes that are currently visible, and the ones that were visible just before but not anymore.
preventUpdate
preventUpdate:
boolean
=false
Flag to indicate if the renderer shouldn't update the visibility.
renderTarget
renderTarget:
WebGLRenderTarget
<Texture
>
The render target used to render the visibility scene.
renderer
readonly
renderer:WebGLRenderer
The THREE.js renderer used to make the visibility test.
world
readonly
world:World
The world instance to which this renderer belongs.
Methods
dispose()
dispose():
void
Returns
void
updateVisibility()
updateVisibility(
force
?):Promise
<void
>
The function that the culler uses to reprocess the scene. Generally it's better to call needsUpdate, but you can also call this to force it.
Parameters
Parameter | Type | Description |
---|---|---|
force ? | boolean | if true, it will refresh the scene even if needsUpdate is |
not true. |
Returns
Promise
<void
>