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

#include <TilemapLayer.hpp>

Public Member Functions

 TilemapLayer ()=default

Public Attributes

glm::vec2 cellSize {32.0f, 32.0f}
u8 orientation {0}
f32 hexSideLength {0.0f}
u8 staggerAxis {0}
u8 staggerIndex {0}
glm::vec2 originOffset {0.0f, 0.0f}
resource::TextureHandle tileset
i32 tilesetColumns {1}
i32 renderLayer {0}
glm::vec4 tintColor {1.0f, 1.0f, 1.0f, 1.0f}
f32 opacity {1.0f}
glm::vec2 parallaxFactor {1.0f, 1.0f}
bool visible {true}
bool lit {false}
 Lit by the scene's 2D lights (Light), as a Sprite's lit is: flat normal, the layer's tint as the albedo. Off = unlit.
bool needsSync {true}

Detailed Description

Heavy tile data (chunks, animations, per-tile properties) lives in TilemapSystem's LayerData keyed by this entity. Chunks flow through tilemap_exportChunks / tilemap_importChunks during scene I/O.

Definition at line 49 of file TilemapLayer.hpp.

Constructor & Destructor Documentation

◆ TilemapLayer()

esengine::ecs::TilemapLayer::TilemapLayer ( )
default

Member Data Documentation

◆ cellSize

glm::vec2 esengine::ecs::TilemapLayer::cellSize {32.0f, 32.0f}

Definition at line 51 of file TilemapLayer.hpp.

Referenced by tilemaplayerApplyJS(), and tilemaplayerToJS().

◆ hexSideLength

f32 esengine::ecs::TilemapLayer::hexSideLength {0.0f}

Definition at line 58 of file TilemapLayer.hpp.

Referenced by tilemaplayerApplyJS(), and tilemaplayerToJS().

◆ lit

bool esengine::ecs::TilemapLayer::lit {false}

Lit by the scene's 2D lights (Light), as a Sprite's lit is: flat normal, the layer's tint as the albedo. Off = unlit.

Definition at line 94 of file TilemapLayer.hpp.

Referenced by esengine::TilemapRenderPlugin::collect(), tilemaplayerApplyJS(), and tilemaplayerToJS().

◆ needsSync

bool esengine::ecs::TilemapLayer::needsSync {true}

Definition at line 97 of file TilemapLayer.hpp.

◆ opacity

f32 esengine::ecs::TilemapLayer::opacity {1.0f}

◆ orientation

u8 esengine::ecs::TilemapLayer::orientation {0}

Definition at line 54 of file TilemapLayer.hpp.

Referenced by tilemaplayerApplyJS(), and tilemaplayerToJS().

◆ originOffset

glm::vec2 esengine::ecs::TilemapLayer::originOffset {0.0f, 0.0f}

◆ parallaxFactor

glm::vec2 esengine::ecs::TilemapLayer::parallaxFactor {1.0f, 1.0f}

◆ renderLayer

i32 esengine::ecs::TilemapLayer::renderLayer {0}

◆ staggerAxis

u8 esengine::ecs::TilemapLayer::staggerAxis {0}

Definition at line 62 of file TilemapLayer.hpp.

Referenced by tilemaplayerApplyJS(), and tilemaplayerToJS().

◆ staggerIndex

u8 esengine::ecs::TilemapLayer::staggerIndex {0}

Definition at line 66 of file TilemapLayer.hpp.

Referenced by tilemaplayerApplyJS(), and tilemaplayerToJS().

◆ tileset

resource::TextureHandle esengine::ecs::TilemapLayer::tileset

◆ tilesetColumns

i32 esengine::ecs::TilemapLayer::tilesetColumns {1}

◆ tintColor

glm::vec4 esengine::ecs::TilemapLayer::tintColor {1.0f, 1.0f, 1.0f, 1.0f}

◆ visible

bool esengine::ecs::TilemapLayer::visible {true}

The documentation for this struct was generated from the following file:
  • /home/runner/work/estella/estella/src/esengine/ecs/components/TilemapLayer.hpp