feat: set stencil highlight on gizmo attach
This commit is contained in:
@@ -86,6 +86,7 @@ class Gizmo extends AbstractGizmo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future attach(ThermionEntity entity) async {
|
Future attach(ThermionEntity entity) async {
|
||||||
|
print("Attaching");
|
||||||
_activeAxis = null;
|
_activeAxis = null;
|
||||||
if (entity == _activeEntity) {
|
if (entity == _activeEntity) {
|
||||||
return;
|
return;
|
||||||
@@ -95,10 +96,16 @@ class Gizmo extends AbstractGizmo {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_visible = true;
|
_visible = true;
|
||||||
|
|
||||||
|
if (_activeEntity != null) {
|
||||||
|
await _viewer.removeStencilHighlight(_activeEntity!);
|
||||||
|
}
|
||||||
_activeEntity = entity;
|
_activeEntity = entity;
|
||||||
await _viewer.setGizmoVisibility(true);
|
await _viewer.setGizmoVisibility(true);
|
||||||
await _viewer.setParent(center, entity, preserveScaling: true);
|
await _viewer.setParent(center, entity, preserveScaling: true);
|
||||||
_boundingBoxController.sink.add(await _viewer.getBoundingBox(x));
|
_boundingBoxController.sink.add(await _viewer.getBoundingBox(x));
|
||||||
|
|
||||||
|
await _viewer.setStencilHighlight(_activeEntity!);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future detach() async {
|
Future detach() async {
|
||||||
|
|||||||
Reference in New Issue
Block a user