Builtin Library
- ..
- EcsAudioListener.module
- EcsAudioSource.module
- EcsCamera.module
- EcsCollider.module
- EcsCollisionGroups.module
- EcsFluidForces.module
- EcsForce.module
- EcsGravityField.module
- EcsLiftSurface.module
- EcsLight.module
- EcsMaterial.module
- EcsMesh.module
- EcsMorphWeights.module
- EcsPhysics.module
- EcsPhysicsJoint.module
- EcsPhysicsLatch.module
- EcsPlaneHold.module
- EcsPlayerOwned.module
- EcsRetargetProfile.module
- EcsShaderData.module
- EcsShaftNetwork.module
- EcsSkeleton.module
- EcsSky.module
- EcsSoftBody.module
- EcsTessellation.module
- EcsTransform.module
- EcsTransformConstraints.module
- EcsVisibilityRange.module
- EcsWheelCollider.module
- README.md1.7 KB
- init.luau2.2 KB
README.md
ecs.components
Component-spec namespace — re-exports every native ECS component spec under ecs.components.<Name>. Each spec describes one native component: its public name, the Rust type it maps to, and the per-field entries the generic ecs verbs use to build and read Rust-shaped values. The sibling ecs module registers each spec to mint its typed constructor (ecs.Mesh, ecs.Transform, ...).
Spec shape
Each spec is a table with:
name— the public component name ("Mesh").rust— the native type it maps to ("MeshInstance").entries— per-field descriptors{ luau, rust?, kind, expand? }.luauis the camelCase field a caller writes;rustis the underlying snake_case field;kindis the conversion kind (string,bool,number,vec3,meshHandle,materialHandle,textureHandle,assetRef,struct);expandlists the rust scalars avec3expands into.behavior(id) -> { method = fn }— optional per-entity imperative methods theecs.gethandle exposes.static = { fn = function(id, ...) end }— optional component-level operations that take an explicit entity id.
Members
Mesh, Material, Transform, Physics, Light, Collider, CollisionGroups, PlaneHold, GravityField, Force, FluidForces, LiftSurface, PhysicsJoint, PhysicsLatch, WheelCollider, ShaftNetwork, SoftBody, AudioSource, Camera, Sky, PlayerOwned, Skeleton, TransformConstraints. Each lives in its own .module/ folder.
Usage
local Specs = require("modules.api.engine.ecs.components")
for name, spec in Specs do
print(name, spec.rust)
end