Api

Built-In Components

Public ECS component fields, scene JSON keys, defaults, and loader behavior.

Include Pattern

#include <ECS/components/Transform.hpp>
#include <ECS/components/MeshRenderer.hpp>
#include <ECS/components/Rigidbody.hpp>

Scene JSON uses the same component type names as the C++ structs.

Transform

FieldTypeDefaultJSON key
positionPosition { x, y, z }0,0,0position: [x, y, z]
rotationRotation { x, y, z, w }0,0,0,1rotation: [x, y, z, w]
scaleScale { x, y, z }1,1,1scale: [x, y, z]
parentEntityIDINVALID_ENTITYnumeric scene entity ID
childrenstd::vector<EntityID>emptyrebuilt by scene loader

parent must be numeric to be resolved. Empty string parents from editor output are ignored and become INVALID_ENTITY.

Camera

FieldDefaultLoader rule
fov60.0clamped to 1..179
aspectRatio16 / 9must be greater than 0
nearPlane0.1minimum 0.001
farPlane100.0 in struct, default factory fallback 1000.0at least nearPlane + 0.1

MeshRenderer

FieldJSON keyNotes
meshIDmeshMesh path, for example assets/monkey.obj.
materialIDsmaterialString or array of material IDs.
enabledenabledFactory defaults to true.

If no material is specified, the loader uses material names imported from the mesh. If none resolve, it falls back to basic.

Light

FieldJSON keyNotes
typetype0 Spot, 1 Directional, 2 Point.
colorcolor[r, g, b, a], clamped 0..1.
rangerangeMinimum 0.

ShadowProjector

FieldDefaultLoader rule
typeSpotProjector0 Spot, 1 Directional, 2 Point.
resolution1024minimum 16
nearPlane0.1minimum 0.001
farPlane100.0at least nearPlane + 0.1
fov90.0clamped to 1..179
aspectRatio1.0must be greater than 0
volumeExtents10,10,10[x, y, z], each minimum 0

Directional lights use volumeExtents for shadow volume sizing.

Animator

FieldJSON keyDefault
animationNameanimationNameempty
timetime0.0
enabledenabledtrue

Animation names often come from GLTF imports, for example assets/car_camera_movement.gltf_CameraAction.

Rigidbody

FieldDefaultJSON key / rule
typeDynamic"Static", "Dynamic", "Kinematic" or integer 0/1/2.
mass1.0minimum 0.
linearVelocity0,0,0[x, y, z].
drag0.0minimum 0.
useGravitytrueboolean.
lockRotation[3]all falseboolean, array, or object {x,y,z}.
lockMovement[3]all falseboolean, array, or object {x,y,z}.
freezeRotationfalsecompatibility alias for locking all rotation axes.

Physics bodies are created by the built-in physics system when an entity has Transform, Rigidbody, and one supported collider.

Colliders

BoxCollider

FieldDefaultRule
center[3]0,0,0[x, y, z]
size[3]1,1,1each minimum 0.001
friction0.5minimum 0
restitution0.0clamped 0..1
isTriggerfalseboolean

SphereCollider

FieldDefaultRule
center[3]0,0,0[x, y, z]
radius0.5minimum 0.001
friction0.5minimum 0
restitution0.0clamped 0..1
isTriggerfalseboolean

CapsuleCollider

FieldDefaultRule
center[3]0,0,0[x, y, z]
radius0.5minimum 0.001
height2.0at least radius * 2
friction0.5minimum 0
restitution0.0clamped 0..1
isTriggerfalseboolean

MeshCollider

FieldDefaultRule
convexfalseboolean
friction0.5minimum 0
restitution0.0clamped 0..1
isTriggerfalseboolean

For dynamic objects, prefer primitive colliders or convex mesh colliders.

Post-Processing Components

Post-processing is component-driven. A stack entity has PostProcessingSystem plus one or more effect components.

ComponentFields
PostProcessingSystemenabled = true, priority = 0
ACESenabled = true, exposure = 1.0
ColorAdjustmentenabled = false, brightness = 0, contrast = 1, saturation = 1, gamma = 1
Vignetteenabled = false, intensity = 0, radius = 0.75, softness = 0.45
ChromaticAberrationenabled = false, intensity = 0
FilmGrainenabled = false, intensity = 0
Bloomenabled = false, threshold = 1, intensity = 0, radius = 4, iterations = 5
ColorGradingLUTenabled = false, texture = "", intensity = 1, size = 16
AutoExposureenabled = false, targetLuminance = 0.18, minExposure = 0.25, maxExposure = 4, adaptationSpeed = 1

Loader clamps include:

ComponentClamp
ColorAdjustment.brightness-1..1
ColorAdjustment.contrast, saturation0..4
ColorAdjustment.gamma0.01..8
Vignette.intensity0..1
Vignette.radius0..1.5
Vignette.softness0.001..1
ChromaticAberration.intensity0..32
FilmGrain.intensity0..1
Bloom.threshold0..10
Bloom.intensity0..4
Bloom.radius0.25..16
Bloom.iterations1..8
ColorGradingLUT.intensity0..1
ColorGradingLUT.size2..64
AutoExposure.targetLuminance0.001..1
AutoExposure.minExposure, maxExposure0.01..16, swapped if max is less than min
AutoExposure.adaptationSpeed0..10