motionary 10.5.0 → 10.7.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.
Files changed (128) hide show
  1. package/AGENTS.md +2 -0
  2. package/CHANGELOG.md +28 -0
  3. package/README.md +95 -1
  4. package/bin/motionary-mcp.mjs +160 -11
  5. package/dist/chunks/{anim-image-DuxvYhq6.cjs → anim-image-CFGpUX7t.cjs} +2 -2
  6. package/dist/chunks/{anim-image-DuxvYhq6.cjs.map → anim-image-CFGpUX7t.cjs.map} +1 -1
  7. package/dist/chunks/{anim-image-BlNPv4JG.js → anim-image-CXDD19FH.js} +2 -2
  8. package/dist/chunks/{anim-image-BlNPv4JG.js.map → anim-image-CXDD19FH.js.map} +1 -1
  9. package/dist/chunks/{keyframes-Ce1s05n3.cjs → keyframes-DdwGY1gr.cjs} +2 -2
  10. package/dist/chunks/{keyframes-Ce1s05n3.cjs.map → keyframes-DdwGY1gr.cjs.map} +1 -1
  11. package/dist/chunks/{keyframes-B8ITIAVa.js → keyframes-DwR6GPej.js} +2 -2
  12. package/dist/chunks/{keyframes-B8ITIAVa.js.map → keyframes-DwR6GPej.js.map} +1 -1
  13. package/dist/chunks/{registry-DXdFb2fJ.js → registry-D87dP_aR.js} +3 -3
  14. package/dist/chunks/{registry-DXdFb2fJ.js.map → registry-D87dP_aR.js.map} +1 -1
  15. package/dist/chunks/{registry-VhfPSI0v.cjs → registry-DhKZCitb.cjs} +2 -2
  16. package/dist/chunks/{registry-VhfPSI0v.cjs.map → registry-DhKZCitb.cjs.map} +1 -1
  17. package/dist/chunks/{ticker-C5RMHMW7.js → ticker-CJYI5Pxc.js} +2 -2
  18. package/dist/chunks/{ticker-C5RMHMW7.js.map → ticker-CJYI5Pxc.js.map} +1 -1
  19. package/dist/chunks/{ticker-DvmC6WLS.cjs → ticker-jD9_A9Rh.cjs} +2 -2
  20. package/dist/chunks/{ticker-DvmC6WLS.cjs.map → ticker-jD9_A9Rh.cjs.map} +1 -1
  21. package/dist/chunks/{tween-_BGIl6hK.cjs → tween-Dk0QmNe9.cjs} +2 -2
  22. package/dist/chunks/{tween-_BGIl6hK.cjs.map → tween-Dk0QmNe9.cjs.map} +1 -1
  23. package/dist/chunks/{tween-CPtm-EdT.js → tween-_Lld1MsF.js} +2 -2
  24. package/dist/chunks/{tween-CPtm-EdT.js.map → tween-_Lld1MsF.js.map} +1 -1
  25. package/dist/components/ai.cjs +314 -0
  26. package/dist/components/ai.cjs.map +1 -0
  27. package/dist/components/ai.d.cts +58 -0
  28. package/dist/components/ai.d.ts +58 -0
  29. package/dist/components/ai.js +311 -0
  30. package/dist/components/ai.js.map +1 -0
  31. package/dist/components/lite.cjs +179 -0
  32. package/dist/components/lite.cjs.map +1 -1
  33. package/dist/components/lite.js +176 -1
  34. package/dist/components/lite.js.map +1 -1
  35. package/dist/components/tokens.cjs +179 -0
  36. package/dist/components/tokens.cjs.map +1 -1
  37. package/dist/components/tokens.d.cts +36 -1
  38. package/dist/components/tokens.d.ts +36 -1
  39. package/dist/components/tokens.js +176 -1
  40. package/dist/components/tokens.js.map +1 -1
  41. package/dist/components/widgets.cjs +985 -221
  42. package/dist/components/widgets.cjs.map +1 -1
  43. package/dist/components/widgets.d.cts +606 -4
  44. package/dist/components/widgets.d.ts +606 -4
  45. package/dist/components/widgets.js +976 -222
  46. package/dist/components/widgets.js.map +1 -1
  47. package/dist/components.cjs +4 -0
  48. package/dist/components.cjs.map +1 -1
  49. package/dist/components.d.cts +36 -1
  50. package/dist/components.d.ts +36 -1
  51. package/dist/components.js +1 -1
  52. package/dist/components.umd.js +2 -2
  53. package/dist/components.umd.js.map +1 -1
  54. package/dist/index.umd.js.map +1 -1
  55. package/dist/llms-full.txt +221 -1
  56. package/dist/llms.txt +11 -2
  57. package/dist/manifest.json +580 -1
  58. package/dist/runtime/format-apng.cjs +4 -4
  59. package/dist/runtime/format-apng.js +4 -4
  60. package/dist/runtime/format-css.cjs +4 -4
  61. package/dist/runtime/format-css.js +4 -4
  62. package/dist/runtime/format-gif.cjs +4 -4
  63. package/dist/runtime/format-gif.js +4 -4
  64. package/dist/runtime/format-gltf.cjs +1 -1
  65. package/dist/runtime/format-gltf.js +1 -1
  66. package/dist/runtime/format-motion.cjs +4 -4
  67. package/dist/runtime/format-motion.js +4 -4
  68. package/dist/runtime/format-obj.cjs +1 -1
  69. package/dist/runtime/format-obj.js +1 -1
  70. package/dist/runtime/format-scene.cjs +241 -0
  71. package/dist/runtime/format-scene.cjs.map +1 -0
  72. package/dist/runtime/format-scene.d.cts +349 -0
  73. package/dist/runtime/format-scene.d.ts +349 -0
  74. package/dist/runtime/format-scene.iife.js +2 -0
  75. package/dist/runtime/format-scene.iife.js.map +1 -0
  76. package/dist/runtime/format-scene.js +233 -0
  77. package/dist/runtime/format-scene.js.map +1 -0
  78. package/dist/runtime/format-sprite.cjs +3 -3
  79. package/dist/runtime/format-sprite.js +3 -3
  80. package/dist/runtime/format-svg.cjs +3 -3
  81. package/dist/runtime/format-svg.js +3 -3
  82. package/dist/runtime/format-webp.cjs +4 -4
  83. package/dist/runtime/format-webp.js +4 -4
  84. package/dist/runtime/gl.cjs +1 -1
  85. package/dist/runtime/gl.js +1 -1
  86. package/dist/runtime/physics.cjs +739 -0
  87. package/dist/runtime/physics.cjs.map +1 -0
  88. package/dist/runtime/physics.d.cts +250 -0
  89. package/dist/runtime/physics.d.ts +250 -0
  90. package/dist/runtime/physics.iife.js +2 -0
  91. package/dist/runtime/physics.iife.js.map +1 -0
  92. package/dist/runtime/physics.js +731 -0
  93. package/dist/runtime/physics.js.map +1 -0
  94. package/dist/runtime/scroll.cjs +2 -2
  95. package/dist/runtime/scroll.js +2 -2
  96. package/dist/runtime/smooth.cjs +1 -1
  97. package/dist/runtime/smooth.js +1 -1
  98. package/dist/runtime/text.cjs +1 -1
  99. package/dist/runtime/text.js +1 -1
  100. package/dist/runtime/vector.cjs +704 -0
  101. package/dist/runtime/vector.cjs.map +1 -0
  102. package/dist/runtime/vector.d.cts +306 -0
  103. package/dist/runtime/vector.d.ts +306 -0
  104. package/dist/runtime/vector.iife.js +2 -0
  105. package/dist/runtime/vector.iife.js.map +1 -0
  106. package/dist/runtime/vector.js +692 -0
  107. package/dist/runtime/vector.js.map +1 -0
  108. package/dist/runtime.cjs +3 -3
  109. package/dist/runtime.d.cts +1 -1
  110. package/dist/runtime.d.ts +1 -1
  111. package/dist/runtime.iife.js +1 -1
  112. package/dist/runtime.iife.js.map +1 -1
  113. package/dist/runtime.js +5 -5
  114. package/dist/widgets.umd.js +1 -1
  115. package/dist/widgets.umd.js.map +1 -1
  116. package/docs/ROADMAP.md +2 -2
  117. package/docs/components/README.md +6 -1
  118. package/docs/components/usa-lottie-player.md +60 -0
  119. package/docs/components/usa-motion-prompt.md +32 -0
  120. package/docs/components/usa-physics-playground.md +63 -0
  121. package/docs/components/usa-rive.md +57 -0
  122. package/docs/components/usa-token-editor.md +32 -0
  123. package/docs/components.md +116 -0
  124. package/docs/runtime/format-scene.md +59 -0
  125. package/docs/runtime/physics.md +61 -0
  126. package/docs/runtime/rive.md +55 -0
  127. package/docs/runtime/vector.md +67 -0
  128. package/package.json +46 -2
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var registry = require('../chunks/registry-VhfPSI0v.cjs');
4
- var keyframes = require('../chunks/keyframes-Ce1s05n3.cjs');
5
- require('../chunks/tween-_BGIl6hK.cjs');
6
- require('../chunks/ticker-DvmC6WLS.cjs');
3
+ var registry = require('../chunks/registry-DhKZCitb.cjs');
4
+ var keyframes = require('../chunks/keyframes-DdwGY1gr.cjs');
5
+ require('../chunks/tween-Dk0QmNe9.cjs');
6
+ require('../chunks/ticker-jD9_A9Rh.cjs');
7
7
  require('../chunks/ease-HwYZnZat.cjs');
