Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / captureImpostor

Function: captureImpostor() ​

ts
function captureImpostor(
   renderer, 
   model, 
   size?): Impostor | null;

Defined in: terrain/impostor.ts:37

Render a model into impostor pictures with the game's own renderer. Restores the renderer's target and clear colour. Returns null when the renderer can't draw into a target (a stand-in in tests, a lost context).

Parameters ​

ParameterTypeDefault value
rendererEcsRendererundefined
modelObject3Dundefined
sizenumber256

Returns ​

Impostor | null