|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
#include <TrailRenderer.hpp>
Public Member Functions | |
| TrailRenderer ()=default | |
Public Attributes | |
| f32 | time {0.5f} |
| Seconds each recorded point persists before fading out of the tail. | |
| f32 | minVertexDistance {5.0f} |
| Minimum world distance the entity must move before a new point is recorded (0 = record every frame; larger = coarser, cheaper trail). | |
| bool | emitting {true} |
| Record new points. Set false to freeze emission and let the existing streak fade in place (the ribbon detaches from the entity). | |
| f32 | startWidth {20.0f} |
| Full ribbon width at the head (the newest point, glued to the entity). | |
| f32 | endWidth {0.0f} |
| Full ribbon width at the tail (the oldest point). 0 = taper to a line. | |
| glm::vec4 | startColor {1.0f, 1.0f, 1.0f, 1.0f} |
| Color at the head (newest). | |
| glm::vec4 | endColor {1.0f, 1.0f, 1.0f, 0.0f} |
| Color at the tail (oldest) — typically the head color with alpha 0. | |
| resource::TextureHandle | texture |
| Texture sampled along the ribbon (U runs head→tail, V across the width). Invalid = untextured (vertex colors only). | |
| i32 | blendMode {0} |
| Blend mode (0 = Normal, 1 = Additive for glow, …). | |
| i32 | layer {0} |
| Sorting layer (higher = rendered on top). | |
| u32 | material {0} |
| Custom material ID (0 = default batch shader). | |
| bool | enabled {true} |
Definition at line 39 of file TrailRenderer.hpp.
|
default |
| i32 esengine::ecs::TrailRenderer::blendMode {0} |
Blend mode (0 = Normal, 1 = Additive for glow, …).
Definition at line 81 of file TrailRenderer.hpp.
Referenced by trailrendererApplyJS(), and trailrendererToJS().
| bool esengine::ecs::TrailRenderer::emitting {true} |
Record new points. Set false to freeze emission and let the existing streak fade in place (the ribbon detaches from the entity).
Definition at line 53 of file TrailRenderer.hpp.
Referenced by trailrendererApplyJS(), and trailrendererToJS().
| bool esengine::ecs::TrailRenderer::enabled {true} |
Definition at line 93 of file TrailRenderer.hpp.
Referenced by trailrendererApplyJS(), and trailrendererToJS().
| glm::vec4 esengine::ecs::TrailRenderer::endColor {1.0f, 1.0f, 1.0f, 0.0f} |
Color at the tail (oldest) — typically the head color with alpha 0.
Definition at line 71 of file TrailRenderer.hpp.
Referenced by trailrendererApplyJS(), and trailrendererToJS().
| f32 esengine::ecs::TrailRenderer::endWidth {0.0f} |
Full ribbon width at the tail (the oldest point). 0 = taper to a line.
Definition at line 62 of file TrailRenderer.hpp.
Referenced by trailrendererApplyJS(), and trailrendererToJS().
| i32 esengine::ecs::TrailRenderer::layer {0} |
Sorting layer (higher = rendered on top).
Definition at line 85 of file TrailRenderer.hpp.
Referenced by trailrendererApplyJS(), and trailrendererToJS().
| u32 esengine::ecs::TrailRenderer::material {0} |
Custom material ID (0 = default batch shader).
Definition at line 89 of file TrailRenderer.hpp.
Referenced by trailrendererApplyJS(), and trailrendererToJS().
| f32 esengine::ecs::TrailRenderer::minVertexDistance {5.0f} |
Minimum world distance the entity must move before a new point is recorded (0 = record every frame; larger = coarser, cheaper trail).
Definition at line 48 of file TrailRenderer.hpp.
Referenced by trailrendererApplyJS(), and trailrendererToJS().
| glm::vec4 esengine::ecs::TrailRenderer::startColor {1.0f, 1.0f, 1.0f, 1.0f} |
Color at the head (newest).
Definition at line 67 of file TrailRenderer.hpp.
Referenced by trailrendererApplyJS(), and trailrendererToJS().
| f32 esengine::ecs::TrailRenderer::startWidth {20.0f} |
Full ribbon width at the head (the newest point, glued to the entity).
Definition at line 58 of file TrailRenderer.hpp.
Referenced by trailrendererApplyJS(), and trailrendererToJS().
| resource::TextureHandle esengine::ecs::TrailRenderer::texture |
Texture sampled along the ribbon (U runs head→tail, V across the width). Invalid = untextured (vertex colors only).
Definition at line 77 of file TrailRenderer.hpp.
Referenced by trailrendererApplyJS(), and trailrendererToJS().
| f32 esengine::ecs::TrailRenderer::time {0.5f} |
Seconds each recorded point persists before fading out of the tail.
Definition at line 43 of file TrailRenderer.hpp.
Referenced by trailrendererApplyJS(), and trailrendererToJS().