Skip to main content

onRender()

onRender: ()

Description

onRender() is called after onUpdate. This is the time for the rendering engine to issue any WebGL drawing commands. If an application is providing its own run loop and is relying on XR8.runPreRender() and XR8.runPostRender(), this method is not called and all rendering must be coordinated by the external run loop.

Parameters

None

Example

XR8.addCameraPipelineModule({
name: 'mycamerapipelinemodule',
onRender: () => {
// This is already done by XR8.Threejs.pipelineModule() but is provided here as an illustration.
XR8.Threejs.xrScene().renderer.render()
},
})