Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
DragonBonesAnimation.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
24#pragma once
25
26#include "../../core/Types.hpp"
28#include "../../math/Math.hpp"
29
30#include <string>
31
32namespace esengine::ecs {
33
34ES_COMPONENT(renderable=enabled)
37 ES_PROPERTY(asset = dragonbones_skeleton)
39
41 ES_PROPERTY(asset = dragonbones_atlas)
42 std::string atlasPath;
43
45 ES_PROPERTY(enum_source=dragonbonesArmatures)
46 std::string armature;
47
49 ES_PROPERTY(enum_source=dragonbonesAnimations)
50 std::string animation;
51
53 ES_PROPERTY(min=0)
55
58 bool loop{true};
59
62 bool playing{true};
63
65 ES_PROPERTY(min=0, step=0.05)
67
70 bool flipX{false};
71
74 bool flipY{false};
75
78 glm::vec4 color{1.0f, 1.0f, 1.0f, 1.0f};
79
81 ES_PROPERTY(step=1, enum_source=sortingLayers)
83
85 ES_PROPERTY(min=0)
87
89 ES_PROPERTY(asset = material)
91
93 bool enabled{true};
94
96 bool needsReload{true};
97
99};
100
101} // namespace esengine::ecs
Math utilities and GLM configuration for ESEngine.
Reflection and metadata system for automatic binding generation.
#define ES_COMPONENT(...)
Mark a struct/class as a component that should be exposed to scripts.
#define ES_PROPERTY(...)
Mark a field as a property that should be exposed to scripts.
Core type definitions and utilities for ESEngine.
std::int32_t i32
Signed 32-bit integer.
Definition Types.hpp:54
std::uint32_t u32
Unsigned 32-bit integer.
Definition Types.hpp:45
float f32
32-bit floating point
Definition Types.hpp:59
u32 material
Custom material ID (0 = use default batch shader).
bool flipX
Flip armature horizontally.
bool playing
Whether animation is currently playing.
bool flipY
Flip armature vertically.
std::string animation
Current animation name.
glm::vec4 color
Color tint (RGBA, 0-1 range).
i32 layer
Sorting layer (higher = rendered on top).
bool loop
Whether to loop the animation.
std::string skeletonPath
Skeleton data (*_ske.json or .dbbin).
f32 fadeInTime
Seconds to crossfade over when the animation changes.
bool needsReload
Set while the paths have changed and the armature is not built yet.
std::string armature
Which armature in the file; empty takes the first.
std::string atlasPath
Texture atlas data (*_tex.json).
f32 timeScale
Animation playback speed multiplier.