diff --git a/resources/rigs/rig-bird.glb b/resources/rigs/rig-bird.glb
new file mode 100644
index 0000000..da9e1c8
Binary files /dev/null and b/resources/rigs/rig-bird.glb differ
diff --git a/resources/rigs/rig-dragon.glb b/resources/rigs/rig-dragon.glb
new file mode 100644
index 0000000..fd38d41
Binary files /dev/null and b/resources/rigs/rig-dragon.glb differ
diff --git a/resources/rigs/rig-fox.glb b/resources/rigs/rig-fox.glb
new file mode 100644
index 0000000..28194a2
Binary files /dev/null and b/resources/rigs/rig-fox.glb differ
diff --git a/resources/rigs/rig-human.glb b/resources/rigs/rig-human.glb
new file mode 100644
index 0000000..832a222
Binary files /dev/null and b/resources/rigs/rig-human.glb differ
diff --git a/resources/rigs/rig-kaiju.glb b/resources/rigs/rig-kaiju.glb
new file mode 100644
index 0000000..183716c
Binary files /dev/null and b/resources/rigs/rig-kaiju.glb differ
diff --git a/resources/rigs/rig-shark.glb b/resources/rigs/rig-shark.glb
new file mode 100644
index 0000000..7fb5429
Binary files /dev/null and b/resources/rigs/rig-shark.glb differ
diff --git a/resources/rigs/rig-snake.glb b/resources/rigs/rig-snake.glb
new file mode 100644
index 0000000..77b098f
Binary files /dev/null and b/resources/rigs/rig-snake.glb differ
diff --git a/resources/rigs/rig-spider.glb b/resources/rigs/rig-spider.glb
new file mode 100644
index 0000000..74794c2
Binary files /dev/null and b/resources/rigs/rig-spider.glb differ
diff --git a/src/components/meshEditor/BoneMappingModal.jsx b/src/components/meshEditor/BoneMappingModal.jsx
index 1d27056..a821d68 100644
--- a/src/components/meshEditor/BoneMappingModal.jsx
+++ b/src/components/meshEditor/BoneMappingModal.jsx
@@ -3,12 +3,20 @@
// bones (target, right column) so clips can be retargeted. Mirrors the
// mesh2motion mapping UI: drag a source bone onto a target row, or click a
// source then a target. Auto-Map fills the mapping heuristically.
+//
+// To make it obvious *where* each bone lives (names alone rarely tell you), the
+// far-left column shows two live 3D skeletons — the reference (source) on top
+// and the user's mesh (target) below. Click a bone in a view to select it (same
+// as clicking its row), and hovering a list row flashes that bone in 3D.
import { useEffect, useMemo, useState } from 'react'
+import BoneSkeletonView from './BoneSkeletonView'
export default function BoneMappingModal({
referenceLabel,
sourceBones,
targetBones,
+ sourceSkeleton,
+ targetSkeleton,
initialMapping,
onAutoMap,
onSave,
@@ -18,6 +26,9 @@ export default function BoneMappingModal({
const [sourceFilter, setSourceFilter] = useState('')
const [targetFilter, setTargetFilter] = useState('')
const [pickedSource, setPickedSource] = useState(null)
+ const [pickedTarget, setPickedTarget] = useState(null)
+ const [hoverSource, setHoverSource] = useState(null)
+ const [hoverTarget, setHoverTarget] = useState(null)
const [dragSource, setDragSource] = useState(null)
// Close on Escape.
@@ -28,6 +39,7 @@ export default function BoneMappingModal({
}, [onClose])
const mappedSources = useMemo(() => new Set(Object.values(mapping)), [mapping])
+ const mappedTargets = useMemo(() => new Set(Object.keys(mapping)), [mapping])
const mappedCount = Object.keys(mapping).length
const filteredSources = useMemo(
@@ -59,6 +71,7 @@ export default function BoneMappingModal({
}
const handleTargetClick = targetName => {
+ setPickedTarget(targetName)
if (pickedSource) assign(targetName, pickedSource)
}
@@ -67,6 +80,13 @@ export default function BoneMappingModal({
setDragSource(null)
}
+ const toggleSource = name => setPickedSource(prev => (prev === name ? null : name))
+
+ // Bones to highlight in each 3D view: what the user is hovering in the list
+ // takes priority (so a hover flashes its location), else the current pick.
+ const sourceHighlight = hoverSource || pickedSource
+ const targetHighlight = hoverTarget || pickedTarget
+
return (
e.stopPropagation()}>
@@ -74,8 +94,9 @@ export default function BoneMappingModal({
Map bones — {referenceLabel}
- Assign each animation (source) bone to a bone on your mesh (target). Drag a source
- bone onto a target, or click a source then a target. {mappedCount} mapped.
+ Assign each animation (source) bone to a bone on your mesh (target). Rotate the 3D
+ views and click a bone to select it, drag a source bone onto a target, or click a
+ source then a target. {mappedCount} mapped.
+ {/* 3D SKELETON VIEWS */}
+
+
+
+
+
{/* SOURCE column */}
@@ -106,7 +145,9 @@ export default function BoneMappingModal({
draggable
onDragStart={() => setDragSource(name)}
onDragEnd={() => setDragSource(null)}
- onClick={() => setPickedSource(pickedSource === name ? null : name)}
+ onClick={() => toggleSource(name)}
+ onMouseEnter={() => setHoverSource(name)}
+ onMouseLeave={() => setHoverSource(null)}
title={used ? `${name} (mapped)` : name}
>
drag_indicator
@@ -149,6 +190,8 @@ export default function BoneMappingModal({
key={name}
className={`mesh-editor-bonemap__target ${src ? 'mesh-editor-bonemap__target--mapped' : ''} ${pickedSource ? 'mesh-editor-bonemap__target--droppable' : ''}`}
onClick={() => handleTargetClick(name)}
+ onMouseEnter={() => setHoverTarget(name)}
+ onMouseLeave={() => setHoverTarget(null)}
onDragOver={e => e.preventDefault()}
onDrop={() => handleDrop(name)}
>
diff --git a/src/components/meshEditor/BoneSkeletonView.jsx b/src/components/meshEditor/BoneSkeletonView.jsx
new file mode 100644
index 0000000..96f200f
--- /dev/null
+++ b/src/components/meshEditor/BoneSkeletonView.jsx
@@ -0,0 +1,134 @@
+// A small, self-contained 3D skeleton viewer used inside the Bone-mapping modal
+// so you can rotate a rig and click its bones to see where each one is (helpful
+// when a bone's name alone doesn't tell you which limb it drives).
+//
+// IMPORTANT: it renders from the PLAIN data returned by
+// `extractSkeletonFromObject` (joints/segments/names), NOT the live THREE scene.
+// The reference/target scenes are shared objects also used for retargeting and
+// preview — dropping them into another