motionary 10.6.0 → 10.8.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.
- package/AGENTS.md +2 -0
- package/CHANGELOG.md +36 -0
- package/README.md +77 -4
- package/bin/motionary-mcp.mjs +160 -11
- package/dist/chunks/{anim-image-DECLkPH4.cjs → anim-image-BzTQa2k3.cjs} +2 -2
- package/dist/chunks/{anim-image-DECLkPH4.cjs.map → anim-image-BzTQa2k3.cjs.map} +1 -1
- package/dist/chunks/{anim-image-DNghy017.js → anim-image-iD646Q7i.js} +2 -2
- package/dist/chunks/{anim-image-DNghy017.js.map → anim-image-iD646Q7i.js.map} +1 -1
- package/dist/chunks/{keyframes-F6vp6tZZ.js → keyframes-B4zefz0k.js} +2 -2
- package/dist/chunks/{keyframes-F6vp6tZZ.js.map → keyframes-B4zefz0k.js.map} +1 -1
- package/dist/chunks/{keyframes-CbUZjD_5.cjs → keyframes-BlOyB1PP.cjs} +2 -2
- package/dist/chunks/{keyframes-CbUZjD_5.cjs.map → keyframes-BlOyB1PP.cjs.map} +1 -1
- package/dist/chunks/{registry-dr1CPTk1.cjs → registry-BZxDVL3h.cjs} +2 -2
- package/dist/chunks/{registry-dr1CPTk1.cjs.map → registry-BZxDVL3h.cjs.map} +1 -1
- package/dist/chunks/{registry-D8LAoXI-.js → registry-Bkt3-3ET.js} +3 -3
- package/dist/chunks/{registry-D8LAoXI-.js.map → registry-Bkt3-3ET.js.map} +1 -1
- package/dist/chunks/runtime-link-CUiZ8lbE.cjs +38 -0
- package/dist/chunks/runtime-link-CUiZ8lbE.cjs.map +1 -0
- package/dist/chunks/runtime-link-c13gskBZ.js +36 -0
- package/dist/chunks/runtime-link-c13gskBZ.js.map +1 -0
- package/dist/chunks/{ticker-DaAlEyOd.cjs → ticker-BfxAECfO.cjs} +2 -2
- package/dist/chunks/{ticker-DaAlEyOd.cjs.map → ticker-BfxAECfO.cjs.map} +1 -1
- package/dist/chunks/{ticker-Do9bGsaV.js → ticker-ZtweD3U4.js} +2 -2
- package/dist/chunks/{ticker-Do9bGsaV.js.map → ticker-ZtweD3U4.js.map} +1 -1
- package/dist/chunks/{tween-CmkdSyaC.cjs → tween--MD-39y0.cjs} +2 -2
- package/dist/chunks/{tween-CmkdSyaC.cjs.map → tween--MD-39y0.cjs.map} +1 -1
- package/dist/chunks/{tween-BzCGq_Ba.js → tween-DACdkLyO.js} +2 -2
- package/dist/chunks/{tween-BzCGq_Ba.js.map → tween-DACdkLyO.js.map} +1 -1
- package/dist/components/ai.cjs +314 -0
- package/dist/components/ai.cjs.map +1 -0
- package/dist/components/ai.d.cts +58 -0
- package/dist/components/ai.d.ts +58 -0
- package/dist/components/ai.js +311 -0
- package/dist/components/ai.js.map +1 -0
- package/dist/components/snap-carousel.cjs +216 -0
- package/dist/components/snap-carousel.cjs.map +1 -0
- package/dist/components/snap-carousel.d.cts +80 -0
- package/dist/components/snap-carousel.d.ts +80 -0
- package/dist/components/snap-carousel.js +214 -0
- package/dist/components/snap-carousel.js.map +1 -0
- package/dist/components/widgets.cjs +626 -268
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +515 -39
- package/dist/components/widgets.d.ts +515 -39
- package/dist/components/widgets.js +617 -262
- package/dist/components/widgets.js.map +1 -1
- package/dist/llms-full.txt +191 -6
- package/dist/llms.txt +10 -3
- package/dist/manifest.json +497 -19
- package/dist/runtime/drag-snap.cjs +269 -0
- package/dist/runtime/drag-snap.cjs.map +1 -0
- package/dist/runtime/drag-snap.d.cts +109 -0
- package/dist/runtime/drag-snap.d.ts +109 -0
- package/dist/runtime/drag-snap.iife.js +2 -0
- package/dist/runtime/drag-snap.iife.js.map +1 -0
- package/dist/runtime/drag-snap.js +261 -0
- package/dist/runtime/drag-snap.js.map +1 -0
- package/dist/runtime/format-apng.cjs +4 -4
- package/dist/runtime/format-apng.js +4 -4
- package/dist/runtime/format-css.cjs +4 -4
- package/dist/runtime/format-css.js +4 -4
- package/dist/runtime/format-gif.cjs +4 -4
- package/dist/runtime/format-gif.js +4 -4
- package/dist/runtime/format-gltf.cjs +37 -18
- package/dist/runtime/format-gltf.cjs.map +1 -1
- package/dist/runtime/format-gltf.d.cts +18 -2
- package/dist/runtime/format-gltf.d.ts +18 -2
- package/dist/runtime/format-gltf.iife.js +1 -1
- package/dist/runtime/format-gltf.iife.js.map +1 -1
- package/dist/runtime/format-gltf.js +37 -18
- package/dist/runtime/format-gltf.js.map +1 -1
- package/dist/runtime/format-motion.cjs +4 -4
- package/dist/runtime/format-motion.js +4 -4
- package/dist/runtime/format-obj.cjs +1 -1
- package/dist/runtime/format-obj.d.cts +2 -0
- package/dist/runtime/format-obj.d.ts +2 -0
- package/dist/runtime/format-obj.iife.js.map +1 -1
- package/dist/runtime/format-obj.js +1 -1
- package/dist/runtime/format-scene.cjs +241 -0
- package/dist/runtime/format-scene.cjs.map +1 -0
- package/dist/runtime/format-scene.d.cts +349 -0
- package/dist/runtime/format-scene.d.ts +349 -0
- package/dist/runtime/format-scene.iife.js +2 -0
- package/dist/runtime/format-scene.iife.js.map +1 -0
- package/dist/runtime/format-scene.js +233 -0
- package/dist/runtime/format-scene.js.map +1 -0
- package/dist/runtime/format-sprite.cjs +3 -3
- package/dist/runtime/format-sprite.js +3 -3
- package/dist/runtime/format-svg.cjs +3 -3
- package/dist/runtime/format-svg.js +3 -3
- package/dist/runtime/format-webp.cjs +4 -4
- package/dist/runtime/format-webp.js +4 -4
- package/dist/runtime/gl.cjs +17 -4
- package/dist/runtime/gl.cjs.map +1 -1
- package/dist/runtime/gl.d.cts +2 -0
- package/dist/runtime/gl.d.ts +2 -0
- package/dist/runtime/gl.iife.js +1 -1
- package/dist/runtime/gl.iife.js.map +1 -1
- package/dist/runtime/gl.js +17 -4
- package/dist/runtime/gl.js.map +1 -1
- package/dist/runtime/gltf-anim.cjs +251 -0
- package/dist/runtime/gltf-anim.cjs.map +1 -0
- package/dist/runtime/gltf-anim.d.cts +216 -0
- package/dist/runtime/gltf-anim.d.ts +216 -0
- package/dist/runtime/gltf-anim.iife.js +2 -0
- package/dist/runtime/gltf-anim.iife.js.map +1 -0
- package/dist/runtime/gltf-anim.js +243 -0
- package/dist/runtime/gltf-anim.js.map +1 -0
- package/dist/runtime/physics.cjs +739 -0
- package/dist/runtime/physics.cjs.map +1 -0
- package/dist/runtime/physics.d.cts +250 -0
- package/dist/runtime/physics.d.ts +250 -0
- package/dist/runtime/physics.iife.js +2 -0
- package/dist/runtime/physics.iife.js.map +1 -0
- package/dist/runtime/physics.js +731 -0
- package/dist/runtime/physics.js.map +1 -0
- package/dist/runtime/scroll.cjs +2 -2
- package/dist/runtime/scroll.js +2 -2
- package/dist/runtime/smooth.cjs +1 -1
- package/dist/runtime/smooth.js +1 -1
- package/dist/runtime/text.cjs +1 -1
- package/dist/runtime/text.js +1 -1
- package/dist/runtime/vector.cjs +421 -11
- package/dist/runtime/vector.cjs.map +1 -1
- package/dist/runtime/vector.d.cts +20 -4
- package/dist/runtime/vector.d.ts +20 -4
- package/dist/runtime/vector.iife.js +1 -1
- package/dist/runtime/vector.iife.js.map +1 -1
- package/dist/runtime/vector.js +421 -12
- package/dist/runtime/vector.js.map +1 -1
- package/dist/runtime.cjs +3 -3
- package/dist/runtime.d.cts +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.iife.js +1 -1
- package/dist/runtime.iife.js.map +1 -1
- package/dist/runtime.js +5 -5
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +2 -2
- package/docs/components/README.md +5 -2
- package/docs/components/usa-gl-scene.md +27 -6
- package/docs/components/usa-lottie-player.md +18 -0
- package/docs/components/usa-motion-prompt.md +32 -0
- package/docs/components/usa-physics-playground.md +63 -0
- package/docs/components/usa-snap-carousel.md +68 -0
- package/docs/components.md +95 -3
- package/docs/runtime/drag-snap.md +60 -0
- package/docs/runtime/format-gltf.md +3 -2
- package/docs/runtime/format-scene.md +59 -0
- package/docs/runtime/gltf-anim.md +62 -0
- package/docs/runtime/physics.md +61 -0
- package/docs/runtime/vector.md +3 -2
- package/package.json +61 -1
package/dist/manifest.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"format": "motionary/components",
|
|
4
4
|
"schemaVersion": 1,
|
|
5
5
|
"package": "motionary",
|
|
6
|
-
"version": "10.
|
|
6
|
+
"version": "10.8.0",
|
|
7
7
|
"homepage": "https://harrisoncn.github.io/Motionary/",
|
|
8
8
|
"llms": "https://harrisoncn.github.io/Motionary/llms.txt",
|
|
9
9
|
"cdn": {
|
|
@@ -895,8 +895,13 @@
|
|
|
895
895
|
],
|
|
896
896
|
[
|
|
897
897
|
"skins, morph targets, animations",
|
|
898
|
-
"
|
|
899
|
-
"
|
|
898
|
+
"yes",
|
|
899
|
+
"data kept on the nodes / geometry; played by motionary/runtime/gltf-anim (10.8)"
|
|
900
|
+
],
|
|
901
|
+
[
|
|
902
|
+
"sparse accessors",
|
|
903
|
+
"yes",
|
|
904
|
+
"10.8"
|
|
900
905
|
],
|
|
901
906
|
[
|
|
902
907
|
"Draco / meshopt / KTX2 (Basis) compression",
|
|
@@ -904,7 +909,7 @@
|
|
|
904
909
|
"files that require them fail with a clear error; decoder hooks planned for 10.9"
|
|
905
910
|
],
|
|
906
911
|
[
|
|
907
|
-
"
|
|
912
|
+
"cameras, KHR_lights_punctual, texture transforms",
|
|
908
913
|
"no",
|
|
909
914
|
"ignored"
|
|
910
915
|
],
|
|
@@ -995,6 +1000,7 @@
|
|
|
995
1000
|
"budget": 12288,
|
|
996
1001
|
"exports": [
|
|
997
1002
|
"vector",
|
|
1003
|
+
"evalExpression",
|
|
998
1004
|
"loadLottie",
|
|
999
1005
|
"parseDotLottie",
|
|
1000
1006
|
"unzipEntries",
|
|
@@ -1063,9 +1069,14 @@
|
|
|
1063
1069
|
""
|
|
1064
1070
|
],
|
|
1065
1071
|
[
|
|
1066
|
-
"text layers,
|
|
1067
|
-
"
|
|
1068
|
-
"
|
|
1072
|
+
"text layers: fonts by family + style, justification, tracking, line height, fill / stroke, box text (wrapping), source-text keyframes",
|
|
1073
|
+
"yes",
|
|
1074
|
+
"10.8; system / page fonts (glyph outlines in chars are not used); text animators not supported"
|
|
1075
|
+
],
|
|
1076
|
+
[
|
|
1077
|
+
"expressions: time, value, wiggle, loopOut / loopIn (cycle, pingpong, offset, continue), linear / ease, valueAtTime, Math, arithmetic, var / $bm_rt",
|
|
1078
|
+
"yes",
|
|
1079
|
+
"10.8 subset, own interpreter (no eval; CSP-safe); other expressions keep the keyframed value and are listed by inspectLottie()"
|
|
1069
1080
|
],
|
|
1070
1081
|
[
|
|
1071
1082
|
"3D layers, layer effects, merge paths, repeaters",
|
|
@@ -1145,6 +1156,273 @@
|
|
|
1145
1156
|
]
|
|
1146
1157
|
],
|
|
1147
1158
|
"example": "// npm i @rive-app/canvas\nimport { defineRive } from 'motionary/components/widgets';\ndefineRive();\n// <usa-rive src=\"/anim/icon.riv\" state-machine=\"State Machine 1\" autoplay></usa-rive>"
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
"kind": "runtime",
|
|
1162
|
+
"id": "physics",
|
|
1163
|
+
"label": "motionary/runtime/physics",
|
|
1164
|
+
"title": "2D rigid-body physics",
|
|
1165
|
+
"summary": "A small 2D rigid-body engine written for Motionary (own implementation and API — no Matter.js / Box2D code): circles, boxes and convex polygons, mass from density, restitution, friction, sensors, collision groups, sleeping, distance / spring / pin constraints, pointer drag, a fixed time step on the shared ticker.",
|
|
1166
|
+
"install": "npm i motionary",
|
|
1167
|
+
"importPath": "motionary/runtime/physics",
|
|
1168
|
+
"import": "import { use } from 'motionary/runtime';\nimport { physics } from 'motionary/runtime/physics';",
|
|
1169
|
+
"register": "use(physics);",
|
|
1170
|
+
"cdn": "<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/physics.iife.js\"></script>",
|
|
1171
|
+
"cdnEsm": "https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/physics.js",
|
|
1172
|
+
"order": "Register the core first, then the module: use(physics) also registers the core. CDN: load runtime.iife.js, then runtime/physics.iife.js (it registers itself).",
|
|
1173
|
+
"docs": "docs/runtime/physics.md",
|
|
1174
|
+
"budget": 10240,
|
|
1175
|
+
"exports": [
|
|
1176
|
+
"physics",
|
|
1177
|
+
"createWorld",
|
|
1178
|
+
"World",
|
|
1179
|
+
"Body",
|
|
1180
|
+
"Constraint",
|
|
1181
|
+
"collide",
|
|
1182
|
+
"dragConstraint"
|
|
1183
|
+
],
|
|
1184
|
+
"compat": [
|
|
1185
|
+
[
|
|
1186
|
+
"bodies: circle, box, convex polygon (any winding, made convex)",
|
|
1187
|
+
"yes",
|
|
1188
|
+
"concave shapes: split them into convex parts"
|
|
1189
|
+
],
|
|
1190
|
+
[
|
|
1191
|
+
"static, dynamic and kinematic bodies; density / mass, inertia, fixed rotation",
|
|
1192
|
+
"yes",
|
|
1193
|
+
""
|
|
1194
|
+
],
|
|
1195
|
+
[
|
|
1196
|
+
"collisions: sort-and-sweep broad phase, SAT narrow phase, up to 2 contact points",
|
|
1197
|
+
"yes",
|
|
1198
|
+
"no continuous collision detection: very fast small bodies can tunnel"
|
|
1199
|
+
],
|
|
1200
|
+
[
|
|
1201
|
+
"restitution, Coulomb friction, warm-started accumulated impulses",
|
|
1202
|
+
"yes",
|
|
1203
|
+
""
|
|
1204
|
+
],
|
|
1205
|
+
[
|
|
1206
|
+
"constraints: distance (rigid or spring with stiffness / damping), pin, pointer drag",
|
|
1207
|
+
"yes",
|
|
1208
|
+
"no revolute motors / joint limits"
|
|
1209
|
+
],
|
|
1210
|
+
[
|
|
1211
|
+
"sensors, collision categories / masks, collision events, sleeping",
|
|
1212
|
+
"yes",
|
|
1213
|
+
""
|
|
1214
|
+
],
|
|
1215
|
+
[
|
|
1216
|
+
"fixed time step + accumulator (same result at any frame rate)",
|
|
1217
|
+
"yes",
|
|
1218
|
+
""
|
|
1219
|
+
],
|
|
1220
|
+
[
|
|
1221
|
+
"SSR / workers",
|
|
1222
|
+
"yes",
|
|
1223
|
+
"pure maths; world.run() needs the runtime ticker"
|
|
1224
|
+
]
|
|
1225
|
+
],
|
|
1226
|
+
"example": "import { use } from 'motionary/runtime';\nimport { physics, createWorld } from 'motionary/runtime/physics';\nuse(physics);\nconst world = createWorld({ gravity: [0, 980] });\nworld.bounds(600, 400);\nconst ball = world.body({ shape: 'circle', x: 300, y: 40, radius: 20, restitution: 0.7 });\nworld.run(); // steps on the shared ticker"
|
|
1227
|
+
},
|
|
1228
|
+
{
|
|
1229
|
+
"kind": "runtime",
|
|
1230
|
+
"id": "format-scene",
|
|
1231
|
+
"label": "motionary/runtime/format-scene",
|
|
1232
|
+
"title": "Scene JSON (motionary-scene@1)",
|
|
1233
|
+
"summary": "The versioned motionary-scene@1 format: a JSON description of a 2D physics scene (world, named materials, bodies, constraints, per-body style) — validate, migrate older drafts, load into a physics world and save one back.",
|
|
1234
|
+
"install": "npm i motionary",
|
|
1235
|
+
"importPath": "motionary/runtime/format-scene",
|
|
1236
|
+
"import": "import { use } from 'motionary/runtime';\nimport { formatScene } from 'motionary/runtime/format-scene';",
|
|
1237
|
+
"register": "use(formatScene);",
|
|
1238
|
+
"cdn": "<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-scene.iife.js\"></script>",
|
|
1239
|
+
"cdnEsm": "https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-scene.js",
|
|
1240
|
+
"order": "Register the core first, then the module: use(formatScene) also registers the core. CDN: load runtime.iife.js, then runtime/format-scene.iife.js (it registers itself).",
|
|
1241
|
+
"docs": "docs/runtime/format-scene.md",
|
|
1242
|
+
"budget": 3072,
|
|
1243
|
+
"exports": [
|
|
1244
|
+
"formatScene",
|
|
1245
|
+
"SCENE_FORMAT",
|
|
1246
|
+
"migrateScene",
|
|
1247
|
+
"validateScene",
|
|
1248
|
+
"parseScene",
|
|
1249
|
+
"sceneToWorld",
|
|
1250
|
+
"worldToScene"
|
|
1251
|
+
],
|
|
1252
|
+
"compat": [
|
|
1253
|
+
[
|
|
1254
|
+
"world: size, gravity, walls (with or without a top), solver iterations",
|
|
1255
|
+
"yes",
|
|
1256
|
+
""
|
|
1257
|
+
],
|
|
1258
|
+
[
|
|
1259
|
+
"named materials (restitution, friction, density), per-body overrides",
|
|
1260
|
+
"yes",
|
|
1261
|
+
""
|
|
1262
|
+
],
|
|
1263
|
+
[
|
|
1264
|
+
"bodies: circle / box / polygon, static / kinematic, velocity, angle, sensor, style",
|
|
1265
|
+
"yes",
|
|
1266
|
+
""
|
|
1267
|
+
],
|
|
1268
|
+
[
|
|
1269
|
+
"constraints: distance / spring / pin between bodies or to a world point",
|
|
1270
|
+
"yes",
|
|
1271
|
+
""
|
|
1272
|
+
],
|
|
1273
|
+
[
|
|
1274
|
+
"validation (lists every problem, never throws) + parseScene (throws one error)",
|
|
1275
|
+
"yes",
|
|
1276
|
+
""
|
|
1277
|
+
],
|
|
1278
|
+
[
|
|
1279
|
+
"migration: unversioned scenes and the motionary-scene@0 draft → @1, with a change list",
|
|
1280
|
+
"yes",
|
|
1281
|
+
""
|
|
1282
|
+
],
|
|
1283
|
+
[
|
|
1284
|
+
"save: worldToScene() (walls made by bounds() are left out)",
|
|
1285
|
+
"yes",
|
|
1286
|
+
""
|
|
1287
|
+
]
|
|
1288
|
+
],
|
|
1289
|
+
"example": "import { use } from 'motionary/runtime';\nimport { physics } from 'motionary/runtime/physics';\nimport { formatScene, sceneToWorld } from 'motionary/runtime/format-scene';\nuse(physics, formatScene);\nconst { world, bodies } = sceneToWorld(await (await fetch('/scenes/stack.json')).json());\nworld.run();"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
"kind": "runtime",
|
|
1293
|
+
"id": "drag-snap",
|
|
1294
|
+
"label": "motionary/runtime/drag-snap",
|
|
1295
|
+
"title": "Drag, inertia and snap points",
|
|
1296
|
+
"summary": "Pointer drag along one axis with velocity tracking, inertial throws, rubber-band edges and spring-animated snap points on the shared ticker — the engine of <usa-snap-carousel>, usable for sheets, sliders and pickers (own implementation).",
|
|
1297
|
+
"install": "npm i motionary",
|
|
1298
|
+
"importPath": "motionary/runtime/drag-snap",
|
|
1299
|
+
"import": "import { use } from 'motionary/runtime';\nimport { dragSnap } from 'motionary/runtime/drag-snap';",
|
|
1300
|
+
"register": "use(dragSnap);",
|
|
1301
|
+
"cdn": "<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/drag-snap.iife.js\"></script>",
|
|
1302
|
+
"cdnEsm": "https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/drag-snap.js",
|
|
1303
|
+
"order": "Register the core first, then the module: use(dragSnap) also registers the core. CDN: load runtime.iife.js, then runtime/drag-snap.iife.js (it registers itself).",
|
|
1304
|
+
"docs": "docs/runtime/drag-snap.md",
|
|
1305
|
+
"budget": 4096,
|
|
1306
|
+
"exports": [
|
|
1307
|
+
"dragSnap",
|
|
1308
|
+
"createDragSnap",
|
|
1309
|
+
"projectThrow",
|
|
1310
|
+
"nearestSnap",
|
|
1311
|
+
"rubberband",
|
|
1312
|
+
"springStep",
|
|
1313
|
+
"velocityTracker"
|
|
1314
|
+
],
|
|
1315
|
+
"compat": [
|
|
1316
|
+
[
|
|
1317
|
+
"pointer, touch and pen (Pointer Events), drag threshold, pointer capture, touch-action for the other axis",
|
|
1318
|
+
"yes",
|
|
1319
|
+
"one axis per controller (x or y)"
|
|
1320
|
+
],
|
|
1321
|
+
[
|
|
1322
|
+
"velocity from the last 100 ms, inertial throw with constant deceleration",
|
|
1323
|
+
"yes",
|
|
1324
|
+
"off under reduced motion"
|
|
1325
|
+
],
|
|
1326
|
+
[
|
|
1327
|
+
"snap points: nearest to the projected throw, a fast flick moves at least one point",
|
|
1328
|
+
"yes",
|
|
1329
|
+
""
|
|
1330
|
+
],
|
|
1331
|
+
[
|
|
1332
|
+
"critically damped spring to the snap point (shared ticker)",
|
|
1333
|
+
"yes",
|
|
1334
|
+
"instant under reduced motion"
|
|
1335
|
+
],
|
|
1336
|
+
[
|
|
1337
|
+
"bounds with rubber-band resistance",
|
|
1338
|
+
"yes",
|
|
1339
|
+
""
|
|
1340
|
+
],
|
|
1341
|
+
[
|
|
1342
|
+
"clicks inside are kept; the click that ends a drag is swallowed",
|
|
1343
|
+
"yes",
|
|
1344
|
+
""
|
|
1345
|
+
],
|
|
1346
|
+
[
|
|
1347
|
+
"free 2D dragging, scroll-linked snapping (CSS scroll-snap)",
|
|
1348
|
+
"no",
|
|
1349
|
+
"use two controllers / native scroll-snap"
|
|
1350
|
+
],
|
|
1351
|
+
[
|
|
1352
|
+
"SSR / workers",
|
|
1353
|
+
"partial",
|
|
1354
|
+
"the maths (projectThrow, nearestSnap, rubberband, springStep, velocityTracker) is pure"
|
|
1355
|
+
]
|
|
1356
|
+
],
|
|
1357
|
+
"example": "import { use } from 'motionary/runtime';\nimport { dragSnap, createDragSnap } from 'motionary/runtime/drag-snap';\nuse(dragSnap);\nconst track = document.querySelector('.track');\nconst ds = createDragSnap(track, { axis: 'x', snap: [0, -320, -640], onUpdate: (x) => (track.style.transform = `translateX(${x}px)`) });\nds.snapTo(1);"
|
|
1358
|
+
},
|
|
1359
|
+
{
|
|
1360
|
+
"kind": "runtime",
|
|
1361
|
+
"id": "gltf-anim",
|
|
1362
|
+
"label": "motionary/runtime/gltf-anim",
|
|
1363
|
+
"title": "glTF animation, skinning and morph targets",
|
|
1364
|
+
"summary": "Plays glTF 2.0 animations on models loaded by motionary/runtime/format-gltf: translation / rotation / scale / weights channels with LINEAR, STEP and CUBICSPLINE samplers, skins (4 joints per vertex) and morph targets, deformed on the CPU and re-uploaded to motionary/runtime/gl (own implementation).",
|
|
1365
|
+
"install": "npm i motionary",
|
|
1366
|
+
"importPath": "motionary/runtime/gltf-anim",
|
|
1367
|
+
"import": "import { use } from 'motionary/runtime';\nimport { gltfAnim } from 'motionary/runtime/gltf-anim';",
|
|
1368
|
+
"register": "use(gltfAnim);",
|
|
1369
|
+
"cdn": "<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/gltf-anim.iife.js\"></script>",
|
|
1370
|
+
"cdnEsm": "https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/gltf-anim.js",
|
|
1371
|
+
"order": "Register the core first, then the module: use(gltfAnim) also registers the core. CDN: load runtime.iife.js, then runtime/gltf-anim.iife.js (it registers itself).",
|
|
1372
|
+
"docs": "docs/runtime/gltf-anim.md",
|
|
1373
|
+
"budget": 4608,
|
|
1374
|
+
"exports": [
|
|
1375
|
+
"gltfAnim",
|
|
1376
|
+
"gltfAnimator",
|
|
1377
|
+
"gltfClips",
|
|
1378
|
+
"sampleChannel",
|
|
1379
|
+
"applyClip",
|
|
1380
|
+
"deformModel",
|
|
1381
|
+
"deformGeometry"
|
|
1382
|
+
],
|
|
1383
|
+
"compat": [
|
|
1384
|
+
[
|
|
1385
|
+
"animation channels: translation, rotation, scale, weights",
|
|
1386
|
+
"yes",
|
|
1387
|
+
"KHR_animation_pointer is ignored"
|
|
1388
|
+
],
|
|
1389
|
+
[
|
|
1390
|
+
"samplers: LINEAR (quaternions slerped), STEP, CUBICSPLINE (Hermite, in / out tangents)",
|
|
1391
|
+
"yes",
|
|
1392
|
+
""
|
|
1393
|
+
],
|
|
1394
|
+
[
|
|
1395
|
+
"skins: joint hierarchy, inverse bind matrices, JOINTS_0 / WEIGHTS_0 (4 influences)",
|
|
1396
|
+
"yes",
|
|
1397
|
+
"CPU skinning; JOINTS_1 / WEIGHTS_1 (8 influences) not used"
|
|
1398
|
+
],
|
|
1399
|
+
[
|
|
1400
|
+
"morph targets: POSITION + NORMAL deltas, mesh / node default weights, animated weights",
|
|
1401
|
+
"yes",
|
|
1402
|
+
"TANGENT / TEXCOORD / COLOR targets ignored"
|
|
1403
|
+
],
|
|
1404
|
+
[
|
|
1405
|
+
"sparse accessors (common for morph targets)",
|
|
1406
|
+
"yes",
|
|
1407
|
+
"read by format-gltf"
|
|
1408
|
+
],
|
|
1409
|
+
[
|
|
1410
|
+
"clip player: by name or index, loop, speed, seek, update(dt) or the shared ticker",
|
|
1411
|
+
"yes",
|
|
1412
|
+
"one clip at a time (no blending)"
|
|
1413
|
+
],
|
|
1414
|
+
[
|
|
1415
|
+
"GPU skinning, animation blending / cross-fades, a mesh shared by several skinned nodes",
|
|
1416
|
+
"no",
|
|
1417
|
+
"planned work beyond 11.0"
|
|
1418
|
+
],
|
|
1419
|
+
[
|
|
1420
|
+
"SSR / workers",
|
|
1421
|
+
"yes",
|
|
1422
|
+
"sampling and deformation are pure; play() needs the runtime ticker"
|
|
1423
|
+
]
|
|
1424
|
+
],
|
|
1425
|
+
"example": "import { use } from 'motionary/runtime';\nimport { gl } from 'motionary/runtime/gl';\nimport { formatGltf, loadGltf } from 'motionary/runtime/format-gltf';\nimport { gltfAnim, gltfAnimator } from 'motionary/runtime/gltf-anim';\nuse(gl, formatGltf, gltfAnim);\nconst model = await loadGltf('/models/robot.glb');\nconst anim = gltfAnimator(model, { clip: 'walk' });\nanim.play(); // or anim.update(dt) in your own loop"
|
|
1148
1426
|
}
|
|
1149
1427
|
],
|
|
1150
1428
|
"components": [
|
|
@@ -3814,7 +4092,7 @@
|
|
|
3814
4092
|
"id": "gl-scene",
|
|
3815
4093
|
"tag": "usa-gl-scene",
|
|
3816
4094
|
"title": "3D scene (glTF / OBJ)",
|
|
3817
|
-
"description": "10.5: a WebGL2 3D viewer on Motionary’s own renderer — glTF 2.0 / GLB and OBJ / MTL models or built-in shapes, PBR-style materials, orbit controls (drag, wheel, pinch, arrow keys), auto-rotate and video textures. Requires motionary/runtime/gl (+ format-gltf for .gltf / .glb, format-obj for .obj) — npm i motionary, then use(gl, formatGltf, formatObj) before it mounts. Alias: <usa-three-scene>.",
|
|
4095
|
+
"description": "10.5: a WebGL2 3D viewer on Motionary’s own renderer — glTF 2.0 / GLB and OBJ / MTL models or built-in shapes, PBR-style materials, orbit controls (drag, wheel, pinch, arrow keys), auto-rotate and video textures. Requires motionary/runtime/gl (+ format-gltf for .gltf / .glb, format-obj for .obj, gltf-anim for glTF animation — 10.8) — npm i motionary, then use(gl, formatGltf, formatObj, gltfAnim) before it mounts. Alias: <usa-three-scene>.",
|
|
3818
4096
|
"category": "ui",
|
|
3819
4097
|
"since": "10.5",
|
|
3820
4098
|
"keywords": [
|
|
@@ -3844,7 +4122,9 @@
|
|
|
3844
4122
|
"auto-rotate",
|
|
3845
4123
|
"video",
|
|
3846
4124
|
"video-scrub",
|
|
3847
|
-
"label"
|
|
4125
|
+
"label",
|
|
4126
|
+
"animation",
|
|
4127
|
+
"animation-speed"
|
|
3848
4128
|
],
|
|
3849
4129
|
"events": [
|
|
3850
4130
|
"usa:error",
|
|
@@ -3856,31 +4136,48 @@
|
|
|
3856
4136
|
"reload"
|
|
3857
4137
|
],
|
|
3858
4138
|
"example": "<usa-gl-scene src=\"/models/chair.glb\" controls auto-rotate=\"20\" label=\"Chair\"></usa-gl-scene>",
|
|
3859
|
-
"esm": "import { use } from 'motionary/runtime';\nimport { gl } from 'motionary/runtime/gl';\nimport { formatGltf } from 'motionary/runtime/format-gltf';\nimport { formatObj } from 'motionary/runtime/format-obj';\n\nuse(gl, formatGltf, formatObj);\nimport { defineGlScene } from 'motionary/components/widgets';\n\ndefineGlScene(); // registers <usa-gl-scene>\n\n/* then use it in your HTML:\n<usa-gl-scene src=\"/models/chair.glb\" controls auto-rotate=\"20\" label=\"Chair\"></usa-gl-scene>\n*/",
|
|
4139
|
+
"esm": "import { use } from 'motionary/runtime';\nimport { gl } from 'motionary/runtime/gl';\nimport { formatGltf } from 'motionary/runtime/format-gltf';\nimport { formatObj } from 'motionary/runtime/format-obj';\nimport { gltfAnim } from 'motionary/runtime/gltf-anim';\n\nuse(gl, formatGltf, formatObj, gltfAnim);\nimport { defineGlScene } from 'motionary/components/widgets';\n\ndefineGlScene(); // registers <usa-gl-scene>\n\n/* then use it in your HTML:\n<usa-gl-scene src=\"/models/chair.glb\" controls auto-rotate=\"20\" label=\"Chair\"></usa-gl-scene>\n*/",
|
|
3860
4140
|
"requires": [
|
|
3861
4141
|
"gl",
|
|
3862
4142
|
"format-gltf",
|
|
3863
|
-
"format-obj"
|
|
4143
|
+
"format-obj",
|
|
4144
|
+
"gltf-anim"
|
|
3864
4145
|
],
|
|
3865
4146
|
"prerequisites": {
|
|
3866
|
-
"badge": "Requires: motionary/runtime/gl + motionary/runtime/format-gltf + motionary/runtime/format-obj",
|
|
4147
|
+
"badge": "Requires: motionary/runtime/gl + motionary/runtime/format-gltf + motionary/runtime/format-obj + motionary/runtime/gltf-anim",
|
|
3867
4148
|
"modules": [
|
|
3868
4149
|
"motionary/runtime/gl",
|
|
3869
4150
|
"motionary/runtime/format-gltf",
|
|
3870
|
-
"motionary/runtime/format-obj"
|
|
4151
|
+
"motionary/runtime/format-obj",
|
|
4152
|
+
"motionary/runtime/gltf-anim"
|
|
3871
4153
|
],
|
|
3872
4154
|
"install": "npm i motionary",
|
|
3873
|
-
"importAndRegister": "import { use } from 'motionary/runtime';\nimport { gl } from 'motionary/runtime/gl';\nimport { formatGltf } from 'motionary/runtime/format-gltf';\nimport { formatObj } from 'motionary/runtime/format-obj';\nimport { defineGlScene } from 'motionary/components/widgets';\n\nuse(gl, formatGltf, formatObj);\ndefineGlScene(); // registers <usa-gl-scene> — after the prerequisites",
|
|
3874
|
-
"order": "Register the core first, then the module: use(gl) also registers the core. CDN: load runtime.iife.js, then runtime/gl.iife.js (it registers itself). Register the core first, then the module: use(formatGltf) also registers the core. CDN: load runtime.iife.js, then runtime/format-gltf.iife.js (it registers itself). Register the core first, then the module: use(formatObj) also registers the core. CDN: load runtime.iife.js, then runtime/format-obj.iife.js (it registers itself).",
|
|
3875
|
-
"cdn": "<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/gl.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-gltf.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-obj.iife.js\"></script>\n<!-- then the component bundles -->\n<script src=\"https://unpkg.com/motionary@10/dist/components.umd.js\"></script>\n<script src=\"https://unpkg.com/motionary@10/dist/widgets.umd.js\"></script>",
|
|
4155
|
+
"importAndRegister": "import { use } from 'motionary/runtime';\nimport { gl } from 'motionary/runtime/gl';\nimport { formatGltf } from 'motionary/runtime/format-gltf';\nimport { formatObj } from 'motionary/runtime/format-obj';\nimport { gltfAnim } from 'motionary/runtime/gltf-anim';\nimport { defineGlScene } from 'motionary/components/widgets';\n\nuse(gl, formatGltf, formatObj, gltfAnim);\ndefineGlScene(); // registers <usa-gl-scene> — after the prerequisites",
|
|
4156
|
+
"order": "Register the core first, then the module: use(gl) also registers the core. CDN: load runtime.iife.js, then runtime/gl.iife.js (it registers itself). Register the core first, then the module: use(formatGltf) also registers the core. CDN: load runtime.iife.js, then runtime/format-gltf.iife.js (it registers itself). Register the core first, then the module: use(formatObj) also registers the core. CDN: load runtime.iife.js, then runtime/format-obj.iife.js (it registers itself). Register the core first, then the module: use(gltfAnim) also registers the core. CDN: load runtime.iife.js, then runtime/gltf-anim.iife.js (it registers itself).",
|
|
4157
|
+
"cdn": "<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/gl.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-gltf.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-obj.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/gltf-anim.iife.js\"></script>\n<!-- then the component bundles -->\n<script src=\"https://unpkg.com/motionary@10/dist/components.umd.js\"></script>\n<script src=\"https://unpkg.com/motionary@10/dist/widgets.umd.js\"></script>",
|
|
3876
4158
|
"example": "<usa-gl-scene src=\"/models/chair.glb\" controls auto-rotate=\"20\" label=\"Chair\"></usa-gl-scene>",
|
|
3877
4159
|
"docs": [
|
|
3878
4160
|
"https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/gl.md",
|
|
3879
4161
|
"https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-gltf.md",
|
|
3880
|
-
"https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-obj.md"
|
|
4162
|
+
"https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-obj.md",
|
|
4163
|
+
"https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/gltf-anim.md"
|
|
3881
4164
|
]
|
|
3882
4165
|
},
|
|
3883
|
-
"source": "src/components/widgets/gl-scene.ts"
|
|
4166
|
+
"source": "src/components/widgets/gl-scene.ts",
|
|
4167
|
+
"variants": [
|
|
4168
|
+
{
|
|
4169
|
+
"id": "gl-scene",
|
|
4170
|
+
"title": "3D scene (glTF / OBJ)",
|
|
4171
|
+
"description": "10.5: a WebGL2 3D viewer on Motionary’s own renderer — glTF 2.0 / GLB and OBJ / MTL models or built-in shapes, PBR-style materials, orbit controls (drag, wheel, pinch, arrow keys), auto-rotate and video textures. Requires motionary/runtime/gl (+ format-gltf for .gltf / .glb, format-obj for .obj, gltf-anim for glTF animation — 10.8) — npm i motionary, then use(gl, formatGltf, formatObj, gltfAnim) before it mounts. Alias: <usa-three-scene>.",
|
|
4172
|
+
"example": "<usa-gl-scene src=\"/models/chair.glb\" controls auto-rotate=\"20\" label=\"Chair\"></usa-gl-scene>"
|
|
4173
|
+
},
|
|
4174
|
+
{
|
|
4175
|
+
"id": "gl-skinned",
|
|
4176
|
+
"title": "3D animation (glTF skin + morph)",
|
|
4177
|
+
"description": "10.8: <usa-gl-scene animation> plays glTF animations — skeletal skinning (4 joints per vertex), morph targets and LINEAR / STEP / CUBICSPLINE channels — on Motionary’s own WebGL2 renderer. Pick a clip by name or index, set animation-speed; reduced motion shows the first pose. Requires motionary/runtime/gl + motionary/runtime/format-gltf + motionary/runtime/gltf-anim (+ format-obj for .obj models) — npm i motionary, then use(gl, formatGltf, formatObj, gltfAnim).",
|
|
4178
|
+
"example": "<usa-gl-scene src=\"/models/robot.glb\" animation=\"walk\" controls label=\"Walking robot\"></usa-gl-scene>"
|
|
4179
|
+
}
|
|
4180
|
+
]
|
|
3884
4181
|
},
|
|
3885
4182
|
{
|
|
3886
4183
|
"id": "glitch",
|
|
@@ -4847,7 +5144,21 @@
|
|
|
4847
5144
|
"https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/vector.md"
|
|
4848
5145
|
]
|
|
4849
5146
|
},
|
|
4850
|
-
"source": "src/components/widgets/lottie-player.ts"
|
|
5147
|
+
"source": "src/components/widgets/lottie-player.ts",
|
|
5148
|
+
"variants": [
|
|
5149
|
+
{
|
|
5150
|
+
"id": "lottie-player",
|
|
5151
|
+
"title": "Lottie player (JSON + dotLottie)",
|
|
5152
|
+
"description": "10.6: plays Lottie JSON and dotLottie (.lottie) files with Motionary’s own Canvas 2D renderer — shapes, gradients, trim paths, masks, track mattes, precomps and images; autoplay, loop, bounce, segments / markers, play on hover or scrub with scroll. Requires motionary/runtime/vector — npm i motionary, then use(vector) before it mounts.",
|
|
5153
|
+
"example": "<usa-lottie-player src=\"/anim/hero.lottie\" autoplay loop label=\"Hero animation\"></usa-lottie-player>"
|
|
5154
|
+
},
|
|
5155
|
+
{
|
|
5156
|
+
"id": "lottie-text",
|
|
5157
|
+
"title": "Lottie text + expressions",
|
|
5158
|
+
"description": "10.8: the Lottie player now draws text layers (fonts by family and style, justification, tracking, line height, fill and stroke, wrapping box text, source-text keyframes) and runs an expression subset — time, value, wiggle, loopOut / loopIn, linear / ease, Math — with its own interpreter (no eval, CSP-safe). Requires motionary/runtime/vector — npm i motionary, then use(vector).",
|
|
5159
|
+
"example": "<usa-lottie-player src=\"/anim/title.json\" autoplay loop label=\"Animated title\"></usa-lottie-player>"
|
|
5160
|
+
}
|
|
5161
|
+
]
|
|
4851
5162
|
},
|
|
4852
5163
|
{
|
|
4853
5164
|
"id": "lyrics",
|
|
@@ -5374,6 +5685,47 @@
|
|
|
5374
5685
|
"prerequisites": null,
|
|
5375
5686
|
"source": "src/components/widgets/motion-prefs.ts"
|
|
5376
5687
|
},
|
|
5688
|
+
{
|
|
5689
|
+
"id": "motion-prompt",
|
|
5690
|
+
"tag": "usa-motion-prompt",
|
|
5691
|
+
"title": "Motion prompt (text → motion)",
|
|
5692
|
+
"description": "10.7 (AI-assisted motion): describe a motion in English or Chinese and get a live preview plus ready code — Web Animations, CSS (with a reduced-motion guard) or a Motionary component. A small deterministic parser (motionary/components/ai), no model and no network; the same parser powers suggest_motion in motionary-mcp 2.0.",
|
|
5693
|
+
"category": "ui",
|
|
5694
|
+
"since": "10.7",
|
|
5695
|
+
"keywords": [
|
|
5696
|
+
"ai",
|
|
5697
|
+
"natural language",
|
|
5698
|
+
"prompt",
|
|
5699
|
+
"motion spec",
|
|
5700
|
+
"code generator",
|
|
5701
|
+
"mcp"
|
|
5702
|
+
],
|
|
5703
|
+
"import": {
|
|
5704
|
+
"path": "motionary/components/widgets",
|
|
5705
|
+
"define": "defineMotionPrompt",
|
|
5706
|
+
"register": "defineMotionPrompt();"
|
|
5707
|
+
},
|
|
5708
|
+
"cdn": "https://unpkg.com/motionary@10/dist/widgets.umd.js",
|
|
5709
|
+
"attributes": [
|
|
5710
|
+
"value",
|
|
5711
|
+
"format",
|
|
5712
|
+
"placeholder",
|
|
5713
|
+
"label"
|
|
5714
|
+
],
|
|
5715
|
+
"events": [
|
|
5716
|
+
"usa:suggest",
|
|
5717
|
+
"usa:copy"
|
|
5718
|
+
],
|
|
5719
|
+
"slots": [],
|
|
5720
|
+
"methods": [
|
|
5721
|
+
"suggest"
|
|
5722
|
+
],
|
|
5723
|
+
"example": "<usa-motion-prompt value=\"fade the cards up slowly, one after another\"></usa-motion-prompt>",
|
|
5724
|
+
"esm": "import { defineMotionPrompt } from 'motionary/components/widgets';\n\ndefineMotionPrompt(); // registers <usa-motion-prompt>\n\n/* then use it in your HTML:\n<usa-motion-prompt value=\"fade the cards up slowly, one after another\"></usa-motion-prompt>\n*/",
|
|
5725
|
+
"requires": [],
|
|
5726
|
+
"prerequisites": null,
|
|
5727
|
+
"source": "src/components/widgets/motion-prompt.ts"
|
|
5728
|
+
},
|
|
5377
5729
|
{
|
|
5378
5730
|
"id": "motion-spec",
|
|
5379
5731
|
"tag": "usa-motion-spec",
|
|
@@ -6089,6 +6441,71 @@
|
|
|
6089
6441
|
"prerequisites": null,
|
|
6090
6442
|
"source": "src/components/widgets/perf-monitor.ts"
|
|
6091
6443
|
},
|
|
6444
|
+
{
|
|
6445
|
+
"id": "physics-playground",
|
|
6446
|
+
"tag": "usa-physics-playground",
|
|
6447
|
+
"title": "Physics playground",
|
|
6448
|
+
"description": "10.7: a 2D rigid-body sandbox on Motionary’s own physics engine — circles, boxes and polygons, friction, restitution, constraints, sleeping — loaded from a versioned motionary-scene@1 JSON (or a preset: balls, pyramid, pendulum, dominoes). Drag bodies, tap to spawn, arrow keys nudge. Requires motionary/runtime/physics + motionary/runtime/format-scene — npm i motionary, then use(physics, formatScene) before it mounts.",
|
|
6449
|
+
"category": "ui",
|
|
6450
|
+
"since": "10.7",
|
|
6451
|
+
"keywords": [
|
|
6452
|
+
"physics",
|
|
6453
|
+
"rigid body",
|
|
6454
|
+
"gravity",
|
|
6455
|
+
"collision",
|
|
6456
|
+
"scene json",
|
|
6457
|
+
"runtime"
|
|
6458
|
+
],
|
|
6459
|
+
"import": {
|
|
6460
|
+
"path": "motionary/components/widgets",
|
|
6461
|
+
"define": "definePhysicsPlayground",
|
|
6462
|
+
"register": "definePhysicsPlayground();"
|
|
6463
|
+
},
|
|
6464
|
+
"cdn": "https://unpkg.com/motionary@10/dist/widgets.umd.js",
|
|
6465
|
+
"attributes": [
|
|
6466
|
+
"preset",
|
|
6467
|
+
"src",
|
|
6468
|
+
"gravity",
|
|
6469
|
+
"spawn",
|
|
6470
|
+
"label"
|
|
6471
|
+
],
|
|
6472
|
+
"events": [
|
|
6473
|
+
"usa:collision",
|
|
6474
|
+
"usa:load",
|
|
6475
|
+
"usa:error",
|
|
6476
|
+
"usa:runtime-missing"
|
|
6477
|
+
],
|
|
6478
|
+
"slots": [],
|
|
6479
|
+
"methods": [
|
|
6480
|
+
"reset",
|
|
6481
|
+
"play",
|
|
6482
|
+
"pause",
|
|
6483
|
+
"toScene"
|
|
6484
|
+
],
|
|
6485
|
+
"example": "<usa-physics-playground preset=\"pyramid\" spawn label=\"Knock the pyramid over\"></usa-physics-playground>",
|
|
6486
|
+
"esm": "import { use } from 'motionary/runtime';\nimport { physics } from 'motionary/runtime/physics';\nimport { formatScene } from 'motionary/runtime/format-scene';\n\nuse(physics, formatScene);\nimport { definePhysicsPlayground } from 'motionary/components/widgets';\n\ndefinePhysicsPlayground(); // registers <usa-physics-playground>\n\n/* then use it in your HTML:\n<usa-physics-playground preset=\"pyramid\" spawn label=\"Knock the pyramid over\"></usa-physics-playground>\n*/",
|
|
6487
|
+
"requires": [
|
|
6488
|
+
"physics",
|
|
6489
|
+
"format-scene"
|
|
6490
|
+
],
|
|
6491
|
+
"prerequisites": {
|
|
6492
|
+
"badge": "Requires: motionary/runtime/physics + motionary/runtime/format-scene",
|
|
6493
|
+
"modules": [
|
|
6494
|
+
"motionary/runtime/physics",
|
|
6495
|
+
"motionary/runtime/format-scene"
|
|
6496
|
+
],
|
|
6497
|
+
"install": "npm i motionary",
|
|
6498
|
+
"importAndRegister": "import { use } from 'motionary/runtime';\nimport { physics } from 'motionary/runtime/physics';\nimport { formatScene } from 'motionary/runtime/format-scene';\nimport { definePhysicsPlayground } from 'motionary/components/widgets';\n\nuse(physics, formatScene);\ndefinePhysicsPlayground(); // registers <usa-physics-playground> — after the prerequisites",
|
|
6499
|
+
"order": "Register the core first, then the module: use(physics) also registers the core. CDN: load runtime.iife.js, then runtime/physics.iife.js (it registers itself). Register the core first, then the module: use(formatScene) also registers the core. CDN: load runtime.iife.js, then runtime/format-scene.iife.js (it registers itself).",
|
|
6500
|
+
"cdn": "<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/physics.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-scene.iife.js\"></script>\n<!-- then the component bundles -->\n<script src=\"https://unpkg.com/motionary@10/dist/components.umd.js\"></script>\n<script src=\"https://unpkg.com/motionary@10/dist/widgets.umd.js\"></script>",
|
|
6501
|
+
"example": "<usa-physics-playground preset=\"pyramid\" spawn label=\"Knock the pyramid over\"></usa-physics-playground>",
|
|
6502
|
+
"docs": [
|
|
6503
|
+
"https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/physics.md",
|
|
6504
|
+
"https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-scene.md"
|
|
6505
|
+
]
|
|
6506
|
+
},
|
|
6507
|
+
"source": "src/components/widgets/physics-playground.ts"
|
|
6508
|
+
},
|
|
6092
6509
|
{
|
|
6093
6510
|
"id": "pinch-zoom",
|
|
6094
6511
|
"tag": "usa-pinch-zoom",
|
|
@@ -7640,6 +8057,67 @@
|
|
|
7640
8057
|
},
|
|
7641
8058
|
"source": "src/components/widgets/smooth-scroll.ts"
|
|
7642
8059
|
},
|
|
8060
|
+
{
|
|
8061
|
+
"id": "snap-carousel",
|
|
8062
|
+
"tag": "usa-snap-carousel",
|
|
8063
|
+
"title": "Snap carousel (drag · inertia · snap)",
|
|
8064
|
+
"description": "10.8: drag or swipe with real inertia — a throw keeps gliding, then springs to the nearest slide (a quick flick always moves one); rubber-band edges, arrows, dots, ←/→ / Home / End, optional autoplay that pauses on hover, focus and off screen. Slides keep their own width so the next one peeks in. Requires motionary/runtime/drag-snap — npm i motionary, then use(dragSnap) before it mounts. Its own entry point: motionary/components/snap-carousel (not in the widgets / lite bundles).",
|
|
8065
|
+
"category": "ui",
|
|
8066
|
+
"since": "10.8",
|
|
8067
|
+
"keywords": [
|
|
8068
|
+
"carousel",
|
|
8069
|
+
"slider",
|
|
8070
|
+
"drag",
|
|
8071
|
+
"inertia",
|
|
8072
|
+
"snap",
|
|
8073
|
+
"swipe",
|
|
8074
|
+
"runtime"
|
|
8075
|
+
],
|
|
8076
|
+
"import": {
|
|
8077
|
+
"path": "motionary/components/snap-carousel",
|
|
8078
|
+
"define": "defineSnapCarousel",
|
|
8079
|
+
"register": "defineSnapCarousel();"
|
|
8080
|
+
},
|
|
8081
|
+
"cdn": "https://unpkg.com/motionary@10/dist/components.umd.js",
|
|
8082
|
+
"attributes": [
|
|
8083
|
+
"align",
|
|
8084
|
+
"gap",
|
|
8085
|
+
"autoplay",
|
|
8086
|
+
"no-controls",
|
|
8087
|
+
"no-dots",
|
|
8088
|
+
"label"
|
|
8089
|
+
],
|
|
8090
|
+
"events": [
|
|
8091
|
+
"usa:change",
|
|
8092
|
+
"usa:runtime-missing"
|
|
8093
|
+
],
|
|
8094
|
+
"slots": [],
|
|
8095
|
+
"methods": [
|
|
8096
|
+
"next",
|
|
8097
|
+
"prev",
|
|
8098
|
+
"goTo"
|
|
8099
|
+
],
|
|
8100
|
+
"example": "<usa-snap-carousel align=\"center\" gap=\"16\" label=\"Featured\">\n <article>…</article>\n <article>…</article>\n <article>…</article>\n</usa-snap-carousel>",
|
|
8101
|
+
"esm": "import { use } from 'motionary/runtime';\nimport { dragSnap } from 'motionary/runtime/drag-snap';\n\nuse(dragSnap);\nimport { defineSnapCarousel } from 'motionary/components/snap-carousel';\n\ndefineSnapCarousel(); // registers <usa-snap-carousel>\n\n/* then use it in your HTML:\n<usa-snap-carousel align=\"center\" gap=\"16\" label=\"Featured\">\n <article>…</article>\n <article>…</article>\n <article>…</article>\n</usa-snap-carousel>\n*/",
|
|
8102
|
+
"requires": [
|
|
8103
|
+
"drag-snap"
|
|
8104
|
+
],
|
|
8105
|
+
"prerequisites": {
|
|
8106
|
+
"badge": "Requires: motionary/runtime/drag-snap",
|
|
8107
|
+
"modules": [
|
|
8108
|
+
"motionary/runtime/drag-snap"
|
|
8109
|
+
],
|
|
8110
|
+
"install": "npm i motionary",
|
|
8111
|
+
"importAndRegister": "import { use } from 'motionary/runtime';\nimport { dragSnap } from 'motionary/runtime/drag-snap';\nimport { defineSnapCarousel } from 'motionary/components/snap-carousel';\n\nuse(dragSnap);\ndefineSnapCarousel(); // registers <usa-snap-carousel> — after the prerequisites",
|
|
8112
|
+
"order": "Register the core first, then the module: use(dragSnap) also registers the core. CDN: load runtime.iife.js, then runtime/drag-snap.iife.js (it registers itself).",
|
|
8113
|
+
"cdn": "<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/drag-snap.iife.js\"></script>\n<!-- then the component bundles -->\n<script src=\"https://unpkg.com/motionary@10/dist/components.umd.js\"></script>\n<script src=\"https://unpkg.com/motionary@10/dist/widgets.umd.js\"></script>",
|
|
8114
|
+
"example": "<usa-snap-carousel align=\"center\" gap=\"16\" label=\"Featured\">\n <article>…</article>\n <article>…</article>\n <article>…</article>\n</usa-snap-carousel>",
|
|
8115
|
+
"docs": [
|
|
8116
|
+
"https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/drag-snap.md"
|
|
8117
|
+
]
|
|
8118
|
+
},
|
|
8119
|
+
"source": "src/components/widgets/snap-carousel.ts"
|
|
8120
|
+
},
|
|
7643
8121
|
{
|
|
7644
8122
|
"id": "sparkline",
|
|
7645
8123
|
"tag": "usa-sparkline",
|