Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
faf59c0
Add shared ECS traits and helpers for entity pose plugins
DTCurrie Jun 1, 2026
9e637c6
Add changeset
DTCurrie Jun 1, 2026
02bc0d0
Refactor Details panel into focused subcomponents
DTCurrie Jun 1, 2026
bf49747
Add changeset
DTCurrie Jun 1, 2026
9bd8689
Small component tweaks to support per-entity pose mutators
DTCurrie Jun 1, 2026
030b969
Add changeset
DTCurrie Jun 1, 2026
77eed59
Address review feedback on writeMatrix and useMouseRaycaster
github-actions[bot] Jun 1, 2026
c18c0e7
Merge branch 'main' into app-16292/1-ecs-utils
DTCurrie Jun 2, 2026
6854ba0
Address review feedback: hierarchy comment, disableTooltip test
github-actions[bot] Jun 2, 2026
0d33dea
Address review feedback on Details refactor
github-actions[bot] Jun 2, 2026
dfef837
Address review feedback: writeMatrix early exit, undefined tests, fir…
github-actions[bot] Jun 2, 2026
4b68aae
Merge branch 'app-16292/1-ecs-utils' into app-16292/2-details-refactor
DTCurrie Jun 2, 2026
c00b48a
Update src/lib/ecs/traits.ts
DTCurrie Jun 2, 2026
2bcdba2
Merge branch 'app-16292/1-ecs-utils' into app-16292/2-details-refactor
DTCurrie Jun 2, 2026
b18c167
Add invalidate() to subcomponents and fix Details handleParentChange
github-actions[bot] Jun 2, 2026
fd1cd53
Apply suggestion from @claude[bot]
DTCurrie Jun 2, 2026
b890b95
fix claude's bad suggestion
DTCurrie Jun 2, 2026
82d5076
cleanup
DTCurrie Jun 2, 2026
51809f3
Address review feedback on Details refactor
github-actions[bot] Jun 2, 2026
3741933
Address review feedback on writeMatrix and useMouseRaycaster
github-actions[bot] Jun 1, 2026
fea6014
Make measure tool a plugin (#732)
micheal-parks Jun 1, 2026
8d67f43
Address review feedback: writeMatrix early exit, undefined tests, fir…
github-actions[bot] Jun 2, 2026
db5c541
Update src/lib/ecs/traits.ts
DTCurrie Jun 2, 2026
83b98a6
Add invalidate() to subcomponents and fix Details handleParentChange
github-actions[bot] Jun 2, 2026
3d6bf32
Apply suggestion from @claude[bot]
DTCurrie Jun 2, 2026
e1b0cbe
fix claude's bad suggestion
DTCurrie Jun 2, 2026
e25aa16
cleanup
DTCurrie Jun 2, 2026
f8c93fb
Merge branch 'app-16292/2-details-refactor' into app-16292/3-componen…
DTCurrie Jun 2, 2026
b11891e
Add disableTooltip inactive test case to Button spec
github-actions[bot] Jun 2, 2026
1bc584f
Merge branch 'main' into app-16292/1-ecs-utils
DTCurrie Jun 2, 2026
8e8bc5e
Merge branch 'app-16292/1-ecs-utils' into app-16292/2-details-refactor
DTCurrie Jun 2, 2026
12b8101
Merge branch 'app-16292/2-details-refactor' into app-16292/3-componen…
DTCurrie Jun 2, 2026
ddd050a
add handlers for changes
DTCurrie Jun 2, 2026
e47694e
Merge branch 'app-16292/2-details-refactor' into app-16292/3-componen…
DTCurrie Jun 2, 2026
9ad63d7
use callbacks with no defaults
DTCurrie Jun 2, 2026
5061ec9
Merge branch 'app-16292/2-details-refactor' into app-16292/3-componen…
DTCurrie Jun 2, 2026
2450370
revert opacity behavior
DTCurrie Jun 2, 2026
1aeff3b
Merge branch 'app-16292/2-details-refactor' into app-16292/3-componen…
DTCurrie Jun 2, 2026
94f3b26
revert opacity fallbacks
DTCurrie Jun 2, 2026
081f852
split out opacity and axes helper details
DTCurrie Jun 2, 2026
ad9d95d
Merge branch 'app-16292/2-details-refactor' into app-16292/3-componen…
DTCurrie Jun 2, 2026
f2b8a19
line color updates
DTCurrie Jun 2, 2026
4c7ab2f
default to first hit
DTCurrie Jun 2, 2026
d076b3f
Merge branch 'main' into app-16292/1-ecs-utils
DTCurrie Jun 2, 2026
b7b7d7c
Refactor Details panel into focused subcomponents
DTCurrie Jun 1, 2026
168cd3e
Add changeset
DTCurrie Jun 1, 2026
473af2e
Address review feedback on Details refactor
github-actions[bot] Jun 2, 2026
873a67b
Add invalidate() to subcomponents and fix Details handleParentChange
github-actions[bot] Jun 2, 2026
72a6fce
Apply suggestion from @claude[bot]
DTCurrie Jun 2, 2026
a92007c
fix claude's bad suggestion
DTCurrie Jun 2, 2026
2d7c9c1
cleanup
DTCurrie Jun 2, 2026
d5a080e
add handlers for changes
DTCurrie Jun 2, 2026
17e814f
use callbacks with no defaults
DTCurrie Jun 2, 2026
76b80ef
revert opacity behavior
DTCurrie Jun 2, 2026
053d6e1
split out opacity and axes helper details
DTCurrie Jun 2, 2026
51d9b2b
line color updates
DTCurrie Jun 2, 2026
d3f4b78
Merge branch 'app-16292/2-details-refactor' of github.com:viam-labs/m…
DTCurrie Jun 2, 2026
70a5b6f
Merge branch 'app-16292/2-details-refactor' of github.com:viam-labs/m…
DTCurrie Jun 2, 2026
22b2dc9
Merge branch 'main' into app-16292/2-details-refactor
DTCurrie Jun 2, 2026
5626401
Merge branch 'app-16292/2-details-refactor' into app-16292/3-componen…
DTCurrie Jun 2, 2026
156feed
Apply suggestions from code review
DTCurrie Jun 3, 2026
299bed5
fix: correct useThrelte mock structure and remove duplicate guard
github-actions[bot] Jun 3, 2026
2cdca10
Apply suggestion from @claude[bot]
DTCurrie Jun 3, 2026
fb7f589
Apply suggestion from @claude[bot]
DTCurrie Jun 3, 2026
7d48588
claude is bad at suggesting code edits
DTCurrie Jun 3, 2026
5ccbd2b
remove outdated mock
DTCurrie Jun 3, 2026
16b6268
Merge branch 'app-16292/2-details-refactor' into app-16292/3-componen…
DTCurrie Jun 3, 2026
84b0156
test: remove duplicate 'keeps original array intact' test case
github-actions[bot] Jun 3, 2026
b85557c
Merge branch 'app-16292/2-details-refactor' of github.com:viam-labs/m…
DTCurrie Jun 3, 2026
e715f79
Merge branch 'app-16292/3-component-tweaks' of github.com:viam-labs/m…
DTCurrie Jun 3, 2026
fec6d11
Merge branch 'main' of github.com:viam-labs/motion-tools into app-162…
DTCurrie Jun 4, 2026
6bc1fd6
cleanup
DTCurrie Jun 4, 2026
43ab2e9
cleanup and clarify
DTCurrie Jun 4, 2026
f376b4d
cleanup
DTCurrie Jun 4, 2026
36463bf
Merge branch 'main' into app-16292/3-component-tweaks
DTCurrie Jun 8, 2026
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
5 changes: 5 additions & 0 deletions .changeset/component-tweaks-for-gizmo-mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@viamrobotics/motion-tools': patch
---

Default `Line` and `Mesh` opacity to `1`, fix `LineDots` instance ID tracking, enable BVH raycasting in `'gizmo'` interaction mode, fix stale matrix reads in `SelectedTransformControls`, and add `isOpen` / `close` to `Popover` snippets plus a `shapes` icon and `disableTooltip` prop on dashboard `Button`
5 changes: 5 additions & 0 deletions .changeset/details-panel-subcomponents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@viamrobotics/motion-tools': patch
---

Split the Details overlay into focused subcomponents under `details/` and expose a `details-extensions` portal target for plugin-supplied editors
5 changes: 5 additions & 0 deletions .changeset/gizmo-foundation-utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@viamrobotics/motion-tools': patch
---

Add `writeMatrix` and `CustomDetails` ECS traits, a `firstHitOnly` raycaster option, and a `'gizmo'` interaction mode
2 changes: 1 addition & 1 deletion src/lib/components/Entities/Line.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
return rgb
})

