Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
ShapeRenderer.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
3#pragma once
4
7#include "../../math/Math.hpp"
8
9namespace esengine::ecs {
10
11ES_ENUM()
12enum class ShapeType : u8 {
13 Circle = 0,
16};
17
18ES_COMPONENT(renderable=enabled)
22
24 glm::vec4 color{1.0f, 1.0f, 1.0f, 1.0f};
25
27 glm::vec2 size{100.0f, 100.0f};
28
29 ES_PROPERTY(min=0)
31
32 ES_PROPERTY(step=1, enum_source=sortingLayers)
34
39 ES_PROPERTY(advanced, tooltip="Parallax scroll factor (1 = with world, <1 = slower, 0 = locked to camera).")
40 glm::vec2 parallax{1.0f, 1.0f};
41
43 bool enabled{true};
44
45 ShapeRenderer() = default;
46};
47
48} // 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_ENUM(...)
Mark an enum 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::uint8_t u8
Unsigned 8-bit integer.
Definition Types.hpp:41
float f32
32-bit floating point
Definition Types.hpp:59
glm::vec2 parallax
Parallax scroll factor per axis. 1 = moves with the world (default, no parallax); <1 = scrolls slower...