需要 Node.js v22.22 及以上版本;本地加载模型需在模型目录运行 npx server --cors 关闭 CORS;开发服务默认端口为 3000
model-viewer
playcanvasMIT活跃维护基于 PlayCanvas 的网页端 3D 模型查看器,支持加载 glTF 模型和 3D Gaussian Splatting 场景,方便在浏览器里直接预览和调试三维资产。
3D Model Viewer supporting glTF and 3D Gaussian Splats
npm install
npm run build
npm run serveREADME 未说明硬件要求;浏览器端运行,需支持 WebGL 的现代浏览器
PlayCanvas 出品的 glTF 场景查看器,兼容 glTF 2.0 规范,可快速预览模型
基于 PlayCanvas 的网页端 3D 模型查看器,支持加载 glTF 模型和 3D Gaussian Splatting 场景,方便在浏览器里直接预览和调试三维资产。
核心能力
- 完整支持 glTF 2.0 规范,可加载任意 glTF 场景
- 支持拖拽 GLB 或 glTF 文件夹直接预览
- 支持拖入 HDR、PNG、JPG 图片设置环境背景
- 支持 URL 参数指定模型地址与初始相机位置
- 基于 PlayCanvas Engine 渲染,构建产物输出到 dist
容易踩的坑
- v5.10.0最新正式版2026-06-16 · 2026-06-16 10:36 UTC
What's Changed
- Update all npm dependencies by @renovate[bot] in https://github.com/playcanvas/model-viewer/pull/380
- Update all npm dependencies by @renovate[bot] in https://github.com/playcanvas/model-viewer/pull/382
- Use engine picker. by @slimbuck in https://github.com/playcanvas/model-viewer/pull/383
Full Changelog: https://github.com/playcanvas/model-viewer/compare/v5.9.0...v5.10.0
- v5.9.02026-02-16 · 2026-02-16 10:31 UTC
这个版本没有写更新说明。
- v5.8.12026-01-21 · 2026-01-21 07:59 UTC
查看更新说明
What's Changed
- chore(deps): update all npm dependencies by @renovate[bot] in https://github.com/playcanvas/model-viewer/pull/373
- chore(deps): update dependency globals to v17 by @renovate[bot] in https://github.com/playcanvas/model-viewer/pull/375
Full Changelog: https://github.com/playcanvas/model-viewer/compare/v5.8.0...v5.8.1
- v5.8.02025-12-29 · 2025-12-29 15:54 UTC
查看更新说明
What's Changed
- Use loaded scene filename to name downloaded PNG by @willeastcott in https://github.com/playcanvas/model-viewer/pull/362
- Replace react-visibility-sensor with react-intersection-observer by @willeastcott in https://github.com/playcanvas/model-viewer/pull/364
- Add support for selecting cameras loaded from glTF by @willeastcott in https://github.com/playcanvas/model-viewer/pull/358
- Refactor Debug Panel to Settings and Consolidate Device Options by @willeastcott in https://github.com/playcanvas/model-viewer/pull/361
Fixes
- [FIX] Eliminate build warnings by @willeastcott in https://github.com/playcanvas/model-viewer/pull/357
- [FIX] Fix glTF min/mag filter settings not being respected by @willeastcott in https://github.com/playcanvas/model-viewer/pull/359
- [FIX] Show all animations even when they have duplicate names by @willeastcott in https://github.com/playcanvas/model-viewer/pull/363
- [FIX] Allow scene to load even with warnings by @willeastcott in https://github.com/playcanvas/model-viewer/pull/360
Full Changelog: https://github.com/playcanvas/model-viewer/compare/v5.7.0...v5.8.0
- v5.7.02025-11-18 · 2025-11-18 11:38 UTC
查看更新说明
What's Changed
- Bump actions/setup-node from 5 to 6 by @dependabot[bot] in https://github.com/playcanvas/model-viewer/pull/351
- Latest engine and support streaming sog by @slimbuck in https://github.com/playcanvas/model-viewer/pull/353
Full Changelog: https://github.com/playcanvas/model-viewer/compare/v5.6.3...v5.7.0
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
PlayCanvas Model Viewer
| User Manual | API Reference | Blog | Forum |
The PlayCanvas glTF scene viewer is blazingly fast and 100% compliant with the glTF 2.0 spec.

You can find a live version at:
https://playcanvas.com/model-viewer
Viewing Scenes
The viewer can load any glTF 2.0 scene. Embedded glTF and binary glTF (GLB) can be dragged directly into the 3D view. To load an unpacked glTF scene, drag its parent folder into the 3D view.
You can also drag and drop images into the 3D view to set a background. Options are:
- Single file images are treated as equirectangular projections. Supported formats are PNG, JPG and HDR. Find high quality HDR images at HDRHaven.
- Six images are treated as cube map faces. Naming should be one of the following 5 forms, where each face name below should be incorporated in the overall filename like
name_posx.pngfor example:
| Face 0 | Face 1 | Face 2 | Face 3 | Face 4 | Face 5 |
|---|---|---|---|---|---|
| posx | negx | posy | negy | posz | negz |
| px | nx | py | ny | pz | nz |
| right | left | up | down | front | back |
| right | left | top | bottom | forward | backward |
| 0 | 1 | 2 | 3 | 4 | 5 |
Supported URL Parameters
Some URL query parameters are available to override certain aspects of the viewer:
| Parameter | Description | Example |
|---|---|---|
load/assetUrl | Specify URL to a glTF scene to load | ?load=URL |
cameraPosition | Override the initial camera position | ?cameraPosition=0,0,20 |
How to build
Ensure you have Node.js installed (v22.22+). Then, from a command prompt, run:
npm install
npm run build
This will invoke Vite and esbuild and output the built viewer to the dist folder. To rebuild the viewer on saving any source file, do:
npm run watch
How to run
Run:
npm run serve
Open a browser and navigate to http://localhost:3000.
Development
Run:
npm run develop
Open a browser and navigate to http://localhost:3000.
N.B. To load local models run npx server --cors in the directory containing the model (disables CORS).
Library integration testing
The Model Viewer is built on the following open source libraries:
| Library | Details |
|---|---|
| PlayCanvas Engine | Powers the Editor's 3D View and Launch Page |
| Observer | Data binding and history |
| PCUI | Front-end component library |
To test the integration of these libraries use npm link. Follow these steps:
-
Create a global link from source
cd <library> npm link -
Create a link to the global link
cd model-viewer npm link <library>