37 glm::vec2
uv{0.0f, 0.0f};
56 ES_PROPERTY(asset =
texture, tooltip=
"Normal map (tangent space). Needs a mesh with normals.")
60 ES_PROPERTY(animatable, tooltip=
"Tint multiplied into the vertex colors (white = unchanged).")
61 glm::vec4
color{1.0f, 1.0f, 1.0f, 1.0f};
64 ES_PROPERTY(step=1, enum_source=sortingLayers, tooltip=
"Sorting layer — controls draw order across renderables.")
70 ES_PROPERTY(tooltip=
"Opaque: no blending; writes and tests depth, so meshes occlude each other.")
75 ES_PROPERTY(tooltip=
"Cull back faces: triangles facing away from the camera are skipped.")
79 ES_PROPERTY(tooltip=
"Receive 2D lights: Light entities light this mesh (flat normal). A custom material overrides this.")
84 ES_PROPERTY(tooltip=
"Cast shadows: whether this mesh blocks the light. Water and other surfaces light passes through say no.")
91 ES_PROPERTY(advanced, tooltip=
"Parallax scroll factor (1 = with world, <1 = slower, 0 = locked to camera).")
95 ES_PROPERTY(asset = material, category=Materials, tooltip=
"The material it is drawn with; none draws it with the built-in look (texture and colour above).")
158 ES_PROPERTY(entity_ref, tooltip=
"Joint entities, in the order the mesh's bind matrices are in.")
163 tooltip=
"Auto follows the project's Default Skin Cache Behavior. Disabled poses it in each draw's vertex stage. Enabled asks for the skin cache even when the project leaves meshes out by default.")
189 ES_PROPERTY(animatable, label_source=meshMorphTargets,
190 tooltip=
"Weight per morph target of the mesh, in the order the mesh carries them.")
211 ES_PROPERTY(asset = mesh, tooltip=
"The cheaper mesh used past the LOD distance. Needs the same channels as the mesh.")
215 ES_PROPERTY(tooltip=
"Distance (metres) past which the cheaper mesh is used. 0 = never.")
220 ES_PROPERTY(tooltip=
"Distance (metres) nearer than which an instance is not drawn. 0 = from the eye.")
225 ES_PROPERTY(tooltip=
"Distance (metres) past which an instance is not drawn. 0 = unlimited.")
230 ES_PROPERTY(tooltip=
"Distance (metres) past which an instance casts no shadow. 0 = as far as it is drawn.")
262 ES_PROPERTY(asset = texture, tooltip=
"Baked lightmap atlas. Needs a mesh with a second UV set.")
268 ES_PROPERTY(advanced, tooltip=
"Atlas rectangle: xy scales the second UV set, zw offsets it.")
Type-safe resource handle system.
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.
std::uint32_t u32
Unsigned 32-bit integer.
float f32
32-bit floating point
Entity identifier with packed index + generation.
resource::MeshHandle lod1Mesh
The cheaper mesh that stands in past lodDistance; invalid = the mesh itself at every distance....
f32 lodDistance
Metres from the eye past which lod1Mesh is drawn; 0 = never.
glm::vec3 originMin
The corners of the instances' ORIGINS and the greatest scale among them: with the mesh's own reach,...
f32 shadowDistance
Metres from the eye past which an instance casts no shadow; 0 = as far as it is drawn....
f32 minDistance
Metres from the eye BEFORE which an instance is not drawn; 0 = from the eye outward....
f32 drawDistance
Metres from the eye past which an instance is not drawn; 0 = at any distance. A shadow map is cut by ...
std::vector< f32 > transforms
Sixteen floats an instance: the model's three rows (translation in .w) then its tint RGBA,...
glm::vec4 scaleOffset
Where in the atlas: xy scales the mesh's second UV, zw offsets it. (1,1,0,0) reads the whole texture,...
resource::TextureHandle lightmap
The baked atlas. Invalid = this object has no bake, which is not the same as a black one: it keeps th...
std::vector< f32 > weights
Weight per target, 0 leaving the mesh as authored. Not clamped: a negative weight and one past 1 are ...
std::vector< u32 > indices
Triangle-list indices into vertices (validated on upload).
u32 material
Custom material ID (0 = use default batch shader).
glm::vec4 color
Color tint multiplied with per-vertex colors (white = unchanged).
bool cullBackfaces
Skip triangles facing away from the camera — a closed model's inside. A glTF says this with doubleSid...
resource::TextureHandle texture
Texture sampled by the mesh UVs (invalid = untextured, vertex colors only).
glm::vec2 parallax
Parallax scroll factor per axis. 1 = moves with the world (default, no parallax); <1 = scrolls slower...
glm::vec2 localMin
Local-space AABB of vertices, recomputed on upload — cull source.
bool operator==(const MeshRenderer &) const =default
Compared member by member: what the change audit checks a write of this component against (Registry::...
bool opaque
Drawn as an opaque surface: no blending, and it takes part in depth — which is what lets one mesh hid...
resource::TextureHandle normalMap
Tangent-space normal map, applied on top of the geometry's own normals. Needs a mesh that HAS normals...
bool castShadows
Whether it stands in the light's way: drawn into the shadow maps (and what shelters from rain)....
std::vector< MeshVertex2D > vertices
Local-space vertices (triangle list, indexed).
bool lit
Lit by the scene's 2D lights (Light). A custom material overrides this.
i32 layer
Sorting layer (higher = rendered on top).
resource::MeshHandle mesh
Geometry from an .esmesh, drawn INSTEAD of the inline vertices.
bool operator==(const MeshSkin &) const =default
Compared member by member: what the change audit checks a write of this component against (Registry::...
std::vector< Entity > joints
Joint entities, in the order the mesh's bind matrices are stored.
i32 skinCache
Whether the skin cache poses this mesh (SkinCacheMode).
One local-space mesh vertex: position, texture coordinate, RGBA8 color.
bool operator==(const MeshVertex2D &) const =default