import type { TiledMap } from "./types.ts"; import type { VoxelWorldJSON } from "../../serialization/VoxelSerializer.ts"; import type { BlockShapeID } from "../../blocks/BlockShape.ts"; export interface TiledConverterOptions { /** * Maps a Tiled tileset `source` string (e.g. `"TX Tileset Grass.tsx"`) and * its derived ID to the actual asset path/URL used for TilesetDefinition.src. * Called once per tileset. For embedded tilesets without a source file, * `tiledSource` is an empty string and `tilesetId` is the tileset name. */ resolveTilesetSrc: (tiledSource: string, tilesetId: string) => string; /** * Chunk size written into the VoxelWorldJSON output. * @default 16 */ chunkSize?: number; /** * Controls how Tiled tile layers map to the 3-D Y axis. * * - `"flat"` — all tile layers are placed at Y=0; when two layers occupy * the same (x, z) cell the later layer wins. * - `"stacked"` — tile layer at index N is placed at Y=N (useful for * multi-floor or multi-depth maps). * * @default "flat" */ layerMode?: "flat" | "stacked"; /** * BlockShape ID assigned to every generated block. * @default "fullCube" */ defaultShapeId?: BlockShapeID; /** * Whether generated blocks are collidable. * @default true */ collidable?: boolean; } /** * Converts a parsed Tiled JSON map to a VoxelWorldJSON snapshot. * * - Each Tiled tile layer becomes a VoxelLayerJSON. * - Each Tiled object layer becomes a VoxelObjectLayerJSON. * - One BlockDefinition is generated per unique tile GID found in the map; * these are embedded in the output as `blocks` so the file is self-contained. * * No browser or Three.js dependency — safe to run in Node.js build pipelines. */ export declare class TiledConverter { convert(map: TiledMap, options: TiledConverterOptions): VoxelWorldJSON; } //# sourceMappingURL=TiledConverter.d.ts.map