Custom Render Function

Sometimes you'll need to replace the default Lunchbox render function with your own. To do that, import and call setCustomRender, passing your new render function:

import { setCustomRender } from 'lunchboxjs'

setCustomRender((options) => {
    options = {
        app,        // The Lunchbox app
        scene,      // The current scene
        renderer,   // The current renderer
        camera,     // The current camera

To remove your custom render function and fall back to Lunchbox's default, call clearCustomRender:

import { clearCustomRender } from 'lunchboxjs'


See this example for an example that manually toggles an EffectComposer for postprocessing.