更新记录

0.0.2(2026-08-17)

  • 新增 Android(Filament):.glb / .gltf
  • 新增 Web(Three.js):.glb / .gltf,OrbitControls 旋转缩放
  • API 对齐:src / autoRotate / backgroundColor / resetCamera() / load / error

0.0.1(2026-08-15)

该插件只支持 iOS(SceneKit)原生格式 .usdz .usd .usdc .scn .dae .obj 不支持 .glb / .gltf(会报 Unsupported iOS native model format,需转成 .usdz)。来源支持三种:远程 HTTPS 链接、本地绝对路径、static/... 路径


平台兼容性

uni-app x(5.24)

Chrome Safari Android iOS iOS插件版本 鸿蒙 微信小程序
√ √ 7.0 15 0.0.1 - √

其他

多语言 暗黑模式 宽屏模式 蒸汽模式
× × × √

tan-3d-viewer

uni-app x 蒸汽模式 3D 产品查看器(UTS 标准组件)。

平台 引擎 推荐格式
Android Filament ModelViewer + native-view .glb / .gltf
iOS SceneKit + native-view .usdz 等
Web Three.js + OrbitControls .glb / .gltf

Usage

<tan-3d-viewer
  class="viewer"
  :src="modelSrc"
  :auto-rotate="true"
  background-color="#EEF1F4"
  @load="onLoad"
  @error="onError"
/>
.viewer {
  width: 100%;
  height: 900rpx;
}

Model sources

  • Remote HTTPS URL
  • Absolute filesystem path(App)
  • Project static/... path(如 /static/product.glb)

Props / Methods

  • src / autoRotate / backgroundColor
  • resetCamera()

Platform notes

Web

  1. 进入 uni_modules/tan-3d-viewer/utssdk/web 执行 npm install
  2. HBuilderX 运行到浏览器
  3. 格式:.glb / .gltf(不支持 .usdz)

Android

  • 依赖 Filament(见 utssdk/app-android/config.json)
  • 首次需自定义调试基座

iOS

  • SceneKit:.usdz / .usd / .usdc / .scn / .dae / .obj
  • 不支持 .glb / .gltf

隐私、权限声明

1. 本插件需要申请的系统权限列表:

No

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

This plugin does not collect user data.

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

No