@rig-c/play 1.29.0 → 1.30.0

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.
@@ -47,8 +47,10 @@ export type ComposedTakeOptions = TakeOptions & TakeLoop & {
47
47
  transitionMs?: number;
48
48
  /** Blend compiled turn dials into the Parallax handoff by default. Set false for camera-only control. */
49
49
  pointerTurn?: boolean;
50
+ /** Hold the authored scene phase on hover. Defaults to enabled in Parallax only. */
51
+ hoverHold?: boolean;
50
52
  };
51
- type Refusal = 'COMPOSED_STAGE_REQUIRED' | 'COMPOSED_LOOP_REQUIRED' | 'COMPOSED_SLOT_PARTITION' | 'COMPOSED_CROSS_PLANE_CLIP' | 'COMPOSED_BACKDROP_COVERAGE' | 'COMPOSED_INVALID_DISPLACEMENT' | 'COMPOSED_INVALID_CAMERA' | 'COMPOSED_PLATE_TRACK' | SceneCameraRefusal;
53
+ type Refusal = 'COMPOSED_STAGE_REQUIRED' | 'COMPOSED_LOOP_REQUIRED' | 'COMPOSED_SLOT_PARTITION' | 'COMPOSED_CROSS_PLANE_CLIP' | 'COMPOSED_BACKDROP_COVERAGE' | 'COMPOSED_INVALID_DISPLACEMENT' | 'COMPOSED_INVALID_CAMERA' | 'COMPOSED_PLATE_TRACK' | 'COMPOSED_HOVER_HOLD_UNSUPPORTED_MODE' | 'COMPOSED_HOVER_HOLD_UNAVAILABLE' | SceneCameraRefusal;
52
54
  export declare class ComposedTakeError extends Error {
53
55
  readonly code: Refusal;
54
56
  constructor(code: Refusal, detail: string, cause?: unknown);
@@ -1 +1 @@
1
- {"version":3,"file":"composed-take.d.ts","sourceRoot":"","sources":["../src/composed-take.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAwB,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACpH,OAAO,EAA4G,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEjK,OAAO,EAAE,SAAS,EAAmB,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, d as discoverTurnDials, n as normalizedDial, c as poseRawSetup, f as frameOf, e as frameSource, g as rememberComposedClip } from "./_play-runtime.js";
1
+ import { u as underNoSkin, f as f32, o as openTrack, r as readModel, C as CORE_DOCUMENT_SPEC, p as poseRawAnimation, a as CoreInputError, l as loadModel, b as CanvasRenderer, R as RigPlayer, d as discoverTurnDials, n as normalizedDial, c as poseRawSetup, e as frameOf, g as frameSource, h as rememberComposedClip } from "./_play-runtime.js";
2
2
  const ORIGIN = { x: 0, y: 0 };
3
3
  const GAINS = { background: -0.55, figure: 0, foreground: 0.55 };
4
4
  const TIME_CONSTANT = 0.12;
@@ -389,44 +389,13 @@ function sceneCameraDriftEvidence(report, refuse) {
389
389
  }
390
390
  };
391
391
  }
392
- function storedFloat32(value) {
393
- const rounded = Math.fround(value);
394
- if (rounded === 0 || !Number.isFinite(rounded)) return rounded === 0 ? 0 : rounded;
395
- const magnitude = Math.abs(rounded);
396
- const sign = rounded < 0 ? "-" : "";
397
- floatBits.setFloat32(0, magnitude);
398
- const word = floatBits.getUint32(0);
399
- const exponent = word >>> 23;
400
- const significand = BigInt(word & 8388607 | (exponent === 0 ? 0 : 8388608));
401
- const doubledPower = (exponent === 0 ? -149 : exponent - 150) + 1;
402
- for (let digits = 1; digits <= 9; digits++) {
403
- const [mantissa, power] = magnitude.toExponential(digits - 1).split("e");
404
- const nearest = BigInt(mantissa.replace(".", ""));
405
- const scale = Number(power) - (digits - 1);
406
- const candidates = [nearest - 1n, nearest, nearest + 1n].filter(
407
- (candidate) => candidate > 0n && Math.fround(Number(`${candidate}e${scale}`)) === magnitude
408
- );
409
- if (candidates.length === 0) continue;
410
- const chosen = candidates.reduce((a, b) => {
411
- let midpoint = a + b;
412
- let float = significand;
413
- if (scale >= 0) midpoint *= 10n ** BigInt(scale);
414
- else float *= 10n ** BigInt(-scale);
415
- if (doubledPower >= 0) float <<= BigInt(doubledPower);
416
- else midpoint <<= BigInt(-doubledPower);
417
- return midpoint < float || midpoint === float && b % 2n === 0n ? b : a;
418
- });
419
- return Number(`${sign}${chosen}e${scale}`);
420
- }
421
- return rounded;
422
- }
423
392
  function storedTime(time) {
424
- const named = storedFloat32(time);
393
+ const named = f32(time);
425
394
  const nearest = Math.fround(time);
426
395
  if (named === time || nearest <= time || !Number.isFinite(nearest)) return named;
427
396
  floatBits.setFloat32(0, nearest);
428
397
  floatBits.setUint32(0, floatBits.getUint32(0) - 1);
429
- return storedFloat32(floatBits.getFloat32(0));
398
+ return f32(floatBits.getFloat32(0));
430
399
  }
431
400
  function coreSampler(keys, duration, label, refuse) {
432
401
  const times = keys.map((key) => storedTime(key.t));
@@ -457,13 +426,13 @@ function coreSampler(keys, duration, label, refuse) {
457
426
  bones: [
458
427
  { name: "pan", timelines: [{ name: "translate", keys: keys.map((key, i) => ({
459
428
  time: times[i],
460
- x: storedFloat32(key.pan[0]),
461
- y: storedFloat32(key.pan[1]),
429
+ x: f32(key.pan[0]),
430
+ y: f32(key.pan[1]),
462
431
  curve: Array.isArray(key.curve) ? key.curve.slice(0, PAN_CURVE_LENGTH) : key.curve
463
432
  })) }] },
464
433
  { name: "span", timelines: [{ name: "translatex", keys: keys.map((key, i) => ({
465
434
  time: times[i],
466
- value: storedFloat32(1 / key.zoom),
435
+ value: f32(1 / key.zoom),
467
436
  curve: Array.isArray(key.curve) ? key.curve.slice(PAN_CURVE_LENGTH) : key.curve
468
437
  })) }] }
469
438
  ]
@@ -538,7 +507,7 @@ function readTrack(raw, compiled, stage, label, refuse) {
538
507
  }
539
508
  if (curve !== void 0) {
540
509
  const validCurve = curve === "stepped" || Array.isArray(curve) && curve.length === 12 && [...curve].every(
541
- (value) => finite(value) && Number.isFinite(Math.fround(value)) && storedFloat32(value) === value
510
+ (value) => finite(value) && Number.isFinite(Math.fround(value)) && f32(value) === value
542
511
  );
543
512
  if (!validCurve || i === raw.keys.length - 1) {
544
513
  return refuse("SCENE_CAMERA_REPORT_INVALID", `${at} needs a nonterminal outgoing curve (stepped or twelve float32 decimals)`);
@@ -1189,6 +1158,13 @@ function keyedPlaneGains(planes) {
1189
1158
  async function mountComposedTake(root, options) {
1190
1159
  const initial = options.camera ?? "fixed";
1191
1160
  checkMode(initial);
1161
+ const { hoverHold } = options;
1162
+ function checkHoverHoldMode(mode) {
1163
+ if (hoverHold === true && mode === "pan") {
1164
+ throw new ComposedTakeError("COMPOSED_HOVER_HOLD_UNSUPPORTED_MODE", "Pan does not support hover-hold");
1165
+ }
1166
+ }
1167
+ checkHoverHoldMode(initial);
1192
1168
  const { loop, sceneReportUrl } = options;
1193
1169
  if (loop !== true && (loop !== false || sceneReportUrl === void 0)) {
1194
1170
  throw new ComposedTakeError("COMPOSED_LOOP_REQUIRED", "declare the existing take as loop: true");
@@ -1252,11 +1228,18 @@ async function mountComposedTake(root, options) {
1252
1228
  legacyPlanes.set(animation, named);
1253
1229
  }
1254
1230
  return named;
1255
- }, configureScene = function(next, animation, loop2, time, reset = false) {
1256
- if (!reset && scene.mode === next && scene.animation === animation && scene.loop === loop2) return false;
1231
+ }, requireFixedHold = function(next, binding) {
1232
+ if (next !== "fixed" || hoverHold !== true || binding.behavior === "hold") return;
1233
+ const detail = binding.behavior === "refused" ? binding.reason : "the take needs a digest-bound scene_driven binding";
1234
+ throw new ComposedTakeError("COMPOSED_HOVER_HOLD_UNAVAILABLE", detail);
1235
+ }, configureScene = function(next, animation, loop2, time, reset = false, selecting = false) {
1236
+ if (!reset && scene.mode === next && scene.animation === animation && scene.loop === loop2) {
1237
+ if (selecting) requireFixedHold(next, scene.binding);
1238
+ return false;
1239
+ }
1257
1240
  const wasHolding = scene.clock !== null;
1258
1241
  let binding = { behavior: "additive" };
1259
- if (next === "parallax" && animation !== null) {
1242
+ if (next !== "pan" && (hoverHold ?? next === "parallax") && animation !== null) {
1260
1243
  const key = JSON.stringify([animation, loop2]);
1261
1244
  binding = bindings.get(key) ?? bindSceneHold(
1262
1245
  report,
@@ -1276,6 +1259,7 @@ async function mountComposedTake(root, options) {
1276
1259
  binding = { behavior: "refused", reason: "backdrop depends on an external player local adjustment" };
1277
1260
  }
1278
1261
  }
1262
+ if (selecting) requireFixedHold(next, binding);
1279
1263
  scene = {
1280
1264
  mode: next,
1281
1265
  animation,
@@ -1412,16 +1396,17 @@ async function mountComposedTake(root, options) {
1412
1396
  if (nonOpaque) {
1413
1397
  throw plateCoverageError(backdrop, next, `${nonOpaque} stage pixels have alpha below 255 at ${layout.width} × ${layout.height} backing px`);
1414
1398
  }
1415
- }, syncPose = function(next) {
1416
- syncTurn(next);
1399
+ }, syncPose = function(next, selecting = false) {
1417
1400
  const entry = poser.entry();
1418
1401
  const changed = configureScene(
1419
1402
  next,
1420
1403
  entry?.animation ?? null,
1421
1404
  entry?.loop ?? false,
1422
1405
  entry?.trackTime ?? 0,
1423
- changedExternalAdjust(poser)
1406
+ changedExternalAdjust(poser),
1407
+ selecting
1424
1408
  );
1409
+ syncTurn(next);
1425
1410
  syncAdjust(poser, changed);
1426
1411
  }, currentFrame = function(named, keyed) {
1427
1412
  const frame = poser.posedFrame(null);
@@ -1508,7 +1493,7 @@ async function mountComposedTake(root, options) {
1508
1493
  canvas.style.visibility = "";
1509
1494
  Object.assign(canvas.style, { width: "100%", height: "100%", transform: "none", pointerEvents: "auto" });
1510
1495
  }, select = function(next, switching, allowFallback) {
1511
- syncPose(next);
1496
+ syncPose(next, switching);
1512
1497
  const entry = bound && poser.entry();
1513
1498
  const backdropSteps = scene.binding.behavior === "hold" ? scene.binding.backdropSteps : void 0;
1514
1499
  const view = entry?.animation ? cameraFor(entry.animation, scene.clock?.phase ?? entry.animationTime, entry.loop, backdropSteps) : null;
@@ -1520,12 +1505,14 @@ async function mountComposedTake(root, options) {
1520
1505
  } catch (error) {
1521
1506
  if (!(error instanceof ComposedTakeError) || error.code !== "COMPOSED_BACKDROP_COVERAGE" || next === "fixed" || !named && !view && !allowFallback) throw error;
1522
1507
  try {
1523
- syncPose("fixed");
1508
+ syncPose("fixed", true);
1524
1509
  const fixed = currentFrame(named, drawingKeyed);
1525
- const fixedView = entry?.animation ? cameraFor(entry.animation, entry.animationTime, entry.loop) : null;
1510
+ const fixedSteps = scene.binding.behavior === "hold" ? scene.binding.backdropSteps : void 0;
1511
+ const fixedView = entry?.animation ? cameraFor(entry.animation, scene.clock?.phase ?? entry.animationTime, entry.loop, fixedSteps) : null;
1526
1512
  drawMode(fixed.frame, fixed.backdrop, "fixed", true, fixedView, named);
1527
1513
  } catch (fixedError) {
1528
1514
  canvas.style.visibility = "hidden";
1515
+ if (fixedError instanceof ComposedTakeError && fixedError.code === "COMPOSED_HOVER_HOLD_UNAVAILABLE") throw error;
1529
1516
  throw fixedError;
1530
1517
  }
1531
1518
  refusal = error;
@@ -1545,12 +1532,13 @@ async function mountComposedTake(root, options) {
1545
1532
  if (disposed || stopped) return;
1546
1533
  try {
1547
1534
  checkMode(next);
1535
+ checkHoverHoldMode(next);
1548
1536
  measure();
1549
1537
  select(next, true, false);
1550
1538
  refusal = null;
1551
1539
  } catch (error) {
1552
1540
  if (error instanceof ComposedTakeError) refusal = error;
1553
- if ((namedInput || drawingKeyed) && next === "fixed") canvas.style.visibility = "hidden";
1541
+ if ((namedInput || drawingKeyed) && next === "fixed" && (!(error instanceof ComposedTakeError) || error.code !== "COMPOSED_HOVER_HOLD_UNAVAILABLE")) canvas.style.visibility = "hidden";
1554
1542
  throw error;
1555
1543
  }
1556
1544
  }, advanceCamera = function(elapsed) {
@@ -1606,7 +1594,7 @@ async function mountComposedTake(root, options) {
1606
1594
  let composedTracks = false;
1607
1595
  let skin;
1608
1596
  let externalAdjust = false;
1609
- configureScene(initial, initialAnimation, loop, 0, true);
1597
+ configureScene(initial, initialAnimation, loop, 0, true, true);
1610
1598
  let turnInput = { weight: 0, pointer: NEUTRAL };
1611
1599
  let posedTurnInput = turnInput;
1612
1600
  let turnValues = [];
@@ -1734,8 +1722,8 @@ async function mountComposedTake(root, options) {
1734
1722
  if (!(box.width > 0 && box.height > 0)) return;
1735
1723
  if (namedInput || scene.clock) {
1736
1724
  if (namedInput && autoStart) syncCamera(window.performance.now());
1737
- if (hover === void 0 && mode === "parallax") {
1738
- if (namedInput) handoff.enter();
1725
+ if (hover === void 0) {
1726
+ if (namedInput && mode === "parallax") handoff.enter();
1739
1727
  scene.clock?.aim(true);
1740
1728
  }
1741
1729
  hover = event.pointerId;