Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
ShadowCaster2D.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
16#pragma once
17
18#include "../../core/Types.hpp"
20#include "../../math/Math.hpp"
21
22#include <vector>
23
24namespace esengine::ecs {
25
30ES_COMPONENT(renderable=enabled)
34 ES_PROPERTY(animatable, min=0, tooltip="Occluder box size in world units (centred on the entity, turning with it). Unused when the caster has an outline.")
35 glm::vec2 size{32.0f, 32.0f};
36
45 std::vector<glm::vec2> path;
46
49 bool enabled{true};
50
52 bool operator==(const ShadowCaster2D&) const = default;
53};
54
55} // 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.
A 2D shadow occluder. The box is centred on the entity's world position and turns with it; its size i...
std::vector< glm::vec2 > path
The occluder's outline in local units, or empty for size's box.
glm::vec2 size
Occluder box size in world units (full width/height; centered on the Transform). Ignored by a caster ...
bool operator==(const ShadowCaster2D &) const =default
Compared member by member: what the change audit checks a write of this component against (Registry::...
bool enabled
Disabled casters are skipped during collection.