|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
A 2D shadow occluder. The box is centred on the entity's world position and turns with it; its size is its own, which is how a collider is placed too. More...
#include <ShadowCaster2D.hpp>
Public Member Functions | |
| bool | operator== (const ShadowCaster2D &) const =default |
| Compared member by member: what the change audit checks a write of this component against (Registry::auditChanges). | |
Public Attributes | |
| glm::vec2 | size {32.0f, 32.0f} |
| Occluder box size in world units (full width/height; centered on the Transform). Ignored by a caster that carries a path. | |
| std::vector< glm::vec2 > | path |
| The occluder's outline in local units, or empty for size's box. | |
| bool | enabled {true} |
| Disabled casters are skipped during collection. | |
A 2D shadow occluder. The box is centred on the entity's world position and turns with it; its size is its own, which is how a collider is placed too.
Definition at line 31 of file ShadowCaster2D.hpp.
|
default |
Compared member by member: what the change audit checks a write of this component against (Registry::auditChanges).
| bool esengine::ecs::ShadowCaster2D::enabled {true} |
Disabled casters are skipped during collection.
Definition at line 49 of file ShadowCaster2D.hpp.
Referenced by shadowcaster2dApplyJS(), and shadowcaster2dToJS().
| std::vector<glm::vec2> esengine::ecs::ShadowCaster2D::path |
The occluder's outline in local units, or empty for size's box.
Three points or more, in order round the shape; where it sits and how it is turned is the Transform's, exactly as the box's is. Traced from the sprite's own alpha in the editor, which is where a shape that matches the artwork comes from.
Definition at line 45 of file ShadowCaster2D.hpp.
Referenced by shadowcaster2dApplyJS(), and shadowcaster2dToJS().
| glm::vec2 esengine::ecs::ShadowCaster2D::size {32.0f, 32.0f} |
Occluder box size in world units (full width/height; centered on the Transform). Ignored by a caster that carries a path.
Definition at line 35 of file ShadowCaster2D.hpp.
Referenced by shadowcaster2dApplyJS(), and shadowcaster2dToJS().