3D-model-001

温馨提示:点击页面下方以展开或折叠目录~

这是第一个模型

展示

如何呈现

设置如下文件结构

1
2
3
4
5
6
7
8
9
10
11
12
13
├─js
│ ├─modelJS #放置模型的js加载文件及配置文件
│ └─three
│ ├─build #three js 本体
│ ├─jsm #插件文件
│ │ ├─controls
│ │ ├─libs
│ │ │ └─draco
│ │ ├─loaders
│ │ │ └─lwo
│ │ └─utils
│ └─models #模型文件
│ └─001

文章中放入以下代码

1
2
3
4
5
6
7
8
9
10
<div id="webgl" style="margin-top: 10px; margin-left: 10px;"></div>
<script type="importmap">
{
"imports": {
"three": "../js/three/build/three.module.js",
"three/addons/": "../js/three/jsm/"
}
}
</script>
<script type="module" src="../js/modelJS/001.js"></script>