Skip to content

@modoki/engine / index / ModelPostprocessor

Interface: ModelPostprocessor ​

Resource Cache ​

description ​

description: string


filterMesh? ​

optional filterMesh?: (mesh) => boolean

Optional: filter which meshes to include (return false to skip)

Parameters ​

mesh ​

Mesh

Returns ​

boolean


fixupMesh ​

fixupMesh: (mesh) => void

Process a mesh after extraction — apply material fixes, etc.

Parameters ​

mesh ​

Mesh

Returns ​

void


name ​

name: string


recipeVersion? ​

optional recipeVersion?: number

Bumped by the postprocessor author whenever fixupMesh / resolveImportOptions semantics change in a way the model-convert cache must invalidate. Mixed into the cache hash so a recipe edit forces re-encode of every model bound to this postprocessor. Default 0 — but bump it the moment any fixup body changes, or the cache will silently serve stale processed GLBs.


resolveImportOptions? ​

optional resolveImportOptions?: (templates, materialDir) => object

Optional: resolve import options from loaded templates. Called during model import to produce excludeMeshes and materialOverrides. Templates have fixupMesh already applied.

Parameters ​

templates ​

Map<string, { geometry: BufferGeometry; material: Material; name: string; }>

materialDir ​

string

Returns ​

excludeMeshes? ​

optional excludeMeshes?: string[]

materialOverrides? ​

optional materialOverrides?: Record<string, string>

Built with Modoki.