8
8
 
9
9
  /**
@@ -1,7 +1,7 @@
1
- import { R as RUNTIME_VERSION } from '../chunks/registry-DXdFb2fJ.js';
2
- import { f as framesToTimeline, d as distributeOffsets, c as camelProp } from '../chunks/keyframes-B8ITIAVa.js';
3
- import '../chunks/tween-CPtm-EdT.js';
4
- import '../chunks/ticker-C5RMHMW7.js';
1
+ import { R as RUNTIME_VERSION } from '../chunks/registry-D87dP_aR.js';
2
+ import { f as framesToTimeline, d as distributeOffsets, c as camelProp } from '../chunks/keyframes-DwR6GPej.js';
3
+ import '../chunks/tween-_Lld1MsF.js';
4
+ import '../chunks/ticker-CJYI5Pxc.js';
5
5
  import '../chunks/ease-XN8_0sXu.js';
6
6
 
7
7
  /**
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var registry = require('../chunks/registry-VhfPSI0v.cjs');
4
- var animImage = require('../chunks/anim-image-DuxvYhq6.cjs');
5
- require('../chunks/tween-_BGIl6hK.cjs');
6
- require('../chunks/ticker-DvmC6WLS.cjs');
3
+ var registry = require('../chunks/registry-DhKZCitb.cjs');
4
+ var animImage = require('../chunks/anim-image-CFGpUX7t.cjs');
5
+ require('../chunks/tween-Dk0QmNe9.cjs');
6
+ require('../chunks/ticker-jD9_A9Rh.cjs');
7
7
  require('../chunks/ease-HwYZnZat.cjs');
8
8
 
9
9
  /**
@@ -1,7 +1,7 @@
1
- import { R as RUNTIME_VERSION } from '../chunks/registry-DXdFb2fJ.js';
2
- import { a as animatedImagePlayer, u as u8, c as composeFrames, d as bytesOf, f as fixDelay } from '../chunks/anim-image-BlNPv4JG.js';
3
- import '../chunks/tween-CPtm-EdT.js';
4
- import '../chunks/ticker-C5RMHMW7.js';
1
+ import { R as RUNTIME_VERSION } from '../chunks/registry-D87dP_aR.js';
2
+ import { a as animatedImagePlayer, u as u8, c as composeFrames, d as bytesOf, f as fixDelay } from '../chunks/anim-image-CXDD19FH.js';
3
+ import '../chunks/tween-_Lld1MsF.js';
4
+ import '../chunks/ticker-CJYI5Pxc.js';
5
5
  import '../chunks/ease-XN8_0sXu.js';
6
6
 
7
7
  /**
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var registry = require('../chunks/registry-VhfPSI0v.cjs');
3
+ var registry = require('../chunks/registry-DhKZCitb.cjs');
4
4
  var runtime_gl = require('./gl.cjs');
5
5
 
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { R as RUNTIME_VERSION } from '../chunks/registry-DXdFb2fJ.js';
1
+ import { R as RUNTIME_VERSION } from '../chunks/registry-D87dP_aR.js';
2
2
  import { standardMaterial, texture, computeNormals, GlNode } from './gl.js';
3
3
 
4
4
  /**
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var registry = require('../chunks/registry-VhfPSI0v.cjs');
4
- var tween = require('../chunks/tween-_BGIl6hK.cjs');
3
+ var registry = require('../chunks/registry-DhKZCitb.cjs');
4
+ var tween = require('../chunks/tween-Dk0QmNe9.cjs');
5
5
  var ease = require('../chunks/ease-HwYZnZat.cjs');
6
- var keyframes = require('../chunks/keyframes-Ce1s05n3.cjs');
7
- require('../chunks/ticker-DvmC6WLS.cjs');
6
+ var keyframes = require('../chunks/keyframes-DdwGY1gr.cjs');
7
+ require('../chunks/ticker-jD9_A9Rh.cjs');
8
8
 
9
9
  /**
10
10
  * `motionary/runtime/format-motion` (10.1) — play Motion / Framer-style
@@ -1,8 +1,8 @@
1
- import { R as RUNTIME_VERSION } from '../chunks/registry-DXdFb2fJ.js';
2
- import { T as Timeline } from '../chunks/tween-CPtm-EdT.js';
1
+ import { R as RUNTIME_VERSION } from '../chunks/registry-D87dP_aR.js';
2
+ import { T as Timeline } from '../chunks/tween-_Lld1MsF.js';
3
3
  import { c as cubicBezier, E as EASES } from '../chunks/ease-XN8_0sXu.js';
4
- import { f as framesToTimeline } from '../chunks/keyframes-B8ITIAVa.js';
5
- import '../chunks/ticker-C5RMHMW7.js';
4
+ import { f as framesToTimeline } from '../chunks/keyframes-DwR6GPej.js';
5
+ import '../chunks/ticker-CJYI5Pxc.js';
6
6
 
7
7
  /**
8
8
  * `motionary/runtime/format-motion` (10.1) — play Motion / Framer-style
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var registry = require('../chunks/registry-VhfPSI0v.cjs');
3
+ var registry = require('../chunks/registry-DhKZCitb.cjs');
4
4
  var runtime_gl = require('./gl.cjs');
5
5
 
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { R as RUNTIME_VERSION } from '../chunks/registry-DXdFb2fJ.js';
1
+ import { R as RUNTIME_VERSION } from '../chunks/registry-D87dP_aR.js';
2
2
  import { GlNode, texture, standardMaterial, computeNormals } from './gl.js';
3
3
 
4
4
  /**
@@ -0,0 +1,241 @@
1
+ 'use strict';
2
+
3
+ var registry = require('../chunks/registry-DhKZCitb.cjs');
4
+
5
+ /**
6
+ * `motionary/runtime/format-scene` (10.7) — the versioned scene format
7
+ * `motionary-scene@1`: a JSON description of a 2D physics scene (world,
8
+ * named materials, bodies, constraints, per-body style) that
9
+ * `<usa-physics-playground>` and your own code can load, validate,
10
+ * migrate and save.
11
+ *
12
+ * ```json
13
+ * { "format": "motionary-scene@1",
14
+ * "world": { "width": 600, "height": 360, "gravity": [0, 980], "walls": true },
15
+ * "materials": { "rubber": { "restitution": 0.8, "friction": 0.6, "density": 0.001 } },
16
+ * "bodies": [
17
+ * { "id": "ball", "shape": "circle", "radius": 20, "position": [120, 40], "material": "rubber", "style": { "fill": "#f472b6" } },
18
+ * { "id": "floor-plank", "shape": "box", "size": [300, 16], "position": [300, 300], "angle": 0.1, "static": true }
19
+ * ],
20
+ * "constraints": [ { "type": "distance", "a": "ball", "b": "floor-plank", "length": 120, "stiffness": 0.3 } ] }
21
+ * ```
22
+ *
23
+ * - `validateScene(json)` lists problems (never throws);
24
+ * - `migrateScene(json)` upgrades older shapes (an unversioned scene, the
25
+ * `motionary-scene@0` draft) to `@1` and reports what it changed;
26
+ * - `parseScene(json)` = migrate + validate, throws on errors;
27
+ * - `sceneToWorld(scene)` builds a `motionary/runtime/physics` world
28
+ * (bodies by id); `worldToScene(world)` saves one back.
29
+ *
30
+ * Needs `motionary/runtime/physics` registered for `sceneToWorld` /
31
+ * `worldToScene`; validation and migration are pure.
32
+ */
33
+ const SCENE_FORMAT = 'motionary-scene@1';
34
+ const isNum = (x) => typeof x === 'number' && isFinite(x);
35
+ const isVec = (x) => Array.isArray(x) && x.length === 2 && x.every(isNum);
36
+ /** Upgrade older scene shapes to `motionary-scene@1`. Returns the scene and what changed. */
37
+ function migrateScene(input) {
38
+ const changes = [];
39
+ const s = typeof input === 'string' ? JSON.parse(input) : JSON.parse(JSON.stringify(input ?? {}));
40
+ if (s.format === SCENE_FORMAT)
41
+ return { scene: s, changes };
42
+ if (s.format && s.format !== 'motionary-scene@0')
43
+ throw new Error(`[motionary] scene: unknown format "${s.format}" (this build reads ${SCENE_FORMAT} and migrates motionary-scene@0 / unversioned scenes)`);
44
+ changes.push(`${s.format || 'unversioned'} → ${SCENE_FORMAT}`);
45
+ s.format = SCENE_FORMAT;
46
+ // @0 / unversioned: { width, height, gravity: number } at the top level, bodies with x / y / w / h / type
47
+ if (!s.world) {
48
+ s.world = { width: s.width ?? 600, height: s.height ?? 400 };
49
+ if (s.gravity != null)
50
+ s.world.gravity = isNum(s.gravity) ? [0, s.gravity] : s.gravity;
51
+ if (s.walls != null)
52
+ s.world.walls = s.walls;
53
+ delete s.width, delete s.height, delete s.gravity, delete s.walls;
54
+ changes.push('top-level width / height / gravity moved into "world"');
55
+ }
56
+ if (isNum(s.world.gravity)) {
57
+ s.world.gravity = [0, s.world.gravity];
58
+ changes.push('world.gravity number → [0, g]');
59
+ }
60
+ s.bodies = (s.bodies || []).map((b, i) => {
61
+ const o = { ...b };
62
+ if (!o.id)
63
+ (o.id = `body-${i + 1}`), changes.push(`bodies[${i}]: id "${o.id}" added`);
64
+ if (o.position == null && (isNum(o.x) || isNum(o.y))) {
65
+ o.position = [o.x ?? 0, o.y ?? 0];
66
+ delete o.x, delete o.y;
67
+ changes.push(`bodies[${i}]: x / y → position`);
68
+ }
69
+ if (o.size == null && (isNum(o.w) || isNum(o.h))) {
70
+ o.size = [o.w ?? 40, o.h ?? 40];
71
+ delete o.w, delete o.h;
72
+ changes.push(`bodies[${i}]: w / h → size`);
73
+ }
74
+ if (o.type === 'static' || o.type === 'kinematic') {
75
+ o[o.type] = true;
76
+ delete o.type;
77
+ changes.push(`bodies[${i}]: type → ${o.static ? 'static' : 'kinematic'}: true`);
78
+ }
79
+ else if (o.type === 'dynamic')
80
+ delete o.type;
81
+ if (!o.shape)
82
+ o.shape = o.radius != null ? 'circle' : o.vertices ? 'polygon' : 'box';
83
+ return o;
84
+ });
85
+ return { scene: s, changes };
86
+ }
87
+ /** Problems in a `motionary-scene@1` document (after migration). Never throws. */
88
+ function validateScene(input) {
89
+ const out = [];
90
+ let s;
91
+ try {
92
+ s = migrateScene(input).scene;
93
+ }
94
+ catch (e) {
95
+ return [String(e.message).replace('[motionary] scene: ', '')];
96
+ }
97
+ if (!s.world || !isNum(s.world.width) || !isNum(s.world.height) || s.world.width <= 0 || s.world.height <= 0)
98
+ out.push('world: width and height must be positive numbers');
99
+ if (s.world?.gravity != null && !isVec(s.world.gravity))
100
+ out.push('world.gravity must be [x, y]');
101
+ const mats = s.materials || {};
102
+ for (const [k, m] of Object.entries(mats))
103
+ for (const p of ['restitution', 'friction', 'density'])
104
+ if (m[p] != null && (!isNum(m[p]) || m[p] < 0))
105
+ out.push(`materials.${k}.${p} must be a number ≥ 0`);
106
+ if (!Array.isArray(s.bodies))
107
+ out.push('bodies must be an array');
108
+ const ids = new Set();
109
+ (s.bodies || []).forEach((b, i) => {
110
+ const w = `bodies[${i}]${b.id ? ` ("${b.id}")` : ''}`;
111
+ if (ids.has(b.id))
112
+ out.push(`${w}: duplicate id`);
113
+ ids.add(b.id);
114
+ if (!['circle', 'box', 'polygon'].includes(b.shape))
115
+ out.push(`${w}: shape must be circle, box or polygon`);
116
+ if (!isVec(b.position))
117
+ out.push(`${w}: position must be [x, y]`);
118
+ if (b.shape === 'circle' && !(isNum(b.radius) && b.radius > 0))
119
+ out.push(`${w}: circle needs radius > 0`);
120
+ if (b.shape === 'box' && !(isVec(b.size) && b.size[0] > 0 && b.size[1] > 0))
121
+ out.push(`${w}: box needs size [w, h] > 0`);
122
+ if (b.shape === 'polygon' && !(Array.isArray(b.vertices) && b.vertices.length >= 3 && b.vertices.every(isVec)))
123
+ out.push(`${w}: polygon needs ≥ 3 vertices [x, y]`);
124
+ if (b.material && !mats[b.material])
125
+ out.push(`${w}: unknown material "${b.material}"`);
126
+ if (b.static && b.kinematic)
127
+ out.push(`${w}: static and kinematic are exclusive`);
128
+ });
129
+ (s.constraints || []).forEach((c, i) => {
130
+ const w = `constraints[${i}]`;
131
+ if (!['distance', 'pin'].includes(c.type))
132
+ out.push(`${w}: type must be distance or pin`);
133
+ if (!ids.has(c.a))
134
+ out.push(`${w}: unknown body "${c.a}"`);
135
+ if (c.type === 'distance' && !ids.has(c.b))
136
+ out.push(`${w}: distance needs body b (unknown "${c.b}")`);
137
+ if (c.type === 'pin' && c.point != null && !isVec(c.point))
138
+ out.push(`${w}: point must be [x, y]`);
139
+ if (c.stiffness != null && !(isNum(c.stiffness) && c.stiffness > 0 && c.stiffness <= 1))
140
+ out.push(`${w}: stiffness must be in (0, 1]`);
141
+ });
142
+ return out;
143
+ }
144
+ /** Migrate + validate; throws one error listing every problem. */
145
+ function parseScene(input) {
146
+ const { scene } = migrateScene(input);
147
+ const problems = validateScene(scene);
148
+ if (problems.length)
149
+ throw new Error(`[motionary] scene: ${problems.length} problem(s): ${problems.join('; ')}`);
150
+ return scene;
151
+ }
152
+ /** Build a physics world from a scene (needs `use(physics)`). */
153
+ function sceneToWorld(input) {
154
+ const scene = parseScene(input);
155
+ const P = registry.requireModule('physics', 'motionary/runtime/format-scene');
156
+ const w = scene.world;
157
+ const world = P.createWorld({ gravity: w.gravity || [0, 980], iterations: w.iterations });
158
+ if (w.walls)
159
+ world.bounds(w.width, w.height, 50, typeof w.walls === 'object' ? w.walls : {});
160
+ const bodies = {};
161
+ for (const b of scene.bodies) {
162
+ const m = (b.material && scene.materials?.[b.material]) || {};
163
+ const o = {
164
+ shape: b.shape,
165
+ x: b.position[0],
166
+ y: b.position[1],
167
+ angle: b.angle,
168
+ radius: b.radius,
169
+ width: b.size?.[0],
170
+ height: b.size?.[1],
171
+ vertices: b.vertices,
172
+ type: b.static ? 'static' : b.kinematic ? 'kinematic' : 'dynamic',
173
+ restitution: b.restitution ?? m.restitution,
174
+ friction: b.friction ?? m.friction,
175
+ density: b.density ?? m.density,
176
+ vx: b.velocity?.[0],
177
+ vy: b.velocity?.[1],
178
+ angularVelocity: b.angularVelocity,
179
+ sensor: b.sensor,
180
+ label: b.id,
181
+ data: { id: b.id, style: b.style || {}, material: b.material },
182
+ };
183
+ bodies[b.id] = world.body(o);
184
+ }
185
+ for (const c of scene.constraints || [])
186
+ world.constraint({ type: c.type, a: bodies[c.a], b: c.b ? bodies[c.b] : undefined, point: c.point, anchorA: c.anchorA, anchorB: c.anchorB, length: c.length, stiffness: c.stiffness, damping: c.damping });
187
+ return { world, bodies, scene };
188
+ }
189
+ /** Save the current state of a world as a scene (walls made by `bounds()` are left out; `w` / `h` give the world size). */
190
+ function worldToScene(world, o = { width: 600, height: 400 }) {
191
+ const r = (x) => Math.round(x * 1000) / 1000;
192
+ const wallLabels = new Set(['floor', 'wall-left', 'wall-right', 'ceiling']);
193
+ const kept = world.bodies.filter((b) => !(b.isStatic && wallLabels.has(b.label)));
194
+ const id = (b) => b.data?.id || b.label + '-' + b.id;
195
+ const bodies = kept.map((b) => {
196
+ const sb = { id: id(b), shape: b.shape, position: [r(b.position.x), r(b.position.y)] };
197
+ if (b.angle)
198
+ sb.angle = r(b.angle);
199
+ if (b.shape === 'circle')
200
+ sb.radius = r(b.radius);
201
+ else {
202
+ const xs = b.verts.map((p) => p.x), ys = b.verts.map((p) => p.y);
203
+ const isBox = b.shape === 'box';
204
+ if (isBox)
205
+ sb.size = [r(Math.max(...xs) - Math.min(...xs)), r(Math.max(...ys) - Math.min(...ys))];
206
+ else
207
+ sb.vertices = b.verts.map((p) => [r(p.x), r(p.y)]);
208
+ }
209
+ if (b.type === 'static')
210
+ sb.static = true;
211
+ if (b.type === 'kinematic')
212
+ sb.kinematic = true;
213
+ sb.restitution = b.restitution;
214
+ sb.friction = b.friction;
215
+ if (b.type === 'dynamic' && (b.velocity.x || b.velocity.y))
216
+ sb.velocity = [r(b.velocity.x), r(b.velocity.y)];
217
+ if (b.angularVelocity)
218
+ sb.angularVelocity = r(b.angularVelocity);
219
+ if (b.sensor)
220
+ sb.sensor = true;
221
+ const st = b.data?.style;
222
+ if (st && Object.keys(st).length)
223
+ sb.style = st;
224
+ return sb;
225
+ });
226
+ const constraints = world.constraints
227
+ .filter((c) => c.label !== 'drag' && kept.includes(c.a) && (!c.b || kept.includes(c.b)))
228
+ .map((c) => ({ type: c.type, a: id(c.a), ...(c.b ? { b: id(c.b) } : { point: [r(c.point.x), r(c.point.y)] }), anchorA: [r(c.anchorA.x), r(c.anchorA.y)], ...(c.b ? { anchorB: [r(c.anchorB.x), r(c.anchorB.y)] } : {}), length: r(c.length), stiffness: c.stiffness, damping: c.damping }));
229
+ return { format: SCENE_FORMAT, ...(o.name ? { name: o.name } : {}), world: { width: o.width, height: o.height, gravity: [world.gravity.x, world.gravity.y], walls: o.walls ?? world.bodies.some((b) => wallLabels.has(b.label)) }, bodies, constraints };
230
+ }
231
+ /** The module object for `use(formatScene)` (needs `physics`). */
232
+ const formatScene = { id: 'format-scene', version: registry.RUNTIME_VERSION, requires: ['core', 'physics'], api: { SCENE_FORMAT, migrateScene, validateScene, parseScene, sceneToWorld, worldToScene } };
233
+
234
+ exports.SCENE_FORMAT = SCENE_FORMAT;
235
+ exports.formatScene = formatScene;
236
+ exports.migrateScene = migrateScene;
237
+ exports.parseScene = parseScene;
238
+ exports.sceneToWorld = sceneToWorld;
239
+ exports.validateScene = validateScene;
240
+ exports.worldToScene = worldToScene;
241
+ //# sourceMappingURL=format-scene.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-scene.cjs","sources":["../../src/runtime/format-scene.ts"],"sourcesContent":["/**\n * `motionary/runtime/format-scene` (10.7) — the versioned scene format\n * `motionary-scene@1`: a JSON description of a 2D physics scene (world,\n * named materials, bodies, constraints, per-body style) that\n * `<usa-physics-playground>` and your own code can load, validate,\n * migrate and save.\n *\n * ```json\n * { \"format\": \"motionary-scene@1\",\n * \"world\": { \"width\": 600, \"height\": 360, \"gravity\": [0, 980], \"walls\": true },\n * \"materials\": { \"rubber\": { \"restitution\": 0.8, \"friction\": 0.6, \"density\": 0.001 } },\n * \"bodies\": [\n * { \"id\": \"ball\", \"shape\": \"circle\", \"radius\": 20, \"position\": [120, 40], \"material\": \"rubber\", \"style\": { \"fill\": \"#f472b6\" } },\n * { \"id\": \"floor-plank\", \"shape\": \"box\", \"size\": [300, 16], \"position\": [300, 300], \"angle\": 0.1, \"static\": true }\n * ],\n * \"constraints\": [ { \"type\": \"distance\", \"a\": \"ball\", \"b\": \"floor-plank\", \"length\": 120, \"stiffness\": 0.3 } ] }\n * ```\n *\n * - `validateScene(json)` lists problems (never throws);\n * - `migrateScene(json)` upgrades older shapes (an unversioned scene, the\n * `motionary-scene@0` draft) to `@1` and reports what it changed;\n * - `parseScene(json)` = migrate + validate, throws on errors;\n * - `sceneToWorld(scene)` builds a `motionary/runtime/physics` world\n * (bodies by id); `worldToScene(world)` saves one back.\n *\n * Needs `motionary/runtime/physics` registered for `sceneToWorld` /\n * `worldToScene`; validation and migration are pure.\n */\nimport { RUNTIME_VERSION, requireModule, type RuntimeModule } from './registry';\nimport type { PhysicsApi, World, Body, BodyOptions } from './physics';\n\ntype Num = number;\nexport const SCENE_FORMAT = 'motionary-scene@1';\n\nexport interface SceneMaterial { restitution?: Num; friction?: Num; density?: Num }\nexport interface SceneBody {\n id: string;\n shape: 'circle' | 'box' | 'polygon';\n position: [Num, Num];\n angle?: Num;\n radius?: Num;\n size?: [Num, Num];\n vertices?: [Num, Num][];\n static?: boolean;\n kinematic?: boolean;\n material?: string;\n restitution?: Num;\n friction?: Num;\n density?: Num;\n velocity?: [Num, Num];\n angularVelocity?: Num;\n sensor?: boolean;\n style?: { fill?: string; stroke?: string; label?: string };\n}\nexport interface SceneConstraint {\n type: 'distance' | 'pin';\n a: string;\n b?: string;\n point?: [Num, Num];\n anchorA?: [Num, Num];\n anchorB?: [Num, Num];\n length?: Num;\n stiffness?: Num;\n damping?: Num;\n}\nexport interface Scene {\n format: typeof SCENE_FORMAT;\n name?: string;\n world: { width: Num; height: Num; gravity?: [Num, Num]; walls?: boolean | { top?: boolean }; iterations?: Num };\n materials?: Record<string, SceneMaterial>;\n bodies: SceneBody[];\n constraints?: SceneConstraint[];\n}\n\nconst isNum = (x: unknown): x is Num => typeof x === 'number' && isFinite(x);\nconst isVec = (x: unknown): x is [Num, Num] => Array.isArray(x) && x.length === 2 && x.every(isNum);\n\n/** Upgrade older scene shapes to `motionary-scene@1`. Returns the scene and what changed. */\nexport function migrateScene(input: unknown): { scene: any; changes: string[] } {\n const changes: string[] = [];\n const s: any = typeof input === 'string' ? JSON.parse(input) : JSON.parse(JSON.stringify(input ?? {}));\n if (s.format === SCENE_FORMAT) return { scene: s, changes };\n if (s.format && s.format !== 'motionary-scene@0') throw new Error(`[motionary] scene: unknown format \"${s.format}\" (this build reads ${SCENE_FORMAT} and migrates motionary-scene@0 / unversioned scenes)`);\n changes.push(`${s.format || 'unversioned'} → ${SCENE_FORMAT}`);\n s.format = SCENE_FORMAT;\n // @0 / unversioned: { width, height, gravity: number } at the top level, bodies with x / y / w / h / type\n if (!s.world) {\n s.world = { width: s.width ?? 600, height: s.height ?? 400 };\n if (s.gravity != null) s.world.gravity = isNum(s.gravity) ? [0, s.gravity] : s.gravity;\n if (s.walls != null) s.world.walls = s.walls;\n delete s.width, delete s.height, delete s.gravity, delete s.walls;\n changes.push('top-level width / height / gravity moved into \"world\"');\n }\n if (isNum(s.world.gravity)) {\n s.world.gravity = [0, s.world.gravity];\n changes.push('world.gravity number → [0, g]');\n }\n s.bodies = (s.bodies || []).map((b: any, i: number) => {\n const o: any = { ...b };\n if (!o.id) (o.id = `body-${i + 1}`), changes.push(`bodies[${i}]: id \"${o.id}\" added`);\n if (o.position == null && (isNum(o.x) || isNum(o.y))) {\n o.position = [o.x ?? 0, o.y ?? 0];\n delete o.x, delete o.y;\n changes.push(`bodies[${i}]: x / y → position`);\n }\n if (o.size == null && (isNum(o.w) || isNum(o.h))) {\n o.size = [o.w ?? 40, o.h ?? 40];\n delete o.w, delete o.h;\n changes.push(`bodies[${i}]: w / h → size`);\n }\n if (o.type === 'static' || o.type === 'kinematic') {\n o[o.type] = true;\n delete o.type;\n changes.push(`bodies[${i}]: type → ${o.static ? 'static' : 'kinematic'}: true`);\n } else if (o.type === 'dynamic') delete o.type;\n if (!o.shape) o.shape = o.radius != null ? 'circle' : o.vertices ? 'polygon' : 'box';\n return o;\n });\n return { scene: s, changes };\n}\n\n/** Problems in a `motionary-scene@1` document (after migration). Never throws. */\nexport function validateScene(input: unknown): string[] {\n const out: string[] = [];\n let s: any;\n try {\n s = migrateScene(input).scene;\n } catch (e) {\n return [String((e as Error).message).replace('[motionary] scene: ', '')];\n }\n if (!s.world || !isNum(s.world.width) || !isNum(s.world.height) || s.world.width <= 0 || s.world.height <= 0) out.push('world: width and height must be positive numbers');\n if (s.world?.gravity != null && !isVec(s.world.gravity)) out.push('world.gravity must be [x, y]');\n const mats = s.materials || {};\n for (const [k, m] of Object.entries<any>(mats)) for (const p of ['restitution', 'friction', 'density']) if (m[p] != null && (!isNum(m[p]) || m[p] < 0)) out.push(`materials.${k}.${p} must be a number ≥ 0`);\n if (!Array.isArray(s.bodies)) out.push('bodies must be an array');\n const ids = new Set<string>();\n (s.bodies || []).forEach((b: any, i: number) => {\n const w = `bodies[${i}]${b.id ? ` (\"${b.id}\")` : ''}`;\n if (ids.has(b.id)) out.push(`${w}: duplicate id`);\n ids.add(b.id);\n if (!['circle', 'box', 'polygon'].includes(b.shape)) out.push(`${w}: shape must be circle, box or polygon`);\n if (!isVec(b.position)) out.push(`${w}: position must be [x, y]`);\n if (b.shape === 'circle' && !(isNum(b.radius) && b.radius > 0)) out.push(`${w}: circle needs radius > 0`);\n if (b.shape === 'box' && !(isVec(b.size) && b.size[0] > 0 && b.size[1] > 0)) out.push(`${w}: box needs size [w, h] > 0`);\n if (b.shape === 'polygon' && !(Array.isArray(b.vertices) && b.vertices.length >= 3 && b.vertices.every(isVec))) out.push(`${w}: polygon needs ≥ 3 vertices [x, y]`);\n if (b.material && !mats[b.material]) out.push(`${w}: unknown material \"${b.material}\"`);\n if (b.static && b.kinematic) out.push(`${w}: static and kinematic are exclusive`);\n });\n (s.constraints || []).forEach((c: any, i: number) => {\n const w = `constraints[${i}]`;\n if (!['distance', 'pin'].includes(c.type)) out.push(`${w}: type must be distance or pin`);\n if (!ids.has(c.a)) out.push(`${w}: unknown body \"${c.a}\"`);\n if (c.type === 'distance' && !ids.has(c.b)) out.push(`${w}: distance needs body b (unknown \"${c.b}\")`);\n if (c.type === 'pin' && c.point != null && !isVec(c.point)) out.push(`${w}: point must be [x, y]`);\n if (c.stiffness != null && !(isNum(c.stiffness) && c.stiffness > 0 && c.stiffness <= 1)) out.push(`${w}: stiffness must be in (0, 1]`);\n });\n return out;\n}\n\n/** Migrate + validate; throws one error listing every problem. */\nexport function parseScene(input: unknown): Scene {\n const { scene } = migrateScene(input);\n const problems = validateScene(scene);\n if (problems.length) throw new Error(`[motionary] scene: ${problems.length} problem(s): ${problems.join('; ')}`);\n return scene as Scene;\n}\n\n/** Build a physics world from a scene (needs `use(physics)`). */\nexport function sceneToWorld(input: Scene | unknown): { world: World; bodies: Record<string, Body>; scene: Scene } {\n const scene = parseScene(input);\n const P = requireModule<PhysicsApi>('physics', 'motionary/runtime/format-scene');\n const w = scene.world;\n const world = P.createWorld({ gravity: w.gravity || [0, 980], iterations: w.iterations });\n if (w.walls) world.bounds(w.width, w.height, 50, typeof w.walls === 'object' ? w.walls : {});\n const bodies: Record<string, Body> = {};\n for (const b of scene.bodies) {\n const m = (b.material && scene.materials?.[b.material]) || {};\n const o: BodyOptions = {\n shape: b.shape,\n x: b.position[0],\n y: b.position[1],\n angle: b.angle,\n radius: b.radius,\n width: b.size?.[0],\n height: b.size?.[1],\n vertices: b.vertices,\n type: b.static ? 'static' : b.kinematic ? 'kinematic' : 'dynamic',\n restitution: b.restitution ?? m.restitution,\n friction: b.friction ?? m.friction,\n density: b.density ?? m.density,\n vx: b.velocity?.[0],\n vy: b.velocity?.[1],\n angularVelocity: b.angularVelocity,\n sensor: b.sensor,\n label: b.id,\n data: { id: b.id, style: b.style || {}, material: b.material },\n };\n bodies[b.id] = world.body(o);\n }\n for (const c of scene.constraints || []) world.constraint({ type: c.type, a: bodies[c.a], b: c.b ? bodies[c.b] : undefined, point: c.point, anchorA: c.anchorA, anchorB: c.anchorB, length: c.length, stiffness: c.stiffness, damping: c.damping });\n return { world, bodies, scene };\n}\n\n/** Save the current state of a world as a scene (walls made by `bounds()` are left out; `w` / `h` give the world size). */\nexport function worldToScene(world: World, o: { width: Num; height: Num; name?: string; walls?: boolean } = { width: 600, height: 400 }): Scene {\n const r = (x: Num) => Math.round(x * 1000) / 1000;\n const wallLabels = new Set(['floor', 'wall-left', 'wall-right', 'ceiling']);\n const kept = world.bodies.filter((b) => !(b.isStatic && wallLabels.has(b.label)));\n const id = (b: Body) => (b.data as any)?.id || b.label + '-' + b.id;\n const bodies: SceneBody[] = kept.map((b) => {\n const sb: SceneBody = { id: id(b), shape: b.shape, position: [r(b.position.x), r(b.position.y)] };\n if (b.angle) sb.angle = r(b.angle);\n if (b.shape === 'circle') sb.radius = r(b.radius);\n else {\n const xs = b.verts.map((p) => p.x), ys = b.verts.map((p) => p.y);\n const isBox = b.shape === 'box';\n if (isBox) sb.size = [r(Math.max(...xs) - Math.min(...xs)), r(Math.max(...ys) - Math.min(...ys))];\n else sb.vertices = b.verts.map((p) => [r(p.x), r(p.y)]);\n }\n if (b.type === 'static') sb.static = true;\n if (b.type === 'kinematic') sb.kinematic = true;\n sb.restitution = b.restitution;\n sb.friction = b.friction;\n if (b.type === 'dynamic' && (b.velocity.x || b.velocity.y)) sb.velocity = [r(b.velocity.x), r(b.velocity.y)];\n if (b.angularVelocity) sb.angularVelocity = r(b.angularVelocity);\n if (b.sensor) sb.sensor = true;\n const st = (b.data as any)?.style;\n if (st && Object.keys(st).length) sb.style = st;\n return sb;\n });\n const constraints: SceneConstraint[] = world.constraints\n .filter((c) => c.label !== 'drag' && kept.includes(c.a) && (!c.b || kept.includes(c.b)))\n .map((c) => ({ type: c.type, a: id(c.a), ...(c.b ? { b: id(c.b) } : { point: [r(c.point.x), r(c.point.y)] as [Num, Num] }), anchorA: [r(c.anchorA.x), r(c.anchorA.y)] as [Num, Num], ...(c.b ? { anchorB: [r(c.anchorB.x), r(c.anchorB.y)] as [Num, Num] } : {}), length: r(c.length), stiffness: c.stiffness, damping: c.damping }));\n return { format: SCENE_FORMAT, ...(o.name ? { name: o.name } : {}), world: { width: o.width, height: o.height, gravity: [world.gravity.x, world.gravity.y], walls: o.walls ?? world.bodies.some((b) => wallLabels.has(b.label)) }, bodies, constraints };\n}\n\nexport interface FormatSceneApi {\n SCENE_FORMAT: typeof SCENE_FORMAT;\n migrateScene: typeof migrateScene;\n validateScene: typeof validateScene;\n parseScene: typeof parseScene;\n sceneToWorld: typeof sceneToWorld;\n worldToScene: typeof worldToScene;\n}\n\n/** The module object for `use(formatScene)` (needs `physics`). */\nexport const formatScene: RuntimeModule<FormatSceneApi> = { id: 'format-scene', version: RUNTIME_VERSION, requires: ['core', 'physics'], api: { SCENE_FORMAT, migrateScene, validateScene, parseScene, sceneToWorld, worldToScene } };\n"],"names":["requireModule","RUNTIME_VERSION"],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;AAKI,MAAM,YAAY,GAAG;AA0C5B,MAAM,KAAK,GAAG,CAAC,CAAU,KAAe,OAAO,CAAC,KAAK,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC;AAC5E,MAAM,KAAK,GAAG,CAAC,CA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