Skip to content

ModelOpts

Defined in: packages/threeplay/src/plugins/assets/types.ts:14

Options of model().

optional anim?: string

Defined in: packages/threeplay/src/plugins/assets/types.ts:22

Animation to start right away (looping).


optional faceForward?: boolean

Defined in: packages/threeplay/src/plugins/assets/types.ts:28

glTF assets face +Z while the engine’s forward is −Z. With true (the default) the model root is turned 180° around Y so the model faces the object’s forward(). Use false for models already authored facing −Z.


optional groundAlign?: boolean

Defined in: packages/threeplay/src/plugins/assets/types.ts:20

Move the model so its bounding box bottom sits at y=0 (default false).


optional scale?: number

Defined in: packages/threeplay/src/plugins/assets/types.ts:16

Uniform scale applied to the model’s root (default 1).


optional shadows?: boolean

Defined in: packages/threeplay/src/plugins/assets/types.ts:18

Cast and receive shadows on every mesh (default true).


optional uniqueMaterials?: boolean

Defined in: packages/threeplay/src/plugins/assets/types.ts:35

Clone the materials for this instance up front (default false: instances share the template’s materials, which is cheaper). Not needed to tint or fade one instance: color() and opacity() on a model clone its materials automatically. The clones are disposed when the object is destroyed.