Skip to main content

Crate bevy_map_core

Crate bevy_map_core 

Source
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 entities
  • Layer - A single layer (tiles or objects)
  • Tileset - Tile atlas configuration with multi-image support
  • EntityInstance - Placed entities with properties
  • Value - Generic property value type
  • MapProject - Self-contained format bundling level and tilesets
  • EntityTypeConfig - Type-level component configurations (physics, input, sprite)

Structs§

CollisionData
Collision data for a tile or entity
ComponentOverrides
Instance-level overrides for component configurations
EditorProject
Editor project format - matches what the editor exports
EntityInstance
An entity placed in the world
EntityTypeConfig
Configuration for an entity type’s automatic components
InputConfig
Input component configuration for an entity type
InputOverrides
Input-related instance overrides
Layer
A layer (tiles or objects)
Level
A level/map containing tiles and entities
LevelConnection
A connection/exit point between two levels
MapProject
A self-contained map project that includes level data and tileset metadata
MapProjectBuilder
Builder for creating a MapProject from separate level and tileset sources
PhysicsConfig
Physics component configuration for an entity type
PhysicsOverrides
Physics-related instance overrides
SpriteConfig
Sprite/animation configuration for an entity type
SpriteOverrides
Sprite-related instance overrides
TileProperties
Per-tile properties like collision, animation, and custom metadata
Tileset
Tileset configuration - can contain multiple images (Godot-style)
TilesetImage
A single image source within a tileset
WorldConfig
World configuration stored in the project

Enums§

ColliderConfig
Collider shape configuration
CollisionShape
Collision shape types supported by the editor
ConnectionDirection
Direction/edge of a level connection
InputProfile
Input profile presets for common game types
LayerData
The data contained in a layer
LayerType
The type of a layer
OneWayDirection
Direction for one-way platforms
PhysicsBody
Physics body type
PhysicsBodyType
Physics body type for entity colliders
Value
Generic property value (JSON-like but typed)
WorldLayout
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