视图3D
快速自定义 glTF 三维模式查看器, 装满了特性!
* 特性
- glTF 图像 基于 3个j
- 查看、旋转、翻译和放大网络中的 glTF 3D 模型.
- 工作于 & & & & & & 移动
- 自定义自动播放、天盒和阴影等选项的查看器
- 增强现实
- View3D 支持基于 WebXR, Scene Viewer 和 AR 快速查看的增强现实
- 可以在我们的AR会话中看到,旋转,移动,并缩放地上和墙上的3D模型.
- 支持压缩 glTF 2. 0 模式
- View3D可以显示压缩的glTF模型,其扩展如下.
- KHR draco mesh 压缩
- EXT meshopt 压缩
- KHR 纹理 basisu
- View3D可以显示压缩的glTF模型,其扩展如下.
- 基于打字符
* 安装
npm i @egjs/view3d
# OR
yarn add @egjs/view3d
QQ 快速启动
@egjs/view3d 需要一包和一帆布元素初始化 .
<div id="view3d" class="view3d-wrapper">
<canvas class="my-canvas"></canvas>
</div>
那你就用得着
import View3D from "@egjs/view3d";
import "@egjs/view3d/css/view3d-bundle.min.css";
const canvasEl = document.querySelector("#view3d");
const view3d = new View3D(canvasEl, {
src: "URL_TO_YOUR_3D_MODEL",
envmap: "URL_TO_YOUR_HDR_IMAGE",
});
// or just
const view3d = new View3D("#view3d");
见关于我们 教学
QQ 浏览器支持
View3D可供所有常绿桌面和移动浏览器的后两个主要版本使用.
文章
许可证
Copyright (c) 2020-present NAVER Corp.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.