未验证 提交 3d97512e 编写于 作者: D Don McCurdy 提交者: GitHub

Docs: Update 'Installation' guide to use cdn.skypack.dev (#21711)

上级 d4aa9e00
......@@ -87,9 +87,9 @@
<code>
&lt;script type="module">
// Find the latest version by visiting https://unpkg.com/three.
// Find the latest version by visiting https://cdn.skypack.dev/three.
import * as THREE from 'https://unpkg.com/three@&lt;version&gt;/build/three.module.js';
import * as THREE from 'https://cdn.skypack.dev/three@&lt;version&gt;';
const scene = new THREE.Scene();
......@@ -125,9 +125,9 @@
<code>
&lt;script type="module">
// Find the latest version by visiting https://unpkg.com/three.
// Find the latest version by visiting https://cdn.skypack.dev/three.
import { OrbitControls } from 'https://unpkg.com/three@&lt;version&gt;/examples/jsm/controls/OrbitControls.js';
import { OrbitControls } from 'https://cdn.skypack.dev/three@&lt;version&gt;/examples/jsm/controls/OrbitControls.js';
const controls = new OrbitControls();
......
......@@ -69,9 +69,9 @@
<code>
&lt;script type="module">
// Find the latest version by visiting https://unpkg.com/three.
// Find the latest version by visiting https://cdn.skypack.dev/three.
import * as THREE from 'https://unpkg.com/three@&lt;version&gt;/build/three.module.js';
import * as THREE from 'https://cdn.skypack.dev/three@&lt;version&gt;';
const scene = new THREE.Scene();
......@@ -79,7 +79,7 @@
</code>
<p>
Not all features are accessed through the <em>build/three.module.js</em> module. Other popular parts of the library — such as controls, loaders, and post-processing effects — must be imported from the [link:https://github.com/mrdoob/three.js/tree/dev/examples/jsm examples/jsm] subfolder. To learn more, see <em>Examples</em> below.
Not all features are accessed through the <em>three</em> entrypoint. Other popular parts of the library — such as controls, loaders, and post-processing effects — must be imported from the [link:https://github.com/mrdoob/three.js/tree/dev/examples/jsm examples/jsm] subfolder. To learn more, see <em>Examples</em> below.
</p>
......@@ -107,9 +107,9 @@
<code>
&lt;script type="module">
// Find the latest version by visiting https://unpkg.com/three.
// Find the latest version by visiting https://cdn.skypack.dev/three.
import { OrbitControls } from 'https://unpkg.com/three@&lt;version&gt;/examples/jsm/controls/OrbitControls.js';
import { OrbitControls } from 'https://cdn.skypack.dev/three@&lt;version&gt;/examples/jsm/controls/OrbitControls.js';
const controls = new OrbitControls();
......
......@@ -71,9 +71,9 @@
<code>
&lt;script type="module">
// Find the latest version by visiting https://unpkg.com/three. The URL will
// redirect to the newest stable release.
import * as THREE from 'https://unpkg.com/three/build/three.module.js';
// Find the latest version by visiting https://cdn.skypack.dev/three.
import * as THREE from 'https://cdn.skypack.dev/three@&lt;version&gt;';
const scene = new THREE.Scene();
......@@ -109,9 +109,9 @@
<code>
&lt;script type="module">
// Find the latest version by visiting https://unpkg.com/three. The URL will
// Find the latest version by visiting https://cdn.skypack.dev/three. The URL will
// redirect to the newest stable release.
import { OrbitControls } from 'https://unpkg.com/three/examples/jsm/controls/OrbitControls.js';
import { OrbitControls } from 'https://cdn.skypack.dev/three/examples/jsm/controls/OrbitControls.js';
const controls = new OrbitControls();
......
......@@ -79,9 +79,9 @@
<code>
&lt;script type="module">
// Find the latest version by visiting https://unpkg.com/three.
// Find the latest version by visiting https://cdn.skypack.dev/three.
import * as THREE from 'https://unpkg.com/three@&lt;version&gt;/build/three.module.js';
import * as THREE from 'https://cdn.skypack.dev/three@&lt;version&gt;';
const scene = new THREE.Scene();
......@@ -122,9 +122,9 @@
<code>
&lt;script type="module">
// Find the latest version by visiting https://unpkg.com/three.
// Find the latest version by visiting https://cdn.skypack.dev/three.
import { OrbitControls } from 'https://unpkg.com/three@&lt;version&gt;/examples/jsm/controls/OrbitControls.js';
import { OrbitControls } from 'https://cdn.skypack.dev/three@&lt;version&gt;/examples/jsm/controls/OrbitControls.js';
const controls = new OrbitControls();
......
......@@ -69,9 +69,9 @@
<code>
&lt;script type="module">
// 通过访问 https://unpkg.com/three 来查找最新版本。
// 通过访问 https://cdn.skypack.dev/three 来查找最新版本。
import * as THREE from 'https://unpkg.com/three@&lt;version&gt;/build/three.module.js';
import * as THREE from 'https://cdn.skypack.dev/three@&lt;version&gt;';
const scene = new THREE.Scene();
......@@ -107,9 +107,9 @@
<code>
&lt;script type="module">
// 通过访问 https://unpkg.com/three 来查找最新版本。
// 通过访问 https://cdn.skypack.dev/three 来查找最新版本。
import { OrbitControls } from 'https://unpkg.com/three@&lt;version&gt;/examples/jsm/controls/OrbitControls.js';
import { OrbitControls } from 'https://cdn.skypack.dev/three@&lt;version&gt;/examples/jsm/controls/OrbitControls.js';
const controls = new OrbitControls();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册