rig-review 1.3.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/ANIMATION_INSPECTION.md +1 -1
- package/docs/DESIGN.md +2 -0
- package/docs/PANELS.md +8 -5
- package/docs/REVIEW_PACKAGE.md +1 -1
- package/package.json +2 -2
- package/src/environment.ts +12 -4
- package/web/animation-inspection.ts +10 -19
- package/web/catalog-en.ts +1 -3
- package/web/catalog-ko.ts +1 -3
- package/web/compare-picked-tools.ts +2 -5
- package/web/compare.css +4 -2
- package/web/compare.ts +6 -1
- package/web/i18n.ts +2 -1
- package/web/index.html +1 -1
- package/web/main.ts +7 -21
- package/web/stage-pick.ts +150 -0
- package/web/styles.css +4 -2
- package/web/view-controls.ts +17 -5
|
@@ -4,7 +4,7 @@ Animate → Transport offers a timeline, a stored-curve view and a bone tree for
|
|
|
4
4
|
|
|
5
5
|
The timeline lists bone groups followed by slot groups, one lane per stored timeline, with a mark per key including simultaneous keys. Key times remain exact seconds. Clicking a mark seeks through the existing transport; transport movement updates its playhead. No FPS is inferred. A selected bone filters its direct bone tracks; a selected slot filters that slot's tracks. Whole rig clears the filter.
|
|
6
6
|
|
|
7
|
-
Tree, Parts and stage share selection. Enable Bone points in Animate to pick bones on stage. A bone highlights its directly attached Parts rows, including an empty set for a bone without slots; it does not select an arbitrary child slot. Clicking drawn part geometry selects its slot. Picking uses the held drawn primitives and their resolved clip. Overlapping bone points pick the last active bone in compiled source order; the tree offers exact targets. Pan gestures remain pan; the existing Setup editors keep their own handles. Bone selection is page-local; existing slot identity/bookmark behavior is unchanged.
|
|
7
|
+
Tree, Parts and stage share selection. Enable Bone points in Animate to pick bones on stage. A bone highlights its directly attached Parts rows, including an empty set for a bone without slots; it does not select an arbitrary child slot. Clicking drawn part geometry selects its slot. Hovering previews that click with the same hit test: the part's outline, a faint tint and its slot name ([Inspect a part](PANELS.md#inspect-a-part)). Picking uses the held drawn primitives and their resolved clip. Overlapping bone points pick the last active bone in compiled source order; the tree offers exact targets. Pan gestures remain pan; the existing Setup editors keep their own handles. Bone selection is page-local; existing slot identity/bookmark behavior is unchanged.
|
|
8
8
|
|
|
9
9
|
## Curve values
|
|
10
10
|
|
package/docs/DESIGN.md
CHANGED
|
@@ -105,6 +105,8 @@ The Parts explorer (the review page's left column; the compare page's right one)
|
|
|
105
105
|
|
|
106
106
|
Published Play1.14.0 supplies a frozen `slotIdentity()` snapshot coherent with `posedFrame().generation`. Review retains copied frame/identity together only after equal-generation and source-slot/order checks, uses the player's default public filter, and never seeks/reposes/changes physics merely to read identity. Exact owning skin/key, active set/skin and null reasons come from that snapshot, not a unique-declaration or texture match. A resolved identity can remain known without visible geometry or fit bounds. Clip declarations do not invent keys when the API reports no drawable attachment.
|
|
107
107
|
|
|
108
|
+
A click on the rig view in Animate selects the slot under it, and hovering previews that click (#330): the same hit test (`web/stage-pick.ts` `pickAt`) draws the part's outline and tint with its slot name beside the pointer, styled apart from the selection box, and shows nothing where the click would select nothing. It is display state only, never written to a session, feedback or export. See [Inspect a part](PANELS.md#inspect-a-part).
|
|
109
|
+
|
|
108
110
|
Selecting the selected row again (click, Space or Enter) clears the selection, the same as **Whole rig**; the control value is then `null`.
|
|
109
111
|
|
|
110
112
|
Each row shows a 24×24 CSS-pixel thumbnail (2× backing store) of the attachment the held identity snapshot says is active: the region the compiled model's `pages[].regions[]` declares under that attachment's path (or name), cut from the loaded page image by its page UVs. It is drawn when the row scrolls into view and cached per skin/attachment key. A row whose attachment has no such region (no active attachment, a non-image kind, no or several regions of that name, a rotated packing, a page that did not load) shows the type icon, and its tooltip names the reason. A whole atlas page is never a part's thumbnail. Row text and the slot count are unchanged; on the compare page each side registers its own thumbnail source from that side's compiled model and loaded page images. Both pages keep the Parts heading, search input, Whole rig button, Solo toggle and result count in a fixed tool area above a scrolling list of single-line ellipsized rows with uniform height, preserving full row text in `title` and `aria-label`.
|
package/docs/PANELS.md
CHANGED
|
@@ -50,14 +50,13 @@ inspect: a **Wind** base (−100…100), **Breeze**, a **Gust** pulse
|
|
|
50
50
|
(peak 0…200, duration 0.1…20 s, **Repeat** every max(6, duration + 0.6) s)
|
|
51
51
|
and **Gravity** (0…4), applied through `player.environment` in the same frame
|
|
52
52
|
step that draws. The gust clock is the stepped player time, so pausing freezes
|
|
53
|
-
it. **Jolt** sends a translate-and-return impulse through `player.moved
|
|
54
|
-
|
|
55
|
-
instead of the camera (Space still pans). **Reset physics** returns the
|
|
53
|
+
it. **Jolt** sends a translate-and-return impulse through `player.moved`.
|
|
54
|
+
**Reset physics** returns the
|
|
56
55
|
runtime start values and re-poses from the current time, clearing the physics
|
|
57
56
|
history. Until a control is touched the player stays at the runtime start values. The
|
|
58
57
|
state is kept in the local draft and recorded in feedback as
|
|
59
|
-
`context.environment`; nothing is written to the model or motion.
|
|
60
|
-
page
|
|
58
|
+
`context.environment`; nothing is written to the model or motion. On the
|
|
59
|
+
compare page the block is in Animate (shared markup, #234) and drives the picked build only.
|
|
61
60
|
|
|
62
61
|
Below it, the **Physics tuning** panel (`#physics-panel`) edits the physics
|
|
63
62
|
constraints through the producer. Each row is a constraint of the inspected
|
|
@@ -256,6 +255,10 @@ The pinned published `@rig-c/play`1.14.0 supplies `slotIdentity()` and frame gen
|
|
|
256
255
|
|
|
257
256
|
Source-bound links/drafts and explicit feedback preserve that side/slot plus exact attachment/owning skin/set/active skin/null reason. A restored explicit target is checked after restoring its animation/time/set and drawing; `PART_IDENTITY_MISMATCH` rolls back rather than silently substituting another key. Older slot-only links remain readable and resolve from the current authoritative snapshot. Runtime generation is current observation/feedback evidence, never a persistent identity. Named vertex weights and original source alpha remain unavailable in this inspection; packed pages are not original part images.
|
|
258
257
|
|
|
258
|
+
**A drag on the rig view moves the physics.** A plain drag on the rig pane pans the camera and, on the same move, tells the rig's player it was carried, so hair and cloth trail the way they do in the Family viewer (rig-c/examples `family/viewer/index.html`, whose tuning this takes as written): each pointer move of `dx`, `dy` page px at root scale `s` calls `player.moved({x: clamp(dx/s × 0.25, ±8), y: clamp(−dy/s × 0.25, ±6)})`. A press is a click until it travels more than 3 px from where it went down (`CLICK_SLOP_PX` in `web/stage-pick.ts`, the one line both the pick and the drag read); a click selects a part as below and moves nothing, and a press that once passed the line is a drag even if it is released where it started. The first impulse carries the whole travel since the press. A press made with **Space** held pans only, a press an editor handle or comment mode takes is unchanged, and the reference pane pans without an impulse. On the compare page a drag on either build carries both, each by its own root scale, so A and B take the same stimulus. `player.moved` applies on the player's next step, so on a paused rig nothing swings until it steps. It is inspection only: nothing is recorded in drafts, feedback or exports. The earlier **Drag to trail** toggle, which moved the physics with the camera held, is retired (#331): the default drag covers it and **Jolt** gives an impulse without moving the camera.
|
|
259
|
+
|
|
260
|
+
**Hover preview on the stage.** In **Animate**, where a click on drawn part geometry selects its slot, resting the mouse over the rig view previews that click: the part a click at that point would select gets a solid white outline (dark halo) over a faint light tint, and its slot name sits beside the pointer. It is distinct from the selection's dashed amber box. The preview and the click are one hit test (`web/stage-pick.ts` `pickAt`: the held drawn primitives with their resolved clip, the last drawn on top, only a slot the inspection lists); where a click would select nothing — empty stage, Setup, a button or handle under the pointer, Space held — nothing is shown. It is hidden while a button is pressed (a pan or a drag), while comment mode or an editor handle owns the press, and when the pointer leaves the view. It repaints only when what it would draw changes, so a still pointer over a paused rig paints nothing. Touch and keyboard show no preview, and tap and keyboard selection are unchanged. On the compare page it follows the picked build's own rig. The preview is never recorded: sessions, drafts, feedback and exports are unchanged.
|
|
261
|
+
|
|
259
262
|
This explorer is inspection. Producer-backed optimization and candidate Apply/undo/export remain separate work; the explorer does not generate mesh, rig or motion bytes.
|
|
260
263
|
|
|
261
264
|
## Chest regions (designate, rebuild, watch)
|
package/docs/REVIEW_PACKAGE.md
CHANGED
|
@@ -589,7 +589,7 @@ Browser players retain play's default DOM mode and default mesh backend. Rigid
|
|
|
589
589
|
parts remain DOM images; a WebGL mesh label does not claim full-frame GL drawing.
|
|
590
590
|
WebGL is requested by the published default, with Canvas2D as the supported mesh
|
|
591
591
|
fallback. Accurate public actual-flush telemetry requires play 1.11.1 or later;
|
|
592
|
-
this checkout consumes pinned 1.22.
|
|
592
|
+
this checkout consumes pinned 1.22.2. The consumer does not probe GL or inspect
|
|
593
593
|
private renderer state. The separate Node strip exporter remains Canvas2D.
|
|
594
594
|
|
|
595
595
|
The backend badge is sampled only after successful draw/frame calls. Fresh mesh
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rig-review",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local human rig inspection and structured feedback export",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@napi-rs/canvas": "1.0.11",
|
|
22
|
-
"@rig-c/play": "1.22.
|
|
22
|
+
"@rig-c/play": "1.22.2"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/bun": "^1.3.0",
|
package/src/environment.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Inspection-only environment for Animate: a pure wind model (base, breeze, gust),
|
|
3
|
-
* the jolt packet, the drag
|
|
3
|
+
* the jolt packet, the drag impulse and the read-only physics constraint
|
|
4
4
|
* list. Nothing here writes the model or motion; the player stays the only solver.
|
|
5
5
|
*
|
|
6
6
|
* The wind model ports the semantics of the public parts-examples viewer's
|
|
@@ -134,10 +134,18 @@ export function dueJolts(queue:readonly JoltStep[],now:number):{due:JoltStep[];p
|
|
|
134
134
|
due.sort((a,b)=>a.at-b.at);return {due,pending};
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
/**
|
|
138
|
-
|
|
137
|
+
/**
|
|
138
|
+
* The drag impulse (#331), the Family viewer's tuning as written (rig-c/examples `family/viewer/index.html`, the stage's
|
|
139
|
+
* `pointermove`): the camera follows the pointer, and on the same move every player gets
|
|
140
|
+
* `{x: clamp(dx/scale*.25, 8), y: clamp(-dy/scale*.25, 6)}`. The factor and the two limits are that demo's choice, taken
|
|
141
|
+
* as they stand rather than derived; the clamp is symmetric (±limit) and applies per move.
|
|
142
|
+
*/
|
|
143
|
+
export const DRAG_IMPULSE=Object.freeze({factor:.25,limitX:8,limitY:6});
|
|
144
|
+
/** One pointer move (page px, y down) as `player.moved` wants it: ÷ the root's scale, y negated (world y up), the demo's factor and clamps. */
|
|
145
|
+
export function dragImpulse(dx:number,dy:number,scale:number):{x:number;y:number}|null {
|
|
139
146
|
if(!Number.isFinite(dx)||!Number.isFinite(dy)||!Number.isFinite(scale)||scale<=0)return null;
|
|
140
|
-
|
|
147
|
+
const clamp=(v:number,limit:number)=>Math.max(-limit,Math.min(limit,v))||0;
|
|
148
|
+
return {x:clamp(dx/scale*DRAG_IMPULSE.factor,DRAG_IMPULSE.limitX),y:clamp(-dy/scale*DRAG_IMPULSE.factor,DRAG_IMPULSE.limitY)};
|
|
141
149
|
}
|
|
142
150
|
|
|
143
151
|
/** Columns read as the compiled model declares them; an absent field stays absent. */
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
import type {AppliedAnimation} from '../src/applied-context.ts';
|
|
29
29
|
import {sourceTextContent} from './i18n.ts';
|
|
30
30
|
import type {AnimationSourceView} from './rebuild-client.ts';
|
|
31
|
+
import {bindStagePick,domHoverPainter,type StagePick} from './stage-pick.ts';
|
|
31
32
|
import {InspectionSelection} from './inspection-selection.ts';
|
|
32
33
|
import {animationPreviewAdjust} from './preview.ts';
|
|
33
34
|
|
|
@@ -96,16 +97,6 @@ export interface AnimationSideState {
|
|
|
96
97
|
zoom:number;
|
|
97
98
|
}
|
|
98
99
|
|
|
99
|
-
/** All picking reads the last drawn primitives, including their resolved clip; never a setup bounding box. */
|
|
100
|
-
export function pickedSlot(frame:PosedFrame,x:number,y:number):string|null {
|
|
101
|
-
const inside=(p:readonly number[])=>{let hit=false;for(let i=0,j=p.length-2;i<p.length;j=i,i+=2){const ax=p[i]!,ay=p[i+1]!,bx=p[j]!,by=p[j+1]!;if((ay>y)!==(by>y)&&x<(bx-ax)*(y-ay)/(by-ay)+ax)hit=!hit;}return hit;};
|
|
102
|
-
for(const row of [...frame.order].reverse()){
|
|
103
|
-
if(row.clip&&inside(row.clip.polygon)===row.clip.inverse)continue;
|
|
104
|
-
if(row.kind==='region'&&inside(row.corners))return row.slot;
|
|
105
|
-
if(row.kind==='mesh')for(let i=0;i<row.triangles.length;i+=3){const p=row.triangles.slice(i,i+3).flatMap(v=>[row.vertices[v*2]!,row.vertices[v*2+1]!]);if(inside(p))return row.slot;}
|
|
106
|
-
}return null;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
100
|
export const ANIMATION_APPLY_ISOLATION_NOTE =
|
|
110
101
|
'An animation Apply builds from the handoff config.json and animations_from file into scratch (rig-parts rig → rigc build → rig-parts check), so it does not carry another kind\'s Apply on the stage.';
|
|
111
102
|
|
|
@@ -151,8 +142,8 @@ export class AnimationInspectionPanel {
|
|
|
151
142
|
private picks:HTMLElement;
|
|
152
143
|
private bones=new Map<string,{x:number;y:number;a:number;b:number;c:number;d:number;hasMatrix:boolean}>();
|
|
153
144
|
private frame:PosedFrame|null=null;
|
|
154
|
-
private down:{x:number;y:number}|null=null;
|
|
155
145
|
private space=false;
|
|
146
|
+
private stagePick:StagePick|null=null;
|
|
156
147
|
private disposers:(()=>void)[]=[];
|
|
157
148
|
private boneButtons=new Map<string,HTMLButtonElement>();
|
|
158
149
|
private bonePoints=false;
|
|
@@ -331,12 +322,11 @@ export class AnimationInspectionPanel {
|
|
|
331
322
|
this.easeSelect.onchange=()=>{this.applyCurveModeChange(this.easeSelect.value);};
|
|
332
323
|
this.bindCurveHandleDrag();
|
|
333
324
|
this.picks=document.createElement('div');this.picks.className='animation-stage-picks';stage.append(this.picks);
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
};
|
|
325
|
+
// #330: the click and the hover preview are one hit test (web/stage-pick.ts `pickAt`); the panel only supplies its state.
|
|
326
|
+
this.stagePick=bindStagePick({stage,project:(x,y)=>options.project(x,y),frame:()=>this.frame,enabled:()=>options.enabled(),held:()=>this.space,
|
|
327
|
+
selectable:slot=>this.has({kind:'slot',name:slot}),select:slot=>this.select({kind:'slot',name:slot}),paint:domHoverPainter(this.picks)});
|
|
338
328
|
const key=(e:KeyboardEvent)=>{
|
|
339
|
-
if(e.code==='Space')this.space=e.type==='keydown';
|
|
329
|
+
if(e.code==='Space'){this.space=e.type==='keydown';this.stagePick?.refresh();}
|
|
340
330
|
if(e.type==='keydown'&&(e.key==='Delete'||e.key==='Backspace')&&!this.isBusy){
|
|
341
331
|
const active=document.activeElement as Element|null;
|
|
342
332
|
const inField=active&&typeof active.closest==='function'&&active.closest('input,textarea,select');
|
|
@@ -352,9 +342,9 @@ export class AnimationInspectionPanel {
|
|
|
352
342
|
}
|
|
353
343
|
}
|
|
354
344
|
};
|
|
355
|
-
const blur=()=>{this.space=false;this.
|
|
356
|
-
|
|
357
|
-
this.disposers.push(()=>{
|
|
345
|
+
const blur=()=>{this.space=false;this.stagePick?.reset();};
|
|
346
|
+
window.addEventListener('keydown',key);window.addEventListener('keyup',key);window.addEventListener('blur',blur);
|
|
347
|
+
this.disposers.push(()=>{this.stagePick?.dispose();window.removeEventListener('keydown',key);window.removeEventListener('keyup',key);window.removeEventListener('blur',blur);});
|
|
358
348
|
|
|
359
349
|
if(typeof ResizeObserver!=='undefined'&&typeof host.closest==='function'){
|
|
360
350
|
const playbackPanel=host.closest<HTMLElement>('[data-inspector-panel]');
|
|
@@ -2839,6 +2829,7 @@ export class AnimationInspectionPanel {
|
|
|
2839
2829
|
stage.dataset.selectedName=selected?.name??'';
|
|
2840
2830
|
const enabled=this.options.enabled();
|
|
2841
2831
|
this.picks.hidden=!enabled;
|
|
2832
|
+
this.stagePick?.refresh();
|
|
2842
2833
|
const otherMode:'rotate'|'translate'=this.poseMode==='rotate'?'translate':'rotate';
|
|
2843
2834
|
let order=0;
|
|
2844
2835
|
for(const [name,p]of this.bones){
|
package/web/catalog-en.ts
CHANGED
|
@@ -634,9 +634,7 @@ export const enCatalog: Readonly<Record<string, string>> = {
|
|
|
634
634
|
"Drag bone handles on stage to translate (hold Alt during drag to rotate)": "Drag bone handles on stage to translate (hold Alt during drag to rotate)",
|
|
635
635
|
"Drag on stage": "Drag on stage",
|
|
636
636
|
"Drag to pan · scroll to zoom · cameras synchronized": "Drag to pan · scroll to zoom · cameras synchronized",
|
|
637
|
-
"
|
|
638
|
-
"Drag to trail: dragging the rig pane tells the physics the rig moved; the camera stays. Hold Space to pan. Reset returns the runtime start values and re-poses from the current time, clearing the physics history.": "Drag to trail: dragging the rig pane tells the physics the rig moved; the camera stays. Hold Space to pan. Reset returns the runtime start values and re-poses from the current time, clearing the physics history.",
|
|
639
|
-
"Dragging the rig pane moves the rig's physics instead of the camera. Hold Space to pan.": "Dragging the rig pane moves the rig's physics instead of the camera. Hold Space to pan.",
|
|
637
|
+
"Dragging the rig pane pans the camera and tells the physics the rig moved, so hair and cloth trail; a click that does not move still selects a part. Hold Space to pan only. Reset returns the runtime start values and re-poses from the current time, clearing the physics history.": "Dragging the rig pane pans the camera and tells the physics the rig moved, so hair and cloth trail; a click that does not move still selects a part. Hold Space to pan only. Reset returns the runtime start values and re-poses from the current time, clearing the physics history.",
|
|
640
638
|
"Draw polygon": "Draw polygon",
|
|
641
639
|
"Drawn": "Drawn",
|
|
642
640
|
"Drawn late": "Drawn late",
|
package/web/catalog-ko.ts
CHANGED
|
@@ -634,9 +634,7 @@ export const koCatalog: Readonly<Record<string, string>> = {
|
|
|
634
634
|
"Drag bone handles on stage to translate (hold Alt during drag to rotate)": "스테이지에서 본 핸들을 드래그하여 이동 (드래그 중 Alt를 누르면 회전)",
|
|
635
635
|
"Drag on stage": "스테이지에서 드래그",
|
|
636
636
|
"Drag to pan · scroll to zoom · cameras synchronized": "드래그하여 이동 · 스크롤하여 확대/축소 · 카메라 동기화됨",
|
|
637
|
-
"
|
|
638
|
-
"Drag to trail: dragging the rig pane tells the physics the rig moved; the camera stays. Hold Space to pan. Reset returns the runtime start values and re-poses from the current time, clearing the physics history.": "드래그 트레일: 리그 창을 드래그하면 카메라는 고정된 채 리그가 이동한 것으로 물리에 전달됩니다. Space를 누른 채 드래그하면 화면을 이동합니다. 초기화는 런타임 시작 값으로 되돌리고 물리 히스토리를 지운 뒤 현재 시간부터 다시 포즈를 잡습니다.",
|
|
639
|
-
"Dragging the rig pane moves the rig's physics instead of the camera. Hold Space to pan.": "리그 창을 드래그하면 카메라 대신 리그의 물리가 움직입니다. Space를 누른 채 드래그하면 화면을 이동합니다.",
|
|
637
|
+
"Dragging the rig pane pans the camera and tells the physics the rig moved, so hair and cloth trail; a click that does not move still selects a part. Hold Space to pan only. Reset returns the runtime start values and re-poses from the current time, clearing the physics history.": "리그 창을 드래그하면 화면이 이동하면서 리그가 움직인 것으로 물리에 전달되어 머리카락과 옷이 뒤따라 흔들립니다. 움직이지 않은 클릭은 그대로 파트를 선택합니다. Space를 누른 채 드래그하면 화면만 이동합니다. 초기화는 런타임 시작 값으로 되돌리고 물리 히스토리를 지운 뒤 현재 시간부터 다시 포즈를 잡습니다.",
|
|
640
638
|
"Draw polygon": "다각형 그리기",
|
|
641
639
|
"Drawn": "그려짐",
|
|
642
640
|
"Drawn late": "지연 그려짐",
|
|
@@ -57,7 +57,7 @@ import { appliedBuildOwner, appliedPanelOps, dropNoticeForPanel, reconcilePanelS
|
|
|
57
57
|
import { compareSeekStep } from '../src/compare-playhead.ts';
|
|
58
58
|
import { composeAdjust, PhysicsPreview } from './preview.ts';
|
|
59
59
|
import {
|
|
60
|
-
createWindModel, environmentFor, windReadout, RUNTIME_START_READOUT, joltPacket, dueJolts,
|
|
60
|
+
createWindModel, environmentFor, windReadout, RUNTIME_START_READOUT, joltPacket, dueJolts,
|
|
61
61
|
loadModelDocument, environmentContext, environmentJson, type JoltStep, type WindSnapshot, type WindState,
|
|
62
62
|
} from '../src/environment.ts';
|
|
63
63
|
import { environmentCheckRows, restartsWindClock, scheduleContext, worldExport, type ClipMove, type EnvironmentCheckView, type WorldExport } from './environment-world.ts';
|
|
@@ -2116,7 +2116,7 @@ export function mountComparePickedTools(host: ComparePickedToolsHost): ComparePi
|
|
|
2116
2116
|
}
|
|
2117
2117
|
|
|
2118
2118
|
function bindEnvironmentControls(): void {
|
|
2119
|
-
const environmentInputs = ['wind-base', 'wind-breeze', 'wind-gust', 'wind-repeat', 'wind-gust-peak', 'wind-gust-duration', 'gravity', 'jolt', '
|
|
2119
|
+
const environmentInputs = ['wind-base', 'wind-breeze', 'wind-gust', 'wind-repeat', 'wind-gust-peak', 'wind-gust-duration', 'gravity', 'jolt', 'physics-reset', 'environment-use', 'environment-export', 'environment-check'];
|
|
2120
2120
|
for (const id of environmentInputs) {
|
|
2121
2121
|
const node = document.getElementById(id) as HTMLInputElement | HTMLButtonElement | null;
|
|
2122
2122
|
if (node) node.disabled = false;
|
|
@@ -2174,9 +2174,6 @@ export function mountComparePickedTools(host: ComparePickedToolsHost): ComparePi
|
|
|
2174
2174
|
host.message(`Exported ${w.summary}. The download is the bytes readings, Apply and feedback carry; the package is unchanged.`);
|
|
2175
2175
|
};
|
|
2176
2176
|
button('environment-check').onclick = () => { void runEnvironmentCheck(); };
|
|
2177
|
-
input('drag-trail').onchange = () => {
|
|
2178
|
-
for (const s of ['a', 'b'] as const) el(`${s}-viewport`).dataset.trail = String(s === pickedSide && input('drag-trail').checked);
|
|
2179
|
-
};
|
|
2180
2177
|
}
|
|
2181
2178
|
|
|
2182
2179
|
function onInspectorTabChanged(): void {
|
package/web/compare.css
CHANGED
|
@@ -146,8 +146,8 @@ main{position:relative}.viewbar,.toolbar{anchor-name:--stage-comment-bar}#stage-
|
|
|
146
146
|
.pane[data-picked=true]{border-color:var(--rv-pressed-border)}
|
|
147
147
|
.inspector-body>[data-inspector-panel]{height:100%;overflow:auto;padding:12px 15px;min-height:0}
|
|
148
148
|
.view-tools{display:flex;gap:4px;flex:none}.view-tool{padding:5px 9px;font-size:11px;white-space:nowrap}
|
|
149
|
-
:root{--rv-region-a:#ff9f43;--rv-region-a-fill:rgba(255,159,67,.18);--rv-region-b:#4dd6ff;--rv-region-b-fill:rgba(77,214,255,.18);--rv-tick-inspected:#7cc8ff;--rv-tick-scratch:#ff9f43;--rv-mesh-region:#ff7ae0;--rv-mesh-region-fill:rgba(255,122,224,.12);--rv-mesh-handle:#ffffff;--rv-bust-r:#00e5ff;--rv-bust-r-fill:rgba(0,229,255,.13);--rv-bust-l:#52ff88;--rv-bust-l-fill:rgba(82,255,136,.13);--rv-bust-overlap:#ff5252;--rv-bust-overlap-fill:rgba(255,82,82,.13);--rv-bust-handle:#ffffff;--rv-bust-ink:#111318;--rv-bust-label-bg:rgba(12,14,18,.82);--rv-bust-flash:#ffcc00;--rv-landmark:#ffd34d;--rv-landmark-fill:#ffd34d;--rv-landmark-ink:#111318;--rv-mesh-veil:rgba(8,10,14,.55);--rv-mesh-edge:#69f1ff;--rv-mesh-hull:#ffb020;--rv-mesh-constraint:#ff4fd8;--rv-mesh-removed:#ff5252;--rv-mesh-vertex:#ffffff;--rv-mesh-ink:#111318;--rv-mesh-selected:#ffe14d;--rv-mesh-added:#52ff88;--rv-mesh-hover:#ffffff;--rv-mesh-box:#ffe14d;--rv-mesh-box-fill:rgba(255,225,77,.12);--rv-weight-0:#3d1a78;--rv-weight-half:#e0573a;--rv-weight-1:#fcef6c;--rv-weight-bone-1:#00e5ff;--rv-weight-bone-2:#ff7ae0;--rv-weight-bone-3:#52ff88;--rv-weight-bone-4:#ffb020;--rv-weight-bone-5:#a98bff;--rv-weight-bone-6:#ff5252;--rv-bone-line:#ffe26b;--rv-field-still:#69f1ff;--rv-field-inward:rgba(255,122,224,.28);--rv-field-inward-line:#ff7ae0;--rv-field-outward:rgba(105,241,255,.24);--rv-field-outward-line:#69f1ff;--rv-field-rest:#ffe26b;--rv-field-handle-bg:rgba(12,14,18,.82);--rv-field-ink:#f4f6fa;--rv-bone-origin:#ffe26b;--rv-bone-point:#69f1ff;--rv-bone-tip:#ff7ae0;--rv-bone-pending:#ffb020;--rv-bone-selected:#ffffff;--rv-bone-ink:#111318;--rv-bone-label-bg:rgba(12,14,18,.82)}
|
|
150
|
-
:root[data-theme=light]{--rv-region-a:#ff9f43;--rv-region-a-fill:rgba(255,159,67,.18);--rv-region-b:#4dd6ff;--rv-region-b-fill:rgba(77,214,255,.18);--rv-tick-inspected:#1a6fc0;--rv-tick-scratch:#c25e00;--rv-mesh-region:#c2189b;--rv-mesh-region-fill:rgba(194,24,155,.12);--rv-mesh-handle:#ffffff;--rv-bust-r:#00e5ff;--rv-bust-r-fill:rgba(0,229,255,.13);--rv-bust-l:#52ff88;--rv-bust-l-fill:rgba(82,255,136,.13);--rv-bust-overlap:#ff5252;--rv-bust-overlap-fill:rgba(255,82,82,.13);--rv-bust-handle:#ffffff;--rv-bust-ink:#111318;--rv-bust-label-bg:rgba(12,14,18,.82);--rv-bust-flash:#ffcc00;--rv-landmark:#ffd34d;--rv-landmark-fill:#ffd34d;--rv-landmark-ink:#111318;--rv-mesh-veil:rgba(245,247,251,.6);--rv-mesh-edge:#69f1ff;--rv-mesh-hull:#ffb020;--rv-mesh-constraint:#ff4fd8;--rv-mesh-removed:#ff5252;--rv-mesh-vertex:#ffffff;--rv-mesh-ink:#111318;--rv-mesh-selected:#ffe14d;--rv-mesh-added:#52ff88;--rv-mesh-hover:#ffffff;--rv-mesh-box:#ffe14d;--rv-mesh-box-fill:rgba(255,225,77,.12);--rv-weight-0:#3d1a78;--rv-weight-half:#e0573a;--rv-weight-1:#fcef6c;--rv-weight-bone-1:#00e5ff;--rv-weight-bone-2:#ff7ae0;--rv-weight-bone-3:#52ff88;--rv-weight-bone-4:#ffb020;--rv-weight-bone-5:#a98bff;--rv-weight-bone-6:#ff5252;--rv-bone-line:#ffe26b;--rv-field-still:#69f1ff;--rv-field-inward:rgba(255,122,224,.28);--rv-field-inward-line:#ff7ae0;--rv-field-outward:rgba(105,241,255,.24);--rv-field-outward-line:#69f1ff;--rv-field-rest:#ffe26b;--rv-field-handle-bg:rgba(12,14,18,.82);--rv-field-ink:#f4f6fa;--rv-bone-origin:#ffe26b;--rv-bone-point:#69f1ff;--rv-bone-tip:#ff7ae0;--rv-bone-pending:#ffb020;--rv-bone-selected:#ffffff;--rv-bone-ink:#111318;--rv-bone-label-bg:rgba(12,14,18,.82)}
|
|
149
|
+
:root{--rv-hover-pick-line:#ffffff;--rv-hover-pick-halo:rgba(12,14,18,.72);--rv-hover-pick-fill:rgba(255,255,255,.2);--rv-hover-pick-label-bg:rgba(12,14,18,.82);--rv-hover-pick-ink:#f4f6fa;--rv-region-a:#ff9f43;--rv-region-a-fill:rgba(255,159,67,.18);--rv-region-b:#4dd6ff;--rv-region-b-fill:rgba(77,214,255,.18);--rv-tick-inspected:#7cc8ff;--rv-tick-scratch:#ff9f43;--rv-mesh-region:#ff7ae0;--rv-mesh-region-fill:rgba(255,122,224,.12);--rv-mesh-handle:#ffffff;--rv-bust-r:#00e5ff;--rv-bust-r-fill:rgba(0,229,255,.13);--rv-bust-l:#52ff88;--rv-bust-l-fill:rgba(82,255,136,.13);--rv-bust-overlap:#ff5252;--rv-bust-overlap-fill:rgba(255,82,82,.13);--rv-bust-handle:#ffffff;--rv-bust-ink:#111318;--rv-bust-label-bg:rgba(12,14,18,.82);--rv-bust-flash:#ffcc00;--rv-landmark:#ffd34d;--rv-landmark-fill:#ffd34d;--rv-landmark-ink:#111318;--rv-mesh-veil:rgba(8,10,14,.55);--rv-mesh-edge:#69f1ff;--rv-mesh-hull:#ffb020;--rv-mesh-constraint:#ff4fd8;--rv-mesh-removed:#ff5252;--rv-mesh-vertex:#ffffff;--rv-mesh-ink:#111318;--rv-mesh-selected:#ffe14d;--rv-mesh-added:#52ff88;--rv-mesh-hover:#ffffff;--rv-mesh-box:#ffe14d;--rv-mesh-box-fill:rgba(255,225,77,.12);--rv-weight-0:#3d1a78;--rv-weight-half:#e0573a;--rv-weight-1:#fcef6c;--rv-weight-bone-1:#00e5ff;--rv-weight-bone-2:#ff7ae0;--rv-weight-bone-3:#52ff88;--rv-weight-bone-4:#ffb020;--rv-weight-bone-5:#a98bff;--rv-weight-bone-6:#ff5252;--rv-bone-line:#ffe26b;--rv-field-still:#69f1ff;--rv-field-inward:rgba(255,122,224,.28);--rv-field-inward-line:#ff7ae0;--rv-field-outward:rgba(105,241,255,.24);--rv-field-outward-line:#69f1ff;--rv-field-rest:#ffe26b;--rv-field-handle-bg:rgba(12,14,18,.82);--rv-field-ink:#f4f6fa;--rv-bone-origin:#ffe26b;--rv-bone-point:#69f1ff;--rv-bone-tip:#ff7ae0;--rv-bone-pending:#ffb020;--rv-bone-selected:#ffffff;--rv-bone-ink:#111318;--rv-bone-label-bg:rgba(12,14,18,.82)}
|
|
150
|
+
:root[data-theme=light]{--rv-hover-pick-line:#ffffff;--rv-hover-pick-halo:rgba(12,14,18,.72);--rv-hover-pick-fill:rgba(255,255,255,.2);--rv-hover-pick-label-bg:rgba(12,14,18,.82);--rv-hover-pick-ink:#f4f6fa;--rv-region-a:#ff9f43;--rv-region-a-fill:rgba(255,159,67,.18);--rv-region-b:#4dd6ff;--rv-region-b-fill:rgba(77,214,255,.18);--rv-tick-inspected:#1a6fc0;--rv-tick-scratch:#c25e00;--rv-mesh-region:#c2189b;--rv-mesh-region-fill:rgba(194,24,155,.12);--rv-mesh-handle:#ffffff;--rv-bust-r:#00e5ff;--rv-bust-r-fill:rgba(0,229,255,.13);--rv-bust-l:#52ff88;--rv-bust-l-fill:rgba(82,255,136,.13);--rv-bust-overlap:#ff5252;--rv-bust-overlap-fill:rgba(255,82,82,.13);--rv-bust-handle:#ffffff;--rv-bust-ink:#111318;--rv-bust-label-bg:rgba(12,14,18,.82);--rv-bust-flash:#ffcc00;--rv-landmark:#ffd34d;--rv-landmark-fill:#ffd34d;--rv-landmark-ink:#111318;--rv-mesh-veil:rgba(245,247,251,.6);--rv-mesh-edge:#69f1ff;--rv-mesh-hull:#ffb020;--rv-mesh-constraint:#ff4fd8;--rv-mesh-removed:#ff5252;--rv-mesh-vertex:#ffffff;--rv-mesh-ink:#111318;--rv-mesh-selected:#ffe14d;--rv-mesh-added:#52ff88;--rv-mesh-hover:#ffffff;--rv-mesh-box:#ffe14d;--rv-mesh-box-fill:rgba(255,225,77,.12);--rv-weight-0:#3d1a78;--rv-weight-half:#e0573a;--rv-weight-1:#fcef6c;--rv-weight-bone-1:#00e5ff;--rv-weight-bone-2:#ff7ae0;--rv-weight-bone-3:#52ff88;--rv-weight-bone-4:#ffb020;--rv-weight-bone-5:#a98bff;--rv-weight-bone-6:#ff5252;--rv-bone-line:#ffe26b;--rv-field-still:#69f1ff;--rv-field-inward:rgba(255,122,224,.28);--rv-field-inward-line:#ff7ae0;--rv-field-outward:rgba(105,241,255,.24);--rv-field-outward-line:#69f1ff;--rv-field-rest:#ffe26b;--rv-field-handle-bg:rgba(12,14,18,.82);--rv-field-ink:#f4f6fa;--rv-bone-origin:#ffe26b;--rv-bone-point:#69f1ff;--rv-bone-tip:#ff7ae0;--rv-bone-pending:#ffb020;--rv-bone-selected:#ffffff;--rv-bone-ink:#111318;--rv-bone-label-bg:rgba(12,14,18,.82)}
|
|
151
151
|
.chest-regions{margin-top:22px;padding-top:15px;border-top:1px solid var(--border)}.chest-regions code{font:11px var(--font-mono)}.chest-grid,.chest-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}.chest-row{border:1px solid var(--border);border-radius:6px;padding:9px 10px;margin:10px 0 0;min-width:0}.chest-row legend{font-size:11px;color:var(--fg-muted);padding:0 4px}.chest-grid label,.chest-row label{display:flex;flex-direction:column;gap:4px;font-size:11px;color:var(--fg-muted);min-width:0}.chest-row input,.chest-row select,.chest-grid input{width:100%;padding:5px 6px;font-size:11px}.chest-row .chest-check{flex-direction:row;align-items:center;gap:6px}.chest-row .chest-check input{width:auto}.chest-more{margin-top:10px;font-size:11px;color:var(--fg-muted)}.chest-more summary{cursor:pointer}#chest-status.error{color:var(--fail)}
|
|
152
152
|
.chest-editor-bar{position:relative;display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;padding:6px 10px;border-bottom:1px solid var(--border);background:var(--rv-bar);font-size:11px}.chest-editor-bar[hidden]{display:none}.chest-editor-bar input[type=range]{width:84px}.chest-editor-bar input[type=text]{width:104px;padding:3px 5px;font-size:11px}.chest-editor-bar output{min-width:2.6em;font:10px/1 var(--font-mono);color:var(--fg)}.chest-editor-bar [data-landmark][aria-pressed=true]{outline:2px solid var(--rv-landmark);outline-offset:1px}#lm-derived{flex:1 1 100%;order:9;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:10px/1.4 var(--font-mono)}#lm-derived.error{color:var(--fail)}.chest-editor-bar .bust-group{display:flex;align-items:center;gap:6px;padding-left:10px;border-left:1px solid var(--border)}.chest-editor-bar .bust-group:first-child{padding-left:0;border-left:0}.chest-editor-bar label{display:flex;align-items:center;gap:4px;color:var(--fg-muted)}.chest-editor-bar input[type=number]{width:58px;padding:3px 5px;font-size:11px}.chest-editor-bar button{padding:4px 8px;font-size:11px}.chest-editor-bar button[aria-disabled=true]{opacity:.6}.bust-tag{font-weight:700}.bust-tag-r{color:var(--rv-bust-r)}.bust-tag-l{color:var(--rv-bust-l)}#handoff-line{flex:1 1 100%;order:10;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:10px/1.4 var(--font-mono)}#chest-editor-status{flex:1 1 220px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rebuild-log{position:absolute;top:100%;left:10px;right:10px;z-index:6;margin:4px 0 0;max-height:7.5em;overflow:auto;padding:5px 8px;font:10px/1.5 var(--font-mono);white-space:pre-wrap;overflow-wrap:anywhere;background:var(--code-bg);color:var(--code-fg);border:1px solid var(--border);border-radius:5px}
|
|
153
153
|
.mesh-editor-bar kbd{margin-left:5px;font-size:10px;opacity:.75}#mesh-editor-status{flex:1 1 260px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
@@ -263,6 +263,8 @@ main{position:relative}.viewbar,.toolbar{anchor-name:--stage-comment-bar}#stage-
|
|
|
263
263
|
.animation-tree button{margin:2px;padding:3px 7px;font-size:12px}
|
|
264
264
|
[data-part-list] button[data-bone-selected=true]{outline:1px solid var(--pass);outline-offset:-2px}
|
|
265
265
|
.animation-stage-picks{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:3}
|
|
266
|
+
/* #330 hover pick preview: a solid two-tone outline and a faint tint, beside the selection's dashed amber box. */
|
|
267
|
+
.stage-hover-pick{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.stage-hover-tint{fill:var(--rv-hover-pick-fill);stroke:none}.stage-hover-halo{fill:none;stroke:var(--rv-hover-pick-halo);stroke-width:3.5;stroke-linejoin:round;stroke-linecap:round}.stage-hover-line{fill:none;stroke:var(--rv-hover-pick-line);stroke-width:1.4;stroke-linejoin:round;stroke-linecap:round}.stage-hover-label{position:absolute;z-index:600;max-width:240px;padding:2px 6px;border-radius:4px;background:var(--rv-hover-pick-label-bg);color:var(--rv-hover-pick-ink);font:600 11px var(--font-mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
|
|
266
268
|
.animation-bone-pick{position:absolute;width:10px;height:10px;min-width:0;padding:0;transform:translate(-50%,-50%);border-radius:50%;border:1px solid var(--rv-bone-line);background:var(--rv-bone-point);pointer-events:auto;cursor:grab;touch-action:none}
|
|
267
269
|
.animation-bone-pick[data-pose-editable=true]{border-color:var(--pass);background:var(--pass)}
|
|
268
270
|
.animation-bone-pick[aria-pressed=true]{outline:3px solid var(--rv-bone-selected);outline-offset:2px}
|
package/web/compare.ts
CHANGED
|
@@ -14,6 +14,8 @@ import { feedbackLastFrame, feedbackTargetNames, validateFeedbackSelection } fro
|
|
|
14
14
|
import type { StripInterval, StripRequest } from '../src/strip.ts';
|
|
15
15
|
|
|
16
16
|
import {bindAppearance,bindPan,bindStageLayout,bindInspectorTabs,syncStageLayout,idleAvailable} from './view-controls.ts';
|
|
17
|
+
import {CLICK_SLOP_PX} from './stage-pick.ts';
|
|
18
|
+
import {dragImpulse} from '../src/environment.ts';
|
|
17
19
|
import {RigOverlays} from './rig-overlays.ts';
|
|
18
20
|
import {bindWorkspaceUI,type WorkspaceUI} from './workspace-ui.ts';
|
|
19
21
|
import {connectControl} from './control.ts';
|
|
@@ -421,7 +423,10 @@ function bind(): void {
|
|
|
421
423
|
cameraSync=workspace.defaults().defaultCameraSync;input('camera-sync').checked=cameraSync;input('idle-repeat').checked=workspace.defaults().defaultIdleRepeat;
|
|
422
424
|
appearance=bindAppearance(select('appearance'),workspace.defaults().theme);
|
|
423
425
|
for(const side of ['a','b'] as const)overlays[side]=new RigOverlays({canvas:el<HTMLCanvasElement>(side+'-overlay'),rigRoot:el(side+'-root')});
|
|
424
|
-
|
|
426
|
+
// #331: a plain drag on either rig pans and carries both rigs, each by its own root scale, so A and B take the same
|
|
427
|
+
// stimulus; the reference pane only pans, as the Family viewer's does.
|
|
428
|
+
const carryBoth={threshold:CLICK_SLOP_PX,move:(dx:number,dy:number)=>{for(const side of ['a','b'] as const){const impulse=dragImpulse(dx,dy,rigScales[side]);if(impulse)players[side]?.moved(impulse);}}};
|
|
429
|
+
for(const target of ['a','b','reference'] as const)viewDisposers.push(bindPan(el(target+'-viewport'),(dx,dy)=>cameraAction(()=>panCamera(target,dx,dy)),()=>!comments?.active(),target==='reference'?undefined:carryBoth));
|
|
425
430
|
viewDisposers.push(bindStageLayout(el('stage-layout'),fit));
|
|
426
431
|
for(const [id,key] of [['layer-images','images'],['layer-mesh','mesh'],['layer-bones','bones']] as const)input(id).onchange=()=>{layers[key]=input(id).checked;redrawOverlays(false);};
|
|
427
432
|
input('idle-repeat').onchange=()=>{renderIdle();if(canRepeatIdle())void playComparison().catch(error=>message(describe(error),true));};
|
package/web/i18n.ts
CHANGED
|
@@ -573,7 +573,8 @@ function isExemptElement(el: Element | null): boolean {
|
|
|
573
573
|
cls.includes('part-slot-name') ||
|
|
574
574
|
cls.includes('animation-lane-label') ||
|
|
575
575
|
cls.includes('animation-tree-bone-name') ||
|
|
576
|
-
cls.includes('stage-comment-pin')
|
|
576
|
+
cls.includes('stage-comment-pin') ||
|
|
577
|
+
cls.includes('stage-hover-label')
|
|
577
578
|
) {
|
|
578
579
|
return true;
|
|
579
580
|
}
|
package/web/index.html
CHANGED
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
<header class="topbar"><div class="brand"><span class="brand-mark">r</span>rig review</div><div><strong id="package-title">Review package</strong><span id="revision" class="subtle"></span></div><div class="mode-switch" role="group" aria-label="Mode"><button type="button" data-mode="rig" data-inspector="rig" aria-controls="inspector-rig" aria-pressed="true">Setup</button><button type="button" data-mode="playback" data-inspector="playback" aria-controls="inspector-playback" aria-pressed="false">Animate</button><button type="button" data-mode="compare" aria-pressed="false" disabled title="No second build supplied: reopen with --compare <built> --reference <video>">Compare</button></div><div class="top-actions"><span id="dirty" class="subtle">Loading…</span><button id="write-review" type="button" class="primary" aria-haspopup="dialog" aria-controls="review-dialog">Write review</button></div></header>
|
|
7
7
|
<div class="layout">
|
|
8
8
|
<aside class="left-panel"><div class="left-header parts-header"><h2>PARTS</h2><input id="part-search" data-part-search type="search" autocomplete="off" aria-label="Find slot" placeholder="Find slot"></div><details id="package-context" class="package-context"><summary><span class="eyebrow">CHECKPOINTS</span><span id="checkpoint-title">Select a checkpoint</span></summary><nav id="checkpoints" aria-label="Checkpoints"></nav><section><label for="reference-select" class="label">Reference</label><select id="reference-select"></select><div id="reference-info" class="hint"></div><div id="person-control" hidden><label for="person-select" class="label space-top">Person in input pose</label><select id="person-select"></select></div></section></details><aside id="parts-explorer" class="parts-explorer" aria-label="Parts explorer"><div class="parts-tools"><button type="button" data-part-whole aria-pressed="true">Whole rig</button><label class="part-solo"><input id="part-solo" data-part-solo type="checkbox" disabled>Solo selected slot</label><p data-part-status class="hint" role="status">Loading actual slots…</p></div><ul data-part-list aria-label="Actual rig slots"></ul><p class="hint">Select in context or enable Solo. Thumbnails are each slot's declared page region; a type icon stands in where the model declares none. Atlas pages are not part thumbnails.</p></aside></aside>
|
|
9
|
-
<main><div class="viewbar"><button id="stage-comment" type="button" aria-pressed="false" aria-expanded="false" aria-controls="stage-comment-list" title="Comment · C (active mesh editor keeps C)">Comment · C (0)</button><fieldset id="layer-controls" class="layer-toggles"><legend class="sr-only">Rig layers</legend><label class="layer-toggle" title="No rig supplied"><input aria-keyshortcuts="I" id="layer-images" type="checkbox" checked disabled><span>Images</span><kbd aria-hidden="true">I</kbd></label><label class="layer-toggle" title="No rig supplied"><input aria-keyshortcuts="M" id="layer-mesh" type="checkbox" disabled><span>Mesh edges</span><kbd aria-hidden="true">M</kbd></label><label class="layer-toggle" title="No rig supplied"><input aria-keyshortcuts="B" id="layer-bones" type="checkbox" disabled><span>Bone points</span><kbd aria-hidden="true">B</kbd></label></fieldset><div class="view-tools"><button id="chest-edit" type="button" class="view-tool" aria-pressed="false" aria-controls="chest-editor-bar" title="Place the two chest regions on the rig: drag a centre, the core edge or the band" hidden>Chest regions</button><button id="mesh-edit" type="button" class="view-tool" aria-pressed="false" aria-controls="mesh-editor-bar" title="Edit the selected slot's actual mesh as a typed delta: preview only, the producer retriangulates" hidden>Edit mesh</button></div><div class="zoom-controls"><label class="camera-sync"><input id="camera-sync" type="checkbox" checked>Sync cameras</label><button id="zoom-out" aria-label="Zoom out">−</button><output id="zoom-value">100%</output><button id="zoom-in" aria-label="Zoom in">+</button><button id="fit">Fit</button></div><details id="view-menu" class="view-menu"><summary aria-label="View layout">View: <span id="view-menu-label">Side by side</span></summary><div class="view-menu-list" role="group" aria-label="View"><button type="button" data-view="compare" aria-pressed="true">Side by side</button><button type="button" data-view="reference" aria-pressed="false">Reference</button><button type="button" data-view="rig" aria-pressed="false">Rig</button></div></details></div><div id="chest-editor-bar" class="chest-editor-bar" role="region" aria-label="Chest region editor" hidden><div class="bust-group" role="group" aria-label="Chest editor mode"><input id="bust-mode" type="hidden" value="circles"><button id="bust-mode-circles" type="button" data-bust-mode="circles" aria-pressed="true" title="Two circles, each centre, core and band set by hand (#99)">Circles</button><button id="bust-mode-landmarks" type="button" data-bust-mode="landmarks" aria-pressed="false" title="Three clicks (right apex, left apex, cleavage); the producer derives both circles (contour.bust)">Landmarks</button></div><div class="bust-group" data-chest-mode="circles"><span class="bust-tag bust-tag-r" title="R · character's right (image left)">● R · character's right (image left)</span><label>X<input id="bust-r-x" type="number" step="1" inputmode="decimal" aria-label="R region centre x"></label><label>Y<input id="bust-r-y" type="number" step="1" inputmode="decimal" aria-label="R region centre y"></label><label>R<input id="bust-r-r" type="number" min="6" max="120" step="1" inputmode="decimal" aria-label="R region core radius"></label><label>Band<input id="bust-r-band" type="number" min="4" max="120" step="1" inputmode="decimal" aria-label="R region band"></label></div><div class="bust-group" data-chest-mode="circles"><span class="bust-tag bust-tag-l" title="L · character's left (image right)">● L · character's left (image right)</span><label>X<input id="bust-l-x" type="number" step="1" inputmode="decimal" aria-label="L region centre x"></label><label>Y<input id="bust-l-y" type="number" step="1" inputmode="decimal" aria-label="L region centre y"></label><label>R<input id="bust-l-r" type="number" min="6" max="120" step="1" inputmode="decimal" aria-label="L region core radius"></label><label>Band<input id="bust-l-band" type="number" min="4" max="120" step="1" inputmode="decimal" aria-label="L region band"></label></div><div id="bust-landmarks" class="bust-group" data-chest-mode="landmarks" role="group" aria-label="Chest landmarks (rig px)" hidden><button id="lm-pick-apex_r" type="button" data-landmark="apex_r" aria-pressed="false" title="Click the part to place the right apex (character's right, image left); drag its marker to move it">Right apex (character's right, image left)</button><label>X<input id="lm-apex_r-x" type="number" step="1" inputmode="decimal" aria-label="Apex R x (rig px)"></label><label>Y<input id="lm-apex_r-y" type="number" step="1" inputmode="decimal" aria-label="Apex R y (rig px)"></label><button id="lm-pick-apex_l" type="button" data-landmark="apex_l" aria-pressed="false" title="Click the part to place the left apex (character's left, image right); drag its marker to move it">Left apex (character's left, image right)</button><label>X<input id="lm-apex_l-x" type="number" step="1" inputmode="decimal" aria-label="Apex L x (rig px)"></label><label>Y<input id="lm-apex_l-y" type="number" step="1" inputmode="decimal" aria-label="Apex L y (rig px)"></label><button id="lm-pick-cleavage" type="button" data-landmark="cleavage" aria-pressed="false" title="Click the part to place the cleavage; drag its marker to move it">Cleavage</button><label>X<input id="lm-cleavage-x" type="number" step="1" inputmode="decimal" aria-label="Cleavage x (rig px)"></label><label>Y<input id="lm-cleavage-y" type="number" step="1" inputmode="decimal" aria-label="Cleavage y (rig px)"></label></div><div id="bust-landmark-params" class="bust-group" data-chest-mode="landmarks" role="group" aria-label="Landmark constants" hidden><label title="Core ratio r / (r + band); the producer's default is 0.22">α<input id="lm-alpha" type="range" min="0.05" max="0.95" step="0.01" value="0.22" aria-label="Alpha, core ratio"><output id="lm-alpha-value" for="lm-alpha">0.22</output></label><label title="Cleavage clearance in rig px; the producer's default is 3.8">Clearance<input id="lm-clearance" type="range" min="0" max="40" step="0.1" value="3.8" aria-label="Clearance, rig px"><output id="lm-clearance-value" for="lm-clearance">3.8</output></label><label title="Control bone for bust_r; empty is the producer's default boob_r">Bone R<input id="lm-bone_r" type="text" list="lm-bones" placeholder="boob_r" spellcheck="false" autocomplete="off"></label><label title="Control bone for bust_l; empty is the producer's default boob_l">Bone L<input id="lm-bone_l" type="text" list="lm-bones" placeholder="boob_l" spellcheck="false" autocomplete="off"></label><datalist id="lm-bones"></datalist></div><span id="lm-derived" class="hint" data-chest-mode="landmarks" aria-live="polite" hidden></span><div class="bust-group" data-chest-mode="circles"><button id="bust-mirror" type="button" title="Copy R's y, core radius and band to L (leaves L's x as is)">Y·size symmetry</button><button id="bust-download" type="button" title="Download chest-regions.json and its binding; evidence, not an approval">Download JSON</button></div><div class="bust-group"><button id="bust-apply" type="button" title="Run the installed producer (rig-parts remesh) on these regions or landmarks into a scratch build and load it here; the package is unchanged">Apply · Rebuild</button><button id="bust-reset" type="button" title="Return the stage to the inspected build" disabled>Reset</button><span class="hint rebuild-drop-notice" data-rebuild-drop="chest" hidden></span></div><span id="handoff-line" class="hint handoff-line" aria-live="polite" title="Producer handoff: the config, parts and inspected rig an Apply rebuilds from"></span><span id="chest-editor-status" class="hint" aria-live="polite"></span><pre id="chest-editor-log" class="rebuild-log" aria-label="Producer output" hidden></pre><textarea id="rebuild-applied" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea></div><div id="mesh-editor-bar" class="chest-editor-bar mesh-editor-bar" role="region" aria-label="Mesh edit" hidden><div class="bust-group" role="group" aria-label="Mesh edit sub-mode"><button id="mesh-mode-modify" type="button" data-mesh-mode="modify" aria-pressed="false" aria-keyshortcuts="V" title="Modify · key V">Modify<kbd aria-hidden="true">V</kbd></button><button id="mesh-mode-create" type="button" data-mesh-mode="create" aria-pressed="false" aria-keyshortcuts="C" title="Create · key C">Create<kbd aria-hidden="true">C</kbd></button><button id="mesh-mode-delete" type="button" data-mesh-mode="delete" aria-pressed="false" aria-keyshortcuts="X" title="Delete · key X">Delete<kbd aria-hidden="true">X</kbd></button><button id="mesh-mode-edges" type="button" data-mesh-mode="edges" aria-pressed="false" aria-keyshortcuts="E" title="Edges · key E">Edges<kbd aria-hidden="true">E</kbd></button></div><div class="bust-group"><button id="mesh-undo" type="button" aria-keyshortcuts="Control+Z Meta+Z" title="Undo the last action · Cmd/Ctrl-Z" disabled>Undo</button><button id="mesh-redo" type="button" aria-keyshortcuts="Control+Shift+Z Meta+Shift+Z" title="Redo · Shift-Cmd/Ctrl-Z" disabled>Redo</button><button id="mesh-reset" type="button" title="Drop the whole delta for this attachment (asks first)" disabled>Reset</button></div><div class="bust-group"><button id="mesh-download" type="button" title="Download mesh-edit.json and its binding; evidence, not an approval">Download JSON</button><button id="mesh-apply" type="button" title="Send the delta to the producer (rig-parts remesh --delta) and load the scratch revision in place; nothing is written into the package">Apply · Rebuild</button><span class="hint rebuild-drop-notice" data-rebuild-drop="mesh-edit" hidden></span></div><textarea id="mesh-edit-draft" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea><span id="mesh-editor-status" class="hint" aria-live="polite"></span></div><div id="stage-layout" class="stages"><section id="reference-pane" class="stage-pane" aria-label="Reference"><span id="reference-label" class="pane-label">Reference</span><div id="reference-viewport" class="viewport"><div id="reference-content" class="reference-content"></div><div id="reference-empty" class="empty">No reference supplied.</div></div></section><section id="rig-pane" class="stage-pane" aria-label="Rig"><span id="rig-label" class="pane-label">Generated rig · read only</span><div id="rig-viewport" class="viewport"><div id="rig-root"></div><canvas id="rig-overlay" class="rig-overlay" aria-label="Actual rig mesh and bone overlay"></canvas><div id="idle-handles" class="idle-handles" hidden aria-label="Chain amplitude handles"></div><div id="rig-fields-stage" class="rig-fields-stage" hidden aria-label="Rig field handles"></div><div id="rig-empty" class="empty">No compiled model supplied.</div></div></section></div><div class="stage-footer"><span id="coordinates">Drag to pan · scroll to zoom · cameras synchronized</span><span>Source files remain unchanged.</span></div><section class="inspector" aria-label="Inspection controls"><div class="inspector-heading sticky-header"><strong>INSPECTOR</strong><span class="hint">Local view controls · source files stay unchanged</span></div><div class="inspector-body"><section id="applied-records" class="applied-records" aria-labelledby="applied-records-heading" hidden><div class="row"><span id="applied-records-heading" class="eyebrow">APPLIED RECORDS</span><button id="applied-undo" type="button" disabled>Undo last Apply (0 deep)</button></div><ol id="applied-list" class="applied-list"></ol><p id="applied-status" class="hint" aria-live="polite"></p></section><section id="inspector-rig" aria-label="Setup" data-inspector-panel="rig"><nav class="block-row" role="tablist" aria-label="Setup blocks"><button type="button" role="tab" id="block-tab-selected-part" aria-controls="selected-part" aria-selected="true" tabindex="0" data-block-target="selected-part">Part</button><button type="button" role="tab" id="block-tab-modeling-tools" aria-controls="modeling-tools" aria-selected="false" tabindex="-1" data-block-target="modeling-tools">Modeling</button><button type="button" role="tab" id="block-tab-chest-regions" aria-controls="chest-regions" aria-selected="false" tabindex="-1" data-block-target="chest-regions">Chest</button><button type="button" role="tab" id="block-tab-mesh-panel" aria-controls="mesh-panel" aria-selected="false" tabindex="-1" data-block-target="mesh-panel">Mesh</button><button type="button" role="tab" id="block-tab-weights" aria-controls="weights" aria-selected="false" tabindex="-1" data-block-target="weights">Weights</button><button type="button" role="tab" id="block-tab-bones-panel" aria-controls="bones-panel" aria-selected="false" tabindex="-1" data-block-target="bones-panel">Bones</button><button type="button" role="tab" id="block-tab-rig-fields" aria-controls="rig-fields" aria-selected="false" tabindex="-1" data-block-target="rig-fields">Fields</button><button type="button" role="tab" id="block-tab-cuts-panel" aria-controls="cuts-panel" aria-selected="false" tabindex="-1" data-block-target="cuts-panel">Cuts</button><button type="button" role="tab" id="block-tab-cloth-panel" aria-controls="cloth-panel" aria-selected="false" tabindex="-1" data-block-target="cloth-panel">Cloth</button></nav><section id="selected-part" role="tabpanel" aria-labelledby="block-tab-selected-part" aria-label="Selected part" aria-live="polite"></section><section id="modeling-tools" role="tabpanel" aria-labelledby="block-tab-modeling-tools" hidden><div class="eyebrow">MODELING REVIEW</div><button data-proposal="mesh" class="tool">Mesh density <small>Add feedback</small></button><button data-proposal="contour" class="tool">Contour curvature <small>Add feedback</small></button><button data-proposal="chest" class="tool">Chest position <small>Add feedback</small></button><label for="part-set" class="label space-top">Part presets</label><select id="part-set" disabled><option>No sets supplied</option></select><p class="hint">Preview only · does not create motion keys.</p></section><section id="chest-regions" role="tabpanel" aria-labelledby="block-tab-chest-regions" class="chest-regions" hidden><div class="eyebrow" id="chest-regions-heading">CHEST REGIONS · DETAIL</div><p class="hint">Crop pixels, x screen-right and y down (<code>family-chest-regions/1</code>). Place the circles with <strong>Chest regions</strong> in the view bar; this block holds names, bones, semi-axes, clip and the contour. Equal semi-axes export as a circle, unequal ones (or a clip) as the generator's 32-sample polygon. Exporting writes nothing into the package and is not an approval.</p><p id="chest-mapping" class="hint"></p><div class="chest-grid"><label>Crop width<input id="chest-crop-w" type="number" step="any" inputmode="decimal"></label><label>Crop height<input id="chest-crop-h" type="number" step="any" inputmode="decimal"></label></div><fieldset class="chest-row"><legend>Region 1</legend><label>Name<input id="chest-0-name" type="text" autocomplete="off" spellcheck="false"></label><label>Bone<select id="chest-0-bone"><option value="">Select bone</option></select></label><label>Centre x<input id="chest-0-cx" type="number" step="any" inputmode="decimal"></label><label>Centre y<input id="chest-0-cy" type="number" step="any" inputmode="decimal"></label><label>Semi-axis x<input id="chest-0-ax" type="number" step="any" inputmode="decimal"></label><label>Semi-axis y<input id="chest-0-ay" type="number" step="any" inputmode="decimal"></label><label>Spacing<input id="chest-0-spacing" type="number" step="any" inputmode="decimal"></label><label>Band<input id="chest-0-band" type="number" step="any" inputmode="decimal"></label><label>Medial clip x<input id="chest-0-clip" type="number" step="any" inputmode="decimal" placeholder="none"></label></fieldset><fieldset class="chest-row"><legend>Region 2</legend><label>Name<input id="chest-1-name" type="text" autocomplete="off" spellcheck="false"></label><label>Bone<select id="chest-1-bone"><option value="">Select bone</option></select></label><label>Centre x<input id="chest-1-cx" type="number" step="any" inputmode="decimal"></label><label>Centre y<input id="chest-1-cy" type="number" step="any" inputmode="decimal"></label><label>Semi-axis x<input id="chest-1-ax" type="number" step="any" inputmode="decimal"></label><label>Semi-axis y<input id="chest-1-ay" type="number" step="any" inputmode="decimal"></label><label>Spacing<input id="chest-1-spacing" type="number" step="any" inputmode="decimal"></label><label>Band<input id="chest-1-band" type="number" step="any" inputmode="decimal"></label><label>Medial clip x<input id="chest-1-clip" type="number" step="any" inputmode="decimal" placeholder="none"></label></fieldset><fieldset class="chest-row"><legend>Contour</legend><label>Tolerance<input id="chest-tolerance" type="number" step="any" inputmode="decimal"></label><label>Margin<input id="chest-margin" type="number" step="any" inputmode="decimal"></label><label>Spacing<input id="chest-spacing" type="number" step="any" inputmode="decimal"></label><label>Max edge<input id="chest-max-edge" type="number" step="any" inputmode="decimal"></label><label>Stray<input id="chest-stray" type="number" step="any" inputmode="decimal"></label><label class="chest-check"><input id="chest-bridges" type="checkbox">Bridges</label></fieldset><details class="chest-more"><summary>Generator and mesh fields</summary><label for="chest-generator" class="label space-top">Public generator</label><input id="chest-generator" type="text" autocomplete="off" spellcheck="false" placeholder="Generator that will read this file"><label for="chest-r" class="label space-top">Mesh r (optional)</label><input id="chest-r" type="number" step="any" inputmode="decimal"><label for="chest-segments" class="label space-top">Mesh segments JSON (optional)</label><textarea id="chest-segments" rows="3" spellcheck="false"></textarea><label for="chest-source-rule" class="label space-top">Source rule (optional)</label><input id="chest-source-rule" type="text" autocomplete="off"></details><p id="chest-status" class="hint" aria-live="polite"></p><button id="chest-export" type="button" class="outline block">Download chest-regions.json</button></section><section id="mesh-panel" role="tabpanel" aria-labelledby="block-tab-mesh-panel" class="physics-panel mesh-panel" hidden><div class="row"><span id="mesh-panel-heading" class="eyebrow">MESH · APPLY REMESHES</span></div><p id="mesh-panel-state" class="hint">Select a mesh part in the parts list.</p><p class="hint">Edits the selected part's <code>meshes.<part></code> entry from the handoff config (the grid and contour modes). Apply sends the whole pending entry to the installed producer's <code>remesh --mesh</code> (one patch op at <code>/meshes/<part></code>), compiles and checks the revision, and reloads it with the mesh edges on; Reset returns to the inspected build and the config's entry. Slider ranges are review's; the number field takes any value, and the producer judges it.</p><div id="mesh-params" class="physics-controls mesh-params"></div><div class="row mesh-tools"><span class="eyebrow">REGIONS</span><button id="mesh-add-circle" type="button" disabled>Add circle</button><button id="mesh-add-polygon" type="button" aria-pressed="false" disabled>Draw polygon</button><button id="mesh-regions-edit" type="button" aria-pressed="false" disabled>Drag on stage</button></div><div id="mesh-regions" class="mesh-regions"></div><div class="row mesh-tools"><span class="eyebrow">SEGMENTS</span><select id="mesh-segment-bone" aria-label="Bone to add as a segment" disabled></select><button id="mesh-segment-add" type="button" disabled>Add</button></div><ol id="mesh-segments" class="physics-pending-list mesh-segments"></ol><div class="row"><span class="eyebrow">PENDING ENTRY · DIFF AGAINST THE CONFIG</span></div><ol id="mesh-diff" class="physics-pending-list"></ol><ul id="mesh-precheck" class="mesh-precheck" aria-label="Review pre-check in the config loader's names"></ul><div class="row"><button id="mesh-panel-apply" type="button" class="primary" disabled>Apply</button><button id="mesh-panel-reset" type="button" disabled>Reset</button><button id="mesh-folds" type="button" title="rigc render --folds of the drawn animation on the inspected build and on this revision (#108 readings)">Folds reading</button><span class="hint rebuild-drop-notice" data-rebuild-drop="mesh" hidden></span></div><output id="mesh-status" class="environment-readout"></output><div id="mesh-counts" class="physics-readout" aria-label="Vertex and triangle counts before and after"></div><div id="mesh-readout" class="physics-readout" aria-label="TEXTURE_STRETCH before and after Apply"></div><div id="density-strip" class="density-strip" aria-labelledby="density-strip-heading"><div class="row"><span id="density-strip-heading" class="eyebrow">DENSITY STRIP · NOTHING IS APPLIED</span></div><p id="density-strip-field" class="hint">Select a mesh part (grid or contour entry) to build a density strip.</p><p class="hint">Builds N values of the part's density field side by side, each as its own <code>replace /meshes/<part></code> patch through remesh (into its own scratch folder). Rows are labels only: Load puts a row on the stage as pending, and the Mesh panel's Apply applies it. Closing or replacing the strip removes its scratch.</p><div class="row density-strip-form"><label>N<input id="density-strip-n" type="number" min="2" max="5" step="1" value="5" aria-label="Number of values"></label><label>from<input id="density-strip-from" type="number" step="any" aria-label="From value"></label><label>to<input id="density-strip-to" type="number" step="any" aria-label="To value"></label><button id="density-strip-build" type="button" disabled>Build strip</button><button id="density-strip-back" type="button" disabled title="Return the stage to the applied build it showed before a row was loaded">Back</button><button id="density-strip-close" type="button" disabled>Close strip</button></div><output id="density-strip-status" class="environment-readout"></output><div id="density-strip-table" class="density-strip-table"></div></div><textarea id="mesh-pending" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea></section><section id="weights" role="tabpanel" aria-labelledby="block-tab-weights" class="physics-panel weights-block" hidden><div class="row"><span id="weights-heading" class="eyebrow">WEIGHTS · SETUP POSE · WATCH ONLY</span></div><p class="hint">The selected slot's mesh at the setup pose, each vertex coloured by the weight the compiled model document stores for the picked bone (0 → 1), or by its dominant bone under <strong>Max influence</strong>. An unweighted mesh is its slot's bone at 1.0. Hover a vertex for its stored values. Nothing here edits, applies or records a weight.</p><div class="row weights-controls"><button id="weights-show" type="button" aria-pressed="false">Show weights</button><label>Colour by<select id="weights-mode"><option value="bone">Bone weight</option><option value="max">Max influence</option></select></label><label>Bone<select id="weights-bone" disabled></select></label></div><p id="weights-state" class="hint" aria-live="polite"></p><div id="weights-legend" class="weights-legend" aria-label="Weights legend"></div><output id="weights-hover" class="environment-readout"></output></section><section id="bones-panel" role="tabpanel" aria-labelledby="block-tab-bones-panel" class="physics-panel bones-panel" hidden><div class="row"><span id="bones-panel-heading" class="eyebrow">BONES · CONFIG ANCHORS · APPLY REBUILDS</span></div><p id="bones-panel-state" class="hint">Reading the producer handoff…</p><p class="hint">The producer config's bones at their <code>at</code>, chain <code>points</code> and <code>tip</code> (rig px, the setup pose; the stage may be posed by an animation). Drag a handle on the stage or edit the numbers: each move is a config patch op at <code>/bones/<i>/at</code>, <code>/bones/<i>/points/<k></code> or <code>/bones/<i>/tip</code> naming its bone, moved in whole rig px. <strong>Check</strong> runs <code>propose --from-config</code> on a scratch copy of the patched config (LINT and coverage lines; LINT blocks nothing) and <code>compare</code> against the handoff config. <strong>Apply</strong> rebuilds the whole rig (<code>rig --config</code>, then <code>check</code>) and needs the reproduced baseline; Reset returns to the inspected build and clears the pending ops. Adding, removing or re-parenting bones is out of scope.</p><div class="row bones-controls"><button id="bones-edit" type="button" aria-pressed="false" disabled>Edit bones on stage</button><label for="bones-select">Bone</label><select id="bones-select" disabled></select></div><div id="bones-anchor-editor" class="bones-anchor-editor"></div><div class="row"><span class="eyebrow">PENDING OPS</span></div><ol id="bones-pending-list" class="physics-pending-list"></ol><div class="row"><button id="bones-check" type="button" disabled>Check</button><button id="bones-apply" type="button" class="primary" disabled>Apply</button><button id="bones-reset-build" type="button" disabled>Reset</button><span class="hint rebuild-drop-notice" data-rebuild-drop="bones" hidden></span></div><output id="bones-status" class="environment-readout"></output><div id="bones-compare" class="bones-lines" aria-label="compare: origin and tip distance per moved bone"></div><div id="bones-lint" class="bones-lines" aria-label="propose --from-config: LINT and coverage lines"></div><textarea id="bones-pending" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea></section><section id="rig-fields" role="tabpanel" aria-labelledby="block-tab-rig-fields" class="physics-panel rig-fields" hidden><div class="row"><span id="rig-fields-heading" class="eyebrow">RIG FIELDS · CONFIG · APPLY REBUILDS</span><span id="rig-fields-dial-label" class="idle-preview-label" hidden>preview — Apply decides</span></div><p id="rig-fields-state" class="hint">Reading the producer handoff…</p><p class="hint">Small producer config fields, each a config patch op: the bone a rigid part rides (<code>/regions/<part></code>), a lash's blink still row (<code>/motion/blink/still/<part></code>, dragged on the stage), a stop's inward / outward bounds (<code>/stops/<i></code>, arcs dragged at the pivot), a bone's inherit mode (<code>/bones/<i>/inherit</code>; a chain's <code>link_inherit</code>) and <code>turn</code>'s pivot and per-part depth (<code>/turn/pivot</code>, <code>/turn/depths/<part></code>). <strong>Apply</strong> rebuilds the whole rig (<code>rig --config</code>, then <code>check</code>) and needs the reproduced baseline; the producer's refusal is shown as printed. The dial only previews the drawn build's <code>turn</code> bone and is never recorded. Reset returns to the inspected build and clears the pending ops.</p><div id="rig-fields-region" class="rig-fields-group"></div><div id="rig-fields-still" class="rig-fields-group"></div><div id="rig-fields-stops" class="rig-fields-group"></div><div id="rig-fields-inherit" class="rig-fields-group"></div><div id="rig-fields-turn" class="rig-fields-group"></div><div class="row"><span class="eyebrow">PENDING OPS</span></div><ol id="rig-fields-pending-list" class="physics-pending-list"></ol><div class="row"><button id="rig-fields-apply" type="button" class="primary" disabled>Apply</button><button id="rig-fields-reset" type="button" disabled>Reset</button><button id="rig-fields-reading" type="button" disabled>Angle range</button><span class="hint rebuild-drop-notice" data-rebuild-drop="rig-fields" hidden></span></div><output id="rig-fields-status" class="environment-readout"></output><div id="rig-fields-readout" class="physics-readout" aria-label="BLINK_NO_HOLE and FEET_STAY_LEVEL before and after"></div><textarea id="rig-fields-pending" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea></section><section id="cuts-panel" role="tabpanel" aria-labelledby="block-tab-cuts-panel" class="physics-panel bones-panel cuts-panel" hidden><div class="row"><span id="cuts-panel-heading" class="eyebrow">CUTS · PATCHES · LIMBS · APPLY RUNS RIG-PARTS BUILD</span></div><p id="cuts-panel-state" class="hint">Reading the producer handoff…</p><p class="hint">The producer config's <code>assemble.cuts</code> polygons, <code>assemble.patches</code> boxes and each limb joint with its <code>range</code> arc, on the stage in rig px of the setup pose. Drag a vertex, a box corner or a joint, or edit the numbers: each change is a config patch op (<code>/assemble/cuts/<i>/polygon/<k></code>, <code>/assemble/patches/<i>/box</code>, <code>/limbs/<limb>/segments/<k>/range</code>; a joint is its bone's origin, <code>/bones/…</code>). A new cut or patch adds its entry and a <code>regions</code> bone. <strong>Apply</strong> runs <code>rig-parts build</code> (assemble → rig → check) from the declared painting and See-through runs into scratch and needs the reproduced baseline; the producer's refusals (<code>ASSEMBLE_CUT_*</code>, <code>ASSEMBLE_UNDER_*</code>, <code>CONFIG_LIMB_*</code>, <code>CONFIG_PART_UNIQUE</code>) are shown as printed, and the recomposite error map, the <code>seam pair</code> lines and the build's wall clock come back with the build. Review paints no <code>under</code> or <code>cap</code> image. Reset returns to the inspected build and clears the pending ops.</p><div class="row bones-controls"><button id="cuts-edit" type="button" aria-pressed="false" disabled>Edit cuts on stage</button><label for="cuts-select">Entry</label><select id="cuts-select" disabled></select></div><div id="cuts-editor" class="bones-anchor-editor"></div><div id="cuts-add" class="row cuts-add"><span class="eyebrow">ADD</span><select data-cuts-add="from" aria-label="Plan part the new cut takes pixels from"></select><input data-cuts-add="name" type="text" autocomplete="off" placeholder="new part" aria-label="New part name"><input data-cuts-add="bone" type="text" list="lm-bones" autocomplete="off" placeholder="bone" aria-label="Bone the new part's region rides"><select data-cuts-add="draw" aria-label="Where the new part is drawn"></select><input data-cuts-add="overlap" type="number" min="0" step="1" value="0" inputmode="numeric" aria-label="Cut overlap band in rig px"><select data-cuts-add="alpha" aria-label="New patch alpha"><option value="silhouette">silhouette</option><option value="box">box</option></select><button type="button" data-cuts-add="place-cut">Place cut</button><button type="button" data-cuts-add="place-patch">Place patch</button><button type="button" data-cuts-add="finish">Finish</button><button type="button" data-cuts-add="cancel">Cancel</button></div><div class="row"><span class="eyebrow">PENDING OPS</span></div><ol id="cuts-pending-list" class="physics-pending-list"></ol><div class="row"><button id="cuts-apply" type="button" class="primary" disabled>Apply</button><button id="cuts-reset" type="button" disabled>Reset</button><span class="hint rebuild-drop-notice" data-rebuild-drop="cuts" hidden></span></div><output id="cuts-status" class="environment-readout"></output><div id="cuts-readout" class="physics-readout" aria-label="The build's refusals, cut lines, recomposite, seam pairs and wall clock"></div><textarea id="cuts-pending" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea></section><section id="cloth-panel" role="tabpanel" aria-labelledby="block-tab-cloth-panel" class="physics-panel bones-panel cloth-panel" hidden><div class="row"><span id="cloth-panel-heading" class="eyebrow">CLOTH · RECIPE PER TAG · APPLY RUNS RIG-PARTS PROPOSE --CLOTH</span></div><p id="cloth-panel-state" class="hint">Reading the producer handoff…</p><p class="hint">The producer config's <code>cloth</code> block: one recipe per tag the installed reader accepts, with its fields as written. Each change is a config patch op at <code>/cloth/<tag>/…</code>. <strong>Show links</strong> draws the chains the tag's parts are meshed on, from the config's <code>points</code> and <code>tip</code> in rig px of the setup pose, and after an Apply the chains of the config the producer wrote. <strong>Apply</strong> runs <code>rig-parts propose --cloth --write-config</code> on the declared parts, painting and keypoints into scratch, then builds the written config (<code>rig-parts build</code> when the config declares <code>limbs</code>, else <code>rig --config</code>) and reloads it under the Environment's wind and gravity; the producer's refusals (<code>CONFIG_CLOTH_*</code>, <code>PROPOSE_CLOTH_DRAFTED</code>, <code>PROPOSE_CLOTH_PART</code>, <code>PROPOSE_WRITE_CONFIG_*</code>) are shown as printed. Review edits the recipe, never the drafted constraints. Reset returns to the inspected build and clears the pending ops.</p><div class="row bones-controls"><button id="cloth-links" type="button" aria-pressed="false" disabled>Show links on stage</button><label for="cloth-tag">Tag</label><select id="cloth-tag" disabled></select><label class="cloth-declared"><input id="cloth-declared" type="checkbox" disabled> recipe declared</label></div><div id="cloth-fields" class="cloth-fields"></div><div class="row"><span class="eyebrow">PENDING OPS</span></div><ol id="cloth-pending-list" class="physics-pending-list"></ol><div class="row"><button id="cloth-apply" type="button" class="primary" disabled>Apply</button><button id="cloth-reset" type="button" disabled>Reset</button><span class="hint rebuild-drop-notice" data-rebuild-drop="cloth" hidden></span></div><output id="cloth-status" class="environment-readout"></output><div id="cloth-readout" class="physics-readout" aria-label="Propose's refusals, the written config's diff, the route and check"></div><textarea id="cloth-pending" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea></section></section><section id="inspector-playback" aria-label="Animate" data-inspector-panel="playback" hidden><div id="animation-dock" class="animation-dock-panel" role="region" aria-label="Animation timeline"><section id="transport" class="transport"><button id="play" aria-label="Play" disabled>▶</button><label for="animation-select" class="sr-only">Animation</label><select id="animation-select" disabled><option>No animations supplied</option></select><input id="scrub" type="range" min="0" max="1" step="0.001" value="0" aria-label="Playback time"><output id="time-label">0.0000 / 0.0000 s</output><output id="frame-label">rate unknown</output><label class="idle-repeat"><input id="idle-repeat" type="checkbox" checked>Repeat idle</label><div id="reading-ticks" class="reading-ticks" hidden aria-label="Reading ticks"></div><div id="idle-blink-strip" class="idle-blink-strip" hidden><button id="idle-blink-marker" type="button" class="idle-blink-marker" aria-label="Blink time">◆</button></div></section><section id="frame-controls" class="frame-controls" hidden aria-label="Frame navigation using the explicit clock"><label for="frame-number">Frame</label><input id="frame-number" type="number" min="0" step="1" inputmode="numeric" aria-label="Frame number to inspect"><button id="frame-jump" type="button">Go</button><input id="frame-scrub" type="range" min="0" max="1" step="1" value="0" aria-label="Scrub by frame"><span id="frame-clock-label" class="hint"></span><p id="frame-outside" class="hint" hidden>The current time is outside the explicit frame range. Enter a frame number to go to its exact time.</p></section><section id="animation-inspection" aria-label="Read-only animation inspection"></section></div><div id="animate-blocks" class="animate-blocks-panel" data-inspector-scroll><nav class="block-row" role="tablist" aria-label="Animate blocks"><button type="button" role="tab" id="block-tab-motion-tools" aria-controls="motion-tools" aria-selected="true" tabindex="0" data-block-target="motion-tools" data-block-includes="angle-panel">Transport</button><button type="button" role="tab" id="block-tab-sound-panel" aria-controls="sound-panel" aria-selected="false" tabindex="-1" data-block-target="sound-panel">Sound</button><button type="button" role="tab" id="block-tab-environment" aria-controls="environment" aria-selected="false" tabindex="-1" data-block-target="environment">Environment</button><button type="button" role="tab" id="block-tab-physics-panel" aria-controls="physics-panel" aria-selected="false" tabindex="-1" data-block-target="physics-panel">Physics</button><button type="button" role="tab" id="block-tab-idle-tracks" aria-controls="idle-tracks" aria-selected="false" tabindex="-1" data-block-target="idle-tracks">Idle tracks</button><button type="button" role="tab" id="block-tab-readings" aria-controls="readings" aria-selected="false" tabindex="-1" data-block-target="readings">Readings</button><button type="button" role="tab" id="block-tab-requirements" aria-controls="requirements" aria-selected="false" tabindex="-1" data-block-target="requirements">Requirements</button><button type="button" role="tab" id="block-tab-retarget" aria-controls="retarget" aria-selected="false" tabindex="-1" data-block-target="retarget">Retarget</button><button type="button" role="tab" id="block-tab-report-panel" aria-controls="report-panel" aria-selected="false" tabindex="-1" data-block-target="report-panel">Report</button></nav><section id="motion-tools" role="tabpanel" aria-labelledby="block-tab-motion-tools"><div class="eyebrow">MOTION · EDITS BUILD THROUGH THE PRODUCER</div><button data-proposal="pose" class="tool">Inspect pose <small>Add feedback</small></button><button data-proposal="timing" class="tool">Inspect interval <small>Add feedback</small></button><button data-proposal="audio" class="tool">Audio links <small>Add feedback</small></button><button data-proposal="angle" class="tool">Angle inspection <small id="axis-state">No inspection axes supplied</small></button></section><section id="angle-panel" class="angle-panel" hidden><label for="axis-select">Rig inspection axis</label><select id="axis-select"></select><label id="axis-label" for="axis-value"></label><input id="axis-value" type="range" disabled><output id="axis-value-label"></output><p class="hint">Maps one inspection axis to its animation time. This does not rotate the camera.</p></section><section id="sound-panel" role="tabpanel" aria-labelledby="block-tab-sound-panel" class="sound-panel" hidden><div class="row"><span class="eyebrow">SOUND CUES</span><label><input id="sync-audio" type="checkbox">Play cue audio in sync</label></div><div id="cues"></div><div class="row"><label for="audio-volume">Audio volume</label><input id="audio-volume" type="range" min="0" max="1" step="0.05" value="0.8"><output id="audio-volume-label">80%</output></div><div id="event-log" class="hint" aria-live="polite">Runtime events: none</div></section><section id="environment" role="tabpanel" aria-labelledby="block-tab-environment" class="environment-panel" hidden><div class="row"><span id="environment-heading" class="eyebrow">ENVIRONMENT · INSPECTION ONLY</span></div><p class="hint">Wind, gravity and impulses go to the player while you inspect. Nothing is written to the model or motion; feedback records the state as context.</p><input id="environment-applied" type="checkbox" hidden aria-hidden="true" tabindex="-1"><div class="row"><label for="wind-base">Wind</label><input id="wind-base" type="range" min="-100" max="100" step="1" value="0" disabled><output id="wind-base-label">0</output></div><div class="row"><label><input id="wind-breeze" type="checkbox" disabled>Breeze</label><button id="wind-gust" type="button" disabled>Gust</button><label><input id="wind-repeat" type="checkbox" disabled>Repeat</label></div><div class="row"><label for="wind-gust-peak">Gust peak</label><input id="wind-gust-peak" type="number" min="0" max="200" step="1" value="48" inputmode="decimal" disabled><label for="wind-gust-duration">Duration (s)</label><input id="wind-gust-duration" type="number" min="0.1" max="20" step="0.1" value="2.4" inputmode="decimal" disabled></div><output id="wind-readout" class="environment-readout">No compiled model drawn · environment unavailable</output><div class="row"><label for="gravity">Gravity</label><input id="gravity" type="range" min="0" max="4" step="0.05" value="1" disabled><output id="gravity-label">1.00</output></div><div class="row"><button id="jolt" type="button" disabled>Jolt</button><label title="Dragging the rig pane moves the rig's physics instead of the camera. Hold Space to pan."><input id="drag-trail" type="checkbox" disabled>Drag to trail</label><button id="physics-reset" type="button" disabled>Reset physics</button></div><p class="hint">Drag to trail: dragging the rig pane tells the physics the rig moved; the camera stays. Hold Space to pan. Reset returns the runtime start values and re-poses from the current time, clearing the physics history.</p><div class="row"><label title="Readings and Apply's check read this wind and gravity as a rigc-environment/1 schedule; the wind clock restarts with the clip so you watch the same world"><input id="environment-use" type="checkbox" disabled>Use for readings</label><button id="environment-export" type="button" disabled>Export schedule</button><button id="environment-check" type="button" disabled>Check under this world</button></div><output id="environment-schedule" class="environment-readout">No schedule · the controls are not applied (the player stands at the runtime start values)</output><div id="environment-check-lines" class="environment-check-lines" aria-live="polite"></div><p class="hint">The schedule is the controls as a <code>rigc-environment/1</code> file from the clip's first frame: one step when the wind is steady, else one step per frame at 12 fps (between frames rigc holds the frame's value). A one-off Gust is not in it; Repeat puts gusts in it. Check under this world runs <code>rig-parts check --environment</code> on the build on the stage; the default-world line is that build's own check.</p></section><section id="physics-panel" role="tabpanel" aria-labelledby="block-tab-physics-panel" class="physics-panel" hidden><div class="row"><span id="physics-panel-heading" class="eyebrow">PHYSICS TUNING · APPLY REBUILDS</span></div><p id="physics-panel-state" class="hint">No compiled model drawn.</p><p class="hint">Each edit is a config patch op at <code>/constraints/<i>/<field></code> naming its constraint. Apply runs the installed producer (<code>rig --config</code>, then <code>check</code>) into a scratch build and reloads it under the same wind, gust and jolt state; Reset returns to the inspected build and clears the pending ops. Live preview changes strength, damping, inertia, wind, gravity and mix on the next evaluation; mass and component toggles require Apply. Clear resumes authored values without resetting integrated history.</p><div class="row"><label><input data-physics-preview type="checkbox" checked>Preview pending physics</label><button id="physics-preview-clear" type="button">Clear preview</button></div><output id="physics-preview-label" class="environment-readout">Preview off · Apply decides.</output><div class="row physics-chain-row"><label for="physics-chain">Chain</label><select id="physics-chain" disabled></select><button id="physics-chain-pick" type="button" aria-pressed="false" disabled>Pick on stage</button></div><div class="row physics-ramp-row"><label for="physics-ramp-field">Ramp</label><select id="physics-ramp-field" disabled></select><label for="physics-ramp-root">root</label><input id="physics-ramp-root" type="number" step="any" inputmode="decimal" disabled><label for="physics-ramp-tip">tip</label><input id="physics-ramp-tip" type="number" step="any" inputmode="decimal" disabled><button id="physics-ramp" type="button" disabled>Ramp</button></div><div class="physics-work"><div id="physics-rows" class="physics-table-wrap" role="region" aria-label="Physics constraints the config declares" tabindex="0"></div><div id="physics-row-editor" class="physics-row-editor"></div></div><div id="physics-locked" class="physics-table-wrap physics-locked" role="region" aria-label="Constraints that are not editable" tabindex="0" hidden></div><div class="row"><span class="eyebrow">PENDING OPS</span></div><ol id="physics-pending-list" class="physics-pending-list"></ol><div class="row"><button id="physics-apply" type="button" class="primary" disabled>Apply</button><button id="physics-reset-build" type="button" disabled>Reset</button><span class="hint rebuild-drop-notice" data-rebuild-drop="physics" hidden></span></div><output id="physics-apply-status" class="environment-readout"></output><div id="physics-readout" class="physics-readout" aria-label="Check readout before and after Apply"></div><textarea id="physics-pending" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea></section><section id="idle-tracks" role="tabpanel" aria-labelledby="block-tab-idle-tracks" class="physics-panel idle-panel" hidden><div class="row"><span id="idle-tracks-heading" class="eyebrow">IDLE TRACKS · APPLY REBUILDS</span><span id="idle-preview-label" class="idle-preview-label" aria-live="polite" hidden>preview — Apply decides</span></div><p id="idle-tracks-state" class="hint">No compiled model drawn.</p><p class="hint">Each edit is a config patch op at <code>/motion/tracks/<i>/…</code> or <code>/motion/blink/…</code>. Period is offered only among the divisors of <code>motion.duration</code> (the producer refuses any other, <code>CONFIG_PERIOD_DIVIDES_DURATION</code>). While edits are pending the preview drives the edited bones through the player's <code>adjust</code> with the producer's sine, <code>v(t) = base + amp·sin(2π(t/period − phase))</code>, on the bone the idle keys (<code><bone>_ctl</code> under ctl keys); it is never recorded or submitted. Apply runs the installed producer (<code>rig --config</code>, then <code>check</code>) into a scratch build and replaces the preview with the built idle; Reset returns to the inspected build and clears the pending ops.</p><p id="idle-keys-line" class="hint"></p><div class="physics-work"><div id="idle-track-list" class="physics-table-wrap" role="region" aria-label="Idle tracks the config states" tabindex="0"></div><div id="idle-track-editor" class="physics-row-editor"></div></div><datalist id="idle-bones"></datalist><div class="row idle-add-row"><span class="eyebrow">ADD</span><input data-idle-add-bone type="text" list="idle-bones" autocomplete="off" placeholder="bone" aria-label="Bone for a new track" disabled><select data-idle-add-prop aria-label="Property for a new track" disabled></select><button data-idle-add-single type="button" disabled>Add track</button><select data-idle-add-chain aria-label="Chain for a new chain track" disabled></select><button data-idle-add-chain-button type="button" disabled>Add chain track</button></div><div id="idle-blink" class="idle-blink"></div><div class="row"><label class="idle-preview-toggle"><input data-idle-preview type="checkbox" checked>Preview edits (not recorded)</label></div><div id="idle-precheck" class="idle-precheck" aria-label="Review pre-check"></div><div class="row"><span class="eyebrow">PENDING OPS</span></div><ol id="idle-pending-list" class="physics-pending-list"></ol><div class="row"><button id="idle-apply" type="button" class="primary" disabled>Apply</button><button id="idle-reset" type="button" disabled>Reset</button><span class="hint rebuild-drop-notice" data-rebuild-drop="idle" hidden></span></div><output id="idle-apply-status" class="environment-readout"></output><div id="idle-readout" class="physics-readout" aria-label="Check readout before and after Apply"></div><textarea id="idle-pending" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea></section><section id="readings" role="tabpanel" aria-labelledby="block-tab-readings" class="readings-panel" hidden><div class="row"><span id="readings-heading" class="eyebrow">READINGS · RIGC RENDER</span></div><p class="hint">Each reading is one <code>rigc render</code> of the drawn animation, on the inspected build and on the latest scratch build. Its frames become ticks under the timeline (<span class="tick-swatch inspected" aria-hidden="true"></span> inspected, <span class="tick-swatch scratch" aria-hidden="true"></span> scratch; click one to seek) and each pair gets its worst-frame line. A reading, not a gate: an unknown slot or bone is refused with rigc's own line.</p><datalist id="readings-slots"></datalist><datalist id="readings-bones"></datalist><div class="row"><label><input id="readings-folds" type="checkbox">Folds</label><label><input id="readings-overlaps" type="checkbox">Overlaps</label></div><div class="row readings-pair"><label><input id="readings-pass-on" type="checkbox">Pass-through</label><input id="readings-pass-cloth" type="text" list="readings-slots" autocomplete="off" placeholder="cloth slot" aria-label="Pass-through cloth slot"><span aria-hidden="true">:</span><input id="readings-pass-leg" type="text" list="readings-slots" autocomplete="off" placeholder="leg slot" aria-label="Pass-through leg slot"></div><div class="row readings-pair"><label><input id="readings-seam-on" type="checkbox">Seam</label><input id="readings-seam-a" type="text" list="readings-slots" autocomplete="off" placeholder="slot" aria-label="Seam first slot"><span aria-hidden="true">:</span><input id="readings-seam-b" type="text" list="readings-slots" autocomplete="off" placeholder="slot" aria-label="Seam second slot"></div><div class="row readings-pair"><label><input id="readings-angle-on" type="checkbox">Angle range</label><input id="readings-angle-bone" type="text" list="readings-bones" autocomplete="off" placeholder="bone" aria-label="Angle range bone"><span aria-hidden="true">vs</span><input id="readings-angle-relative" type="text" list="readings-bones" autocomplete="off" placeholder="relative bone" aria-label="Angle range relative-to bone"></div><div class="row"><button id="readings-run" type="button" disabled>Run readings</button></div><p id="readings-status" class="hint" aria-live="polite">No compiled model drawn.</p><ul id="readings-worst" class="readings-worst" aria-label="Worst frame per reading"></ul></section><section id="requirements" role="tabpanel" aria-labelledby="block-tab-requirements" class="readings-panel requirements-panel" hidden><div class="row"><span id="requirements-heading" class="eyebrow">REQUIREMENTS · RIG-PARTS CHECK</span></div><p class="hint">Declare what the scene asks of the motion: a slot (picked on the stage), its mesh or a bone, an animation and a kind, with your own bar. Check writes a <code>spine-parts-requirements/1</code> file into scratch and runs the installed producer's <code>rig-parts check --requirements</code> on the inspected rig or the latest scratch build; each requirement gets one line with its worst frame (click to seek). A refusal is the producer's, by name. Waivers (<code>may_fold</code>), scene targets and the part exception lists are not written here. Submitted feedback carries the file by hash and content.</p><div id="requirements-body"></div></section><section id="retarget" role="tabpanel" aria-labelledby="block-tab-retarget" class="readings-panel requirements-panel retarget-panel" hidden><div class="row"><span id="retarget-heading" class="eyebrow">RETARGET · RIG-POSE</span></div><p class="hint">Put a pose sequence the package declares onto this rig: edit the <code>rig-pose-map/1</code> (per chain, the bone that carries each segment), set the clean and retarget flags, and Apply. The installed <code>@rig-c/pose</code> runs <code>rig-pose clean</code> and <code>rig-pose retarget</code> onto the handoff rig, and its <code>rigc</code> compiles the result, all into scratch; the new animation plays here beside the reference (pick the sequence under Reference). Review writes no keys and never writes the package's <code>motion.json</code>. Refusals (<code>POSE_NOT_CLEANED</code>, <code>POSE_BEND_ONE_WAY</code>, <code>RAISED_HEAD</code>, <code>MOTION_NAME_FREE</code>, <code>MAP_*</code>) are the producer's, verbatim. FEET, STANCE, FLIP, SHORT, END-ON, LEG-SCALE and REACH lines seek to their frame.</p><div id="retarget-body"></div></section><section id="report-panel" role="tabpanel" aria-labelledby="block-tab-report-panel" class="report-panel" hidden><div class="report-header"><h2 id="report-heading">Report events</h2><span id="report-summary" class="subtle"></span><a id="report-source-link" target="_blank" rel="noopener" hidden>Source report</a></div><p id="report-unavailable" class="hint" hidden>No rig-pose-report/1 events supplied.</p><div id="report-browser"><div class="report-controls"><label for="report-category" class="sr-only">Report event category</label><select id="report-category"><option value="all">All events</option></select><button id="report-previous" type="button" aria-label="Previous event page">Previous</button><output id="report-page"></output><button id="report-next" type="button" aria-label="Next event page">Next</button></div><div id="report-empty-categories" class="report-empty-categories"></div><p id="report-missing" class="hint" hidden></p><ol id="report-events" class="report-event-list" aria-label="Read-only report events"></ol><section id="report-selection" class="report-selection" hidden aria-labelledby="report-selection-heading"><h3 id="report-selection-heading"></h3><p id="report-timing" class="hint"></p><div class="report-controls"><label id="report-time-label" for="report-time" hidden>Select explicit time</label><select id="report-time" hidden></select><button id="report-seek" type="button" disabled>Go to explicit time</button></div><div id="report-target-control" hidden><label for="report-target" class="label space-top">Select a target named in the report</label><select id="report-target"></select></div><p id="report-prefill-note" class="hint"></p><p id="report-provenance" class="hint"></p><details><summary>Source event details</summary><pre id="report-details"></pre></details></section></div></section></div></section></div></section></main></div><footer class="status-bar"><span id="message" class="status-message" role="status" aria-live="polite">Loading local review package…</span><div class="status-readouts" aria-label="Status"><span id="player-state" class="subtle">No rig supplied</span><span id="layout-state" class="subtle" role="status" aria-label="Effective layout">Loading inputs…</span><span id="renderer-state" class="subtle" aria-label="Last draw backend" title="DOM images for rigid parts; WebGL meshes when available, Canvas2D fallback.">Not rendered</span><span id="layer-state" class="hint">No rig supplied</span><span id="idle-state" class="hint" role="status">Idle preview unavailable</span><span id="control-state" class="hint" role="status"></span><div class="draft-notice"><span id="draft-state" role="status" aria-live="polite"></span><div id="draft-recovery"></div></div></div><div class="status-source"><details class="view-region"><summary>View region</summary><div class="view-region-body"><span class="hint">Numeric source region · opening this link restores a paused inspection</span><pre id="view-coordinates" class="numeric-view" aria-label="Current numeric inspection region"></pre><p class="hint">Sync cameras links fit-relative zoom and viewport-relative pan across visible panes. Turn it off to inspect each pane independently. Toolbar zoom and Fit use the last active pane. Hold Space while dragging a video to pan without taking over its native controls.</p></div></details><span id="source-hash" class="subtle"></span></div></footer><dialog id="review-dialog" class="review-dialog" aria-labelledby="review-dialog-title"><div class="review-dialog-header"><h2 id="review-dialog-title">Write review</h2><span class="hint">Drafts save locally as you type · nothing is submitted until you press Submit</span><button id="review-dialog-close" type="button">Close</button></div><section id="inspector-feedback" class="review-dialog-body" aria-label="Feedback"><div class="review-summary"><div class="eyebrow">REVIEW</div><label for="review-status" class="label">Review status</label><select id="review-status"><option value="pending">Pending</option><option value="approved">Approved</option><option value="changes-requested">Changes requested</option></select><section class="provenance" aria-label="Reviewed source"><div class="eyebrow">REVIEWED SOURCE</div><div class="provenance-row"><span>Package revision</span><strong id="provenance-version">—</strong></div><div class="provenance-row"><span>rig SHA-256</span><code id="provenance-rig">—</code></div><div class="provenance-row"><span>motion SHA-256</span><code id="provenance-motion">—</code></div><details><summary>Full provenance</summary><pre id="provenance-full"></pre></details><div class="source-files"><div class="eyebrow">SOURCE FILES · READ ONLY</div><div id="source-files"></div></div><p class="hint">Submits server-verified file hashes and tool versions. Your selected review status is preserved.</p></section><div class="divider"></div></div><div id="checkpoint-detail"><div class="eyebrow">SELECTED CHECKPOINT</div><h1 id="detail-title">Checkpoint</h1><p id="detail-note" class="hint"></p><fieldset class="outcome"><legend>Checkpoint outcome</legend><label><input type="radio" name="outcome" value="pending" checked>Pending</label><label><input type="radio" name="outcome" value="pass">Pass</label><label><input type="radio" name="outcome" value="fail">Needs changes</label></fieldset><label for="checkpoint-note" class="label space-top">Review notes</label><textarea id="checkpoint-note" rows="5" placeholder="Describe the part, conditions and what looks wrong."></textarea></div><div class="divider"></div><section id="proposal-panel"><div class="eyebrow">STRUCTURED FEEDBACK</div><div class="label">Frame range · inclusive</div><div class="frame-range"><label>Start<input id="feedback-start" type="number" min="0" step="1" inputmode="numeric" placeholder="e.g. 18"></label><label>End<input id="feedback-end" type="number" min="0" step="1" inputmode="numeric" placeholder="e.g. 32"></label></div><p id="feedback-range-hint" class="hint">Checking frame bounds…</p><label for="feedback-target-kind" class="label space-top">Target type</label><select id="feedback-target-kind"><option value="">Select target</option><option value="rig">Entire rig</option><option value="bone">Bone</option><option value="slot">Slot</option></select><label for="feedback-target-name" class="label space-top">Target name</label><input id="feedback-target-name" type="text" list="feedback-target-names" autocomplete="off" placeholder="Actual bone or slot name"><datalist id="feedback-target-names"></datalist><p id="feedback-target-hint" class="hint"></p><label for="feedback-category" class="label space-top">Category</label><select id="feedback-category"><option value="">Select category</option><option value="defect">Defect</option><option value="quality">Quality</option></select><label for="feedback-summary" class="label space-top">One-line summary</label><input id="feedback-summary" type="text" maxlength="1000" placeholder="e.g. The left wrist moves outside the sleeve"><button id="add-proposal" class="outline block">Add feedback</button><p id="proposal-boundary" class="hint">Records the current checkpoint, time, reference, camera and inspection axis. Motion is read only: inspect, mark ranges and export feedback. No keys or source files are edited.</p><p id="feedback-warnings" class="hint" role="status" hidden></p><p id="feedback-applied-check" class="hint error" role="alert" hidden></p><div id="proposal-list"></div></section><details id="strip-panel" class="report-panel"><summary>Export frame strip</summary><p class="hint">Uses the feedback form start and end frames, inclusive. Inspection time and source files remain unchanged.</p><label for="strip-scope" class="label">Export range</label><select id="strip-scope"><option value="interval">Entered start–end frames</option><option value="feedback">All feedback ranges</option></select><label for="strip-reference" class="label space-top">Reference video</label><select id="strip-reference"><option value="">Select reference video</option></select><label for="strip-format" class="label space-top">Format</label><select id="strip-format"><option value="png">PNG strip</option><option value="json">JSON frames and provenance</option></select><p class="hint">PNG requires frameTimes in the selected report. Without it, JSON preserves requested frames with time: null. Batch export requires every feedback item to match the selected animation. Unsubmitted feedback is included; exporting does not submit the review.</p><button id="strip-export" type="button" disabled>Download strip</button><p id="strip-status" class="hint" role="status" aria-live="polite">Loading package…</p></details></section><div class="review-dialog-actions"><span id="review-message" class="review-message" role="status" aria-live="polite"></span><span id="review-draft-state" class="review-draft-state" role="status" aria-live="polite"></span><span id="review-draft-recovery" class="review-draft-recovery"></span><button id="save" class="primary" disabled>Submit review</button></div></dialog></div>
|
|
9
|
+
<main><div class="viewbar"><button id="stage-comment" type="button" aria-pressed="false" aria-expanded="false" aria-controls="stage-comment-list" title="Comment · C (active mesh editor keeps C)">Comment · C (0)</button><fieldset id="layer-controls" class="layer-toggles"><legend class="sr-only">Rig layers</legend><label class="layer-toggle" title="No rig supplied"><input aria-keyshortcuts="I" id="layer-images" type="checkbox" checked disabled><span>Images</span><kbd aria-hidden="true">I</kbd></label><label class="layer-toggle" title="No rig supplied"><input aria-keyshortcuts="M" id="layer-mesh" type="checkbox" disabled><span>Mesh edges</span><kbd aria-hidden="true">M</kbd></label><label class="layer-toggle" title="No rig supplied"><input aria-keyshortcuts="B" id="layer-bones" type="checkbox" disabled><span>Bone points</span><kbd aria-hidden="true">B</kbd></label></fieldset><div class="view-tools"><button id="chest-edit" type="button" class="view-tool" aria-pressed="false" aria-controls="chest-editor-bar" title="Place the two chest regions on the rig: drag a centre, the core edge or the band" hidden>Chest regions</button><button id="mesh-edit" type="button" class="view-tool" aria-pressed="false" aria-controls="mesh-editor-bar" title="Edit the selected slot's actual mesh as a typed delta: preview only, the producer retriangulates" hidden>Edit mesh</button></div><div class="zoom-controls"><label class="camera-sync"><input id="camera-sync" type="checkbox" checked>Sync cameras</label><button id="zoom-out" aria-label="Zoom out">−</button><output id="zoom-value">100%</output><button id="zoom-in" aria-label="Zoom in">+</button><button id="fit">Fit</button></div><details id="view-menu" class="view-menu"><summary aria-label="View layout">View: <span id="view-menu-label">Side by side</span></summary><div class="view-menu-list" role="group" aria-label="View"><button type="button" data-view="compare" aria-pressed="true">Side by side</button><button type="button" data-view="reference" aria-pressed="false">Reference</button><button type="button" data-view="rig" aria-pressed="false">Rig</button></div></details></div><div id="chest-editor-bar" class="chest-editor-bar" role="region" aria-label="Chest region editor" hidden><div class="bust-group" role="group" aria-label="Chest editor mode"><input id="bust-mode" type="hidden" value="circles"><button id="bust-mode-circles" type="button" data-bust-mode="circles" aria-pressed="true" title="Two circles, each centre, core and band set by hand (#99)">Circles</button><button id="bust-mode-landmarks" type="button" data-bust-mode="landmarks" aria-pressed="false" title="Three clicks (right apex, left apex, cleavage); the producer derives both circles (contour.bust)">Landmarks</button></div><div class="bust-group" data-chest-mode="circles"><span class="bust-tag bust-tag-r" title="R · character's right (image left)">● R · character's right (image left)</span><label>X<input id="bust-r-x" type="number" step="1" inputmode="decimal" aria-label="R region centre x"></label><label>Y<input id="bust-r-y" type="number" step="1" inputmode="decimal" aria-label="R region centre y"></label><label>R<input id="bust-r-r" type="number" min="6" max="120" step="1" inputmode="decimal" aria-label="R region core radius"></label><label>Band<input id="bust-r-band" type="number" min="4" max="120" step="1" inputmode="decimal" aria-label="R region band"></label></div><div class="bust-group" data-chest-mode="circles"><span class="bust-tag bust-tag-l" title="L · character's left (image right)">● L · character's left (image right)</span><label>X<input id="bust-l-x" type="number" step="1" inputmode="decimal" aria-label="L region centre x"></label><label>Y<input id="bust-l-y" type="number" step="1" inputmode="decimal" aria-label="L region centre y"></label><label>R<input id="bust-l-r" type="number" min="6" max="120" step="1" inputmode="decimal" aria-label="L region core radius"></label><label>Band<input id="bust-l-band" type="number" min="4" max="120" step="1" inputmode="decimal" aria-label="L region band"></label></div><div id="bust-landmarks" class="bust-group" data-chest-mode="landmarks" role="group" aria-label="Chest landmarks (rig px)" hidden><button id="lm-pick-apex_r" type="button" data-landmark="apex_r" aria-pressed="false" title="Click the part to place the right apex (character's right, image left); drag its marker to move it">Right apex (character's right, image left)</button><label>X<input id="lm-apex_r-x" type="number" step="1" inputmode="decimal" aria-label="Apex R x (rig px)"></label><label>Y<input id="lm-apex_r-y" type="number" step="1" inputmode="decimal" aria-label="Apex R y (rig px)"></label><button id="lm-pick-apex_l" type="button" data-landmark="apex_l" aria-pressed="false" title="Click the part to place the left apex (character's left, image right); drag its marker to move it">Left apex (character's left, image right)</button><label>X<input id="lm-apex_l-x" type="number" step="1" inputmode="decimal" aria-label="Apex L x (rig px)"></label><label>Y<input id="lm-apex_l-y" type="number" step="1" inputmode="decimal" aria-label="Apex L y (rig px)"></label><button id="lm-pick-cleavage" type="button" data-landmark="cleavage" aria-pressed="false" title="Click the part to place the cleavage; drag its marker to move it">Cleavage</button><label>X<input id="lm-cleavage-x" type="number" step="1" inputmode="decimal" aria-label="Cleavage x (rig px)"></label><label>Y<input id="lm-cleavage-y" type="number" step="1" inputmode="decimal" aria-label="Cleavage y (rig px)"></label></div><div id="bust-landmark-params" class="bust-group" data-chest-mode="landmarks" role="group" aria-label="Landmark constants" hidden><label title="Core ratio r / (r + band); the producer's default is 0.22">α<input id="lm-alpha" type="range" min="0.05" max="0.95" step="0.01" value="0.22" aria-label="Alpha, core ratio"><output id="lm-alpha-value" for="lm-alpha">0.22</output></label><label title="Cleavage clearance in rig px; the producer's default is 3.8">Clearance<input id="lm-clearance" type="range" min="0" max="40" step="0.1" value="3.8" aria-label="Clearance, rig px"><output id="lm-clearance-value" for="lm-clearance">3.8</output></label><label title="Control bone for bust_r; empty is the producer's default boob_r">Bone R<input id="lm-bone_r" type="text" list="lm-bones" placeholder="boob_r" spellcheck="false" autocomplete="off"></label><label title="Control bone for bust_l; empty is the producer's default boob_l">Bone L<input id="lm-bone_l" type="text" list="lm-bones" placeholder="boob_l" spellcheck="false" autocomplete="off"></label><datalist id="lm-bones"></datalist></div><span id="lm-derived" class="hint" data-chest-mode="landmarks" aria-live="polite" hidden></span><div class="bust-group" data-chest-mode="circles"><button id="bust-mirror" type="button" title="Copy R's y, core radius and band to L (leaves L's x as is)">Y·size symmetry</button><button id="bust-download" type="button" title="Download chest-regions.json and its binding; evidence, not an approval">Download JSON</button></div><div class="bust-group"><button id="bust-apply" type="button" title="Run the installed producer (rig-parts remesh) on these regions or landmarks into a scratch build and load it here; the package is unchanged">Apply · Rebuild</button><button id="bust-reset" type="button" title="Return the stage to the inspected build" disabled>Reset</button><span class="hint rebuild-drop-notice" data-rebuild-drop="chest" hidden></span></div><span id="handoff-line" class="hint handoff-line" aria-live="polite" title="Producer handoff: the config, parts and inspected rig an Apply rebuilds from"></span><span id="chest-editor-status" class="hint" aria-live="polite"></span><pre id="chest-editor-log" class="rebuild-log" aria-label="Producer output" hidden></pre><textarea id="rebuild-applied" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea></div><div id="mesh-editor-bar" class="chest-editor-bar mesh-editor-bar" role="region" aria-label="Mesh edit" hidden><div class="bust-group" role="group" aria-label="Mesh edit sub-mode"><button id="mesh-mode-modify" type="button" data-mesh-mode="modify" aria-pressed="false" aria-keyshortcuts="V" title="Modify · key V">Modify<kbd aria-hidden="true">V</kbd></button><button id="mesh-mode-create" type="button" data-mesh-mode="create" aria-pressed="false" aria-keyshortcuts="C" title="Create · key C">Create<kbd aria-hidden="true">C</kbd></button><button id="mesh-mode-delete" type="button" data-mesh-mode="delete" aria-pressed="false" aria-keyshortcuts="X" title="Delete · key X">Delete<kbd aria-hidden="true">X</kbd></button><button id="mesh-mode-edges" type="button" data-mesh-mode="edges" aria-pressed="false" aria-keyshortcuts="E" title="Edges · key E">Edges<kbd aria-hidden="true">E</kbd></button></div><div class="bust-group"><button id="mesh-undo" type="button" aria-keyshortcuts="Control+Z Meta+Z" title="Undo the last action · Cmd/Ctrl-Z" disabled>Undo</button><button id="mesh-redo" type="button" aria-keyshortcuts="Control+Shift+Z Meta+Shift+Z" title="Redo · Shift-Cmd/Ctrl-Z" disabled>Redo</button><button id="mesh-reset" type="button" title="Drop the whole delta for this attachment (asks first)" disabled>Reset</button></div><div class="bust-group"><button id="mesh-download" type="button" title="Download mesh-edit.json and its binding; evidence, not an approval">Download JSON</button><button id="mesh-apply" type="button" title="Send the delta to the producer (rig-parts remesh --delta) and load the scratch revision in place; nothing is written into the package">Apply · Rebuild</button><span class="hint rebuild-drop-notice" data-rebuild-drop="mesh-edit" hidden></span></div><textarea id="mesh-edit-draft" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea><span id="mesh-editor-status" class="hint" aria-live="polite"></span></div><div id="stage-layout" class="stages"><section id="reference-pane" class="stage-pane" aria-label="Reference"><span id="reference-label" class="pane-label">Reference</span><div id="reference-viewport" class="viewport"><div id="reference-content" class="reference-content"></div><div id="reference-empty" class="empty">No reference supplied.</div></div></section><section id="rig-pane" class="stage-pane" aria-label="Rig"><span id="rig-label" class="pane-label">Generated rig · read only</span><div id="rig-viewport" class="viewport"><div id="rig-root"></div><canvas id="rig-overlay" class="rig-overlay" aria-label="Actual rig mesh and bone overlay"></canvas><div id="idle-handles" class="idle-handles" hidden aria-label="Chain amplitude handles"></div><div id="rig-fields-stage" class="rig-fields-stage" hidden aria-label="Rig field handles"></div><div id="rig-empty" class="empty">No compiled model supplied.</div></div></section></div><div class="stage-footer"><span id="coordinates">Drag to pan · scroll to zoom · cameras synchronized</span><span>Source files remain unchanged.</span></div><section class="inspector" aria-label="Inspection controls"><div class="inspector-heading sticky-header"><strong>INSPECTOR</strong><span class="hint">Local view controls · source files stay unchanged</span></div><div class="inspector-body"><section id="applied-records" class="applied-records" aria-labelledby="applied-records-heading" hidden><div class="row"><span id="applied-records-heading" class="eyebrow">APPLIED RECORDS</span><button id="applied-undo" type="button" disabled>Undo last Apply (0 deep)</button></div><ol id="applied-list" class="applied-list"></ol><p id="applied-status" class="hint" aria-live="polite"></p></section><section id="inspector-rig" aria-label="Setup" data-inspector-panel="rig"><nav class="block-row" role="tablist" aria-label="Setup blocks"><button type="button" role="tab" id="block-tab-selected-part" aria-controls="selected-part" aria-selected="true" tabindex="0" data-block-target="selected-part">Part</button><button type="button" role="tab" id="block-tab-modeling-tools" aria-controls="modeling-tools" aria-selected="false" tabindex="-1" data-block-target="modeling-tools">Modeling</button><button type="button" role="tab" id="block-tab-chest-regions" aria-controls="chest-regions" aria-selected="false" tabindex="-1" data-block-target="chest-regions">Chest</button><button type="button" role="tab" id="block-tab-mesh-panel" aria-controls="mesh-panel" aria-selected="false" tabindex="-1" data-block-target="mesh-panel">Mesh</button><button type="button" role="tab" id="block-tab-weights" aria-controls="weights" aria-selected="false" tabindex="-1" data-block-target="weights">Weights</button><button type="button" role="tab" id="block-tab-bones-panel" aria-controls="bones-panel" aria-selected="false" tabindex="-1" data-block-target="bones-panel">Bones</button><button type="button" role="tab" id="block-tab-rig-fields" aria-controls="rig-fields" aria-selected="false" tabindex="-1" data-block-target="rig-fields">Fields</button><button type="button" role="tab" id="block-tab-cuts-panel" aria-controls="cuts-panel" aria-selected="false" tabindex="-1" data-block-target="cuts-panel">Cuts</button><button type="button" role="tab" id="block-tab-cloth-panel" aria-controls="cloth-panel" aria-selected="false" tabindex="-1" data-block-target="cloth-panel">Cloth</button></nav><section id="selected-part" role="tabpanel" aria-labelledby="block-tab-selected-part" aria-label="Selected part" aria-live="polite"></section><section id="modeling-tools" role="tabpanel" aria-labelledby="block-tab-modeling-tools" hidden><div class="eyebrow">MODELING REVIEW</div><button data-proposal="mesh" class="tool">Mesh density <small>Add feedback</small></button><button data-proposal="contour" class="tool">Contour curvature <small>Add feedback</small></button><button data-proposal="chest" class="tool">Chest position <small>Add feedback</small></button><label for="part-set" class="label space-top">Part presets</label><select id="part-set" disabled><option>No sets supplied</option></select><p class="hint">Preview only · does not create motion keys.</p></section><section id="chest-regions" role="tabpanel" aria-labelledby="block-tab-chest-regions" class="chest-regions" hidden><div class="eyebrow" id="chest-regions-heading">CHEST REGIONS · DETAIL</div><p class="hint">Crop pixels, x screen-right and y down (<code>family-chest-regions/1</code>). Place the circles with <strong>Chest regions</strong> in the view bar; this block holds names, bones, semi-axes, clip and the contour. Equal semi-axes export as a circle, unequal ones (or a clip) as the generator's 32-sample polygon. Exporting writes nothing into the package and is not an approval.</p><p id="chest-mapping" class="hint"></p><div class="chest-grid"><label>Crop width<input id="chest-crop-w" type="number" step="any" inputmode="decimal"></label><label>Crop height<input id="chest-crop-h" type="number" step="any" inputmode="decimal"></label></div><fieldset class="chest-row"><legend>Region 1</legend><label>Name<input id="chest-0-name" type="text" autocomplete="off" spellcheck="false"></label><label>Bone<select id="chest-0-bone"><option value="">Select bone</option></select></label><label>Centre x<input id="chest-0-cx" type="number" step="any" inputmode="decimal"></label><label>Centre y<input id="chest-0-cy" type="number" step="any" inputmode="decimal"></label><label>Semi-axis x<input id="chest-0-ax" type="number" step="any" inputmode="decimal"></label><label>Semi-axis y<input id="chest-0-ay" type="number" step="any" inputmode="decimal"></label><label>Spacing<input id="chest-0-spacing" type="number" step="any" inputmode="decimal"></label><label>Band<input id="chest-0-band" type="number" step="any" inputmode="decimal"></label><label>Medial clip x<input id="chest-0-clip" type="number" step="any" inputmode="decimal" placeholder="none"></label></fieldset><fieldset class="chest-row"><legend>Region 2</legend><label>Name<input id="chest-1-name" type="text" autocomplete="off" spellcheck="false"></label><label>Bone<select id="chest-1-bone"><option value="">Select bone</option></select></label><label>Centre x<input id="chest-1-cx" type="number" step="any" inputmode="decimal"></label><label>Centre y<input id="chest-1-cy" type="number" step="any" inputmode="decimal"></label><label>Semi-axis x<input id="chest-1-ax" type="number" step="any" inputmode="decimal"></label><label>Semi-axis y<input id="chest-1-ay" type="number" step="any" inputmode="decimal"></label><label>Spacing<input id="chest-1-spacing" type="number" step="any" inputmode="decimal"></label><label>Band<input id="chest-1-band" type="number" step="any" inputmode="decimal"></label><label>Medial clip x<input id="chest-1-clip" type="number" step="any" inputmode="decimal" placeholder="none"></label></fieldset><fieldset class="chest-row"><legend>Contour</legend><label>Tolerance<input id="chest-tolerance" type="number" step="any" inputmode="decimal"></label><label>Margin<input id="chest-margin" type="number" step="any" inputmode="decimal"></label><label>Spacing<input id="chest-spacing" type="number" step="any" inputmode="decimal"></label><label>Max edge<input id="chest-max-edge" type="number" step="any" inputmode="decimal"></label><label>Stray<input id="chest-stray" type="number" step="any" inputmode="decimal"></label><label class="chest-check"><input id="chest-bridges" type="checkbox">Bridges</label></fieldset><details class="chest-more"><summary>Generator and mesh fields</summary><label for="chest-generator" class="label space-top">Public generator</label><input id="chest-generator" type="text" autocomplete="off" spellcheck="false" placeholder="Generator that will read this file"><label for="chest-r" class="label space-top">Mesh r (optional)</label><input id="chest-r" type="number" step="any" inputmode="decimal"><label for="chest-segments" class="label space-top">Mesh segments JSON (optional)</label><textarea id="chest-segments" rows="3" spellcheck="false"></textarea><label for="chest-source-rule" class="label space-top">Source rule (optional)</label><input id="chest-source-rule" type="text" autocomplete="off"></details><p id="chest-status" class="hint" aria-live="polite"></p><button id="chest-export" type="button" class="outline block">Download chest-regions.json</button></section><section id="mesh-panel" role="tabpanel" aria-labelledby="block-tab-mesh-panel" class="physics-panel mesh-panel" hidden><div class="row"><span id="mesh-panel-heading" class="eyebrow">MESH · APPLY REMESHES</span></div><p id="mesh-panel-state" class="hint">Select a mesh part in the parts list.</p><p class="hint">Edits the selected part's <code>meshes.<part></code> entry from the handoff config (the grid and contour modes). Apply sends the whole pending entry to the installed producer's <code>remesh --mesh</code> (one patch op at <code>/meshes/<part></code>), compiles and checks the revision, and reloads it with the mesh edges on; Reset returns to the inspected build and the config's entry. Slider ranges are review's; the number field takes any value, and the producer judges it.</p><div id="mesh-params" class="physics-controls mesh-params"></div><div class="row mesh-tools"><span class="eyebrow">REGIONS</span><button id="mesh-add-circle" type="button" disabled>Add circle</button><button id="mesh-add-polygon" type="button" aria-pressed="false" disabled>Draw polygon</button><button id="mesh-regions-edit" type="button" aria-pressed="false" disabled>Drag on stage</button></div><div id="mesh-regions" class="mesh-regions"></div><div class="row mesh-tools"><span class="eyebrow">SEGMENTS</span><select id="mesh-segment-bone" aria-label="Bone to add as a segment" disabled></select><button id="mesh-segment-add" type="button" disabled>Add</button></div><ol id="mesh-segments" class="physics-pending-list mesh-segments"></ol><div class="row"><span class="eyebrow">PENDING ENTRY · DIFF AGAINST THE CONFIG</span></div><ol id="mesh-diff" class="physics-pending-list"></ol><ul id="mesh-precheck" class="mesh-precheck" aria-label="Review pre-check in the config loader's names"></ul><div class="row"><button id="mesh-panel-apply" type="button" class="primary" disabled>Apply</button><button id="mesh-panel-reset" type="button" disabled>Reset</button><button id="mesh-folds" type="button" title="rigc render --folds of the drawn animation on the inspected build and on this revision (#108 readings)">Folds reading</button><span class="hint rebuild-drop-notice" data-rebuild-drop="mesh" hidden></span></div><output id="mesh-status" class="environment-readout"></output><div id="mesh-counts" class="physics-readout" aria-label="Vertex and triangle counts before and after"></div><div id="mesh-readout" class="physics-readout" aria-label="TEXTURE_STRETCH before and after Apply"></div><div id="density-strip" class="density-strip" aria-labelledby="density-strip-heading"><div class="row"><span id="density-strip-heading" class="eyebrow">DENSITY STRIP · NOTHING IS APPLIED</span></div><p id="density-strip-field" class="hint">Select a mesh part (grid or contour entry) to build a density strip.</p><p class="hint">Builds N values of the part's density field side by side, each as its own <code>replace /meshes/<part></code> patch through remesh (into its own scratch folder). Rows are labels only: Load puts a row on the stage as pending, and the Mesh panel's Apply applies it. Closing or replacing the strip removes its scratch.</p><div class="row density-strip-form"><label>N<input id="density-strip-n" type="number" min="2" max="5" step="1" value="5" aria-label="Number of values"></label><label>from<input id="density-strip-from" type="number" step="any" aria-label="From value"></label><label>to<input id="density-strip-to" type="number" step="any" aria-label="To value"></label><button id="density-strip-build" type="button" disabled>Build strip</button><button id="density-strip-back" type="button" disabled title="Return the stage to the applied build it showed before a row was loaded">Back</button><button id="density-strip-close" type="button" disabled>Close strip</button></div><output id="density-strip-status" class="environment-readout"></output><div id="density-strip-table" class="density-strip-table"></div></div><textarea id="mesh-pending" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea></section><section id="weights" role="tabpanel" aria-labelledby="block-tab-weights" class="physics-panel weights-block" hidden><div class="row"><span id="weights-heading" class="eyebrow">WEIGHTS · SETUP POSE · WATCH ONLY</span></div><p class="hint">The selected slot's mesh at the setup pose, each vertex coloured by the weight the compiled model document stores for the picked bone (0 → 1), or by its dominant bone under <strong>Max influence</strong>. An unweighted mesh is its slot's bone at 1.0. Hover a vertex for its stored values. Nothing here edits, applies or records a weight.</p><div class="row weights-controls"><button id="weights-show" type="button" aria-pressed="false">Show weights</button><label>Colour by<select id="weights-mode"><option value="bone">Bone weight</option><option value="max">Max influence</option></select></label><label>Bone<select id="weights-bone" disabled></select></label></div><p id="weights-state" class="hint" aria-live="polite"></p><div id="weights-legend" class="weights-legend" aria-label="Weights legend"></div><output id="weights-hover" class="environment-readout"></output></section><section id="bones-panel" role="tabpanel" aria-labelledby="block-tab-bones-panel" class="physics-panel bones-panel" hidden><div class="row"><span id="bones-panel-heading" class="eyebrow">BONES · CONFIG ANCHORS · APPLY REBUILDS</span></div><p id="bones-panel-state" class="hint">Reading the producer handoff…</p><p class="hint">The producer config's bones at their <code>at</code>, chain <code>points</code> and <code>tip</code> (rig px, the setup pose; the stage may be posed by an animation). Drag a handle on the stage or edit the numbers: each move is a config patch op at <code>/bones/<i>/at</code>, <code>/bones/<i>/points/<k></code> or <code>/bones/<i>/tip</code> naming its bone, moved in whole rig px. <strong>Check</strong> runs <code>propose --from-config</code> on a scratch copy of the patched config (LINT and coverage lines; LINT blocks nothing) and <code>compare</code> against the handoff config. <strong>Apply</strong> rebuilds the whole rig (<code>rig --config</code>, then <code>check</code>) and needs the reproduced baseline; Reset returns to the inspected build and clears the pending ops. Adding, removing or re-parenting bones is out of scope.</p><div class="row bones-controls"><button id="bones-edit" type="button" aria-pressed="false" disabled>Edit bones on stage</button><label for="bones-select">Bone</label><select id="bones-select" disabled></select></div><div id="bones-anchor-editor" class="bones-anchor-editor"></div><div class="row"><span class="eyebrow">PENDING OPS</span></div><ol id="bones-pending-list" class="physics-pending-list"></ol><div class="row"><button id="bones-check" type="button" disabled>Check</button><button id="bones-apply" type="button" class="primary" disabled>Apply</button><button id="bones-reset-build" type="button" disabled>Reset</button><span class="hint rebuild-drop-notice" data-rebuild-drop="bones" hidden></span></div><output id="bones-status" class="environment-readout"></output><div id="bones-compare" class="bones-lines" aria-label="compare: origin and tip distance per moved bone"></div><div id="bones-lint" class="bones-lines" aria-label="propose --from-config: LINT and coverage lines"></div><textarea id="bones-pending" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea></section><section id="rig-fields" role="tabpanel" aria-labelledby="block-tab-rig-fields" class="physics-panel rig-fields" hidden><div class="row"><span id="rig-fields-heading" class="eyebrow">RIG FIELDS · CONFIG · APPLY REBUILDS</span><span id="rig-fields-dial-label" class="idle-preview-label" hidden>preview — Apply decides</span></div><p id="rig-fields-state" class="hint">Reading the producer handoff…</p><p class="hint">Small producer config fields, each a config patch op: the bone a rigid part rides (<code>/regions/<part></code>), a lash's blink still row (<code>/motion/blink/still/<part></code>, dragged on the stage), a stop's inward / outward bounds (<code>/stops/<i></code>, arcs dragged at the pivot), a bone's inherit mode (<code>/bones/<i>/inherit</code>; a chain's <code>link_inherit</code>) and <code>turn</code>'s pivot and per-part depth (<code>/turn/pivot</code>, <code>/turn/depths/<part></code>). <strong>Apply</strong> rebuilds the whole rig (<code>rig --config</code>, then <code>check</code>) and needs the reproduced baseline; the producer's refusal is shown as printed. The dial only previews the drawn build's <code>turn</code> bone and is never recorded. Reset returns to the inspected build and clears the pending ops.</p><div id="rig-fields-region" class="rig-fields-group"></div><div id="rig-fields-still" class="rig-fields-group"></div><div id="rig-fields-stops" class="rig-fields-group"></div><div id="rig-fields-inherit" class="rig-fields-group"></div><div id="rig-fields-turn" class="rig-fields-group"></div><div class="row"><span class="eyebrow">PENDING OPS</span></div><ol id="rig-fields-pending-list" class="physics-pending-list"></ol><div class="row"><button id="rig-fields-apply" type="button" class="primary" disabled>Apply</button><button id="rig-fields-reset" type="button" disabled>Reset</button><button id="rig-fields-reading" type="button" disabled>Angle range</button><span class="hint rebuild-drop-notice" data-rebuild-drop="rig-fields" hidden></span></div><output id="rig-fields-status" class="environment-readout"></output><div id="rig-fields-readout" class="physics-readout" aria-label="BLINK_NO_HOLE and FEET_STAY_LEVEL before and after"></div><textarea id="rig-fields-pending" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea></section><section id="cuts-panel" role="tabpanel" aria-labelledby="block-tab-cuts-panel" class="physics-panel bones-panel cuts-panel" hidden><div class="row"><span id="cuts-panel-heading" class="eyebrow">CUTS · PATCHES · LIMBS · APPLY RUNS RIG-PARTS BUILD</span></div><p id="cuts-panel-state" class="hint">Reading the producer handoff…</p><p class="hint">The producer config's <code>assemble.cuts</code> polygons, <code>assemble.patches</code> boxes and each limb joint with its <code>range</code> arc, on the stage in rig px of the setup pose. Drag a vertex, a box corner or a joint, or edit the numbers: each change is a config patch op (<code>/assemble/cuts/<i>/polygon/<k></code>, <code>/assemble/patches/<i>/box</code>, <code>/limbs/<limb>/segments/<k>/range</code>; a joint is its bone's origin, <code>/bones/…</code>). A new cut or patch adds its entry and a <code>regions</code> bone. <strong>Apply</strong> runs <code>rig-parts build</code> (assemble → rig → check) from the declared painting and See-through runs into scratch and needs the reproduced baseline; the producer's refusals (<code>ASSEMBLE_CUT_*</code>, <code>ASSEMBLE_UNDER_*</code>, <code>CONFIG_LIMB_*</code>, <code>CONFIG_PART_UNIQUE</code>) are shown as printed, and the recomposite error map, the <code>seam pair</code> lines and the build's wall clock come back with the build. Review paints no <code>under</code> or <code>cap</code> image. Reset returns to the inspected build and clears the pending ops.</p><div class="row bones-controls"><button id="cuts-edit" type="button" aria-pressed="false" disabled>Edit cuts on stage</button><label for="cuts-select">Entry</label><select id="cuts-select" disabled></select></div><div id="cuts-editor" class="bones-anchor-editor"></div><div id="cuts-add" class="row cuts-add"><span class="eyebrow">ADD</span><select data-cuts-add="from" aria-label="Plan part the new cut takes pixels from"></select><input data-cuts-add="name" type="text" autocomplete="off" placeholder="new part" aria-label="New part name"><input data-cuts-add="bone" type="text" list="lm-bones" autocomplete="off" placeholder="bone" aria-label="Bone the new part's region rides"><select data-cuts-add="draw" aria-label="Where the new part is drawn"></select><input data-cuts-add="overlap" type="number" min="0" step="1" value="0" inputmode="numeric" aria-label="Cut overlap band in rig px"><select data-cuts-add="alpha" aria-label="New patch alpha"><option value="silhouette">silhouette</option><option value="box">box</option></select><button type="button" data-cuts-add="place-cut">Place cut</button><button type="button" data-cuts-add="place-patch">Place patch</button><button type="button" data-cuts-add="finish">Finish</button><button type="button" data-cuts-add="cancel">Cancel</button></div><div class="row"><span class="eyebrow">PENDING OPS</span></div><ol id="cuts-pending-list" class="physics-pending-list"></ol><div class="row"><button id="cuts-apply" type="button" class="primary" disabled>Apply</button><button id="cuts-reset" type="button" disabled>Reset</button><span class="hint rebuild-drop-notice" data-rebuild-drop="cuts" hidden></span></div><output id="cuts-status" class="environment-readout"></output><div id="cuts-readout" class="physics-readout" aria-label="The build's refusals, cut lines, recomposite, seam pairs and wall clock"></div><textarea id="cuts-pending" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea></section><section id="cloth-panel" role="tabpanel" aria-labelledby="block-tab-cloth-panel" class="physics-panel bones-panel cloth-panel" hidden><div class="row"><span id="cloth-panel-heading" class="eyebrow">CLOTH · RECIPE PER TAG · APPLY RUNS RIG-PARTS PROPOSE --CLOTH</span></div><p id="cloth-panel-state" class="hint">Reading the producer handoff…</p><p class="hint">The producer config's <code>cloth</code> block: one recipe per tag the installed reader accepts, with its fields as written. Each change is a config patch op at <code>/cloth/<tag>/…</code>. <strong>Show links</strong> draws the chains the tag's parts are meshed on, from the config's <code>points</code> and <code>tip</code> in rig px of the setup pose, and after an Apply the chains of the config the producer wrote. <strong>Apply</strong> runs <code>rig-parts propose --cloth --write-config</code> on the declared parts, painting and keypoints into scratch, then builds the written config (<code>rig-parts build</code> when the config declares <code>limbs</code>, else <code>rig --config</code>) and reloads it under the Environment's wind and gravity; the producer's refusals (<code>CONFIG_CLOTH_*</code>, <code>PROPOSE_CLOTH_DRAFTED</code>, <code>PROPOSE_CLOTH_PART</code>, <code>PROPOSE_WRITE_CONFIG_*</code>) are shown as printed. Review edits the recipe, never the drafted constraints. Reset returns to the inspected build and clears the pending ops.</p><div class="row bones-controls"><button id="cloth-links" type="button" aria-pressed="false" disabled>Show links on stage</button><label for="cloth-tag">Tag</label><select id="cloth-tag" disabled></select><label class="cloth-declared"><input id="cloth-declared" type="checkbox" disabled> recipe declared</label></div><div id="cloth-fields" class="cloth-fields"></div><div class="row"><span class="eyebrow">PENDING OPS</span></div><ol id="cloth-pending-list" class="physics-pending-list"></ol><div class="row"><button id="cloth-apply" type="button" class="primary" disabled>Apply</button><button id="cloth-reset" type="button" disabled>Reset</button><span class="hint rebuild-drop-notice" data-rebuild-drop="cloth" hidden></span></div><output id="cloth-status" class="environment-readout"></output><div id="cloth-readout" class="physics-readout" aria-label="Propose's refusals, the written config's diff, the route and check"></div><textarea id="cloth-pending" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea></section></section><section id="inspector-playback" aria-label="Animate" data-inspector-panel="playback" hidden><div id="animation-dock" class="animation-dock-panel" role="region" aria-label="Animation timeline"><section id="transport" class="transport"><button id="play" aria-label="Play" disabled>▶</button><label for="animation-select" class="sr-only">Animation</label><select id="animation-select" disabled><option>No animations supplied</option></select><input id="scrub" type="range" min="0" max="1" step="0.001" value="0" aria-label="Playback time"><output id="time-label">0.0000 / 0.0000 s</output><output id="frame-label">rate unknown</output><label class="idle-repeat"><input id="idle-repeat" type="checkbox" checked>Repeat idle</label><div id="reading-ticks" class="reading-ticks" hidden aria-label="Reading ticks"></div><div id="idle-blink-strip" class="idle-blink-strip" hidden><button id="idle-blink-marker" type="button" class="idle-blink-marker" aria-label="Blink time">◆</button></div></section><section id="frame-controls" class="frame-controls" hidden aria-label="Frame navigation using the explicit clock"><label for="frame-number">Frame</label><input id="frame-number" type="number" min="0" step="1" inputmode="numeric" aria-label="Frame number to inspect"><button id="frame-jump" type="button">Go</button><input id="frame-scrub" type="range" min="0" max="1" step="1" value="0" aria-label="Scrub by frame"><span id="frame-clock-label" class="hint"></span><p id="frame-outside" class="hint" hidden>The current time is outside the explicit frame range. Enter a frame number to go to its exact time.</p></section><section id="animation-inspection" aria-label="Read-only animation inspection"></section></div><div id="animate-blocks" class="animate-blocks-panel" data-inspector-scroll><nav class="block-row" role="tablist" aria-label="Animate blocks"><button type="button" role="tab" id="block-tab-motion-tools" aria-controls="motion-tools" aria-selected="true" tabindex="0" data-block-target="motion-tools" data-block-includes="angle-panel">Transport</button><button type="button" role="tab" id="block-tab-sound-panel" aria-controls="sound-panel" aria-selected="false" tabindex="-1" data-block-target="sound-panel">Sound</button><button type="button" role="tab" id="block-tab-environment" aria-controls="environment" aria-selected="false" tabindex="-1" data-block-target="environment">Environment</button><button type="button" role="tab" id="block-tab-physics-panel" aria-controls="physics-panel" aria-selected="false" tabindex="-1" data-block-target="physics-panel">Physics</button><button type="button" role="tab" id="block-tab-idle-tracks" aria-controls="idle-tracks" aria-selected="false" tabindex="-1" data-block-target="idle-tracks">Idle tracks</button><button type="button" role="tab" id="block-tab-readings" aria-controls="readings" aria-selected="false" tabindex="-1" data-block-target="readings">Readings</button><button type="button" role="tab" id="block-tab-requirements" aria-controls="requirements" aria-selected="false" tabindex="-1" data-block-target="requirements">Requirements</button><button type="button" role="tab" id="block-tab-retarget" aria-controls="retarget" aria-selected="false" tabindex="-1" data-block-target="retarget">Retarget</button><button type="button" role="tab" id="block-tab-report-panel" aria-controls="report-panel" aria-selected="false" tabindex="-1" data-block-target="report-panel">Report</button></nav><section id="motion-tools" role="tabpanel" aria-labelledby="block-tab-motion-tools"><div class="eyebrow">MOTION · EDITS BUILD THROUGH THE PRODUCER</div><button data-proposal="pose" class="tool">Inspect pose <small>Add feedback</small></button><button data-proposal="timing" class="tool">Inspect interval <small>Add feedback</small></button><button data-proposal="audio" class="tool">Audio links <small>Add feedback</small></button><button data-proposal="angle" class="tool">Angle inspection <small id="axis-state">No inspection axes supplied</small></button></section><section id="angle-panel" class="angle-panel" hidden><label for="axis-select">Rig inspection axis</label><select id="axis-select"></select><label id="axis-label" for="axis-value"></label><input id="axis-value" type="range" disabled><output id="axis-value-label"></output><p class="hint">Maps one inspection axis to its animation time. This does not rotate the camera.</p></section><section id="sound-panel" role="tabpanel" aria-labelledby="block-tab-sound-panel" class="sound-panel" hidden><div class="row"><span class="eyebrow">SOUND CUES</span><label><input id="sync-audio" type="checkbox">Play cue audio in sync</label></div><div id="cues"></div><div class="row"><label for="audio-volume">Audio volume</label><input id="audio-volume" type="range" min="0" max="1" step="0.05" value="0.8"><output id="audio-volume-label">80%</output></div><div id="event-log" class="hint" aria-live="polite">Runtime events: none</div></section><section id="environment" role="tabpanel" aria-labelledby="block-tab-environment" class="environment-panel" hidden><div class="row"><span id="environment-heading" class="eyebrow">ENVIRONMENT · INSPECTION ONLY</span></div><p class="hint">Wind, gravity and impulses go to the player while you inspect. Nothing is written to the model or motion; feedback records the state as context.</p><input id="environment-applied" type="checkbox" hidden aria-hidden="true" tabindex="-1"><div class="row"><label for="wind-base">Wind</label><input id="wind-base" type="range" min="-100" max="100" step="1" value="0" disabled><output id="wind-base-label">0</output></div><div class="row"><label><input id="wind-breeze" type="checkbox" disabled>Breeze</label><button id="wind-gust" type="button" disabled>Gust</button><label><input id="wind-repeat" type="checkbox" disabled>Repeat</label></div><div class="row"><label for="wind-gust-peak">Gust peak</label><input id="wind-gust-peak" type="number" min="0" max="200" step="1" value="48" inputmode="decimal" disabled><label for="wind-gust-duration">Duration (s)</label><input id="wind-gust-duration" type="number" min="0.1" max="20" step="0.1" value="2.4" inputmode="decimal" disabled></div><output id="wind-readout" class="environment-readout">No compiled model drawn · environment unavailable</output><div class="row"><label for="gravity">Gravity</label><input id="gravity" type="range" min="0" max="4" step="0.05" value="1" disabled><output id="gravity-label">1.00</output></div><div class="row"><button id="jolt" type="button" disabled>Jolt</button><button id="physics-reset" type="button" disabled>Reset physics</button></div><p class="hint">Dragging the rig pane pans the camera and tells the physics the rig moved, so hair and cloth trail; a click that does not move still selects a part. Hold Space to pan only. Reset returns the runtime start values and re-poses from the current time, clearing the physics history.</p><div class="row"><label title="Readings and Apply's check read this wind and gravity as a rigc-environment/1 schedule; the wind clock restarts with the clip so you watch the same world"><input id="environment-use" type="checkbox" disabled>Use for readings</label><button id="environment-export" type="button" disabled>Export schedule</button><button id="environment-check" type="button" disabled>Check under this world</button></div><output id="environment-schedule" class="environment-readout">No schedule · the controls are not applied (the player stands at the runtime start values)</output><div id="environment-check-lines" class="environment-check-lines" aria-live="polite"></div><p class="hint">The schedule is the controls as a <code>rigc-environment/1</code> file from the clip's first frame: one step when the wind is steady, else one step per frame at 12 fps (between frames rigc holds the frame's value). A one-off Gust is not in it; Repeat puts gusts in it. Check under this world runs <code>rig-parts check --environment</code> on the build on the stage; the default-world line is that build's own check.</p></section><section id="physics-panel" role="tabpanel" aria-labelledby="block-tab-physics-panel" class="physics-panel" hidden><div class="row"><span id="physics-panel-heading" class="eyebrow">PHYSICS TUNING · APPLY REBUILDS</span></div><p id="physics-panel-state" class="hint">No compiled model drawn.</p><p class="hint">Each edit is a config patch op at <code>/constraints/<i>/<field></code> naming its constraint. Apply runs the installed producer (<code>rig --config</code>, then <code>check</code>) into a scratch build and reloads it under the same wind, gust and jolt state; Reset returns to the inspected build and clears the pending ops. Live preview changes strength, damping, inertia, wind, gravity and mix on the next evaluation; mass and component toggles require Apply. Clear resumes authored values without resetting integrated history.</p><div class="row"><label><input data-physics-preview type="checkbox" checked>Preview pending physics</label><button id="physics-preview-clear" type="button">Clear preview</button></div><output id="physics-preview-label" class="environment-readout">Preview off · Apply decides.</output><div class="row physics-chain-row"><label for="physics-chain">Chain</label><select id="physics-chain" disabled></select><button id="physics-chain-pick" type="button" aria-pressed="false" disabled>Pick on stage</button></div><div class="row physics-ramp-row"><label for="physics-ramp-field">Ramp</label><select id="physics-ramp-field" disabled></select><label for="physics-ramp-root">root</label><input id="physics-ramp-root" type="number" step="any" inputmode="decimal" disabled><label for="physics-ramp-tip">tip</label><input id="physics-ramp-tip" type="number" step="any" inputmode="decimal" disabled><button id="physics-ramp" type="button" disabled>Ramp</button></div><div class="physics-work"><div id="physics-rows" class="physics-table-wrap" role="region" aria-label="Physics constraints the config declares" tabindex="0"></div><div id="physics-row-editor" class="physics-row-editor"></div></div><div id="physics-locked" class="physics-table-wrap physics-locked" role="region" aria-label="Constraints that are not editable" tabindex="0" hidden></div><div class="row"><span class="eyebrow">PENDING OPS</span></div><ol id="physics-pending-list" class="physics-pending-list"></ol><div class="row"><button id="physics-apply" type="button" class="primary" disabled>Apply</button><button id="physics-reset-build" type="button" disabled>Reset</button><span class="hint rebuild-drop-notice" data-rebuild-drop="physics" hidden></span></div><output id="physics-apply-status" class="environment-readout"></output><div id="physics-readout" class="physics-readout" aria-label="Check readout before and after Apply"></div><textarea id="physics-pending" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea></section><section id="idle-tracks" role="tabpanel" aria-labelledby="block-tab-idle-tracks" class="physics-panel idle-panel" hidden><div class="row"><span id="idle-tracks-heading" class="eyebrow">IDLE TRACKS · APPLY REBUILDS</span><span id="idle-preview-label" class="idle-preview-label" aria-live="polite" hidden>preview — Apply decides</span></div><p id="idle-tracks-state" class="hint">No compiled model drawn.</p><p class="hint">Each edit is a config patch op at <code>/motion/tracks/<i>/…</code> or <code>/motion/blink/…</code>. Period is offered only among the divisors of <code>motion.duration</code> (the producer refuses any other, <code>CONFIG_PERIOD_DIVIDES_DURATION</code>). While edits are pending the preview drives the edited bones through the player's <code>adjust</code> with the producer's sine, <code>v(t) = base + amp·sin(2π(t/period − phase))</code>, on the bone the idle keys (<code><bone>_ctl</code> under ctl keys); it is never recorded or submitted. Apply runs the installed producer (<code>rig --config</code>, then <code>check</code>) into a scratch build and replaces the preview with the built idle; Reset returns to the inspected build and clears the pending ops.</p><p id="idle-keys-line" class="hint"></p><div class="physics-work"><div id="idle-track-list" class="physics-table-wrap" role="region" aria-label="Idle tracks the config states" tabindex="0"></div><div id="idle-track-editor" class="physics-row-editor"></div></div><datalist id="idle-bones"></datalist><div class="row idle-add-row"><span class="eyebrow">ADD</span><input data-idle-add-bone type="text" list="idle-bones" autocomplete="off" placeholder="bone" aria-label="Bone for a new track" disabled><select data-idle-add-prop aria-label="Property for a new track" disabled></select><button data-idle-add-single type="button" disabled>Add track</button><select data-idle-add-chain aria-label="Chain for a new chain track" disabled></select><button data-idle-add-chain-button type="button" disabled>Add chain track</button></div><div id="idle-blink" class="idle-blink"></div><div class="row"><label class="idle-preview-toggle"><input data-idle-preview type="checkbox" checked>Preview edits (not recorded)</label></div><div id="idle-precheck" class="idle-precheck" aria-label="Review pre-check"></div><div class="row"><span class="eyebrow">PENDING OPS</span></div><ol id="idle-pending-list" class="physics-pending-list"></ol><div class="row"><button id="idle-apply" type="button" class="primary" disabled>Apply</button><button id="idle-reset" type="button" disabled>Reset</button><span class="hint rebuild-drop-notice" data-rebuild-drop="idle" hidden></span></div><output id="idle-apply-status" class="environment-readout"></output><div id="idle-readout" class="physics-readout" aria-label="Check readout before and after Apply"></div><textarea id="idle-pending" class="sr-only" hidden aria-hidden="true" tabindex="-1"></textarea></section><section id="readings" role="tabpanel" aria-labelledby="block-tab-readings" class="readings-panel" hidden><div class="row"><span id="readings-heading" class="eyebrow">READINGS · RIGC RENDER</span></div><p class="hint">Each reading is one <code>rigc render</code> of the drawn animation, on the inspected build and on the latest scratch build. Its frames become ticks under the timeline (<span class="tick-swatch inspected" aria-hidden="true"></span> inspected, <span class="tick-swatch scratch" aria-hidden="true"></span> scratch; click one to seek) and each pair gets its worst-frame line. A reading, not a gate: an unknown slot or bone is refused with rigc's own line.</p><datalist id="readings-slots"></datalist><datalist id="readings-bones"></datalist><div class="row"><label><input id="readings-folds" type="checkbox">Folds</label><label><input id="readings-overlaps" type="checkbox">Overlaps</label></div><div class="row readings-pair"><label><input id="readings-pass-on" type="checkbox">Pass-through</label><input id="readings-pass-cloth" type="text" list="readings-slots" autocomplete="off" placeholder="cloth slot" aria-label="Pass-through cloth slot"><span aria-hidden="true">:</span><input id="readings-pass-leg" type="text" list="readings-slots" autocomplete="off" placeholder="leg slot" aria-label="Pass-through leg slot"></div><div class="row readings-pair"><label><input id="readings-seam-on" type="checkbox">Seam</label><input id="readings-seam-a" type="text" list="readings-slots" autocomplete="off" placeholder="slot" aria-label="Seam first slot"><span aria-hidden="true">:</span><input id="readings-seam-b" type="text" list="readings-slots" autocomplete="off" placeholder="slot" aria-label="Seam second slot"></div><div class="row readings-pair"><label><input id="readings-angle-on" type="checkbox">Angle range</label><input id="readings-angle-bone" type="text" list="readings-bones" autocomplete="off" placeholder="bone" aria-label="Angle range bone"><span aria-hidden="true">vs</span><input id="readings-angle-relative" type="text" list="readings-bones" autocomplete="off" placeholder="relative bone" aria-label="Angle range relative-to bone"></div><div class="row"><button id="readings-run" type="button" disabled>Run readings</button></div><p id="readings-status" class="hint" aria-live="polite">No compiled model drawn.</p><ul id="readings-worst" class="readings-worst" aria-label="Worst frame per reading"></ul></section><section id="requirements" role="tabpanel" aria-labelledby="block-tab-requirements" class="readings-panel requirements-panel" hidden><div class="row"><span id="requirements-heading" class="eyebrow">REQUIREMENTS · RIG-PARTS CHECK</span></div><p class="hint">Declare what the scene asks of the motion: a slot (picked on the stage), its mesh or a bone, an animation and a kind, with your own bar. Check writes a <code>spine-parts-requirements/1</code> file into scratch and runs the installed producer's <code>rig-parts check --requirements</code> on the inspected rig or the latest scratch build; each requirement gets one line with its worst frame (click to seek). A refusal is the producer's, by name. Waivers (<code>may_fold</code>), scene targets and the part exception lists are not written here. Submitted feedback carries the file by hash and content.</p><div id="requirements-body"></div></section><section id="retarget" role="tabpanel" aria-labelledby="block-tab-retarget" class="readings-panel requirements-panel retarget-panel" hidden><div class="row"><span id="retarget-heading" class="eyebrow">RETARGET · RIG-POSE</span></div><p class="hint">Put a pose sequence the package declares onto this rig: edit the <code>rig-pose-map/1</code> (per chain, the bone that carries each segment), set the clean and retarget flags, and Apply. The installed <code>@rig-c/pose</code> runs <code>rig-pose clean</code> and <code>rig-pose retarget</code> onto the handoff rig, and its <code>rigc</code> compiles the result, all into scratch; the new animation plays here beside the reference (pick the sequence under Reference). Review writes no keys and never writes the package's <code>motion.json</code>. Refusals (<code>POSE_NOT_CLEANED</code>, <code>POSE_BEND_ONE_WAY</code>, <code>RAISED_HEAD</code>, <code>MOTION_NAME_FREE</code>, <code>MAP_*</code>) are the producer's, verbatim. FEET, STANCE, FLIP, SHORT, END-ON, LEG-SCALE and REACH lines seek to their frame.</p><div id="retarget-body"></div></section><section id="report-panel" role="tabpanel" aria-labelledby="block-tab-report-panel" class="report-panel" hidden><div class="report-header"><h2 id="report-heading">Report events</h2><span id="report-summary" class="subtle"></span><a id="report-source-link" target="_blank" rel="noopener" hidden>Source report</a></div><p id="report-unavailable" class="hint" hidden>No rig-pose-report/1 events supplied.</p><div id="report-browser"><div class="report-controls"><label for="report-category" class="sr-only">Report event category</label><select id="report-category"><option value="all">All events</option></select><button id="report-previous" type="button" aria-label="Previous event page">Previous</button><output id="report-page"></output><button id="report-next" type="button" aria-label="Next event page">Next</button></div><div id="report-empty-categories" class="report-empty-categories"></div><p id="report-missing" class="hint" hidden></p><ol id="report-events" class="report-event-list" aria-label="Read-only report events"></ol><section id="report-selection" class="report-selection" hidden aria-labelledby="report-selection-heading"><h3 id="report-selection-heading"></h3><p id="report-timing" class="hint"></p><div class="report-controls"><label id="report-time-label" for="report-time" hidden>Select explicit time</label><select id="report-time" hidden></select><button id="report-seek" type="button" disabled>Go to explicit time</button></div><div id="report-target-control" hidden><label for="report-target" class="label space-top">Select a target named in the report</label><select id="report-target"></select></div><p id="report-prefill-note" class="hint"></p><p id="report-provenance" class="hint"></p><details><summary>Source event details</summary><pre id="report-details"></pre></details></section></div></section></div></section></div></section></main></div><footer class="status-bar"><span id="message" class="status-message" role="status" aria-live="polite">Loading local review package…</span><div class="status-readouts" aria-label="Status"><span id="player-state" class="subtle">No rig supplied</span><span id="layout-state" class="subtle" role="status" aria-label="Effective layout">Loading inputs…</span><span id="renderer-state" class="subtle" aria-label="Last draw backend" title="DOM images for rigid parts; WebGL meshes when available, Canvas2D fallback.">Not rendered</span><span id="layer-state" class="hint">No rig supplied</span><span id="idle-state" class="hint" role="status">Idle preview unavailable</span><span id="control-state" class="hint" role="status"></span><div class="draft-notice"><span id="draft-state" role="status" aria-live="polite"></span><div id="draft-recovery"></div></div></div><div class="status-source"><details class="view-region"><summary>View region</summary><div class="view-region-body"><span class="hint">Numeric source region · opening this link restores a paused inspection</span><pre id="view-coordinates" class="numeric-view" aria-label="Current numeric inspection region"></pre><p class="hint">Sync cameras links fit-relative zoom and viewport-relative pan across visible panes. Turn it off to inspect each pane independently. Toolbar zoom and Fit use the last active pane. Hold Space while dragging a video to pan without taking over its native controls.</p></div></details><span id="source-hash" class="subtle"></span></div></footer><dialog id="review-dialog" class="review-dialog" aria-labelledby="review-dialog-title"><div class="review-dialog-header"><h2 id="review-dialog-title">Write review</h2><span class="hint">Drafts save locally as you type · nothing is submitted until you press Submit</span><button id="review-dialog-close" type="button">Close</button></div><section id="inspector-feedback" class="review-dialog-body" aria-label="Feedback"><div class="review-summary"><div class="eyebrow">REVIEW</div><label for="review-status" class="label">Review status</label><select id="review-status"><option value="pending">Pending</option><option value="approved">Approved</option><option value="changes-requested">Changes requested</option></select><section class="provenance" aria-label="Reviewed source"><div class="eyebrow">REVIEWED SOURCE</div><div class="provenance-row"><span>Package revision</span><strong id="provenance-version">—</strong></div><div class="provenance-row"><span>rig SHA-256</span><code id="provenance-rig">—</code></div><div class="provenance-row"><span>motion SHA-256</span><code id="provenance-motion">—</code></div><details><summary>Full provenance</summary><pre id="provenance-full"></pre></details><div class="source-files"><div class="eyebrow">SOURCE FILES · READ ONLY</div><div id="source-files"></div></div><p class="hint">Submits server-verified file hashes and tool versions. Your selected review status is preserved.</p></section><div class="divider"></div></div><div id="checkpoint-detail"><div class="eyebrow">SELECTED CHECKPOINT</div><h1 id="detail-title">Checkpoint</h1><p id="detail-note" class="hint"></p><fieldset class="outcome"><legend>Checkpoint outcome</legend><label><input type="radio" name="outcome" value="pending" checked>Pending</label><label><input type="radio" name="outcome" value="pass">Pass</label><label><input type="radio" name="outcome" value="fail">Needs changes</label></fieldset><label for="checkpoint-note" class="label space-top">Review notes</label><textarea id="checkpoint-note" rows="5" placeholder="Describe the part, conditions and what looks wrong."></textarea></div><div class="divider"></div><section id="proposal-panel"><div class="eyebrow">STRUCTURED FEEDBACK</div><div class="label">Frame range · inclusive</div><div class="frame-range"><label>Start<input id="feedback-start" type="number" min="0" step="1" inputmode="numeric" placeholder="e.g. 18"></label><label>End<input id="feedback-end" type="number" min="0" step="1" inputmode="numeric" placeholder="e.g. 32"></label></div><p id="feedback-range-hint" class="hint">Checking frame bounds…</p><label for="feedback-target-kind" class="label space-top">Target type</label><select id="feedback-target-kind"><option value="">Select target</option><option value="rig">Entire rig</option><option value="bone">Bone</option><option value="slot">Slot</option></select><label for="feedback-target-name" class="label space-top">Target name</label><input id="feedback-target-name" type="text" list="feedback-target-names" autocomplete="off" placeholder="Actual bone or slot name"><datalist id="feedback-target-names"></datalist><p id="feedback-target-hint" class="hint"></p><label for="feedback-category" class="label space-top">Category</label><select id="feedback-category"><option value="">Select category</option><option value="defect">Defect</option><option value="quality">Quality</option></select><label for="feedback-summary" class="label space-top">One-line summary</label><input id="feedback-summary" type="text" maxlength="1000" placeholder="e.g. The left wrist moves outside the sleeve"><button id="add-proposal" class="outline block">Add feedback</button><p id="proposal-boundary" class="hint">Records the current checkpoint, time, reference, camera and inspection axis. Motion is read only: inspect, mark ranges and export feedback. No keys or source files are edited.</p><p id="feedback-warnings" class="hint" role="status" hidden></p><p id="feedback-applied-check" class="hint error" role="alert" hidden></p><div id="proposal-list"></div></section><details id="strip-panel" class="report-panel"><summary>Export frame strip</summary><p class="hint">Uses the feedback form start and end frames, inclusive. Inspection time and source files remain unchanged.</p><label for="strip-scope" class="label">Export range</label><select id="strip-scope"><option value="interval">Entered start–end frames</option><option value="feedback">All feedback ranges</option></select><label for="strip-reference" class="label space-top">Reference video</label><select id="strip-reference"><option value="">Select reference video</option></select><label for="strip-format" class="label space-top">Format</label><select id="strip-format"><option value="png">PNG strip</option><option value="json">JSON frames and provenance</option></select><p class="hint">PNG requires frameTimes in the selected report. Without it, JSON preserves requested frames with time: null. Batch export requires every feedback item to match the selected animation. Unsubmitted feedback is included; exporting does not submit the review.</p><button id="strip-export" type="button" disabled>Download strip</button><p id="strip-status" class="hint" role="status" aria-live="polite">Loading package…</p></details></section><div class="review-dialog-actions"><span id="review-message" class="review-message" role="status" aria-live="polite"></span><span id="review-draft-state" class="review-draft-state" role="status" aria-live="polite"></span><span id="review-draft-recovery" class="review-draft-recovery"></span><button id="save" class="primary" disabled>Submit review</button></div></dialog></div>
|
|
10
10
|
<script type="module" src="main.js"></script>
|
|
11
11
|
</body></html>
|
package/web/main.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { CanvasRenderer, loadModel, RigPlayer, type BoneAdjust, type ModelAssets
|
|
|
9
9
|
import {cameraFrame,cameraSignature,cameraFromSignature,assertCameraView,boundsFitSignature,dragSignature,zoomSignature,type CameraFrame,type CameraPoint,type CameraSignature} from './camera-view.ts';
|
|
10
10
|
import {rendererStatus} from './renderer-status.ts';
|
|
11
11
|
import {bindAppearance,bindPan,bindStageLayout,syncStageLayout,bindInspectorTabs,idleAvailable,initialIdleAnimation,automaticIdlePreview,bindLayerShortcuts,describeLayerToggles,type ViewPoint} from './view-controls.ts';
|
|
12
|
+
import {CLICK_SLOP_PX} from './stage-pick.ts';
|
|
12
13
|
import {RigOverlays,type OverlayCircle,type OverlayMarker,type OverlayRegion,type OverlaySnapshot} from './rig-overlays.ts';
|
|
13
14
|
import {bindMeshPanel,type MeshPanel} from './mesh-panel.ts';
|
|
14
15
|
import {bindDensityStrip,type DensityStripPanel,type DensityStripViewLike} from './density-strip-panel.ts';
|
|
@@ -48,7 +49,7 @@ import { frameAtTime, lastFrame as lastProducerFrame, rigPaneLabel, timeAtFrame,
|
|
|
48
49
|
import { feedbackLastFrame, feedbackTargetNames, validateFeedbackSelection, type FeedbackCatalog } from '../src/feedback-validation.ts';
|
|
49
50
|
import { eventCoordinates, eventSeekTime, eventSelection, eventTimingLabel, reportCounts, reportDraftForMarker, targetLabel } from './report-view.ts';
|
|
50
51
|
import type { StripInterval, StripRequest } from '../src/strip.ts';
|
|
51
|
-
import {createWindModel,environmentFor,windReadout,RUNTIME_START_READOUT,joltPacket,dueJolts,
|
|
52
|
+
import {createWindModel,environmentFor,windReadout,RUNTIME_START_READOUT,joltPacket,dueJolts,dragImpulse,loadModelDocument,environmentContext,environmentJson,type JoltStep,type WindSnapshot,type WindState} from '../src/environment.ts';
|
|
52
53
|
import {tuningRows,readoutRows,type InspectedCheckView} from '../src/physics-tuning.ts';
|
|
53
54
|
import {bindReadingsPanel,type ReadingsJobView,type ReadingsPanel,type ReadingsRefusal} from './readings-panel.ts';
|
|
54
55
|
import {READINGS_SCHEMA,readingSeekTime,type ReadingsContext} from '../src/readings.ts';
|
|
@@ -957,7 +958,9 @@ function bind(): void {
|
|
|
957
958
|
requirementsPanel=bindRequirementsPanel({check:runRequirements,seek:seekReading,animation:()=>animation,slot:()=>parts?.value()?.slot??null,hash:sha256Hex});
|
|
958
959
|
const tickResize=new ResizeObserver(()=>renderReadingTicks());tickResize.observe(el('transport'));viewDisposers.push(()=>tickResize.disconnect());
|
|
959
960
|
viewDisposers.push(bindStageLayout(el('stage-layout'),fitCamera));
|
|
960
|
-
|
|
961
|
+
// #331: a plain drag on the rig pans and carries the rig, the Family viewer's gesture; the reference pane only pans.
|
|
962
|
+
const carryRig={threshold:CLICK_SLOP_PX,move:(dx:number,dy:number)=>{const impulse=dragImpulse(dx,dy,rigScale);if(impulse&&player)player.moved(impulse);}};
|
|
963
|
+
for(const target of ['rig','reference'] as const)viewDisposers.push(bindPan(el(target+'-viewport'),(dx,dy)=>cameraAction(()=>panCamera(target,dx,dy)),()=>!comments?.active(),target==='rig'?carryRig:undefined));
|
|
961
964
|
for(const [id,key] of [['layer-images','images'],['layer-mesh','mesh'],['layer-bones','bones']] as const)input(id).onchange=()=>{layers[key]=input(id).checked;redrawOverlay(false);};
|
|
962
965
|
viewDisposers.push(bindLayerShortcuts(document));describeLayerToggles(document,el('layer-state').textContent??'');
|
|
963
966
|
input('idle-repeat').onchange=()=>{renderIdle();if(canRepeatIdle())void playPreview();};
|
|
@@ -1236,7 +1239,7 @@ async function exportChest():Promise<void> {
|
|
|
1236
1239
|
message('Downloaded chest-regions.json and chest-regions.binding.json. The regions are review evidence, not an approval; the package is unchanged.');
|
|
1237
1240
|
}
|
|
1238
1241
|
/** Animate · Environment. Inspection only: the player is the solver, nothing is written to the model or motion. */
|
|
1239
|
-
const environmentInputs=['wind-base','wind-breeze','wind-gust','wind-repeat','wind-gust-peak','wind-gust-duration','gravity','jolt','
|
|
1242
|
+
const environmentInputs=['wind-base','wind-breeze','wind-gust','wind-repeat','wind-gust-peak','wind-gust-duration','gravity','jolt','physics-reset','environment-use','environment-export','environment-check'];
|
|
1240
1243
|
function environmentApplied():boolean{return input('environment-applied').checked;}
|
|
1241
1244
|
function gravityValue():number{return Number(input('gravity').value);}
|
|
1242
1245
|
/** Called from `tick` right before `player.frame(dt)`: the gust clock is the stepped time, so a paused player freezes it. */
|
|
@@ -1334,23 +1337,6 @@ function bindEnvironment():void {
|
|
|
1334
1337
|
};
|
|
1335
1338
|
button('environment-export').onclick=()=>{const world=worldFor(animation);if('error' in world){message(world.error,true);return;}download('rigc-environment.json',world.text,'application/json');message(`Exported ${world.summary}. The download is the bytes readings, Apply and feedback carry; the package is unchanged.`);};
|
|
1336
1339
|
button('environment-check').onclick=()=>{void runEnvironmentCheck();};
|
|
1337
|
-
input('drag-trail').onchange=()=>{el('rig-viewport').dataset.trail=String(input('drag-trail').checked);};
|
|
1338
|
-
// Drag to trail: the rig pane's pointer drag becomes `player.moved` before the pan handler sees it; Space still pans.
|
|
1339
|
-
let space=false,trail:{id:number;x:number;y:number}|null=null;
|
|
1340
|
-
const keys=(event:KeyboardEvent)=>{if(event.code==='Space')space=event.type==='keydown';};
|
|
1341
|
-
window.addEventListener('keydown',keys);window.addEventListener('keyup',keys);window.addEventListener('blur',()=>{space=false;});
|
|
1342
|
-
const pane=el('rig-pane'),viewport=el('rig-viewport');
|
|
1343
|
-
pane.addEventListener('pointerdown',event=>{
|
|
1344
|
-
if(!input('drag-trail').checked||space||!player||!event.isPrimary||event.button!==0)return;
|
|
1345
|
-
if(event.target instanceof Element&&event.target.closest('button,input,select,textarea,a'))return;
|
|
1346
|
-
event.stopPropagation();event.preventDefault();trail={id:event.pointerId,x:event.clientX,y:event.clientY};viewport.setPointerCapture(event.pointerId);
|
|
1347
|
-
},{capture:true});
|
|
1348
|
-
pane.addEventListener('pointermove',event=>{
|
|
1349
|
-
if(!trail||event.pointerId!==trail.id)return;event.stopPropagation();
|
|
1350
|
-
const motion=dragMoved(event.clientX-trail.x,event.clientY-trail.y,rigScale);trail.x=event.clientX;trail.y=event.clientY;if(motion&&player)player.moved(motion);
|
|
1351
|
-
},{capture:true});
|
|
1352
|
-
const end=(event:PointerEvent)=>{if(!trail||event.pointerId!==trail.id)return;event.stopPropagation();if(viewport.hasPointerCapture(trail.id))viewport.releasePointerCapture(trail.id);trail=null;};
|
|
1353
|
-
pane.addEventListener('pointerup',end,{capture:true});pane.addEventListener('pointercancel',end,{capture:true});
|
|
1354
1340
|
}
|
|
1355
1341
|
/** Reset: the runtime's start values, then the player's reopen-then-step to the current time, so the physics history is cleared. */
|
|
1356
1342
|
function resetPhysics():void {
|
|
@@ -1365,7 +1351,7 @@ function restoreEnvironment():void {
|
|
|
1365
1351
|
const snapshot:WindSnapshot={version:1,base:Number(input('wind-base').value),breeze:input('wind-breeze').checked,repeat:input('wind-repeat').checked,gustPeak:Number(input('wind-gust-peak').value),gustDuration:Number(input('wind-gust-duration').value)};
|
|
1366
1352
|
try{wind.restore(snapshot);environmentFor(wind.read(),gravityValue());}
|
|
1367
1353
|
catch(error){wind.restore(null);input('environment-applied').checked=false;input('gravity').value='1';message(`Saved environment not restored: ${errorText(error)}`,true);}
|
|
1368
|
-
syncEnvironmentInputs();
|
|
1354
|
+
syncEnvironmentInputs();
|
|
1369
1355
|
if(player){if(environmentApplied())applyEnvironment();else player.environment(null);}
|
|
1370
1356
|
}
|
|
1371
1357
|
function feedbackEnvironment(){return player?environmentJson(environmentContext(wind.read(),gravityValue(),environmentApplied(),player.environment())):null;}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stage part picking (#330). A click on the rig view and the hover preview of what that click would select
|
|
3
|
+
* both resolve through `pickAt` below — one gate, one hit test, one selectable filter. There is no second picker.
|
|
4
|
+
*/
|
|
5
|
+
import type {PosedFrame} from '@rig-c/play';
|
|
6
|
+
|
|
7
|
+
export type StageProject=(x:number,y:number)=>{x:number;y:number};
|
|
8
|
+
|
|
9
|
+
/** All picking reads the last drawn primitives, including their resolved clip; never a setup bounding box. */
|
|
10
|
+
export function pickedSlot(frame:PosedFrame,x:number,y:number):string|null {
|
|
11
|
+
const inside=(p:readonly number[])=>{let hit=false;for(let i=0,j=p.length-2;i<p.length;j=i,i+=2){const ax=p[i]!,ay=p[i+1]!,bx=p[j]!,by=p[j+1]!;if((ay>y)!==(by>y)&&x<(bx-ax)*(y-ay)/(by-ay)+ax)hit=!hit;}return hit;};
|
|
12
|
+
for(const row of [...frame.order].reverse()){
|
|
13
|
+
if(row.clip&&inside(row.clip.polygon)===row.clip.inverse)continue;
|
|
14
|
+
if(row.kind==='region'&&inside(row.corners))return row.slot;
|
|
15
|
+
if(row.kind==='mesh')for(let i=0;i<row.triangles.length;i+=3){const p=row.triangles.slice(i,i+3).flatMap(v=>[row.vertices[v*2]!,row.vertices[v*2+1]!]);if(inside(p))return row.slot;}
|
|
16
|
+
}return null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** A client point to rig world through the same projection the stage draws with (stage-local CSS px). */
|
|
20
|
+
export function stageWorld(rect:{left:number;top:number},project:StageProject,clientX:number,clientY:number):{x:number;y:number} {
|
|
21
|
+
const p0=project(0,0),px=project(1,0),py=project(0,1);
|
|
22
|
+
return {x:(clientX-rect.left-p0.x)/(px.x-p0.x),y:(clientY-rect.top-p0.y)/(py.y-p0.y)};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** The hover preview, in stage-local CSS px: the part's drawn primitives as a tint and their outer edges as an outline. */
|
|
26
|
+
export interface HoverPreview {slot:string;tint:string;outline:string;label:{x:number;y:number}}
|
|
27
|
+
|
|
28
|
+
const tenth=(v:number)=>Math.round(v*10)/10;
|
|
29
|
+
|
|
30
|
+
/** Builds the preview of `slot` from the same held frame the hit test read. Null when the slot draws nothing. */
|
|
31
|
+
export function hoverPreview(frame:PosedFrame,slot:string,project:StageProject,at:{x:number;y:number}):HoverPreview|null {
|
|
32
|
+
const tint:string[]=[],outline:string[]=[];
|
|
33
|
+
const screen=(x:number,y:number)=>{const p=project(x,y);return Number.isFinite(p.x)&&Number.isFinite(p.y)?{x:tenth(p.x),y:tenth(p.y)}:null;};
|
|
34
|
+
const polygon=(points:{x:number;y:number}[])=>{
|
|
35
|
+
// One orientation for every polygon, so overlapping triangles of one path fill as a union under nonzero.
|
|
36
|
+
const area=points.reduce((sum,p,i)=>{const q=points[(i+1)%points.length]!;return sum+p.x*q.y-q.x*p.y;},0);
|
|
37
|
+
const ordered=area<0?[...points].reverse():points;
|
|
38
|
+
return 'M'+ordered.map(p=>`${p.x} ${p.y}`).join('L')+'Z';
|
|
39
|
+
};
|
|
40
|
+
for(const row of frame.order){
|
|
41
|
+
if(row.slot!==slot)continue;
|
|
42
|
+
if(row.kind==='region'){
|
|
43
|
+
const points:{x:number;y:number}[]=[];for(let i=0;i+1<row.corners.length;i+=2){const p=screen(row.corners[i]!,row.corners[i+1]!);if(p)points.push(p);}
|
|
44
|
+
if(points.length*2!==row.corners.length||points.length<3)continue;
|
|
45
|
+
const d=polygon(points);tint.push(d);outline.push(d);continue;
|
|
46
|
+
}
|
|
47
|
+
const edges=new Map<string,{a:{x:number;y:number};b:{x:number;y:number};count:number}>();
|
|
48
|
+
for(let i=0;i+2<row.triangles.length;i+=3){
|
|
49
|
+
const ids=row.triangles.slice(i,i+3),points=ids.map(v=>screen(row.vertices[v*2]!,row.vertices[v*2+1]!));
|
|
50
|
+
if(points.some(p=>!p))continue;
|
|
51
|
+
tint.push(polygon(points as {x:number;y:number}[]));
|
|
52
|
+
for(let e=0;e<3;e++){const a=ids[e]!,b=ids[(e+1)%3]!,key=a<b?`${a}:${b}`:`${b}:${a}`,seen=edges.get(key);if(seen)seen.count++;else edges.set(key,{a:points[e]!,b:points[(e+1)%3]!,count:1});}
|
|
53
|
+
}
|
|
54
|
+
// An edge shared by two triangles is interior; the outline is the edges only one triangle uses.
|
|
55
|
+
for(const {a,b,count} of edges.values())if(count===1)outline.push(`M${a.x} ${a.y}L${b.x} ${b.y}`);
|
|
56
|
+
}
|
|
57
|
+
return tint.length?{slot,tint:tint.join(''),outline:outline.join(''),label:{x:tenth(at.x),y:tenth(at.y)}}:null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface StagePickOptions {
|
|
61
|
+
stage:HTMLElement;
|
|
62
|
+
project:StageProject;
|
|
63
|
+
frame:()=>PosedFrame|null;
|
|
64
|
+
enabled:()=>boolean;
|
|
65
|
+
/** Space is held: the gesture is a pan, so neither a click nor a hover picks. */
|
|
66
|
+
held:()=>boolean;
|
|
67
|
+
selectable:(slot:string)=>boolean;
|
|
68
|
+
select:(slot:string)=>void;
|
|
69
|
+
paint:(preview:HoverPreview|null)=>void;
|
|
70
|
+
}
|
|
71
|
+
export interface StagePick {
|
|
72
|
+
/** The one hit test: the click and the hover preview both call it. */
|
|
73
|
+
pickAt(clientX:number,clientY:number,target:EventTarget|null):string|null;
|
|
74
|
+
hovered():string|null;
|
|
75
|
+
/** Re-reads the held frame at the last pointer position; paints only when the preview changed. */
|
|
76
|
+
refresh():void;
|
|
77
|
+
reset():void;
|
|
78
|
+
dispose():void;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The click/drag line, in client px (#331): a press that never travels more than this from where it went down is a click
|
|
83
|
+
* and may select; one that does is a drag, which pans and carries the rig (`bindPan`'s carry reads the same constant).
|
|
84
|
+
*/
|
|
85
|
+
export const CLICK_SLOP_PX=3;
|
|
86
|
+
const CONTROL='button,input,select,textarea';
|
|
87
|
+
/** A stage tool that takes the press before it reaches the stage: comment mode, an editor handle under the pointer, a pan in progress. */
|
|
88
|
+
const OWNER='[data-chest-hover],[data-mesh-mode],[data-mesh-hover],[data-bones-hover],[data-cuts-hover],.stage-comment-mode,[data-panning]';
|
|
89
|
+
const closest=(target:EventTarget|null|undefined,selector:string)=>{const node=target as {closest?:(s:string)=>Element|null}|null|undefined;return typeof node?.closest==='function'?node.closest(selector):null;};
|
|
90
|
+
|
|
91
|
+
export function bindStagePick(o:StagePickOptions):StagePick {
|
|
92
|
+
const {stage}=o;
|
|
93
|
+
let down:{x:number;y:number;far:boolean}|null=null,pressed=false,last:{x:number;y:number;target:EventTarget|null;buttons:number}|null=null,painted='',hover:string|null=null;
|
|
94
|
+
const pickAt=(clientX:number,clientY:number,target:EventTarget|null):string|null=>{
|
|
95
|
+
if(o.held()||!o.enabled()||closest(target,CONTROL))return null;
|
|
96
|
+
const frame=o.frame();if(!frame)return null;
|
|
97
|
+
const at=stageWorld(stage.getBoundingClientRect(),o.project,clientX,clientY),slot=pickedSlot(frame,at.x,at.y);
|
|
98
|
+
return slot&&o.selectable(slot)?slot:null;
|
|
99
|
+
};
|
|
100
|
+
const update=()=>{
|
|
101
|
+
const point=last&&!pressed&&!last.buttons&&!closest(stage,OWNER)?last:null;
|
|
102
|
+
const slot=point?pickAt(point.x,point.y,point.target):null,frame=slot?o.frame():null;
|
|
103
|
+
let preview:HoverPreview|null=null;
|
|
104
|
+
if(slot&&frame&&point){const rect=stage.getBoundingClientRect();preview=hoverPreview(frame,slot,o.project,{x:point.x-rect.left,y:point.y-rect.top});}
|
|
105
|
+
const key=preview?JSON.stringify(preview):'';
|
|
106
|
+
if(key===painted)return;
|
|
107
|
+
painted=key;hover=preview?.slot??null;
|
|
108
|
+
if(hover)stage.dataset.hoverName=hover;else delete stage.dataset.hoverName;
|
|
109
|
+
o.paint(preview);
|
|
110
|
+
};
|
|
111
|
+
const pointer=(e:PointerEvent)=>{last=e.pointerType==='mouse'?{x:e.clientX,y:e.clientY,target:e.target,buttons:e.buttons}:null;};
|
|
112
|
+
const start=(e:PointerEvent)=>{down=e.isPrimary&&e.button===0?{x:e.clientX,y:e.clientY,far:false}:null;pressed=true;update();};
|
|
113
|
+
const end=(e:PointerEvent)=>{
|
|
114
|
+
const from=down;down=null;pressed=false;
|
|
115
|
+
if(from&&!from.far&&Math.hypot(e.clientX-from.x,e.clientY-from.y)<=CLICK_SLOP_PX){const slot=pickAt(e.clientX,e.clientY,e.target);if(slot)o.select(slot);}
|
|
116
|
+
pointer(e);if(last)last.buttons=0;update();
|
|
117
|
+
};
|
|
118
|
+
// A press that went past the line is a drag even if it comes back: one line, read over the whole gesture.
|
|
119
|
+
const move=(e:PointerEvent)=>{if(down&&!down.far&&Math.hypot(e.clientX-down.x,e.clientY-down.y)>CLICK_SLOP_PX)down.far=true;pointer(e);update();};
|
|
120
|
+
const leave=()=>{last=null;update();};
|
|
121
|
+
const cancel=()=>{down=null;pressed=false;last=null;update();};
|
|
122
|
+
stage.addEventListener('pointerdown',start);stage.addEventListener('pointerup',end);stage.addEventListener('pointermove',move);
|
|
123
|
+
stage.addEventListener('pointerleave',leave);stage.addEventListener('pointercancel',cancel);
|
|
124
|
+
return {
|
|
125
|
+
pickAt,hovered:()=>hover,refresh:update,reset:cancel,
|
|
126
|
+
dispose:()=>{stage.removeEventListener('pointerdown',start);stage.removeEventListener('pointerup',end);stage.removeEventListener('pointermove',move);stage.removeEventListener('pointerleave',leave);stage.removeEventListener('pointercancel',cancel);last=null;update();},
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const SVG='http://www.w3.org/2000/svg';
|
|
131
|
+
/** Paints a preview into `layer` (the stage's pick layer): an SVG tint and two-tone outline, and the slot name beside the pointer. */
|
|
132
|
+
export function domHoverPainter(layer:HTMLElement):(preview:HoverPreview|null)=>void {
|
|
133
|
+
let svg:SVGSVGElement|null=null,tint:SVGPathElement|null=null,halo:SVGPathElement|null=null,line:SVGPathElement|null=null,label:HTMLElement|null=null;
|
|
134
|
+
return preview=>{
|
|
135
|
+
if(!preview){svg?.setAttribute('hidden','');if(label)label.hidden=true;return;}
|
|
136
|
+
if(!svg||!svg.isConnected){
|
|
137
|
+
const doc=layer.ownerDocument;
|
|
138
|
+
svg=doc.createElementNS(SVG,'svg');svg.setAttribute('class','stage-hover-pick');svg.setAttribute('aria-hidden','true');
|
|
139
|
+
const path=(cls:string)=>{const node=doc.createElementNS(SVG,'path');node.setAttribute('class',cls);return node;};
|
|
140
|
+
tint=path('stage-hover-tint');halo=path('stage-hover-halo');line=path('stage-hover-line');svg.append(tint,halo,line);
|
|
141
|
+
label=doc.createElement('span');label.className='stage-hover-label';label.setAttribute('aria-hidden','true');
|
|
142
|
+
layer.prepend(svg);layer.append(label);
|
|
143
|
+
}
|
|
144
|
+
svg.removeAttribute('hidden');tint!.setAttribute('d',preview.tint);halo!.setAttribute('d',preview.outline);line!.setAttribute('d',preview.outline);
|
|
145
|
+
label!.hidden=false;label!.textContent=preview.slot;
|
|
146
|
+
const width=label!.offsetWidth,height=label!.offsetHeight,room=layer.clientWidth,floor=layer.clientHeight;
|
|
147
|
+
const x=preview.label.x+14+width>room?preview.label.x-14-width:preview.label.x+14,y=preview.label.y+16+height>floor?preview.label.y-10-height:preview.label.y+16;
|
|
148
|
+
label!.style.left=`${Math.max(0,x)}px`;label!.style.top=`${Math.max(0,y)}px`;
|
|
149
|
+
};
|
|
150
|
+
}
|
package/web/styles.css
CHANGED
|
@@ -254,8 +254,8 @@ footer.status-bar{flex-wrap:nowrap}
|
|
|
254
254
|
:root{--rv-weight-0:#3d1a78;--rv-weight-half:#e0573a;--rv-weight-1:#fcef6c;--rv-weight-bone-1:#00e5ff;--rv-weight-bone-2:#ff7ae0;--rv-weight-bone-3:#52ff88;--rv-weight-bone-4:#ffb020;--rv-weight-bone-5:#a98bff;--rv-weight-bone-6:#ff5252}
|
|
255
255
|
:root[data-theme=light]{--rv-weight-0:#3d1a78;--rv-weight-half:#e0573a;--rv-weight-1:#fcef6c;--rv-weight-bone-1:#00e5ff;--rv-weight-bone-2:#ff7ae0;--rv-weight-bone-3:#52ff88;--rv-weight-bone-4:#ffb020;--rv-weight-bone-5:#a98bff;--rv-weight-bone-6:#ff5252}
|
|
256
256
|
.weights-controls{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px}.weights-controls label{display:inline-flex;align-items:center;gap:5px}.weights-controls select{width:auto;max-width:220px}#weights-state.error{color:var(--fail)}.weights-legend{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;margin:0 0 8px;font:11px var(--font-mono);color:var(--fg-muted)}.weights-ramp{display:inline-block;width:140px;height:10px;border-radius:3px;background:linear-gradient(90deg,var(--rv-weight-0),var(--rv-weight-half),var(--rv-weight-1))}.weights-swatch{display:inline-flex;align-items:center;gap:5px}.weights-swatch i{display:inline-block;width:10px;height:10px;border-radius:50%}
|
|
257
|
-
:root{--rv-bone-line:#ffe26b;--rv-field-still:#69f1ff;--rv-field-inward:rgba(255,122,224,.28);--rv-field-inward-line:#ff7ae0;--rv-field-outward:rgba(105,241,255,.24);--rv-field-outward-line:#69f1ff;--rv-field-rest:#ffe26b;--rv-field-handle-bg:rgba(12,14,18,.82);--rv-field-ink:#f4f6fa;--rv-bone-origin:#ffe26b;--rv-bone-point:#69f1ff;--rv-bone-tip:#ff7ae0;--rv-bone-pending:#ffb020;--rv-bone-selected:#ffffff;--rv-bone-ink:#111318;--rv-bone-label-bg:rgba(12,14,18,.82)}
|
|
258
|
-
:root[data-theme=light]{--rv-bone-line:#ffe26b;--rv-field-still:#69f1ff;--rv-field-inward:rgba(255,122,224,.28);--rv-field-inward-line:#ff7ae0;--rv-field-outward:rgba(105,241,255,.24);--rv-field-outward-line:#69f1ff;--rv-field-rest:#ffe26b;--rv-field-handle-bg:rgba(12,14,18,.82);--rv-field-ink:#f4f6fa;--rv-bone-origin:#ffe26b;--rv-bone-point:#69f1ff;--rv-bone-tip:#ff7ae0;--rv-bone-pending:#ffb020;--rv-bone-selected:#ffffff;--rv-bone-ink:#111318;--rv-bone-label-bg:rgba(12,14,18,.82)}
|
|
257
|
+
:root{--rv-hover-pick-line:#ffffff;--rv-hover-pick-halo:rgba(12,14,18,.72);--rv-hover-pick-fill:rgba(255,255,255,.2);--rv-hover-pick-label-bg:rgba(12,14,18,.82);--rv-hover-pick-ink:#f4f6fa;--rv-bone-line:#ffe26b;--rv-field-still:#69f1ff;--rv-field-inward:rgba(255,122,224,.28);--rv-field-inward-line:#ff7ae0;--rv-field-outward:rgba(105,241,255,.24);--rv-field-outward-line:#69f1ff;--rv-field-rest:#ffe26b;--rv-field-handle-bg:rgba(12,14,18,.82);--rv-field-ink:#f4f6fa;--rv-bone-origin:#ffe26b;--rv-bone-point:#69f1ff;--rv-bone-tip:#ff7ae0;--rv-bone-pending:#ffb020;--rv-bone-selected:#ffffff;--rv-bone-ink:#111318;--rv-bone-label-bg:rgba(12,14,18,.82)}
|
|
258
|
+
:root[data-theme=light]{--rv-hover-pick-line:#ffffff;--rv-hover-pick-halo:rgba(12,14,18,.72);--rv-hover-pick-fill:rgba(255,255,255,.2);--rv-hover-pick-label-bg:rgba(12,14,18,.82);--rv-hover-pick-ink:#f4f6fa;--rv-bone-line:#ffe26b;--rv-field-still:#69f1ff;--rv-field-inward:rgba(255,122,224,.28);--rv-field-inward-line:#ff7ae0;--rv-field-outward:rgba(105,241,255,.24);--rv-field-outward-line:#69f1ff;--rv-field-rest:#ffe26b;--rv-field-handle-bg:rgba(12,14,18,.82);--rv-field-ink:#f4f6fa;--rv-bone-origin:#ffe26b;--rv-bone-point:#69f1ff;--rv-bone-tip:#ff7ae0;--rv-bone-pending:#ffb020;--rv-bone-selected:#ffffff;--rv-bone-ink:#111318;--rv-bone-label-bg:rgba(12,14,18,.82)}
|
|
259
259
|
.bones-controls{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px}.bones-controls button[aria-pressed=true]{background:var(--rv-pressed-bg);border-color:var(--rv-pressed-border);color:var(--rv-pressed-fg)}.bones-controls select{max-width:260px}#bones-panel-state.error{color:var(--fail)}#bones-status.error{color:var(--fail)!important}.bones-anchor-editor{margin:0 0 10px;padding:9px 10px;border:1px solid var(--border);border-radius:6px}.bones-anchor{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) 64px 64px auto;align-items:center;gap:6px;margin:3px 0;color:var(--fg-muted)}.bones-anchor code{overflow-wrap:anywhere}.bones-anchor.pending span,.bones-anchor.pending output{color:var(--warn)}.bones-anchor output{font:11px var(--font-mono)}.bones-lines{display:flex;flex-direction:column;gap:3px;margin-top:8px}.bones-lines .eyebrow{margin:0 0 2px}.bones-lines code{overflow-wrap:anywhere;color:var(--fg-strong)}.bones-lines code.lint{color:var(--warn)}.bones-lines code.error{color:var(--fail)}.bones-coverage summary{cursor:pointer;font:11px var(--font-mono);color:var(--fg-muted)}.bones-coverage code{display:block;margin:2px 0 2px 12px;color:var(--fg-muted)}#rig-pane[data-bones-hover=move]{cursor:move}
|
|
260
260
|
|
|
261
261
|
.rig-fields-group{margin:8px 0 10px}.rig-fields-group .eyebrow{margin:0 0 5px}.rig-fields-group .row{flex-wrap:wrap;gap:6px;align-items:center}.rig-fields-group select{min-width:0;max-width:100%}.rig-fields-group input[type=number]{width:76px}.rig-fields-group .physics-control{display:grid;grid-template-columns:minmax(64px,auto) minmax(0,1fr) 76px auto;gap:6px;align-items:center}
|
|
@@ -374,6 +374,8 @@ footer.status-bar{flex-wrap:nowrap}
|
|
|
374
374
|
.animation-tree button{margin:2px;padding:3px 7px;font-size:12px}
|
|
375
375
|
[data-part-list] button[data-bone-selected=true]{outline:1px solid var(--pass);outline-offset:-2px}
|
|
376
376
|
.animation-stage-picks{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:3}
|
|
377
|
+
/* #330 hover pick preview: a solid two-tone outline and a faint tint, beside the selection's dashed amber box. */
|
|
378
|
+
.stage-hover-pick{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.stage-hover-tint{fill:var(--rv-hover-pick-fill);stroke:none}.stage-hover-halo{fill:none;stroke:var(--rv-hover-pick-halo);stroke-width:3.5;stroke-linejoin:round;stroke-linecap:round}.stage-hover-line{fill:none;stroke:var(--rv-hover-pick-line);stroke-width:1.4;stroke-linejoin:round;stroke-linecap:round}.stage-hover-label{position:absolute;z-index:600;max-width:240px;padding:2px 6px;border-radius:4px;background:var(--rv-hover-pick-label-bg);color:var(--rv-hover-pick-ink);font:600 11px var(--font-mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
|
|
377
379
|
.animation-bone-pick{position:absolute;width:10px;height:10px;min-width:0;padding:0;transform:translate(-50%,-50%);border-radius:50%;border:1px solid var(--rv-bone-line);background:var(--rv-bone-point);pointer-events:auto;cursor:grab;touch-action:none}
|
|
378
380
|
.animation-bone-pick[data-pose-editable=true]{border-color:var(--pass);background:var(--pass)}
|
|
379
381
|
.animation-bone-pick[aria-pressed=true]{outline:3px solid var(--rv-bone-selected);outline-offset:2px}
|
package/web/view-controls.ts
CHANGED
|
@@ -62,8 +62,15 @@ export function describeLayerToggles(root:{getElementById(id:string):unknown},re
|
|
|
62
62
|
|
|
63
63
|
// Nested or separately disposed pan binders must not restore another binder's override.
|
|
64
64
|
const panVideoOverrides=new WeakMap<HTMLVideoElement,{owners:number;value:string;priority:string}>();
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
/**
|
|
66
|
+
* A drag that also carries the rig (#331): once the press has travelled more than `threshold` px from where it went down
|
|
67
|
+
* (the click/drag line, the same one a stage click reads), each move is handed to `move` as well as panned. The first
|
|
68
|
+
* delivery is the whole travel since the press, so nothing panned below the threshold is lost; a press that started
|
|
69
|
+
* with Space held is a pan only, and a press that never passes the threshold is a click and carries nothing.
|
|
70
|
+
*/
|
|
71
|
+
export interface PanCarry {threshold:number;move:(dx:number,dy:number)=>void}
|
|
72
|
+
export function bindPan(viewport:HTMLElement,move:(dx:number,dy:number)=>void,enabled:()=>boolean=()=>true,carry?:PanCarry):()=>void {
|
|
73
|
+
let pointer:number|null=null,x=0,y=0,space=false,press:{x:number;y:number;far:boolean}|null=null;
|
|
67
74
|
const videos=new Set<HTMLVideoElement>();
|
|
68
75
|
const releaseVideo=(video:HTMLVideoElement)=>{
|
|
69
76
|
const previous=panVideoOverrides.get(video);if(!previous)return;
|
|
@@ -80,13 +87,18 @@ export function bindPan(viewport:HTMLElement,move:(dx:number,dy:number)=>void,en
|
|
|
80
87
|
};
|
|
81
88
|
const observer=new MutationObserver(()=>{if(space)syncVideos();});
|
|
82
89
|
const releaseSpace=()=>{space=false;observer.disconnect();for(const video of videos)releaseVideo(video);videos.clear();};
|
|
83
|
-
const releasePointer=()=>{const id=pointer;pointer=null;delete viewport.dataset.panning;if(id!==null&&viewport.hasPointerCapture(id))viewport.releasePointerCapture(id);};
|
|
90
|
+
const releasePointer=()=>{const id=pointer;pointer=null;press=null;delete viewport.dataset.panning;if(id!==null&&viewport.hasPointerCapture(id))viewport.releasePointerCapture(id);};
|
|
84
91
|
const keyDown=(event:KeyboardEvent)=>{if(event.code==='Space'&&enabled()&&!(event.target instanceof Element&&event.target.closest('input,textarea,select,button'))){
|
|
85
92
|
if(!space){space=true;syncVideos();observer.observe(viewport,{childList:true,subtree:true,attributes:true,attributeFilter:['controls']});}event.preventDefault();
|
|
86
93
|
}};
|
|
87
94
|
const keyUp=(event:KeyboardEvent)=>{if(event.code==='Space')releaseSpace();};const blur=()=>{releaseSpace();releasePointer();};
|
|
88
|
-
const start=(event:PointerEvent)=>{if(!enabled()||!event.isPrimary||event.button!==0)return;const target=event.target;if(target instanceof Element&&(target.closest('button,input,select,textarea,a')||target.closest('video[controls]')&&!space))return;pointer=event.pointerId;x=event.clientX;y=event.clientY;viewport.setPointerCapture(pointer);viewport.dataset.panning='true';event.preventDefault();};
|
|
89
|
-
const drag=(event:PointerEvent)=>{
|
|
95
|
+
const start=(event:PointerEvent)=>{if(!enabled()||!event.isPrimary||event.button!==0)return;const target=event.target;if(target instanceof Element&&(target.closest('button,input,select,textarea,a')||target.closest('video[controls]')&&!space))return;pointer=event.pointerId;x=event.clientX;y=event.clientY;press=carry&&!space?{x,y,far:false}:null;viewport.setPointerCapture(pointer);viewport.dataset.panning='true';event.preventDefault();};
|
|
96
|
+
const drag=(event:PointerEvent)=>{
|
|
97
|
+
if(event.pointerId!==pointer)return;const dx=event.clientX-x,dy=event.clientY-y;x=event.clientX;y=event.clientY;move(dx,dy);event.preventDefault();
|
|
98
|
+
if(!press||!carry)return;
|
|
99
|
+
if(press.far)carry.move(dx,dy);
|
|
100
|
+
else if(Math.hypot(x-press.x,y-press.y)>carry.threshold){press.far=true;carry.move(x-press.x,y-press.y);}
|
|
101
|
+
};
|
|
90
102
|
const end=(event:PointerEvent)=>{if(event.pointerId===pointer)releasePointer();};
|
|
91
103
|
const native=(event:DragEvent)=>event.preventDefault();
|
|
92
104
|
window.addEventListener('blur',blur);document.addEventListener('keydown',keyDown,true);window.addEventListener('keyup',keyUp,true);viewport.addEventListener('pointerdown',start);viewport.addEventListener('pointermove',drag);viewport.addEventListener('pointerup',end);viewport.addEventListener('pointercancel',end);viewport.addEventListener('lostpointercapture',end);viewport.addEventListener('dragstart',native);
|