Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
Impostor.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
13#pragma once
14
15#include "../../core/Types.hpp"
17
18namespace esengine::ecs {
19
31ES_COMPONENT(stability=beta)
32struct Impostor {
34 ES_PROPERTY(min=0, max=1, tooltip="Screen height fraction below which the card replaces the mesh.")
36
38 ES_PROPERTY(min=2, max=16, step=1, tooltip="Pictures along each side of the atlas (frames x frames in all). More is smoother as the view goes round, and smaller each.")
40
42 ES_PROPERTY(min=128, max=4096, step=128, tooltip="The atlas's side in pixels; each picture is this divided by frames.")
44
45 ES_PROPERTY(tooltip="Off: the mesh is always drawn as itself.")
46 bool enabled{true};
47
48 Impostor() = default;
49};
50
51} // namespace esengine::ecs
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
float f32
32-bit floating point
Definition Types.hpp:59
f32 screenSize
Fraction of the viewport height below which the card replaces the mesh.
Definition Impostor.hpp:35
i32 resolution
The atlas's side in pixels.
Definition Impostor.hpp:43
i32 frames
Directions along each side of the atlas: frames x frames pictures in all.
Definition Impostor.hpp:39