Expand description
Core data structures for bevy_map_editor
This crate provides the fundamental types for representing tile-based maps:
Level- A complete map with layers and entitiesLayer- A single layer (tiles or objects)Tileset- Tile atlas configuration with multi-image supportEntityInstance- Placed entities with propertiesValue- Generic property value typeMapProject- Self-contained format bundling level and tilesetsEntityTypeConfig- Type-level component configurations (physics, input, sprite)
Structs§
- Collision
Data - Collision data for a tile or entity
- Component
Overrides - Instance-level overrides for component configurations
- Editor
Project - Editor project format - matches what the editor exports
- Entity
Instance - An entity placed in the world
- Entity
Type Config - Configuration for an entity type’s automatic components
- Input
Config - Input component configuration for an entity type
- Input
Overrides - Input-related instance overrides
- Layer
- A layer (tiles or objects)
- Level
- A level/map containing tiles and entities
- Level
Connection - A connection/exit point between two levels
- MapProject
- A self-contained map project that includes level data and tileset metadata
- MapProject
Builder - Builder for creating a MapProject from separate level and tileset sources
- Physics
Config - Physics component configuration for an entity type
- Physics
Overrides - Physics-related instance overrides
- Sprite
Config - Sprite/animation configuration for an entity type
- Sprite
Overrides - Sprite-related instance overrides
- Tile
Properties - Per-tile properties like collision, animation, and custom metadata
- Tileset
- Tileset configuration - can contain multiple images (Godot-style)
- Tileset
Image - A single image source within a tileset
- World
Config - World configuration stored in the project
Enums§
- Collider
Config - Collider shape configuration
- Collision
Shape - Collision shape types supported by the editor
- Connection
Direction - Direction/edge of a level connection
- Input
Profile - Input profile presets for common game types
- Layer
Data - The data contained in a layer
- Layer
Type - The type of a layer
- OneWay
Direction - Direction for one-way platforms
- Physics
Body - Physics body type
- Physics
Body Type - Physics body type for entity colliders
- Value
- Generic property value (JSON-like but typed)
- World
Layout - World layout mode determining how levels are organized
Constants§
- OCCUPIED_
CELL - Sentinel value for cells occupied by multi-cell tiles (but not the base cell)
- TILE_
FLIP_ MASK - Mask for all flip flags
- TILE_
FLIP_ X - Bit flag for horizontal flip (mirror on Y axis)
- TILE_
FLIP_ Y - Bit flag for vertical flip (mirror on X axis)
- TILE_
INDEX_ MASK - Mask to extract just the tile index (without flip flags)
Functions§
- tile_
flip_ x - Check if a tile has horizontal flip
- tile_
flip_ y - Check if a tile has vertical flip
- tile_
index - Extract the tile index from a tile value (strips flip flags)
- tile_
with_ flips - Create a tile value with flip flags
- toggle_
flip_ x - Toggle horizontal flip on a tile value
- toggle_
flip_ y - Toggle vertical flip on a tile value