64Candidates denseAsIds(std::span<const Entity> dense) {
65 static_assert(
sizeof(Entity) ==
sizeof(std::uint32_t),
66 "a dense entity array is only an id array while these agree");
67 return std::span<const std::uint32_t>(
68 reinterpret_cast<const std::uint32_t*
>(dense.data()), dense.size());
74 if (std::strcmp(name,
"Billboard") == 0) {
75 return [®istry](std::uint32_t raw) ->
void* {
79 if (std::strcmp(name,
"BitmapText") == 0) {
80 return [®istry](std::uint32_t raw) ->
void* {
84 if (std::strcmp(name,
"BoxCollider2D") == 0) {
85 return [®istry](std::uint32_t raw) ->
void* {
89 if (std::strcmp(name,
"BoxCollider3D") == 0) {
90 return [®istry](std::uint32_t raw) ->
void* {
94 if (std::strcmp(name,
"Camera") == 0) {
95 return [®istry](std::uint32_t raw) ->
void* {
99 if (std::strcmp(name,
"Canvas") == 0) {
100 return [®istry](std::uint32_t raw) ->
void* {
104 if (std::strcmp(name,
"CapsuleCollider2D") == 0) {
105 return [®istry](std::uint32_t raw) ->
void* {
109 if (std::strcmp(name,
"CapsuleCollider3D") == 0) {
110 return [®istry](std::uint32_t raw) ->
void* {
114 if (std::strcmp(name,
"CharacterController3D") == 0) {
115 return [®istry](std::uint32_t raw) ->
void* {
119 if (std::strcmp(name,
"Children") == 0) {
120 return [®istry](std::uint32_t raw) ->
void* {
124 if (std::strcmp(name,
"CircleCollider2D") == 0) {
125 return [®istry](std::uint32_t raw) ->
void* {
129 if (std::strcmp(name,
"ContentRect") == 0) {
130 return [®istry](std::uint32_t raw) ->
void* {
134 if (std::strcmp(name,
"ConvexCollider3D") == 0) {
135 return [®istry](std::uint32_t raw) ->
void* {
139 if (std::strcmp(name,
"Draggable") == 0) {
140 return [®istry](std::uint32_t raw) ->
void* {
144 if (std::strcmp(name,
"DragonBonesAnimation") == 0) {
145 return [®istry](std::uint32_t raw) ->
void* {
149 if (std::strcmp(name,
"FlexContainer") == 0) {
150 return [®istry](std::uint32_t raw) ->
void* {
154 if (std::strcmp(name,
"GroupOpacity") == 0) {
155 return [®istry](std::uint32_t raw) ->
void* {
159 if (std::strcmp(name,
"Impostor") == 0) {
160 return [®istry](std::uint32_t raw) ->
void* {
164 if (std::strcmp(name,
"Interactable") == 0) {
165 return [®istry](std::uint32_t raw) ->
void* {
169 if (std::strcmp(name,
"LODGroup") == 0) {
170 return [®istry](std::uint32_t raw) ->
void* {
174 if (std::strcmp(name,
"Light") == 0) {
175 return [®istry](std::uint32_t raw) ->
void* {
179 if (std::strcmp(name,
"LightProbeVolume") == 0) {
180 return [®istry](std::uint32_t raw) ->
void* {
184 if (std::strcmp(name,
"MeshCollider3D") == 0) {
185 return [®istry](std::uint32_t raw) ->
void* {
189 if (std::strcmp(name,
"MeshInstances") == 0) {
190 return [®istry](std::uint32_t raw) ->
void* {
194 if (std::strcmp(name,
"MeshLightmap") == 0) {
195 return [®istry](std::uint32_t raw) ->
void* {
199 if (std::strcmp(name,
"MeshMorph") == 0) {
200 return [®istry](std::uint32_t raw) ->
void* {
204 if (std::strcmp(name,
"MeshRenderer") == 0) {
205 return [®istry](std::uint32_t raw) ->
void* {
209 if (std::strcmp(name,
"MeshSkin") == 0) {
210 return [®istry](std::uint32_t raw) ->
void* {
214 if (std::strcmp(name,
"Occluder") == 0) {
215 return [®istry](std::uint32_t raw) ->
void* {
219 if (std::strcmp(name,
"Parent") == 0) {
220 return [®istry](std::uint32_t raw) ->
void* {
224 if (std::strcmp(name,
"ParticleCollider") == 0) {
225 return [®istry](std::uint32_t raw) ->
void* {
229 if (std::strcmp(name,
"ParticleEmitter") == 0) {
230 return [®istry](std::uint32_t raw) ->
void* {
234 if (std::strcmp(name,
"ParticleForceField") == 0) {
235 return [®istry](std::uint32_t raw) ->
void* {
239 if (std::strcmp(name,
"PlanarReflection") == 0) {
240 return [®istry](std::uint32_t raw) ->
void* {
244 if (std::strcmp(name,
"ReflectionProbe") == 0) {
245 return [®istry](std::uint32_t raw) ->
void* {
249 if (std::strcmp(name,
"RigidBody2D") == 0) {
250 return [®istry](std::uint32_t raw) ->
void* {
254 if (std::strcmp(name,
"RigidBody3D") == 0) {
255 return [®istry](std::uint32_t raw) ->
void* {
259 if (std::strcmp(name,
"SegmentCollider2D") == 0) {
260 return [®istry](std::uint32_t raw) ->
void* {
264 if (std::strcmp(name,
"ShadowCaster2D") == 0) {
265 return [®istry](std::uint32_t raw) ->
void* {
269 if (std::strcmp(name,
"ShapeRenderer") == 0) {
270 return [®istry](std::uint32_t raw) ->
void* {
274 if (std::strcmp(name,
"SortingGroup") == 0) {
275 return [®istry](std::uint32_t raw) ->
void* {
279 if (std::strcmp(name,
"SphereCollider3D") == 0) {
280 return [®istry](std::uint32_t raw) ->
void* {
284 if (std::strcmp(name,
"SpineAnimation") == 0) {
285 return [®istry](std::uint32_t raw) ->
void* {
289 if (std::strcmp(name,
"SpringBone") == 0) {
290 return [®istry](std::uint32_t raw) ->
void* {
294 if (std::strcmp(name,
"SpringBoneCollider") == 0) {
295 return [®istry](std::uint32_t raw) ->
void* {
299 if (std::strcmp(name,
"Sprite") == 0) {
300 return [®istry](std::uint32_t raw) ->
void* {
304 if (std::strcmp(name,
"SpriteMask") == 0) {
305 return [®istry](std::uint32_t raw) ->
void* {
309 if (std::strcmp(name,
"TilemapLayer") == 0) {
310 return [®istry](std::uint32_t raw) ->
void* {
314 if (std::strcmp(name,
"TrailRenderer") == 0) {
315 return [®istry](std::uint32_t raw) ->
void* {
319 if (std::strcmp(name,
"Transform") == 0) {
320 return [®istry](std::uint32_t raw) ->
void* {
324 if (std::strcmp(name,
"UIInteraction") == 0) {
325 return [®istry](std::uint32_t raw) ->
void* {
329 if (std::strcmp(name,
"UIMask") == 0) {
330 return [®istry](std::uint32_t raw) ->
void* {
334 if (std::strcmp(name,
"UINode") == 0) {
335 return [®istry](std::uint32_t raw) ->
void* {
339 if (std::strcmp(name,
"UIScroll") == 0) {
340 return [®istry](std::uint32_t raw) ->
void* {
344 if (std::strcmp(name,
"UIVisual") == 0) {
345 return [®istry](std::uint32_t raw) ->
void* {
349 if (std::strcmp(name,
"Velocity") == 0) {
350 return [®istry](std::uint32_t raw) ->
void* {
358 if (std::strcmp(name,
"Billboard") == 0) {
363 if (std::strcmp(name,
"BitmapText") == 0) {
368 if (std::strcmp(name,
"BoxCollider2D") == 0) {
373 if (std::strcmp(name,
"BoxCollider3D") == 0) {
378 if (std::strcmp(name,
"Camera") == 0) {
383 if (std::strcmp(name,
"Canvas") == 0) {
388 if (std::strcmp(name,
"CapsuleCollider2D") == 0) {
393 if (std::strcmp(name,
"CapsuleCollider3D") == 0) {
398 if (std::strcmp(name,
"CharacterController3D") == 0) {
403 if (std::strcmp(name,
"Children") == 0) {
408 if (std::strcmp(name,
"CircleCollider2D") == 0) {
413 if (std::strcmp(name,
"ContentRect") == 0) {
418 if (std::strcmp(name,
"ConvexCollider3D") == 0) {
423 if (std::strcmp(name,
"Draggable") == 0) {
428 if (std::strcmp(name,
"DragonBonesAnimation") == 0) {
433 if (std::strcmp(name,
"FlexContainer") == 0) {
438 if (std::strcmp(name,
"GroupOpacity") == 0) {
443 if (std::strcmp(name,
"Impostor") == 0) {
448 if (std::strcmp(name,
"Interactable") == 0) {
453 if (std::strcmp(name,
"LODGroup") == 0) {
458 if (std::strcmp(name,
"Light") == 0) {
463 if (std::strcmp(name,
"LightProbeVolume") == 0) {
468 if (std::strcmp(name,
"MeshCollider3D") == 0) {
473 if (std::strcmp(name,
"MeshInstances") == 0) {
478 if (std::strcmp(name,
"MeshLightmap") == 0) {
483 if (std::strcmp(name,
"MeshMorph") == 0) {
488 if (std::strcmp(name,
"MeshRenderer") == 0) {
493 if (std::strcmp(name,
"MeshSkin") == 0) {
498 if (std::strcmp(name,
"Occluder") == 0) {
503 if (std::strcmp(name,
"Parent") == 0) {
508 if (std::strcmp(name,
"ParticleCollider") == 0) {
513 if (std::strcmp(name,
"ParticleEmitter") == 0) {
518 if (std::strcmp(name,
"ParticleForceField") == 0) {
523 if (std::strcmp(name,
"PlanarReflection") == 0) {
528 if (std::strcmp(name,
"ReflectionProbe") == 0) {
533 if (std::strcmp(name,
"RigidBody2D") == 0) {
538 if (std::strcmp(name,
"RigidBody3D") == 0) {
543 if (std::strcmp(name,
"SegmentCollider2D") == 0) {
548 if (std::strcmp(name,
"ShadowCaster2D") == 0) {
553 if (std::strcmp(name,
"ShapeRenderer") == 0) {
558 if (std::strcmp(name,
"SortingGroup") == 0) {
563 if (std::strcmp(name,
"SphereCollider3D") == 0) {
568 if (std::strcmp(name,
"SpineAnimation") == 0) {
573 if (std::strcmp(name,
"SpringBone") == 0) {
578 if (std::strcmp(name,
"SpringBoneCollider") == 0) {
583 if (std::strcmp(name,
"Sprite") == 0) {
588 if (std::strcmp(name,
"SpriteMask") == 0) {
593 if (std::strcmp(name,
"TilemapLayer") == 0) {
598 if (std::strcmp(name,
"TrailRenderer") == 0) {
603 if (std::strcmp(name,
"Transform") == 0) {
608 if (std::strcmp(name,
"UIInteraction") == 0) {
613 if (std::strcmp(name,
"UIMask") == 0) {
618 if (std::strcmp(name,
"UINode") == 0) {
623 if (std::strcmp(name,
"UIScroll") == 0) {
628 if (std::strcmp(name,
"UIVisual") == 0) {
633 if (std::strcmp(name,
"Velocity") == 0) {
642 if (std::strcmp(name,
"Billboard") == 0)
return true;
643 if (std::strcmp(name,
"BitmapText") == 0)
return true;
644 if (std::strcmp(name,
"BoxCollider2D") == 0)
return true;
645 if (std::strcmp(name,
"BoxCollider3D") == 0)
return true;
646 if (std::strcmp(name,
"Camera") == 0)
return true;
647 if (std::strcmp(name,
"Canvas") == 0)
return true;
648 if (std::strcmp(name,
"CapsuleCollider2D") == 0)
return true;
649 if (std::strcmp(name,
"CapsuleCollider3D") == 0)
return true;
650 if (std::strcmp(name,
"CharacterController3D") == 0)
return true;
651 if (std::strcmp(name,
"Children") == 0)
return true;
652 if (std::strcmp(name,
"CircleCollider2D") == 0)
return true;
653 if (std::strcmp(name,
"ContentRect") == 0)
return true;
654 if (std::strcmp(name,
"ConvexCollider3D") == 0)
return true;
655 if (std::strcmp(name,
"Draggable") == 0)
return true;
656 if (std::strcmp(name,
"DragonBonesAnimation") == 0)
return true;
657 if (std::strcmp(name,
"FlexContainer") == 0)
return true;
658 if (std::strcmp(name,
"GroupOpacity") == 0)
return true;
659 if (std::strcmp(name,
"Impostor") == 0)
return true;
660 if (std::strcmp(name,
"Interactable") == 0)
return true;
661 if (std::strcmp(name,
"LODGroup") == 0)
return true;
662 if (std::strcmp(name,
"Light") == 0)
return true;
663 if (std::strcmp(name,
"LightProbeVolume") == 0)
return true;
664 if (std::strcmp(name,
"MeshCollider3D") == 0)
return true;
665 if (std::strcmp(name,
"MeshInstances") == 0)
return true;
666 if (std::strcmp(name,
"MeshLightmap") == 0)
return true;
667 if (std::strcmp(name,
"MeshMorph") == 0)
return true;
668 if (std::strcmp(name,
"MeshRenderer") == 0)
return true;
669 if (std::strcmp(name,
"MeshSkin") == 0)
return true;
670 if (std::strcmp(name,
"Occluder") == 0)
return true;
671 if (std::strcmp(name,
"Parent") == 0)
return true;
672 if (std::strcmp(name,
"ParticleCollider") == 0)
return true;
673 if (std::strcmp(name,
"ParticleEmitter") == 0)
return true;
674 if (std::strcmp(name,
"ParticleForceField") == 0)
return true;
675 if (std::strcmp(name,
"PlanarReflection") == 0)
return true;
676 if (std::strcmp(name,
"ReflectionProbe") == 0)
return true;
677 if (std::strcmp(name,
"RigidBody2D") == 0)
return true;
678 if (std::strcmp(name,
"RigidBody3D") == 0)
return true;
679 if (std::strcmp(name,
"SegmentCollider2D") == 0)
return true;
680 if (std::strcmp(name,
"ShadowCaster2D") == 0)
return true;
681 if (std::strcmp(name,
"ShapeRenderer") == 0)
return true;
682 if (std::strcmp(name,
"SortingGroup") == 0)
return true;
683 if (std::strcmp(name,
"SphereCollider3D") == 0)
return true;
684 if (std::strcmp(name,
"SpineAnimation") == 0)
return true;
685 if (std::strcmp(name,
"SpringBone") == 0)
return true;
686 if (std::strcmp(name,
"SpringBoneCollider") == 0)
return true;
687 if (std::strcmp(name,
"Sprite") == 0)
return true;
688 if (std::strcmp(name,
"SpriteMask") == 0)
return true;
689 if (std::strcmp(name,
"TilemapLayer") == 0)
return true;
690 if (std::strcmp(name,
"TrailRenderer") == 0)
return true;
691 if (std::strcmp(name,
"Transform") == 0)
return true;
692 if (std::strcmp(name,
"UIInteraction") == 0)
return true;
693 if (std::strcmp(name,
"UIMask") == 0)
return true;
694 if (std::strcmp(name,
"UINode") == 0)
return true;
695 if (std::strcmp(name,
"UIScroll") == 0)
return true;
696 if (std::strcmp(name,
"UIVisual") == 0)
return true;
697 if (std::strcmp(name,
"Velocity") == 0)
return true;
A mesh that turns to whoever looks at it.
Camera component for rendering viewpoints.
Canvas component for 2D game resolution management.
The shapes that give a flat body its extent.
The rectangle a piece of world content occupies: a size, and the point of it the entity's transform s...
Pointer-drag configuration.
A DragonBones armature on an entity.
Entity utilities for the ECS system.
Hierarchy components for parent-child relationships.
A picture of a mesh, taken from many directions, drawn in its place once it is small.
The cheaper geometry that may stand in for a MeshRenderer once it is small.
2D light source component for the Lit material domain.
Arbitrary-geometry 2D mesh renderable (deformed sprites, polygons, water surfaces,...
A box sight does not pass through, so what stands behind it is not drawn. ShadowCaster2D answers wher...
A shape particles bounce off without any physics: a signed distance a compute kernel can answer per p...
A scene-placed force zone that pushes every world-space particle near it.
What a shiny surface standing HERE reflects, when the sky is not it. LightProbeVolume answers the sam...
Central ECS registry for entity and component management.
A body the flat world simulates.
A body the 3D world simulates, and the shapes that give it extent.
Marks an entity as a 2D shadow occluder for the Lit lighting path.
Makes a subtree sort as ONE unit against the rest of the scene.
Spine skeletal animation component.
Secondary motion for a chain of bones: hair, tails, cords, cloth edges.
Turns this entity's Sprite into a stencil the sprites drawn after it can be cut by.
2D sprite rendering component
Tilemap layer ECS component (editor-facing metadata).
World-space motion trail renderable (sword swipes, projectile/dash streaks, ribbon effects).
Velocity component for physics simulation.
Central container for all entities and components.
std::span< const Entity > entitiesWith() const
The entities that carry T, densely.
T * tryGet(Entity entity)
Tries to get a component from an entity.
ComponentAt engineComponentAt(ecs::Registry ®istry, const char *name)
CandidatesOf engineComponentCandidates(ecs::Registry ®istry, const char *name)
std::function< Candidates()> CandidatesOf
bool isEngineComponent(const char *name)
std::optional< std::span< const std::uint32_t > > Candidates
std::function< void *(std::uint32_t)> ComponentAt
static constexpr Entity fromRaw(u32 v)
Reconstructs an Entity from a raw packed value.
Turns the MeshRenderer beside it to face each view that draws it.
An axis-aligned box, sized in world units around the entity's origin.
Camera component for rendering viewpoints.
Canvas component for 2D game resolution management.
An upright capsule — the shape a character is.
A kinematic mover for a 3D player or NPC.
The rectangle of this entity's content, in its own units.
The convex hull of imported geometry — a shape a solver can push.
Fades an entity and everything under it, the way UINode.opacity fades a UI subtree.
Stands a card in for the MeshRenderer beside it once the object covers less than screenSize of the vi...
Stand-in geometry chosen by how much of the screen the object covers.
A box of baked irradiance: the light for what a bake cannot hold still.
A 2D light contributing to Lit-shaded materials.
Imported geometry, used as it is, for a level to collide against.
Many placements of the one mesh a MeshRenderer draws, as ONE renderable.
Where a MeshRenderer's BAKED light comes from: the atlas, and the rectangle of it this object occupie...
What SHAPE a MeshRenderer is in: how far it is blended towards each of the shapes its mesh carries.
What deforms a MeshRenderer: the entities its Joints channel indexes.
Declares a solid box a camera cannot see through.
Parent reference component.
A box inside which reflections come from a bake rather than from the sky.
A 2D shadow occluder. The box is centred on the entity's world position and turns with it; its size i...
One sorting identity for an entity and everything under it.
Spine skeletal animation component.
A sphere or capsule a spring chain is kept out of, placed by its entity's transform.
A stencil cut from this entity's own Sprite.
UINode — the CSS box-model layout input (the CSS/Flex primary layout model).
UIVisual — the single UI visual component, merging the former low-level UIRenderer (what the renderer...
Velocity component for simple kinematic motion.