Skip to content

Commit

Permalink
Gizmo sizing bug workaround (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
slimbuck authored Jun 7, 2024
1 parent 114e0fd commit 5957666
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "supersplat",
"version": "0.19.1",
"version": "0.19.2",
"author": "PlayCanvas<support@playcanvas.com>",
"homepage": "https://playcanvas.com/supersplat/editor",
"description": "3D Gaussian Splat Editor",
Expand Down
5 changes: 4 additions & 1 deletion src/tools/transform-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class TransformTool {
patchGizmoMaterials(this.gizmo);

this.gizmo.coordSpace = events.invoke('tool.coordSpace');
this.gizmo.size = 0.8;
this.gizmo.size = 1.2;

this.gizmo.on('render:update', () => {
scene.forceRender = true;
Expand Down Expand Up @@ -118,6 +118,9 @@ class TransformTool {

this.splats = [selection];
this.gizmo.attach(this.splats.map((splats) => splats.entity));

// @ts-ignore - temporary workaround for gizmo size bug, to be removed once https://github.com/playcanvas/engine/issues/6671 is fixed.
this.gizmo._deviceStartSize = Math.min(this.gizmo._device.width, this.gizmo._device.height);
}

activate() {
Expand Down

0 comments on commit 5957666

Please sign in to comment.