v0.2.0
Version 0.2.0 (2024-05-17)
- All crates updated to bevy 0.13
ghx_proc_gen
crate:
- When
bevy
feature is enabled,QueuedObserver
andQueuedStatefulObserverare
now deriveComponent
- Model names are now part of a new
models-names
feature separate fromdebug-traces
- Added
ModelCollection
to create models from Rules
:- Added
ModelVariantRef
- Added
weight
andname_str
getters - Added new type
ModelInfo
RulesBuilder
now takes in aModelCollection
- Added
GeneratorBuilder
:build
is now faillible (it checks the initial nodes + the rules for obvious impossible generations) Initialization now runs during the generator creation and- Added
build_collected
- Added
with_initial_nodes
andwith_initial_grid
- Can now create observers from a
GeneratorBuilder
- Added
NodeSetError
andInvalidGridSize
Generator
- Renamed
get_seed
toseed
- Added
set_and_propagate
andset_and_propagate_collected
- Renamed
generate_collected
togenerate_grid
- Renamed
GridNode
toGeneratedNode
- Functions
generate
,generate_collected
andgenerate_grid
now return how many tries it took to successfully generate - Added getter/setter for
max_retry_count
- Added
get_models_variations_on
andget_models_on
- Added
ModelVariations
- Added
pub
to_grid_data
- Renamed
- Errors:
- Added
GeneratorBuilderError
- Renamed
RulesError
toRulesBuilderError
- Renamed
GenerationError
toGeneratorError
- Added derive of Clone & Copy for
GeneratorError
andRulesBuilderError
- Added
- Updated & improved documentation
- Improved memory usage (orginal models sockets were not discarded during generation, the
Rules
now only keep what is strictly necessary) - Examples:
- Renamed
checkerboard
examples tochessboard
and use the new APIs to set bottom-left tile to be a black tile
- Renamed
Grid:
- Extracted grid types
GridDefinition
,GridData
,Direction
, ... to their own crateghx_grid
and extracted theGridDebugPlugin
to its own crate:bevy_ghx_grid
. Parts of the changes are still listed here:GridDefinition
:- Renamed
NodeIndex
toGridIndex
- Added
NodeRef
enum - Added
index_from_ref
function - Added
get_index_in_direction
- Added
coord_system
getter - Renamed
get_index_from_pos
toindex_from_pos
- Renamed
get_position
topos_from_index
- Renamed
get_index
toindex_from_coords
- Renamed
get_next_index
toget_next_index_in_direction
- Function
directions
is nowpub
- Renamed
GridData
:- Added
set_all_...
functions - Function
reset
now accepts Clone types
- Added
GridDelta
:- Implement Mul
bevy_ghx_proc_gen
crate:
Observed
Component removedSpawnedNode
:- Renamed to
GridNode
- Added
NodeIndex
field
- Renamed to
GridDebugPlugin
:- Renamed
DebugGridView2d
/DebugGridView3d
toDebugGridView2dBundle
/DebugGridView3dBundle
- Renamed
DebugGridViewConfig3d
/DebugGridViewConfig2d
toDebugGridView3d
/DebugGridView2d
- Renamed
Marker
toGridMarker
- Changed
MarkerEvent
toMarkerDespawnEvent
GridMarkers
are now created via ECS commands and now have aTransform
automatically added to them.- Debug grids views are now properly scaled/rotated with the grid transform
- Debug grids for Camera3d are now drawn using Gizmos too
- Renamed
ProcGenDebugPlugin
, major ergonomic update: cursors & multi-generations- Added cursors, with customizable UI via
CursorUiMode
(Custom, Static-UI panel, or World-UI overlay)- Cursors ui style can be configured through
GridCursorsUiSettings
,SelectionCursorMarkerSettings
&OverCursorMarkerSettings
Resources - Selection cursor keyboard movement can be tweaked by a
CursorKeyboardMoveCooldown
Resource
- Cursors ui style can be configured through
- Added a
picking
feature:- enables a mouse-over cursor
- enables picking for the selection cursor
- Observing multiple generations is now possible properly. Switching is done via picking or keyboard event.
GenerationControl
can now be paused/unpaused- Renamed
GenerationViewMode::StepByStepPaused
toGenerationViewMode::StepByStepManual
- Added multiple new public Systems, Events, Components & Resources (
GenerationEvent
, cursor systems, …) - Added cursor targets
- Added cursors, with customizable UI via
- Added
toggle_debug_grids_visibilities
utility system - Added
toggle_grid_markers_visibilities
utility system - Updated & improved documentation
- Examples:
- Renamed
checkerboard
examples tochessboard
and use the new APIs to set bottom-left tile to be a black tile - Examples now use the
picking
feature - Added hotkey to toggle camera auto rotation
- Added hotkey to toggle grid markers visbilities
- Added hotkey to toggle ui
- Renamed