@realsee/five 6.8.0-alpha.26 → 6.8.0-alpha.28

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 (44) hide show
  1. package/ai_guides/features/event.md +12 -7
  2. package/ai_guides/features/load-external-model.md +1 -0
  3. package/ai_guides/release_notes/6.8.md +1 -1
  4. package/docs/classes/five.Five.html +17 -17
  5. package/docs/documents/features_event.html +5 -2
  6. package/docs/documents/features_load-external-model.html +1 -0
  7. package/docs/documents/release_notes_6.8.html +1 -1
  8. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +9 -9
  9. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +8 -8
  10. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +8 -8
  11. package/five/index.js +67 -67
  12. package/five/index.mjs +1930 -1812
  13. package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting.d.ts +19 -0
  14. package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +3 -1
  15. package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz_2.d.ts +11 -0
  16. package/five/model/loaders/glTF-helpers/index.d.ts +2 -0
  17. package/gltf-loader/index.js +2 -2
  18. package/gltf-loader/index.mjs +2 -2
  19. package/line/index.js +2 -2
  20. package/line/index.mjs +2 -2
  21. package/package.json +1 -1
  22. package/plugins/index.js +1 -1
  23. package/plugins/index.mjs +1 -1
  24. package/react/index.js +1 -1
  25. package/react/index.mjs +1 -1
  26. package/shader-lib/index.js +1 -1
  27. package/shader-lib/index.mjs +1 -1
  28. package/sticker/index.js +2 -2
  29. package/sticker/index.mjs +2 -2
  30. package/umd/five-gltf-loader.js +2 -2
  31. package/umd/five-line.js +2 -2
  32. package/umd/five-plugins.js +1 -1
  33. package/umd/five-react.js +1 -1
  34. package/umd/five-shader-lib.js +1 -1
  35. package/umd/five-sticker.js +2 -2
  36. package/umd/five-vfx.js +1 -1
  37. package/umd/five-vue.js +1 -1
  38. package/umd/five.js +12 -12
  39. package/vfx/index.js +1 -1
  40. package/vfx/index.mjs +1 -1
  41. package/vue/index.js +1 -1
  42. package/vue/index.mjs +1 -1
  43. package/work-downloader/index.js +1 -1
  44. package/work-downloader/index.mjs +1 -1
@@ -131,15 +131,20 @@ five.on("pano.prepare", (event) => {
131
131
  );
132
132
  });
133
133
 
134
- // 示例:结合 preventDefault waitUntil 实现条件拦截
135
- five.on("pano.prepare", async (event) => {
136
- const allowed = await checkPermission(event.pano);
137
- if (!allowed) {
138
- event.preventDefault();
139
- }
134
+ // 示例:通过 waitUntil reject 来取消走点
135
+ five.on("pano.prepare", (event) => {
136
+ event.waitUntil(
137
+ showConfirmDialog("是否前往该点位?").then((confirmed) => {
138
+ if (!confirmed) {
139
+ throw new Error("用户取消走点");
140
+ }
141
+ })
142
+ );
140
143
  });
141
144
  ```
142
145
 
146
+ > **注意**: `preventDefault` 和 `waitUntil` 必须在事件回调的同步执行阶段调用,不能放在 `await` 之后。
147
+
143
148
  ## Concepts
144
149
 
145
150
  Five 的事件系统将事件主要分为以下几类:
@@ -158,7 +163,7 @@ Five 的事件系统将事件主要分为以下几类:
158
163
  ### Pano Events (全景导航)
159
164
  监听全景图的点位切换过程。
160
165
 
161
- - `pano.prepare`: 准备切换到新点位。这是一个 `ExtendableEvent`,支持通过 `waitUntil(promise)` 延迟后续加载流程(如预加载资源)。
166
+ - `pano.prepare`: 准备切换到新点位。这是一个 `ExtendableEvent`,支持通过 `waitUntil(promise)` 延迟后续加载流程(如预加载资源),以及通过 `preventDefault()` 取消本次走点。
162
167
  - `pano.arrived`: 成功到达新点位(移动动画结束)。
163
168
  - `pano.moving`: 正在移动到新点位(动画进行中)。
164
169
  - `pano.willChange`: 即将发生点位变更(旧版兼容)。
@@ -80,6 +80,7 @@ Five 使用 **Z-up** (Z 轴向上) 的右手坐标系。
80
80
  * `REALSEE_materials_lightmap`
81
81
  * `KHR_gaussian_splatting`
82
82
  * `KHR_gaussian_splatting_compression_spz`
83
+ * `KHR_gaussian_splatting_compression_spz_2`
83
84
 
84
85
  | 参数 | 类型 | 默认值 | 说明 |
85
86
  | --- | --- | --- | --- |
@@ -12,7 +12,7 @@ npm install @realsee/five@6.8
12
12
  ### 文件格式支持
13
13
  1. `.splat` 文档及工具 [GitHub - antimatter15/splat: WebGL 3D Gaussian Splat Viewer](https://github.com/antimatter15/splat)
14
14
  2. `.spz` 文档及工具 GitHub - [nianticlabs/spz: File format for 3D Gaussian splats. About 10x smaller than the PLY equival](https://github.com/nianticlabs/spz)
15
- 3. `.glb` `.gltf` 对应的 KHR_gaussian_splatting_compression_spz 扩展。
15
+ 3. `.glb` `.gltf` 对应的 KHR_gaussian_splatting, KHR_gaussian_splatting_compression_spz, KHR_gaussian_splatting_compression_spz_2 扩展。
16
16
 
17
17
  ### 支持 3d-tile
18
18
  > 通过 3d-tile 标准,使用 glb 作为模型格式。