|
@@ -42,14 +42,12 @@
|
|
</p>
|
|
</p>
|
|
|
|
|
|
<code>
|
|
<code>
|
|
- ///////////////////////////////////////////////////////
|
|
|
|
// Option 1: Import the entire three.js core library.
|
|
// Option 1: Import the entire three.js core library.
|
|
import * as THREE from 'three';
|
|
import * as THREE from 'three';
|
|
|
|
|
|
const scene = new THREE.Scene();
|
|
const scene = new THREE.Scene();
|
|
|
|
|
|
|
|
|
|
- ///////////////////////////////////////////////////////
|
|
|
|
// Option 2: Import just the parts you need.
|
|
// Option 2: Import just the parts you need.
|
|
import { Scene } from 'three';
|
|
import { Scene } from 'three';
|
|
|
|
|
|
@@ -91,7 +89,7 @@
|
|
|
|
|
|
// Find the latest version by visiting https://unpkg.com/three. The URL will
|
|
// Find the latest version by visiting https://unpkg.com/three. The URL will
|
|
// redirect to the newest stable release.
|
|
// redirect to the newest stable release.
|
|
- import * as THREE from 'https://unpkg.com/three@<VERSION>/build/three.module.js';
|
|
|
|
|
|
+ import * as THREE from 'https://unpkg.com/three/build/three.module.js';
|
|
|
|
|
|
const scene = new THREE.Scene();
|
|
const scene = new THREE.Scene();
|
|
|
|
|
|
@@ -129,7 +127,7 @@
|
|
|
|
|
|
// Find the latest version by visiting https://unpkg.com/three. The URL will
|
|
// Find the latest version by visiting https://unpkg.com/three. The URL will
|
|
// redirect to the newest stable release.
|
|
// redirect to the newest stable release.
|
|
- import { OrbitControls } from 'https://unpkg.com/three@<VERSION>/examples/jsm/controls/OrbitControls.js';
|
|
|
|
|
|
+ import { OrbitControls } from 'https://unpkg.com/three/examples/jsm/controls/OrbitControls.js';
|
|
|
|
|
|
const controls = new OrbitControls();
|
|
const controls = new OrbitControls();
|
|
|
|
|