Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions docs/manual/en/introduction/Loading-3D-models.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,15 @@ <h2>Loading</h2>
// commonjs
var THREE = window.THREE = require('three');
require('three/examples/js/loaders/GLTFLoader');
</code>

<p>
Currently three.js examples are not available as ES modules (import &hellip; from '&hellip;').
Several workarounds are discussed in
<a href="https://github.com/mrdoob/three.js/issues/9562" target="_blank" rel="noopener">#9562</a>.
</p>
// ES modules
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
</code>

<p>
Once you've imported a loader, you're ready to add a model to your scene. Syntax varies among
different loaders — when using another format, check the examples and documentation for that
loader. For glTF, basic usage would be:
loader. For glTF, usage with global scripts would be:
</p>

<code>
Expand Down
9 changes: 3 additions & 6 deletions docs/manual/zh/introduction/Loading-3D-models.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,10 @@ <h2>加载</h2>
// commonjs
var THREE = window.THREE = require('three');
require('three/examples/js/loaders/GLTFLoader');
</code>

<p>
目前three.js示例不能作为ES modules (import &hellip; from '&hellip;')来使用。
这里讨论了一些解决方法:
<a href="https://github.com/mrdoob/three.js/issues/9562" target="_blank" rel="noopener">#9562</a>.
</p>
// ES modules
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
</code>

<p>
一旦你引入了一个加载器,你就已经准备好为场景添加模型了。不同加载器之间可能具有不同的语法 ——
Expand Down