Skip to content

TmjLoader Class

Definition

Namespace: Brine2D.Tilemap

Loads Tiled JSON \(\.tmj\) maps. Supports embedded and external \(\.tsj\) tilesets, CSV and base64 tile data \(uncompressed, zlib, gzip, zstd\), and group layers at any depth.

C#
public class TmjLoader : Brine2D.Tilemap.ITilemapLoader

Inheritance System.Object → TmjLoader

Implements Brine2D.Tilemap.ITilemapLoader

Methods
DecodeTileData\(TmjLayer\) Decodes tile GIDs from a layer. Handles CSV arrays and base64 with optional zlib, gzip, or zstd compression.
FlattenLayers\(IEnumerable<TmjLayer>, GroupState\) Yields all tile and object layers in document order, regardless of group nesting depth. Group visibility, opacity, tint, offset, and parallax are composed into the state passed down to each leaf layer.
ParseTiledColor\(string\) Parses a Tiled color string \(\#RRGGBB or \#AARRGGBB\). Returns White on failure.