const currentOpacity = $derived(opacity.current ?? 0.7)
const currentOpacity = $derived(opacity.current ?? 1)

const mesh = new Line2()
mesh.matrixAutoUpdate = false
Expand Down
11 changes: 8 additions & 3 deletions src/lib/components/Entities/LineDots.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,15 @@

$effect(() => {
if (!positions) return
// Track the IDs `addInstance` returns rather than assuming they're a
// sequential 0..N-1 range — when positions changes (e.g. a line gizmo
// being placed), cleanup-by-index would target slots that were never
// allocated for this effect run and throw "Invalid instanceId".
const instances: number[] = []
for (let i = 0, l = positions.length; i < l; i += 3) {
const dotIndex = i / 3
const instance = mesh.addInstance(geometryID)
instances.push(instance)
matrix.makeTranslation(positions[i + 0], positions[i + 1], positions[i + 2])
matrix.scale(vec3.setScalar(scale))
mesh.setMatrixAt(instance, matrix)
Expand All @@ -55,9 +61,8 @@
}

return () => {
if (!positions) return
for (let i = 0, l = positions.length / 3; i < l; i += 1) {
mesh.deleteInstance(i)
for (const instance of instances) {
mesh.deleteInstance(instance)
}
}
})
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Entities/Mesh.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
return colors.default
})

