Logo Mibo

ModelParts Module

Resolves content-pipeline models into drawable ModelPart slices.

Functions and values

Function or value Description

ofModel model

Full Usage: ofModel model

Parameters:
Returns: ModelPart[]

Resolves every mesh part of a content-pipeline model into a zero-copy ModelPart — shared buffers wrapped, per-part absolute bone captured, buffer offsets ready for meshSlice/instancedSlice. Cached per model instance: the ContentManager hands back the same Model per asset name, so the cache follows the model's lifetime and never keeps one alive.

Treat the returned array as read-only: it is the cached result shared by every caller, and mutating an element (for example swapping ModelPart.Material) corrupts it for the model's lifetime. Copy the array (Array.map) when you need adjusted parts.

Static models only — see the ModelPart remarks about skinned parts.

model : Model
Returns: ModelPart[]

Type something to start searching.