Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::ecs::ShapeRenderer Struct Reference

#include <ShapeRenderer.hpp>

Public Member Functions

 ShapeRenderer ()=default

Public Attributes

u8 shapeType {0}
glm::vec4 color {1.0f, 1.0f, 1.0f, 1.0f}
glm::vec2 size {100.0f, 100.0f}
f32 cornerRadius {0.0f}
i32 layer {0}
glm::vec2 parallax {1.0f, 1.0f}
 Parallax scroll factor per axis. 1 = moves with the world (default, no parallax); <1 = scrolls slower than the camera (appears farther, e.g. a background); 0 = locked to the camera (e.g. a sky). The renderer offsets the shape by camera_center * (1 - factor).
bool enabled {true}

Detailed Description

Definition at line 19 of file ShapeRenderer.hpp.

Constructor & Destructor Documentation

◆ ShapeRenderer()

esengine::ecs::ShapeRenderer::ShapeRenderer ( )
default

Member Data Documentation

◆ color

glm::vec4 esengine::ecs::ShapeRenderer::color {1.0f, 1.0f, 1.0f, 1.0f}

Definition at line 24 of file ShapeRenderer.hpp.

Referenced by EMSCRIPTEN_BINDINGS().

◆ cornerRadius

f32 esengine::ecs::ShapeRenderer::cornerRadius {0.0f}

Definition at line 30 of file ShapeRenderer.hpp.

Referenced by EMSCRIPTEN_BINDINGS().

◆ enabled

bool esengine::ecs::ShapeRenderer::enabled {true}

Definition at line 43 of file ShapeRenderer.hpp.

Referenced by EMSCRIPTEN_BINDINGS().

◆ layer

i32 esengine::ecs::ShapeRenderer::layer {0}

Definition at line 33 of file ShapeRenderer.hpp.

Referenced by EMSCRIPTEN_BINDINGS().

◆ parallax

glm::vec2 esengine::ecs::ShapeRenderer::parallax {1.0f, 1.0f}

Parallax scroll factor per axis. 1 = moves with the world (default, no parallax); <1 = scrolls slower than the camera (appears farther, e.g. a background); 0 = locked to the camera (e.g. a sky). The renderer offsets the shape by camera_center * (1 - factor).

Definition at line 40 of file ShapeRenderer.hpp.

Referenced by EMSCRIPTEN_BINDINGS().

◆ shapeType

u8 esengine::ecs::ShapeRenderer::shapeType {0}

Definition at line 21 of file ShapeRenderer.hpp.

Referenced by EMSCRIPTEN_BINDINGS().

◆ size

glm::vec2 esengine::ecs::ShapeRenderer::size {100.0f, 100.0f}

Definition at line 27 of file ShapeRenderer.hpp.

Referenced by EMSCRIPTEN_BINDINGS().


The documentation for this struct was generated from the following file: