motionary 8.7.0 → 8.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/CHANGELOG.md +12 -0
- package/dist/components/fx-spatial.cjs +100 -0
- package/dist/components/fx-spatial.cjs.map +1 -0
- package/dist/components/fx-spatial.d.cts +68 -0
- package/dist/components/fx-spatial.d.ts +68 -0
- package/dist/components/fx-spatial.js +95 -0
- package/dist/components/fx-spatial.js.map +1 -0
- package/dist/components/fx2.cjs +7 -0
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +25 -1
- package/dist/components/fx2.d.ts +25 -1
- package/dist/components/fx2.js +5 -1
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/widgets.cjs +331 -153
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +33 -2
- package/dist/components/widgets.d.ts +33 -2
- package/dist/components/widgets.js +330 -154
- package/dist/components/widgets.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +1 -1
- package/docs/components.md +23 -0
- package/package.json +21 -1
package/docs/ROADMAP.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- ✅ **v8.5** — 纸张与手绘:折纸、铅笔素描、水彩晕染;新组件 便利贴墙、手绘图表。
|
|
10
10
|
- ✅ **v8.6** — 霓虹 / 玻璃 / 新拟态主题系统;新组件 主题切换器。
|
|
11
11
|
- ✅ **v8.7** — 手势 3.0:多点触控、陀螺仪;新组件 陀螺仪 3D 卡片。
|
|
12
|
-
- **v8.8** — XR / 空间界面:WebXR 预览、空间卡片;新组件 全景查看器。
|
|
12
|
+
- ✅ **v8.8** — XR / 空间界面:WebXR 预览、空间卡片;新组件 全景查看器。
|
|
13
13
|
- **v8.9** — 9.0 预备:9.0 弃用警告、`upgrading-9.md` 与 `usa-codemod-9`;低代码组件导出。
|
|
14
14
|
- **v9.0** — 声明式动效 DSL(用一段文本描述完整动效)、插件市场正式版;移除 8.9 弃用项;npm `latest`。
|
|
15
15
|
|
package/docs/components.md
CHANGED
|
@@ -1108,6 +1108,29 @@ sticker.addEventListener('usa:transform', (e) => save(e.detail)); // { x, y, sca
|
|
|
1108
1108
|
- `<usa-gesture-sticker min max label>`: `x`, `y`, `scale`, `angle`, `transformTo(state)`, `reset()`; `usa:transform`.
|
|
1109
1109
|
- Gesture: `swipe-hint` (`direction`) · `pinch-hint` · `tilt-wobble` · `depth-in` (`stagger`, `data-depth`); `pinchScale`, `pinchAngle`, `orientationToTilt(beta, gamma, max?, rest?)`.
|
|
1110
1110
|
|
|
1111
|
+
### v8.8 XR / spatial: 360° panorama, spatial card (`components/widgets`) + spatial pack (`motionary/fx/spatial`)
|
|
1112
|
+
|
|
1113
|
+
```html
|
|
1114
|
+
<usa-panorama src="pano-equirect.jpg" label="Lake at dawn" autorotate="6"></usa-panorama>
|
|
1115
|
+
<usa-spatial-card>
|
|
1116
|
+
<h3 data-depth="2">Photos</h3><p data-depth="1">Spatial window</p>
|
|
1117
|
+
<nav slot="ornament"><button>⟲</button><button>♡</button></nav>
|
|
1118
|
+
</usa-spatial-card>
|
|
1119
|
+
|
|
1120
|
+
<usa-fx effect="portal-open" trigger="enter"><img src="world.jpg" alt=""></usa-fx>
|
|
1121
|
+
<usa-fx effect="spatial-float" trigger="loop"><div class="window">…</div></usa-fx>
|
|
1122
|
+
```
|
|
1123
|
+
```js
|
|
1124
|
+
import { defineWidgets } from 'motionary/components/widgets';
|
|
1125
|
+
import { registerSpatialPack, xrSupport } from 'motionary/fx/spatial';
|
|
1126
|
+
defineWidgets(); registerSpatialPack();
|
|
1127
|
+
if ((await xrSupport()) === 'immersive-vr') enterVR();
|
|
1128
|
+
pano.addEventListener('usa:look', (e) => console.log(e.detail.yaw));
|
|
1129
|
+
```
|
|
1130
|
+
- `<usa-panorama src autorotate label>`: `yaw`, `lookAt(deg)`; `usa:look`, `usa:xr`, `usa:xr-request`.
|
|
1131
|
+
- `<usa-spatial-card>`: `active`; `usa:focus-depth`.
|
|
1132
|
+
- Spatial: `portal-open` (`color`) · `orbit-in` (`from`) · `spatial-float` · `depth-pop`; `yawToOffset(yaw, width)`, `xrSupport()`.
|
|
1133
|
+
|
|
1111
1134
|
## Frameworks
|
|
1112
1135
|
|
|
1113
1136
|
Custom elements work in every framework. Register once (e.g. in your entry file), then use the tags.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motionary",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.8.0",
|
|
4
4
|
"description": "Motionary (formerly use-scroll-animate): dependency-free scroll animations + 94 animated Web Components — 214 scroll-reveal presets, card/click/button morphs, physics, page transitions, generative & sound-reactive backgrounds, cursor/gesture effects, themes, micro-interactions, <usa-player>, WebGL. React, Vue, Svelte, Solid, Angular or plain HTML.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -358,6 +358,16 @@
|
|
|
358
358
|
"default": "./dist/components/fx-gesture.cjs"
|
|
359
359
|
}
|
|
360
360
|
},
|
|
361
|
+
"./fx/spatial": {
|
|
362
|
+
"import": {
|
|
363
|
+
"types": "./dist/components/fx-spatial.d.ts",
|
|
364
|
+
"default": "./dist/components/fx-spatial.js"
|
|
365
|
+
},
|
|
366
|
+
"require": {
|
|
367
|
+
"types": "./dist/components/fx-spatial.d.cts",
|
|
368
|
+
"default": "./dist/components/fx-spatial.cjs"
|
|
369
|
+
}
|
|
370
|
+
},
|
|
361
371
|
"./components/reveal": {
|
|
362
372
|
"import": {
|
|
363
373
|
"types": "./dist/components/reveal.d.ts",
|
|
@@ -948,6 +958,16 @@
|
|
|
948
958
|
"default": "./dist/components/fx-gesture.cjs"
|
|
949
959
|
}
|
|
950
960
|
},
|
|
961
|
+
"./components/fx-spatial": {
|
|
962
|
+
"import": {
|
|
963
|
+
"types": "./dist/components/fx-spatial.d.ts",
|
|
964
|
+
"default": "./dist/components/fx-spatial.js"
|
|
965
|
+
},
|
|
966
|
+
"require": {
|
|
967
|
+
"types": "./dist/components/fx-spatial.d.cts",
|
|
968
|
+
"default": "./dist/components/fx-spatial.cjs"
|
|
969
|
+
}
|
|
970
|
+
},
|
|
951
971
|
"./components/lite": {
|
|
952
972
|
"import": {
|
|
953
973
|
"types": "./dist/components/lite.d.ts",
|