online-3d-viewer-zh
v0.12.0
Published
Online 3D Viewer
Downloads
13
Maintainers
Readme
3D模型查看器
导入: 3dm, 3ds, 3mf, amf, bim, brep, dae, fbx, fcstd, gltf, ifc, iges, step, stl, obj, off, ply, wrl. 导出: 3dm, bim, gltf, obj, off, stl, ply.
使用教程
- npm i安装依赖
- npm run start启动项目
- 打开http://127.0.0.1:8080/website/index.html 即可访问
- 源码位置在 /source/ 文件夹下 修改相应文件之后运行npm run build_website_dev 打包路径 在 build\website_dev
- 项目改自于开源项目 https://github.com/kovacsv/Online3DViewer
外部调用方法
npm install online-3d-viewer
import * as OV from 'online-3d-viewer';
<script type="text/javascript" src="o3dv.min.js"></script>
<div class="online_3d_viewer"
style="width: 800px; height: 600px;"
model="model.obj, model.mtl">
</div>
window.addEventListener ('load', () => {
// tell the engine where to find the libs folder
OV.SetExternalLibLocation ('libs');
// init all viewers on the page
OV.Init3DViewerElements ();
});