Builtin Library
README.md
ecs.Transform
Component spec for ecs.Transform, which maps to the native Transform — an entity's position, rotation, and scale. Transform is always present on an entity, so it is read and written through ecs.get / ecs.set (the generic insert/remove verbs do not apply). Each field is a single Vec3 or Quat passed through verbatim.
Fields
position: { x, y, z }?— translation.rotation: { x, y, z, w }?— quaternion.scale: { x, y, z }?
Types
EcsVec3 = { x: number, y: number, z: number }EcsQuat = { x: number, y: number, z: number, w: number }
Usage
ecs.set(id, ecs.Transform{ position = { x = 0, y = 1, z = 0 } })