Components
Components add features to definitions — visual details, interactive controls, sounds, lights, and more. They are listed in a definition’s components, keyed by component id.
Base Fields
Section titled “Base Fields”All components share these fields:
| Field | Type | Default | Description |
|---|---|---|---|
kind | string | — | Discriminator that selects the component type |
name | string | — | Component name (used for identification) |
transform | Transform | identity | Position, rotation, and scale |
parent | TransformReference | null | Parent transform in the model hierarchy |
enabled | bool | true | Whether the component is active |
Transform
Section titled “Transform”| Field | Type | Default | Description |
|---|---|---|---|
position | float[3] | [0, 0, 0] | Position offset [x, y, z] |
rotation | float[4] | [0, 0, 0, 1] | Rotation quaternion [x, y, z, w] |
scale | float[3] | [1, 1, 1] | Scale multiplier [x, y, z] |
Component Ids
Section titled “Component Ids”A component’s id is its name within the definition it belongs to, and it is what the Definition Editor labels the component with in its list. Set it in the Id field at the top of the component inspector; the editor starts you with one derived from the component’s name and rejects a rename that collides with another component in the same definition.
Ids are how a style rule names one specific component ("Decal#left-number-board") and how a
Relay script looks one up, so an id can only include
the same characters as a style class — see
Names Within a Definition.
Example
Section titled “Example”{ "kind": "Car", "components": [ { "kind": "Ladder", "height": 4.0, "name": "Ladder", "transform": { "position": [1.3, 0.0, 6.5], "rotation": [0.0, 0.0, 0.0, 1.0], "scale": [1.0, 1.0, 1.0] }, "parent": null, "enabled": true } ]}Availability
Section titled “Availability”Each component is available on certain definition types:
| Availability | Definitions |
|---|---|
| Car | Car definitions only (Car, SteamLocomotive, DieselLocomotive, etc.) |
| Prop | Prop definitions only |
| Truck | Truck definitions only (wheel trucks/bogies attached to a car) |
| Any | Car, prop, and truck definitions |
Component Reference
Section titled “Component Reference”| Kind | Availability | Description |
|---|---|---|
AggregateLoadModel | Car | Animated aggregate load visual (coal, gravel) |
AimConstraint | Car | Rotates a transform to aim at another (experimental) |
Bell | Car | Locomotive bell |
Chuff | Car | Steam exhaust chuff effect |
ClassLight | Car | Classification light |
Compressor | Car | Air compressor |
CylinderCock | Car | Steam cylinder cock effect |
Decal | Car | Text decal (road numbers, data, etc.) |
DetailModel | Car, Prop | Additional detail model |
DieselExhaust | Car | Diesel exhaust smoke |
Dynamo | Car | Electrical generator |
FireboxEffect | Car | Firebox glow effect |
Gauge | Car | Cab gauge instrument |
Headlight | Car | Headlight |
Horn | Car | Diesel horn |
Ladder | Any | Climbable ladder |
LightFixture | Any | Switchable light fixture |
LoadAnimation | Car | Animation triggered by load state |
LoadModel | Car | Load-dependent detail model |
LoadModelVolume | Car | Bounding volume for load models |
LoadTarget | Car | Interaction target for loading/unloading |
RectangleMapMask | Prop | Rectangular terrain mask |
CircleMapMask | Prop | Circular terrain mask |
MarkerLight | Car | Marker / tail light |
PrefabControl | Car | Built-in prefab control (brake stand, etc.) |
PropertyAnimation | Car | Animation posed by a car property (reverser, throttle) |
RadialControl | Car | Rotary cab control |
RendererGroup | Car, Truck, Prop | Material / style assignment for renderers |
Script | Any | Relay script attachment |
Seat | Any | Occupiable seat |
ToggleAnimation | Any | Toggle-activated animation |
ToggleControl | Car | Toggle cab control |
Whistle | Car | Steam whistle |
© 2026 Giraffe Lab LLC. All rights reserved.