flame_spatial_grid library

Classes

AnimationGlobal
BoundingHitbox
A special hitbox type which saves additional information:
Cell
Cell is the rect (quad) of game space, connected with it's neighbors at left, right, top and bottom. This class stores cell information and automates new cells creation,makes easier querying cell's components for collision detection system.
CellLayer
CellStaticAnimationLayer
CellStaticLayer
CellTrailLayer
DummyHitbox
FadeOutConfig
GroupHitbox
LayerCacheKey
LayerInfo
LayersManager
The class provides easy-to-use API layer to access game layer's Every layer is added into layersRootComponent to optimize priority recalculation.
LayersRootComponent
LoadingProgressManager<M>
LoadingProgressMessage<M>
SpatialGrid
Main class, responsible for grid creation, searching grid's cells, changing parameters of grid system, ensures that grid is consistent without holes.
SpatialGridBroadphase
Performs Quad Tree broadphase check.
SpatialGridCameraWrapper
Camera wrapper allows to attach CameraComponent as a "trackedComponent" in HasSpatialGridFramework game. Every movement of the camera will be handled by spatial grid af if it would be simple PositionComponent.
SpatialGridCollisionDetection
SpatialGridDebugComponent
SpriteAnimationGlobalComponent
SpriteAnimationTickerGlobal
TickersManager
TileBuilderContext<T>
This class represents the tile's data and the cell's context in which this tile was built absolutePosition and size represents tile's global position on the game field and it's dimensions. If this context contains information about tiled object, tiledObject will be not null. If the context contains information about tile, the tileDataProvider will be not null. Use these properties to build custom components for map's tiles or objects.
TileBuilderContextProvider<T, C>
TileCache
This class is a storage of tile's data from tileset. Use TiledMapLoader.getPreloadedTileData to get instance of this class. Also read about TiledMapLoader.preloadTileSets
TileComponent
TileDataProvider
Proxy class, simplifies access to tile's individual data
TiledMapLoader<T extends HasSpatialGridFramework<World>, C>
This is base class for describing a Tiled map. You going to create new class for every map type (map file) you will use in your game. Each class describes map's fileName, it's destTileSize, it's initialPosition and various build functions to convert each tile into corresponding game component.
TilesetManager
WorldData
WorldLoader
WorldMapData

Enums

CellState
The state controls cell's lifecycle and how many resources it consumes
Direction
InitializationStepStage
LayerComponentsStorageMode
LayerRenderMode
MapLayerType
List of basic types of CellLayer, supported natively by spatial grid framework
RayTraceMode

Mixins

ComponentWithUpdate
DebuggerPause
HasGridSupport
Core mixin of spatial grid framework. This mixin should have EVERY game component, working with spatial grid. Components without this mixin will be hidden from collision detection system.
HasSpatialGridFramework<W extends World>
This class is starting point to add Framework's abilities into you game Calling initializeSpatialGrid at onLoad as absolute necessary! If your game could be zoomed, please call onAfterZoom after every zoom event.
HasTrailSupport
LayerCacheKeyProvider
LayerChildComponent
RepaintOnDemand
RestorableStateMixin<T>
ScheduleAfterUpdateMixin
ScheduleBeforeUpdateMixin
UpdateOnDemand

Extensions

ConvertToAnimation on Sprite
PositionComponentWithGridSupport on PositionComponent
RoundPrecision on Rect
SpatialGridRectangleHitbox on RectangleHitbox
SpatialGridShapeHitbox on ShapeHitbox
SpriteLoader on Tile

Typedefs

BoundingHitboxFactory = BoundingHitbox Function()
CellBuilderFunction = Future<void> Function(Cell cell, Component rootComponent, Iterable<Rect> rectsOfMap)
Function type, responsible for cell build: filling new cell by components and adding them into rootComponent
ComponentExternalTypeCheck = bool Function(PositionComponent first, PositionComponent second)
CustomLayerBuilder = CellLayer Function(PositionComponent component, Cell cell, String layerName, LayerComponentsStorageMode componentsStorageMode)
ExternalMinDistanceCheckSpatialGrid = bool Function(ShapeHitbox activeItem, ShapeHitbox potential)
InitialPositionChecker = Vector2? Function(ObjectGroup layer, TiledObject object, Vector2 mapOffset, String? worldName)
LayerBuilderFunction<T> = Future<bool> Function(LayerInfo layerInfo, TileBuilderContext<T> context)
MapLoaderFactory = TiledMapLoader<HasSpatialGridFramework<World>, dynamic> Function()
PureTypeCheck = bool Function(Type activeItemType, Type potentialItemType)
TileBuilderFunction<T> = Future<void> Function(TileBuilderContext<T> context)