AssetRef
Since 0.6
Fields
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
kind | AssetKind | yes | glb, texture, material, audio, envmap, splat, shader | ||
path | string | yes | The file, relative to the scene file's folder, or a built-in. Built-in meshes (kind "glb"), each centred on the origin and 1 m across unless said: "builtin:cube" (1 m cube), "builtin:sphere" (radius 0.5), "builtin:capsule" (radius 0.5, 2 m tall), "builtin:plane" (1×1 m on XZ, facing +Y), "builtin:cylinder" (radius 0.5, 1 m tall, Y-up), "builtin:cone" (base radius 0.5 at y -0.5, tip at y +0.5). Scale the entity to size them. Any builtin: name other than these meshes is refused (asset-builtin-unknown); the engine ships no sounds. | ||
bounds | Aabb | no | |||
triangles | number | no | |||
rig | RigKind | no | none, humanoid, custom | ||
clips | string[] | no | |||
provenance | AssetProvenance | no | |||
import | AssetImport | no | Present when this asset came from a model file the author imported. bounds and triangles are then the importer's measurements OF THAT FILE, in the file's own units and axes, before the import transform — so a collider sized from bounds has to transform them first. | ||
forward | ModelForward | no | -Z | +Z, -Z, +X, -X | Which way this model's nose points once the file is in the engine's axes. The runtime turns it onto the entity's forward, which is -Z, so an entity's -Z IS the nose whatever the model was authored along. Defaults to "-Z", which is no rotation at all. This is not import.forwardAxis said twice. That one names the FILE's own depth axis so the file's basis can be turned onto the engine's, it lands the model on glTF's +Z front, and it lives inside an import record that also demands a source path and the file's SHA-256. This one is a statement about the MODEL, it is the half-turn (or quarter-turn) between glTF's front and the engine's forward, and an asset with no import record at all can carry it. They compose: the import transform runs first, forward turns what comes out. See docs/CONVENTIONS.md. Meaningful only on a glb asset; the asset-forward-invalid rule refuses it anywhere else. |
skeleton | AssetSkeleton | no | The skin this model carries, as the importer read it. Written by asset.import for a skinned glTF so an animator's IK chains, look-at and pelvis can be checked against real bone names before the scene runs. Absent on a model with no skin. | ||
clipDurations | object | no | Clip name → length in seconds, one entry per name in clips, as the importer read them. What a one-shot's blendOut or an event's at is measured against. |