|
@@ -92,13 +92,10 @@
|
|
|
// 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 … from '…').
|
|
|
- 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
|