feat: re-implement (native) Gizmo class, expose preserveScaling parameter for setParent, add methods for getting viewport bounding box from renderable entity

This commit is contained in:
Nick Fisher
2024-08-22 18:04:06 +08:00
parent 98c3676fdf
commit 7693a0fe14
15 changed files with 769 additions and 347 deletions

View File

@@ -1,3 +1,23 @@
import 'package:thermion_dart/thermion_dart/thermion_viewer.dart';
import 'package:vector_math/vector_math_64.dart';
abstract class AbstractGizmo {
bool get isActive;
void translate(double transX, double transY);
void reset();
void attach(ThermionEntity entity);
void detach();
Aabb2 boundingBox = Aabb2();
void checkHover(double x, double y) {
if(boundingBox.containsVector2(Vector2(x, y)));
}
}