ModelAssetInstantiate extension

instantiate and its helpers, added to ModelAsset.

Named and public — unlike the parts in the gltf/OBJ/f3d decoders, where the extension only needs to be visible to itself — because instantiate is called from other libraries throughout this repo, and a private extension is invisible outside the library that declares it no matter how many files export that library.

on

Methods

instantiate(Scene scene, {SceneNode? parent, String? name, bool shareMaterials = true}) ModelInstance

Available on ModelAsset, provided by the ModelAssetInstantiate extension

Adds this model to scene and returns the instance.