const currentOpacity = $derived(opacity.current ?? 0.7)
const currentOpacity = $derived(opacity.current ?? 1)

const isCapsule = $derived(capsule.current !== undefined)

Expand Down
3 changes: 2 additions & 1 deletion src/lib/components/Scene.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
const bvhEnabled = $derived(
settings.current.renderSubEntityHoverDetail ||
settings.current.interactionMode === 'measure' ||
settings.current.interactionMode === 'select'
settings.current.interactionMode === 'select' ||
settings.current.interactionMode === 'gizmo'
)

bvh(raycaster, () => ({ helper: false, enabled: bvhEnabled }))
Expand Down
18 changes: 12 additions & 6 deletions src/lib/components/SelectedTransformControls.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { TransformControls } from '@threlte/extras'
import { Matrix4, Quaternion, Vector3 } from 'three'
import { Matrix4 } from 'three'

import type { FrameEditSession } from '$lib/editing/FrameEditSession'

Expand Down Expand Up @@ -64,8 +64,6 @@
const isSphereScale = $derived(activeMode === 'scale' && sphere.current !== undefined)
const isCapsuleScale = $derived(activeMode === 'scale' && capsule.current !== undefined)

const quaternion = new Quaternion()
const vector3 = new Vector3()
const refPose = createPose()
const tempRefMatrix = new Matrix4()
const tempEditedMatrix = new Matrix4()
Expand Down Expand Up @@ -131,11 +129,19 @@
const matrix = entity.get(traits.Matrix)
if (matrix) {
matrixToPose(matrix, tempPose)
// Frame-style renderers (Frame.svelte, GizmoPlane, GizmoArrow,
// etc.) set `group.matrixAutoUpdate = false` and re-compose the
// matrix from `worldMatrix` on every flush. Under that flag,
// `getWorldQuaternion`/`getWorldPosition` skip updating the
// local matrix and return the stale pre-drag transform — so
// the gizmo handles move visually but the entity never
// actually rotates/translates. Read what TransformControls
// wrote into the local fields directly. Renderers mount under
// an identity-ish root, so local ≈ world here.
if (activeMode === 'translate') {
vector3ToPose(ref.getWorldPosition(vector3), tempPose)
vector3ToPose(ref.position, tempPose)
} else {
quaternionToPose(ref.getWorldQuaternion(quaternion), tempPose)
ref.quaternion.copy(quaternion)
quaternionToPose(ref.quaternion, tempPose)
}
poseToMatrix(tempPose, matrix)
entity.changed(traits.Matrix)
Comment thread
DTCurrie marked this conversation as resolved.
Outdated
Expand Down
Loading