Skip to main content

pite_core/nodes/
tilemap.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2//! TileMap2D: renders 2D tilemaps defined in an external .ptmap TOML sidecar.
3
4use crate::schema::{DefaultPropVal, NodeTypeSchema, PropHint, PropSchema};
5
6pub static SCHEMA: NodeTypeSchema = NodeTypeSchema {
7    type_name: "TileMap2D",
8    description: "Renders 2D multi-layer grid tilemaps with automatic physics colliders.",
9    inherits: Some("Node2D"),
10    abstract_class: false,
11    props: PROPS,
12};
13
14pub static PROPS: &[PropSchema] = &[PropSchema {
15    key: "tilemap",
16    label: "TileMap",
17    doc: "Path to a tilemap sidecar (`.ptmap`).",
18    default_value: DefaultPropVal::Str(""),
19    hint: PropHint::Asset { filter: &["ptmap"] },
20    read_only: false,
21}];