Skip to content
Documentation

Supported Object types: 2d. Attach this component where needed. An Object can contain multiple named instances of this component.

Use Object components to understand definitions and instance overrides.

A Sprite component renders one Sprite resource. Its local dimensions, draw order, and animation frame are independent of Collider geometry.

Defaults below are normalized factory values from the component schema. Object presets, dimension, project units, and Scene overrides can supply different starting values. “Not stored” means the path is optional or runtime-derived. Read the property description to interpret it. Blank resource references assign no resource.

Writable means exposed for property writes through Logic. A No entry can still be editable in the Object Editor; runtime-only values cannot be authored. World-space lengths use metres, screen-space lengths use pixels, and rotations use degrees unless stated otherwise. The current loader refuses pixel-era projects. Use Units and Coordinates when comparing values.

Property and path Type Factory default Behavior Writable
Resource (resource) thing:sprite “” Sprite resource containing the image and frames. Blank draws no Sprite art; a Collider can still exist. No
Visible (visible) boolean true Whether the Sprite component draws. Hiding art does not disable the Object or Collider. Yes
Depth (depth) number 0 Scene ordering depth associated with the Sprite. Keep component ordering and Object placement ordering distinct. Yes
Layer (zIndex) number 0 Local draw order among components of this Object. Higher values draw in front. Yes
Frame (frame) number 0 Zero-based Sprite frame index. Normalization floors the value and clamps it to at least 0; the resource must contain the selected frame. Yes
Tint (tint) color “#ffffff” Multiplicative color tint. White preserves the source image colors. Yes
Flip Horizontally (flipX) boolean false Reflects the image horizontally; does not change Collider geometry. Yes
Flip Vertically (flipY) boolean false Reflects the image vertically; does not change Collider geometry. Yes
Default Animation Clip (defaultClip) text Not stored; see behavior Animation clip selected for initial playback. An absent clip leaves no named default animation. No
Rig (rig) thing:rig Not stored; see behavior Rig resource used by the Sprite. Requires a compatible rig and Sprite configuration. No
Rig Animation (rigAnimation) text Not stored; see behavior Initial animation name from the selected rig. Only meaningful when a rig is assigned. No
Local Position (transform.position) vec3 {“x”:0,“y”:0,“z”:0} Component-local position. Measured from the fixed Object origin. Current world-space coordinates use metres; screen-space coordinates use pixels. The project coordinate convention determines axis direction. Yes
Local Position X (transform.position.x) number 0 Component-local position on X. Measured from the fixed Object origin. Current world-space coordinates use metres; screen-space coordinates use pixels. The project coordinate convention determines axis direction. Yes
Local Position Y (transform.position.y) number 0 Component-local position on Y. Measured from the fixed Object origin. Current world-space coordinates use metres; screen-space coordinates use pixels. The project coordinate convention determines axis direction. Yes
Local Position Z (transform.position.z) number 0 Component-local position on Z. Measured from the fixed Object origin. Current world-space coordinates use metres; screen-space coordinates use pixels. The project coordinate convention determines axis direction. Yes
Local Size (transform.size) vec3 {“x”:1,“y”:1,“z”:0} Component-local extent. Current world-space dimensions use metres; screen-space dimensions use pixels. Visual size and collision size are separate. Yes
Width (transform.size.x) number 1 Component-local extent on X. Current world-space dimensions use metres; screen-space dimensions use pixels. Visual size and collision size are separate. Yes
Height (transform.size.y) number 1 Component-local extent on Y. Current world-space dimensions use metres; screen-space dimensions use pixels. Visual size and collision size are separate. Yes
Depth Size (transform.size.z) number 0 Component-local extent on Z. Current world-space dimensions use metres; screen-space dimensions use pixels. Visual size and collision size are separate. Yes
Local Rotation (transform.rotation) vec3 {“x”:0,“y”:0,“z”:0} Component-local rotation, in degrees. 2D uses Z rotation; 3D uses the project axis convention. No
Local Rotation (transform.rotation.z) number 0 Component-local rotation on Z, in degrees. 2D uses Z rotation; 3D uses the project axis convention. Yes

Myth Engine Documentation