|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
The host types DragonBones requires, implemented for a module that renders nothing itself and only hands triangles across a boundary. More...
#include <cstdint>#include <vector>#include "dragonBones/DragonBonesHeaders.h"#include "../spine/SkeletalModule.hpp"

Go to the source code of this file.
Classes | |
| class | EsTextureData |
| One atlas page: the texture the host bound to it, and its pixel size. More... | |
| class | EsTextureAtlasData |
| class | EsSlot |
| class | EsArmatureProxy |
| The armature's "display": nothing, because there is nothing to display into. More... | |
| class | EsEventDispatcher |
| Nothing listens: events leave through the module's own ABI, not this one. More... | |
| class | EsFactory |
The host types DragonBones requires, implemented for a module that renders nothing itself and only hands triangles across a boundary.
DragonBones is written against an engine that owns a scene graph: a Slot is expected to add, remove and reorder a display object, and to push a transform onto it. This module has no scene graph — it poses, reads the geometry back, and forgets. So most of the fourteen methods a Slot must implement are legitimately empty here, and the two that are not (_updateFrame, _updateMesh) build the vertices the render walk later emits.
THE ONE SUBTLETY IS WHOSE SPACE THE VERTICES ARE IN. A plain image or an unweighted mesh is posed in slot-local space and needs the slot's global matrix applied. A WEIGHTED mesh is already in armature space, because the bones were applied while computing it — DragonBones signals exactly this by calling _identityTransform instead of _updateTransform, and getting it backwards detaches every weighted mesh from its armature.
Definition in file DragonBonesAdapter.hpp.