35#include "dragonBones/DragonBonesHeaders.h"
52 TextureData::_onClear();
67 TextureAtlasData::_onClear();
70 TextureData*
createTexture()
const override {
return BaseObject::borrowObject<EsTextureData>(); }
75 for (
const auto& pair : textures) {
92 std::vector<float>
uvs;
142 void dbInit(Armature* armatureValue)
override { _armature = armatureValue; }
143 void dbClear()
override { _armature =
nullptr; }
145 void dispose(
bool disposeProxy)
override;
147 Animation*
getAnimation()
const override {
return _armature ? _armature->getAnimation() :
nullptr; }
155 Armature* _armature =
nullptr;
186 Armature*
buildArmature(
const std::string& armatureName,
const std::string& dragonBonesName);
194 TextureAtlasData*
_buildTextureAtlasData(TextureAtlasData* textureAtlasData,
void* textureAtlas)
const override;
195 Armature*
_buildArmature(
const BuildArmaturePackage& dataPackage)
const override;
196 Slot*
_buildSlot(
const BuildArmaturePackage& dataPackage,
const SlotData* slotData, Armature* armature)
const override;
199DRAGONBONES_NAMESPACE_END
What every 2D skeletal-animation side module needs, none of which is about any particular one.
The armature's "display": nothing, because there is nothing to display into.
void removeDBEventListener(const std::string &, const std::function< void(EventObject *)> &) override
void dispose(bool disposeProxy) override
void addDBEventListener(const std::string &, const std::function< void(EventObject *)> &) override
void dbInit(Armature *armatureValue) override
Armature * getArmature() const override
void dispatchDBEvent(const std::string &, EventObject *) override
~EsArmatureProxy() override=default
bool hasDBEventListener(const std::string &) const override
Animation * getAnimation() const override
Nothing listens: events leave through the module's own ABI, not this one.
void addDBEventListener(const std::string &, const std::function< void(EventObject *)> &) override
void dispatchDBEvent(const std::string &, EventObject *) override
~EsEventDispatcher() override=default
bool hasDBEventListener(const std::string &) const override
void removeDBEventListener(const std::string &, const std::function< void(EventObject *)> &) override
Slot * _buildSlot(const BuildArmaturePackage &dataPackage, const SlotData *slotData, Armature *armature) const override
static EsFactory & instance()
EsEventDispatcher _eventDispatcher
Armature * buildArmature(const std::string &armatureName, const std::string &dragonBonesName)
Build an armature by name; null when this data holds no such armature.
void advanceTime(float passedTime)
TextureAtlasData * _buildTextureAtlasData(TextureAtlasData *textureAtlasData, void *textureAtlas) const override
Armature * _buildArmature(const BuildArmaturePackage &dataPackage) const override
void _updateColor() override
void _identityTransform() override
void _updateTransform() override
void _updateBlendMode() override
void _initDisplay(void *, bool) override
void _removeDisplay() override
void _updateFrame() override
void _updateZOrder() override
void _disposeDisplay(void *, bool) override
void _replaceDisplay(void *, bool) override
void _onUpdateDisplay() override
bool armatureSpace
positions already have the bones applied
void _addDisplay() override
std::vector< float > uvs
u,v per vertex
std::vector< float > positions
x,y per vertex
void emit(es::skeletal::TriangleSink &sink, const float tint[4]) const
void _updateVisible() override
std::vector< std::uint16_t > indices
void _updateMesh() override
std::uint32_t textureId
Bound after parsing, once the host has uploaded the page (see setTexture).
TextureData * createTexture() const override
void setTexture(std::uint32_t id)
Point every page of this atlas at an uploaded texture.
EsTextureAtlasData()=default
One atlas page: the texture the host bound to it, and its pixel size.
Where a runtime pours the triangles it posed.