sector 0.4.0+3
sector: ^0.4.0+3 copied to clipboard
Fast and intuitive 2D data structures: grids, graphs, pathfinding & more.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.4.0+3 #
- Bumped Dart to
^3.8.0.
0.4.0+2 #
- Bumped Dart to
^3.7.0.
0.4.0+1 #
- Merged into the
pub.luery.devmonorepo.
0.4.0 #
- Published
0.4.0-alpha+3as0.4.0with no changes.
0.4.0-alpha+3 #
-
Upgraded to
lodim: ^0.1.6. -
Gridand its subtypes must be non-empty (a width and height of at least 1); in practice this was already the case, but it is now enforced by the various constructors and factory methods. -
Added
<Grid>.copyFromto copy the contents of one grid to another.
0.4.0-alpha+2 #
- Optimized (and tested)
<Grid>.filland<ListGrid>.fill.
0.4.0-alpha+1 #
- Deprecated
getUncheckedandsetUncheckedin favor ofgetUnsafeandsetUnsafe.
0.4.0-alpha #
Breaking changes:
-
GridandGraphare nowabstract base mixin class; in other words, they must either be extended or mixed into a class to be used. It is unlikely that this will affect any users, but it is a breaking change nevertheless; there should be no need to mock either class, as concrete implementations are already provided, and they are difficult to mock in isolation. -
UndirectedGraphis now abase mixinfor a similar reason. -
Renamed
cleartofill, and changed the type signature:- void clear([E? fill]) + void clear([Rect? bounds]) + void fill(E fill, [Rect? bounds])
0.3.0+1 #
Cosmetic changes to the pubspec.yaml file only.
0.3.0 #
Major overhaul of the API, almost all classes and methods have been renamed or
restructured; the API is now more consistent and easier to use, and has been
layered partially on top of package:lodim;
sector now includes data structures, graphs, grids, and pathfinding, with
a more consistent API and is better tested and tuned for performance.
In summary:
- Sector now depends on, and uses,
package:lodimfor 2D vector operations. - Sector now has types and functionality for general-purpose graphs and pathfinding.
Gridoperations based on column-major order have been removed.Gridhas anemptyfield used for resizing and sparse-grid optimizations.Gridresizing is now doen via settingwidhtorheightrespectively- Traversals have moved into general graph algorithms in
package:sector.
0.2.0 #
-
Renamed
<Grid>.containsto<Grid>.containsXY:- if (grid.contains(0, 0)) { + if (grid.containsXY(0, 0)) { -
Added
<Grid>.containsto check if a given element is within the grid, similar toList.contains:if (grid.contains('#')) { // ... } -
Removed
Uint8Grid, in favor ofListGrid.view(List<T>, {int width}):- final grid = Uint8Grid(3, 3); + final grid = ListGrid.view(Uint8List(3 * 3), width: 3);This reducs the API surface, and focuses on the key use-case of creating a grid without copying the data: using compact lists as backing storage without generics or codegen.
-
Added
GridIterator,GridIterableandTraversal. These classes provide ways to iterate over the elements of a grid, and to traverse the grid in different directions.For example, a row-major traversal:
for (final element in grid.traverse(rowMajor())) { // ... }See also:
rowMajordrawLine
-
Added
<Grid>.layoutHintand<Grid>.getByIndexUnchecked; these methods allow for more efficient traversal of the grid, by providing a hint about the layout of the grid, and by accessing elements by index without extra bounds checking.Most users never need to use these methods.
0.1.1 #
- Added
Uint8Grid, the first sub-type ofTypedDataGrid. AUint8Grid, like it's counterpartUint8List, is a grid of unsigned 8-bit integers, which makes it suitable for storing pixel data, tile maps, and other data that can be represented as a grid of 8-bit values.
0.1.0 #
🎉 Initial release 🎉