Skip to content

@modoki/engine / index / acquireModel

Function: acquireModel()

acquireModel(sceneId, glbRef, postprocessorId?): Promise<void>

Acquire a GLB model for a scene. Loads if not cached, refcounts if already cached. Accepts a guid or path; resolves before refcounting (cache keys are paths). When the model has been through the LOD pipeline (modelCache.lodPaths present), load each LOD GLB instead of the source — the build tree-shaker drops the source GLB in favor of the derived LODs, so fetching the source path would 404 on device. Mirrors fetchMeshAsset's LOD-aware branch.

Parameters

sceneId

number

glbRef

string

postprocessorId?

string = 'none'

Returns

Promise<void>

Built with Modoki.