@nebula-spatial/viewer 0.6.0 → 0.6.1

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 CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  All notable changes to this package are documented in this file.
4
4
 
5
+ ## 0.6.1
6
+
7
+ ### Added
8
+
9
+ - 新增 `ViewerOptions.previewCameraDampingFactor` 与可实时赋值的 `viewer.previewCameraDampingFactor`,允许消费方调整预览相机阻尼;传入 `null` 时恢复当前拖拽预设默认值。
10
+ - OpenUSD viewer 通过独立 typed-array stream 显示普通 `UsdGeomPoints`,支持位置、vertex `displayColor` 和 constant width,并沿用 prim 层级的 TRS、visibility、purpose、bounds、picking 与资源释放;点云不会进入 mesh、Gaussian 或 collision 路径。
11
+ - Viewer 新增 `UsdVol.ParticleField3DGaussianSplat` 消费链路,支持 positions、scales、orientations、opacities、SH degree/coefficients、prim TRS、visibility 与 purpose,并通过 Spark 显示为 visual-only splat。
12
+ - OpenUSD Probe 升级到 `apiVersion` 7 和 `runtimeId` `868b234d991a15dc6e48`,新增 Gaussian typed-buffer stream 与 `worldMatrix` 读取。
13
+
14
+ ### Fixed
15
+
16
+ - 修正 Gaussian SPZ 被错误默认成 Y-up 导致的模型上下倒转;SPZ 现在与其他 3DGS 来源统一按 Y-down 转换,Studio intake 与 USD 导出一致使用同一约定。
17
+
18
+ ### Behavior notes
19
+
20
+ - `previewCameraDampingFactor` 是可选配置;省略时保持当前拖拽预设默认值,传 `null` 会恢复该默认值。
21
+ - USD Points、Gaussian splat 与 SPZ 在本版本中只进入视觉渲染链路,不改变碰撞或物理事实。
22
+ - 包内 OpenUSD Probe 使用 API 7。自行托管 CDN 或固定运行时的消费方必须同步更新 JS、WASM 与
23
+ `openusd-runtime-manifest.json`,不能混用旧版本文件。
24
+
5
25
  ## 0.6.0
6
26
 
7
27
  ### Added
package/README.md CHANGED
@@ -250,6 +250,9 @@ URDF/XACRO/MJCF 规范即 Z-up,USD 在加载时已按 stage 声明的 up 轴
250
250
  模型与仿真预览的鼠标拖拽映射由 `previewDragPreset` 决定,默认 `left-rotate`(左键旋转、右键平移、
251
251
  中键缩放),`left-pan` 保留 sim-studio 的左键平移、右键旋转映射。运行期可用
252
252
  `viewer.setPreviewDragPreset('left-rotate' | 'left-pan')` 切换。
253
+ `previewCameraDampingFactor` 可覆盖预览 OrbitControls 的阻尼系数,取值范围为 `(0, 1]`;创建时可传给
254
+ Viewer,运行期可直接赋值 `viewer.previewCameraDampingFactor = 0.25` 实时生效。设置为 `null` 时恢复当前
255
+ 拖拽预设的内置默认值。
253
256
 
254
257
  Viewer 包携带与当前 Three.js 版本匹配的 OpenUSD、Basis 和 Draco runtime。Vite 消费方接入
255
258
  `viewerRuntimeAssets()` 插件后,开发服务器和正式构建会自动提供稳定文件名的 `basis/` 与
@@ -270,6 +273,8 @@ export default defineConfig({
270
273
 
271
274
  URDF 和 MJCF 以 MuJoCo WASM 运行,仍由 Viewer 唯一的 scene/runtime/RAF 驱动。多文件模型请传
272
275
  `{ kind: 'files', files, entry }`;`entry` 是包内 URDF 或 MJCF XML 路径。USD 会加载视觉与可可靠映射的物理数据,远端 URL 会以根 USD 文件的完整 URL 作为相对子层、纹理和其他资源的解析基址。
276
+ 普通 `UsdGeomPoints` 由 OpenUSD Probe 独立 stream 为 typed arrays,再创建 Three.js `Points`;支持 authored positions、normals、intensity、constant `widths`、constant/vertex `displayColor` 与 `displayOpacity`。颜色和 opacity 映射到 point material;normals/intensity 保留为 `BufferGeometry` attributes,不用于默认点材质的光照/着色。点云沿 USD prim hierarchy 继承 TRS、visibility 和 purpose,并进入 fit bounds 与 Raycaster 拾取,但不会写入 mesh geometry 或物理 collider。当前 Viewer 不接受变化的 per-point widths,也不将 Gaussian schema 降级为普通点云。
277
+ `UsdVol.ParticleField3DGaussianSplat` 同样由 OpenUSD Probe 独立 stream。Viewer 读取 float32 positions、线性 scales、quatf orientations、opacities、SH degree 与 coefficient-major 系数,生成 Spark `SplatMesh` 并挂回 authored USD prim。Gaussian 继承 prim TRS、stage 单位与 up 轴、visibility 和 purpose,进入相机 fit bounds 与反射通道,但保持 visual-only,不创建 mesh、collider 或 rigid body。
273
278
  当前明确支持动态刚体以及树形拓扑的 `PhysicsFixedJoint`、`PhysicsRevoluteJoint`、`PhysicsPrismaticJoint`,包括局部锚点、轴向、有限/无限限位、零宽锁定限位和 force drive;这些资产会启用 play/pause/reset、碰撞代理和拖拽施力。闭环/多父关节、其他关节类型或无法保持物理语义的属性不会被静默编译成错误仿真:当 OpenUSD 已成功构建完整视觉场景、物理编译或 MuJoCo 初始化失败时,会显式降级为仅视觉预览,禁用播放、复位和拖拽,并报告降级原因;碰撞代理是否可用取决于源格式碰撞定义能否独立构建。物理准备边界之外的网络请求、USD/视觉解析、安全上下文、单位校验等错误仍按加载失败处理;取消操作不作为物理降级。没有刚体的 USD 仍作为正常的静态视觉资产预览,不显示降级警告。
274
279
 
275
280
  ```ts
@@ -1,7 +1,7 @@
1
1
  var ot = Object.defineProperty;
2
2
  var at = (e, t, n) => t in e ? ot(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var j = (e, t, n) => at(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { F as lt, G as T, H as Q, I as ct, J as ut, K as ft, U as dt, s as ht } from "./index-DoxM1Msk.js";
4
+ import { F as lt, G as T, H as Q, I as ct, J as ut, K as ft, U as dt, s as ht } from "./index-CHf9y9eX.js";
5
5
  import { Vector3 as Z } from "three";
6
6
  const mt = /* @__PURE__ */ new Set([
7
7
  "E_MJCF_INCLUDE_CYCLE",
@@ -312,6 +312,8 @@ export interface NormalizedAssetSource {
312
312
  readonly url?: string;
313
313
  readonly canonicalPath?: string;
314
314
  } | AbortSignal): Promise<string>;
315
+ /** Resolves an archive member without remote I/O, for loaders with synchronous URL hooks. */
316
+ resolveSync?(path: string): string | null;
315
317
  release(): void;
316
318
  }
317
319
  export interface AssetDetectionResult {