Skip to main content

Module protocol

Module protocol 

Source
Expand description

The editor’s wire format: page to worker messages, worker to page state mirrors, and the external agent request and response types.

Structs§

AnimationInfo
Animation state of the selected entity, for the inspector’s player section.
AudioSourceComponent
BeamComponent
A glowing volumetric beam between two world-space points, rendered as a bundle of parallel HDR lines so bloom widens it into a soft shaft.
CameraComponent
Primary camera component defining view projection.
CameraCullingMask
Camera-side counterpart to CullingMask. The renderer resolves this into EffectiveShading::culling_mask per frame and the mesh / skinned-mesh prepare passes skip any entity whose own CullingMask doesn’t intersect the camera’s mask. Cameras without this component render every entity (mask = !0).
CameraEntry
A camera entity available for multi-view tiling.
CharacterControllerComponent
First-person character controller with kinematic movement.
Checksum
A cheap digest of a subscribed slice at a stated version, for the third (drift-catching) layer of desync detection.
ColliderComponent
Collision shape component with physical material properties.
CommandLogEntry
One line in the command and event log: the cycle it happened in, whether it was a command or an event, a short label, and the human readable detail.
ComponentInfo
One registry entry as the agent discovers it. Schema and example are derived from the same type so they cannot drift from the wire format.
CullingMask
Bitmask of “culling layers” this entity belongs to. Independent from [RenderLayer] (which selects WORLD vs OVERLAY rendering). Cameras with a CameraCullingMask component skip entities whose (entity_layers & camera_mask) == 0. The default for entities without the component is bit 0 set (layer 0), and the default for cameras without the component is all bits set, so per-camera culling is purely opt-in.
DecalComponent
DeltaBatch
One frame’s emission. Contiguous per subscriber (next.base == prev.target), applied atomically. Ordered creates, then values, then deletes. Every frame emits exactly one batch while tracking is on, empty frames included.
EditorFlags
Editor-side state the page mirrors for toolbar and panel highlights.
EntityRef
A full generational entity handle as it crosses the agent boundary. Never a bare index: a reused slot reads as a different handle, not the same entity mutated, so a command or read against a stale handle fails rather than hitting the new occupant.
Environment
Global sky and environment controls, beyond what the UI buttons expose. Every field is optional; only the set ones are applied.
GenerationSettings
Procedural generation settings, mirrored from the worker’s resource so the panel edits round-trip.
KhronosEntry
A Khronos sample-asset entry for the browser grid.
LightComponent
Light source component.
LightningBoltComponent
A procedural lightning arc between two points, regenerated on an interval via midpoint displacement with optional forking branches.
MaterialComponent
PBR material definition following glTF 2.0 conventions.
MaterialEntry
A material registry entry for the materials panel.
MaterialSpec
A material to create or edit in the material library. name keys the material; every other field is optional and only the set ones are written, so editing leaves untouched fields (including textures) intact.
MorphMeshInfo
One mesh’s morph targets for the scene-wide morph panel: the entity id, a display name, and the current weight per target.
NavMeshAgent
Navigation agent component for navmesh-based movement.
OrthographicCamera
Orthographic projection settings following glTF conventions.
PaletteEntry
A greybox material palette swatch.
ParticleEmitterComponent
Particle emitter component.
PerspectiveCamera
Perspective projection settings following glTF conventions.
PolyhavenEntry
A Polyhaven entry for the browser grid.
PrefabLink
Prefab link shown in the inspector for instanced prefab roots.
RenderLayer
RenderSettingsPatch
A partial update to the world’s render and post-processing settings. Every field is optional; only the set ones change. Read the current values from get_editor_state (the render block), then send back just what you want to change.
RenderSettingsState
Every world-level rendering setting the inspector’s world sections edit, synced both ways as one block.
RigidBodyComponent
Rigid body component for physics simulation.
SceneStructure
Scene layer and chunk authoring data.
SelectedEntity
The selected entity’s full editable detail. Rotation is Euler degrees.
Snapshot
A full point-in-time view of the subscribed slice, stamped with the version the collection system assigned at its slot.
SnapshotEntity
One entity’s subscribed slice in a snapshot.
SubscriptionFilter
Which components and optionally which entities a subscription covers.
TextPropertiesComponent
TrailComponent
A fading ribbon traced by a point orbiting a center, rendered as a fading HDR polyline. Self-contained motion makes it a standalone showcase effect.
TreeRow
One row of the flattened scene tree, in depth-first order.
VfxAnimatorComponent
Drives a mesh entity’s transform and emissive material over its lifetime.
ViewportTile
One camera’s tile in the multi-view layout, in physical canvas pixels with the origin at the canvas top-left.
WaterComponent
A finite animated water surface anchored at the entity’s global transform.

Enums§

AgentCommand
The command set. Named variants exist where the engine does something beyond writing data (a cascade); the generic setters are the open end the registry absorbs new components through.
AgentRequest
Host to worker. Every variant carries a correlation id except the resync request, which is keyed by subscription.
AgentResponse
Worker to host.
AlphaMode
How alpha values are interpreted for transparency.
AnimationCommand
Animation playback control for the selected entity’s player.
AreaLightShape
Geometric shape of an area light’s emitter surface.
Atmosphere
Skybox and environment map selection.
AtmosphereKind
Skybox and environment map selection.
ClientMessage
Page to worker, over the app envelope field. Transport (init, resize, pointer, wheel, touch, keyboard) is the worker host’s control plane and is not part of this protocol.
ColliderShape
Collision shape geometry.
CommandLogKind
Whether a CommandLogEntry is a command that was applied or an event that was published.
ComponentKind
One optional component an entity may carry, the unit the inspector adds, removes, and tests by.
ComponentPatch
A whole-component value applied to an entity. These are the engine’s own component types; applying one writes it with the same setter the inspector would use by hand.
Delta
The five delta kinds. Value-changes come from change detection; structural changes from the freecs structural log. Never coalesced. origin is a correlation tag only and never gates whether a delta is applied.
EditorAction
Editor commands that need no payload beyond what they carry. Entity references are raw entity ids resolved by the worker.
GeneratorKind
A procedural greybox generator.
GetResult
A read against a stale handle returns this distinct outcome, never the new occupant’s data.
GizmoModeKind
GlobalScriptCommand
An ordered edit to the scene’s global script list.
LightKind
A light kind for the Add menu.
LightType
Type of light source. Directional, point, and spot follow glTF KHR_lights_punctual. Area is an emitter with spatial extent shaded with linearly transformed cosines.
PolyhavenCategory
Asset browser category for Polyhaven.
Projection
Projection mode for a camera.
RigidBodyType
ShapeKind
A parametric primitive shape used for spawning and block placement.
WorkerMessage
Worker to page, over the app envelope field. Ready and stats reporting belong to the worker host’s control plane.
WritePolicyInfo
Whether the generic component bag may carry a component.

Type Aliases§

CorrelationId
Correlation id for request/response matching and the optional delta origin tag. Unique per host process lifetime.
SubscriptionId
The host-assigned subscription handle. Unique for the host process lifetime, never reused.
Vec2
A 2D vector with f32 components.
Vec3
A 3D vector with f32 components.
Vec4
A 4D vector with f32 components.
Version
The collection system’s own monotonic batch counter. Not the freecs tick.