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
"
16
#include "
../../core/Reflection.hpp
"
17
18
namespace
esengine::ecs
{
19
31
ES_COMPONENT
(stability=beta)
32
struct
Impostor
{
34
ES_PROPERTY
(min=0, max=1, tooltip=
"Screen height fraction below which the card replaces the mesh."
)
35
f32
screenSize
{0.06f};
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."
)
39
i32
frames
{8};
40
42
ES_PROPERTY
(min=128, max=4096, step=128, tooltip=
"The atlas's side in pixels; each picture is this divided by frames."
)
43
i32
resolution
{1024};
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.hpp
Reflection and metadata system for automatic binding generation.
ES_COMPONENT
#define ES_COMPONENT(...)
Mark a struct/class as a component that should be exposed to scripts.
Definition
Reflection.hpp:46
ES_PROPERTY
#define ES_PROPERTY(...)
Mark a field as a property that should be exposed to scripts.
Definition
Reflection.hpp:95
Types.hpp
Core type definitions and utilities for ESEngine.
esengine::ecs
Definition
AotComponents.generated.hpp:8
esengine::i32
std::int32_t i32
Signed 32-bit integer.
Definition
Types.hpp:54
esengine::f32
float f32
32-bit floating point
Definition
Types.hpp:59
esengine::ecs::Impostor::screenSize
f32 screenSize
Fraction of the viewport height below which the card replaces the mesh.
Definition
Impostor.hpp:35
esengine::ecs::Impostor::enabled
bool enabled
Definition
Impostor.hpp:46
esengine::ecs::Impostor::Impostor
Impostor()=default
esengine::ecs::Impostor::resolution
i32 resolution
The atlas's side in pixels.
Definition
Impostor.hpp:43
esengine::ecs::Impostor::frames
i32 frames
Directions along each side of the atlas: frames x frames pictures in all.
Definition
Impostor.hpp:39
src
esengine
ecs
components
Impostor.hpp
Generated by
1.15.0