Skip to content

The .vrmxs scene file ​

Generated from @vrmxg/scene (documentSchema) over the registry by scripts/docs-reference.mjs. Don't edit it: change the code and run npm run docs:reference.

A .vrmxs file is a scene: a saved node tree, as JSON. A set, a prefab and a sequence are all .vrmxs files. This page lists what the document schema checks. For the ideas behind the format, see The scene format.

The whole schema, as JSON Schema 2020-12: vrmxs-1.schema.json. It is generated from the node registry, so it checks every node type and behaviour listed in this reference. Unknown node types, props and behaviours pass the schema and are kept when a scene is read and written back; lint reports them as warnings.

The document ​

FieldRequiredTypeWhat
formatyesalways "vrmxs"
versionyesalways 1
idyesstringThe scene's id.
assetsarrayThe files the scene uses: see below.
nodesyesarrayThe nodes, as a flat list: see below. Order in the list is sibling order.
connectionsarraySignals wired to actions: see below.
settingsobjectScene settings (physics, personas and others), an open object.

Other top-level keys are allowed and kept. A sequence adds set (the set scene it films) and a sequence block; those are checked by @vrmxg/sequence's checkSequence, not by this schema.

An asset ​

One entry of assets. Nodes name an asset by its id.

FieldRequiredTypeWhat
idyesstringThe id nodes name it by.
typeyesvrmxa, vrmxw, vrmxi, vrmxs, glb, vrma, audio, textureWhat kind of file it is.
refyesstringPath relative to the project root.
sha256stringThe file's SHA-256, as 64 hex digits.

A node ​

One entry of nodes. Every node has these fields; its type adds the props listed under Node types.

FieldRequiredTypeWhat
idyesstringStable node id; "/" separates instance levels.
typeyesstringA node type from the registry.
parentstringThe parent node's id; none for a root.
namestringA display name.
transformobjectLocal transform: metres, Y up, right-handed, +Z forward (VRM 1.0 frame).
tagsarrayFree-form tags, each once.
propsobjectThe type's props.
behavioursarrayA list of { "use": "<behaviour>", …params }.
  • A node id matches ^[A-Za-z0-9_-]+(/[A-Za-z0-9_-]+)*$.
  • A node whose type takes an asset also has asset: the id of an entry in assets.

transform

Local transform: metres, Y up, right-handed, +Z forward (VRM 1.0 frame).

FieldTypeWhat
p3 numbersPosition (m).
q4 numbersRotation quaternion x, y, z, w.
s3 numbersScale.

overrides (an Instance node only)

Partial nodes keyed by inner node id ("hinge", or "frame/hinge" for nested prefabs), deep-merged over the prefab.

An override may set name, transform, props, behaviours, tags, and nothing else.

A connection ​

One entry of connections: when from emits signal, call runs on to.

FieldRequiredTypeWhat
fromyesstringStable node id; "/" separates instance levels.
signalyesstringA signal the from node has (its type's, or a behaviour's).
toyesstringStable node id; "/" separates instance levels.
callyesstringAn action the to node has.
argsobjectArguments for the action.

An example ​

The sample project's door prefab (content/sample/prefabs/door.vrmxs), in the canonical form @vrmxg/scene writes: one asset, node and connection per line, keys in a fixed order, so one edit is a one-line diff.

json
{
  "format": "vrmxs",
  "version": 1,
  "id": "prefab-door",
  "assets": [
    {"id":"frame-glb","type":"glb","ref":"props/door-frame.glb"},
    {"id":"panel-glb","type":"glb","ref":"props/door-panel.glb"}
  ],
  "nodes": [
    {"id":"door","type":"Node3D","name":"Door"},
    {"id":"frame","type":"Model","parent":"door","asset":"frame-glb"},
    {"id":"hinge","type":"RigidBody","parent":"door","transform":{"p":[-0.45,0,0]},"props":{"bodyType":"dynamic","mass":12},"behaviours":[{"locked":false,"openAngle":100,"use":"hinge"}]},
    {"id":"panel","type":"Collider","parent":"hinge","transform":{"p":[0.45,1,0]},"props":{"shape":"box","size":[0.88,2,0.04]}},
    {"id":"panel-model","type":"Model","parent":"hinge","asset":"panel-glb","transform":{"p":[0.45,1,0]},"props":{"castShadow":true,"colliders":"none"}},
    {"id":"trigger","type":"Area","parent":"door","transform":{"p":[0,1,0.8]},"props":{"shape":"box","size":[1.2,2,1]}}
  ],
  "connections": [
    {"from":"trigger","signal":"bodyEntered","to":"hinge","call":"open"},
    {"from":"trigger","signal":"bodyExited","to":"hinge","call":"close"}
  ]
}

The reference pages are generated from the engine's code.