Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.8

- **FIXED**: Allow to select empty rect in `QuadTree` example.

## 0.0.7+1

- **ADDED**: Added `changeSize` method to `QuadTree`.
Expand Down
6 changes: 3 additions & 3 deletions lib/src/collisions/quadtree.dart
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ final class QuadTree {
/// This method is two times faster than [queryMap] and [query].
/// And should be used when you need only object identifiers.
List<int> queryIds(ui.Rect rect) {
if (rect.isEmpty) return const [];
//if (rect.isEmpty) return const [];

final root = _root;
if (root == null) return const [];
Expand Down Expand Up @@ -555,7 +555,7 @@ final class QuadTree {
/// Query the QuadTree for objects that intersect with the given [rect].
/// Returns a map of object identifiers and their bounds.
Map<int, ui.Rect> queryMap(ui.Rect rect) {
if (rect.isEmpty) return const {};
//if (rect.isEmpty) return const {};

final root = _root;
if (root == null) return const {};
Expand Down Expand Up @@ -625,7 +625,7 @@ final class QuadTree {
/// Query the QuadTree for objects that intersect with the given [rect].
/// Returns a buffer of object data.
QuadTree$QueryResult query(ui.Rect rect) {
if (rect.isEmpty) return QuadTree$QueryResult._(Float32List(0));
//if (rect.isEmpty) return QuadTree$QueryResult._(Float32List(0));

final root = _root;
if (root == null || isEmpty) return QuadTree$QueryResult._(Float32List(0));
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: repaint
description: >
Library for creating and managing a canvas similar to CustomPaint but with more features.

version: 0.0.7+1
version: 0.0.8

homepage: https://github.com/PlugFox/repaint

Expand Down
Loading