浏览代码

chore: replace the cdn, unpkg -> jsdelivr (#28006)

* chore: replace the cdn, unpkg -> jsdelivr

`unpkg.com/` -> `cdn.jsdelivr.net/npm/`

I checked all changed examples, editor, manuals are working properly

Context: unpkg is not reliable, especially when we are using NodeMaterials since there are a lot of modules to load.

See: https://github.com/mrdoob/three.js/issues/28002#issuecomment-2019553689

Note that I also replaced in `editor-settings.js`

I excluded `editor/js/libs/ffmpeg.min.js` and `examples/jsm/libs/chevrotain.module.min.js`

`webgl2_ubo_arrays.html` still imports es-module-shims, is this required?

* chore: remove es-module-shims from `webgl2_ubo_arrays.html`

See: https://github.com/mrdoob/three.js/pull/28006#issuecomment-2020013107
0b5vr 1 年之前
父节点
当前提交
447d344c89
共有 35 个文件被更改,包括 79 次插入83 次删除
  1. 4 4
      docs/examples/en/loaders/3DMLoader.html
  2. 4 4
      docs/examples/zh/loaders/3DMLoader.html
  3. 3 3
      docs/manual/ar/introduction/Installation.html
  4. 2 2
      docs/manual/en/introduction/Installation.html
  5. 2 2
      docs/manual/fr/introduction/Creating-a-scene.html
  6. 3 3
      docs/manual/fr/introduction/Installation.html
  7. 2 2
      docs/manual/it/introduction/Creating-a-scene.html
  8. 3 3
      docs/manual/it/introduction/Installation.html
  9. 2 2
      docs/manual/ja/introduction/Creating-a-scene.html
  10. 3 3
      docs/manual/ja/introduction/Installation.html
  11. 2 2
      docs/manual/ko/introduction/Creating-a-scene.html
  12. 3 3
      docs/manual/ko/introduction/Installation.html
  13. 2 2
      docs/manual/pt-br/introduction/Creating-a-scene.html
  14. 3 3
      docs/manual/pt-br/introduction/Installation.html
  15. 2 2
      docs/manual/ru/introduction/Creating-a-scene.html
  16. 3 3
      docs/manual/ru/introduction/Installation.html
  17. 2 2
      docs/manual/zh/introduction/Installation.html
  18. 2 2
      editor/index.html
  19. 0 4
      examples/webgl2_ubo_arrays.html
  20. 2 2
      examples/webgl_geometry_csg.html
  21. 4 4
      examples/webgl_loader_ifc.html
  22. 1 1
      examples/webgl_loader_texture_hdrjpg.html
  23. 2 2
      examples/webgl_modifier_subdivision.html
  24. 1 1
      examples/webgl_raycaster_bvh.html
  25. 2 2
      examples/webgl_renderer_pathtracer.html
  26. 1 1
      examples/webgpu_compute_particles_snow.html
  27. 1 1
      examples/webgpu_mesh_batch.html
  28. 2 2
      manual/en/fundamentals.html
  29. 4 4
      manual/examples/resources/editor-settings.js
  30. 1 1
      manual/examples/resources/editor.html
  31. 1 1
      manual/examples/resources/editor.js
  32. 2 2
      manual/fr/fundamentals.html
  33. 2 2
      manual/ja/fundamentals.html
  34. 3 3
      manual/ko/fundamentals.html
  35. 3 3
      manual/zh/fundamentals.html

+ 4 - 4
docs/examples/en/loaders/3DMLoader.html

@@ -166,7 +166,7 @@
 			// Specify path to a folder containing WASM/JS libraries or a CDN.
 			// Specify path to a folder containing WASM/JS libraries or a CDN.
 			// For example, /jsm/libs/rhino3dm/ is the location of the library inside the three.js repository
 			// For example, /jsm/libs/rhino3dm/ is the location of the library inside the three.js repository
 			// loader.setLibraryPath( '/path_to_library/rhino3dm/' );
 			// loader.setLibraryPath( '/path_to_library/rhino3dm/' );
-			loader.setLibraryPath( 'https://unpkg.com/[email protected]/' );
+			loader.setLibraryPath( 'https://cdn.jsdelivr.net/npm/[email protected]/' );
 	
 	
 			// Load a 3DM file
 			// Load a 3DM file
 			loader.load(
 			loader.load(
@@ -205,13 +205,13 @@
 		</p>
 		</p>
 
 
 		<code>
 		<code>
-		import rhino3dm from 'https://unpkg.com/[email protected]'
+		import rhino3dm from 'https://cdn.jsdelivr.net/npm/[email protected]'
 
 
 		// Instantiate a loader
 		// Instantiate a loader
 		const loader = new Rhino3dmLoader();
 		const loader = new Rhino3dmLoader();
 
 
 		// Specify path to a folder containing WASM/JS libraries or a CDN.
 		// Specify path to a folder containing WASM/JS libraries or a CDN.
-		loader.setLibraryPath( 'https://unpkg.com/[email protected]' );
+		loader.setLibraryPath( 'https://cdn.jsdelivr.net/npm/[email protected]' );
 
 
 		const rhino = await rhino3dm();
 		const rhino = await rhino3dm();
 		console.log('Loaded rhino3dm.');
 		console.log('Loaded rhino3dm.');
@@ -244,7 +244,7 @@
 		// Specify path to a folder containing the WASM/JS library:
 		// Specify path to a folder containing the WASM/JS library:
 		loader.setLibraryPath( '/path_to_library/rhino3dm/' );
 		loader.setLibraryPath( '/path_to_library/rhino3dm/' );
 		// or from a CDN:
 		// or from a CDN:
-		loader.setLibraryPath( 'https://unpkg.com/[email protected]' );
+		loader.setLibraryPath( 'https://cdn.jsdelivr.net/npm/[email protected]' );
 		</code>
 		</code>
 
 
 		<h3>[method:this setWorkerLimit]( [param:Number workerLimit] )</h3>
 		<h3>[method:this setWorkerLimit]( [param:Number workerLimit] )</h3>

+ 4 - 4
docs/examples/zh/loaders/3DMLoader.html

@@ -171,7 +171,7 @@
 			// Specify path to a folder containing WASM/JS libraries or a CDN.
 			// Specify path to a folder containing WASM/JS libraries or a CDN.
 			// For example, /jsm/libs/rhino3dm/ is the location of the library inside the three.js repository
 			// For example, /jsm/libs/rhino3dm/ is the location of the library inside the three.js repository
 			// loader.setLibraryPath( '/path_to_library/rhino3dm/' );
 			// loader.setLibraryPath( '/path_to_library/rhino3dm/' );
-			loader.setLibraryPath( 'https://unpkg.com/[email protected]/' );
+			loader.setLibraryPath( 'https://cdn.jsdelivr.net/npm/[email protected]/' );
 	
 	
 			// Load a 3DM file
 			// Load a 3DM file
 			loader.load(
 			loader.load(
@@ -212,13 +212,13 @@
 	</p>
 	</p>
 
 
 	<code>
 	<code>
-		import rhino3dm from 'https://unpkg.com/[email protected]'
+		import rhino3dm from 'https://cdn.jsdelivr.net/npm/[email protected]'
 
 
 		// Instantiate a loader
 		// Instantiate a loader
 		const loader = new Rhino3dmLoader();
 		const loader = new Rhino3dmLoader();
 
 
 		// Specify path to a folder containing WASM/JS libraries or a CDN.
 		// Specify path to a folder containing WASM/JS libraries or a CDN.
-		loader.setLibraryPath( 'https://unpkg.com/[email protected]' );
+		loader.setLibraryPath( 'https://cdn.jsdelivr.net/npm/[email protected]' );
 
 
 		const rhino = await rhino3dm();
 		const rhino = await rhino3dm();
 		console.log('Loaded rhino3dm.');
 		console.log('Loaded rhino3dm.');
@@ -251,7 +251,7 @@
 		// Specify path to a folder containing the WASM/JS library:
 		// Specify path to a folder containing the WASM/JS library:
 		loader.setLibraryPath( '/path_to_library/rhino3dm/' );
 		loader.setLibraryPath( '/path_to_library/rhino3dm/' );
 		// or from a CDN:
 		// or from a CDN:
-		loader.setLibraryPath( 'https://unpkg.com/[email protected]' );
+		loader.setLibraryPath( 'https://cdn.jsdelivr.net/npm/[email protected]' );
 		</code>
 		</code>
 
 
 	<h3>[method:this setWorkerLimit]( [param:Number workerLimit] )</h3>
 	<h3>[method:this setWorkerLimit]( [param:Number workerLimit] )</h3>

+ 3 - 3
docs/manual/ar/introduction/Installation.html

@@ -88,7 +88,7 @@
 		&lt;script type="importmap">
 		&lt;script type="importmap">
 			{
 			{
 			"imports": {
 			"imports": {
-				"three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js"
+				"three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js"
 			}
 			}
 			}
 			}
 		&lt;/script>
 		&lt;/script>
@@ -127,8 +127,8 @@
 		&lt;script type="importmap">
 		&lt;script type="importmap">
 			{
 			{
 			"imports": {
 			"imports": {
-				"three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js",
-				"three/addons/": "https://unpkg.com/three@&lt;version&gt;/examples/jsm/"
+				"three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js",
+				"three/addons/": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/examples/jsm/"
 			}
 			}
 			}
 			}
 		&lt;/script>
 		&lt;/script>

+ 2 - 2
docs/manual/en/introduction/Installation.html

@@ -152,8 +152,8 @@ npm install --save-dev vite
 &lt;script type="importmap">
 &lt;script type="importmap">
   {
   {
     "imports": {
     "imports": {
-      "three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js",
-      "three/addons/": "https://unpkg.com/three@&lt;version&gt;/examples/jsm/"
+      "three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js",
+      "three/addons/": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/examples/jsm/"
     }
     }
   }
   }
 &lt;/script>
 &lt;/script>

+ 2 - 2
docs/manual/fr/introduction/Creating-a-scene.html

@@ -27,7 +27,7 @@
 			&lt;/head&gt;
 			&lt;/head&gt;
 			&lt;body&gt;
 			&lt;body&gt;
 				&lt;script type="module"&gt;
 				&lt;script type="module"&gt;
-					import * as THREE from 'https://unpkg.com/three/build/three.module.js';
+					import * as THREE from 'https://cdn.jsdelivr.net/npm/three/build/three.module.js';
 
 
 					// Our Javascript will go here.
 					// Our Javascript will go here.
 				&lt;/script&gt;
 				&lt;/script&gt;
@@ -129,7 +129,7 @@
 			&lt;/head&gt;
 			&lt;/head&gt;
 			&lt;body&gt;
 			&lt;body&gt;
 				&lt;script type="module"&gt;
 				&lt;script type="module"&gt;
-					import * as THREE from 'https://unpkg.com/three/build/three.module.js';
+					import * as THREE from 'https://cdn.jsdelivr.net/npm/three/build/three.module.js';
 
 
 					const scene = new THREE.Scene();
 					const scene = new THREE.Scene();
 					const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
 					const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );

+ 3 - 3
docs/manual/fr/introduction/Installation.html

@@ -71,7 +71,7 @@
 		&lt;script type="importmap">
 		&lt;script type="importmap">
 		  {
 		  {
 		    "imports": {
 		    "imports": {
-		      "three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js"
+		      "three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js"
 		    }
 		    }
 		  }
 		  }
 		&lt;/script>
 		&lt;/script>
@@ -110,8 +110,8 @@
 		&lt;script type="importmap">
 		&lt;script type="importmap">
 			{
 			{
 			"imports": {
 			"imports": {
-				"three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js",
-				"three/addons/": "https://unpkg.com/three@&lt;version&gt;/examples/jsm/"
+				"three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js",
+				"three/addons/": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/examples/jsm/"
 			}
 			}
 			}
 			}
 		&lt;/script>
 		&lt;/script>

+ 2 - 2
docs/manual/it/introduction/Creating-a-scene.html

@@ -30,7 +30,7 @@
 			&lt;/head&gt;
 			&lt;/head&gt;
 			&lt;body&gt;
 			&lt;body&gt;
 				&lt;script type="module"&gt;
 				&lt;script type="module"&gt;
-					import * as THREE from 'https://unpkg.com/three/build/three.module.js';
+					import * as THREE from 'https://cdn.jsdelivr.net/npm/three/build/three.module.js';
 
 
 					// Il nostro Javascript andrà qui
 					// Il nostro Javascript andrà qui
 				&lt;/script&gt;
 				&lt;/script&gt;
@@ -147,7 +147,7 @@
 			&lt;/head&gt;
 			&lt;/head&gt;
 			&lt;body&gt;
 			&lt;body&gt;
 				&lt;script type="module"&gt;
 				&lt;script type="module"&gt;
-					import * as THREE from 'https://unpkg.com/three/build/three.module.js';
+					import * as THREE from 'https://cdn.jsdelivr.net/npm/three/build/three.module.js';
 
 
 					const scene = new THREE.Scene();
 					const scene = new THREE.Scene();
 					const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
 					const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );

+ 3 - 3
docs/manual/it/introduction/Installation.html

@@ -72,7 +72,7 @@
 		&lt;script type="importmap">
 		&lt;script type="importmap">
 		  {
 		  {
 		    "imports": {
 		    "imports": {
-		      "three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js"
+		      "three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js"
 		    }
 		    }
 		  }
 		  }
 		&lt;/script>
 		&lt;/script>
@@ -110,8 +110,8 @@
 		&lt;script type="importmap">
 		&lt;script type="importmap">
 			{
 			{
 			"imports": {
 			"imports": {
-				"three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js",
-				"three/addons/": "https://unpkg.com/three@&lt;version&gt;/examples/jsm/"
+				"three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js",
+				"three/addons/": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/examples/jsm/"
 			}
 			}
 			}
 			}
 		&lt;/script>
 		&lt;/script>

+ 2 - 2
docs/manual/ja/introduction/Creating-a-scene.html

@@ -27,7 +27,7 @@
 			&lt;/head&gt;
 			&lt;/head&gt;
 			&lt;body&gt;
 			&lt;body&gt;
 				&lt;script type="module"&gt;
 				&lt;script type="module"&gt;
-					import * as THREE from 'https://unpkg.com/three/build/three.module.js';
+					import * as THREE from 'https://cdn.jsdelivr.net/npm/three/build/three.module.js';
 
 
 					// Our Javascript will go here.
 					// Our Javascript will go here.
 				&lt;/script&gt;
 				&lt;/script&gt;
@@ -130,7 +130,7 @@
 			&lt;/head&gt;
 			&lt;/head&gt;
 			&lt;body&gt;
 			&lt;body&gt;
 				&lt;script type="module"&gt;
 				&lt;script type="module"&gt;
-					import * as THREE from 'https://unpkg.com/three/build/three.module.js';
+					import * as THREE from 'https://cdn.jsdelivr.net/npm/three/build/three.module.js';
 
 
 					const scene = new THREE.Scene();
 					const scene = new THREE.Scene();
 					const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
 					const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );

+ 3 - 3
docs/manual/ja/introduction/Installation.html

@@ -72,7 +72,7 @@
 &lt;script type="importmap">
 &lt;script type="importmap">
     {
     {
     "imports": {
     "imports": {
-        "three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js"
+        "three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js"
     }
     }
     }
     }
 &lt;/script>
 &lt;/script>
@@ -111,8 +111,8 @@
 &lt;script type="importmap">
 &lt;script type="importmap">
     {
     {
     "imports": {
     "imports": {
-        "three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js",
-        "three/addons/": "https://unpkg.com/three@&lt;version&gt;/examples/jsm/"
+        "three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js",
+        "three/addons/": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/examples/jsm/"
     }
     }
     }
     }
 &lt;/script>
 &lt;/script>

+ 2 - 2
docs/manual/ko/introduction/Creating-a-scene.html

@@ -28,7 +28,7 @@
 			&lt;/head&gt;
 			&lt;/head&gt;
 			&lt;body&gt;
 			&lt;body&gt;
 				&lt;script type="module"&gt;
 				&lt;script type="module"&gt;
-					import * as THREE from 'https://unpkg.com/three/build/three.module.js';
+					import * as THREE from 'https://cdn.jsdelivr.net/npm/three/build/three.module.js';
 ´
 ´
 					// Our Javascript will go here.
 					// Our Javascript will go here.
 				&lt;/script&gt;
 				&lt;/script&gt;
@@ -133,7 +133,7 @@
 			&lt;/head&gt;
 			&lt;/head&gt;
 			&lt;body&gt;
 			&lt;body&gt;
 				&lt;script type="module"&gt;
 				&lt;script type="module"&gt;
-					import * as THREE from 'https://unpkg.com/three/build/three.module.js';
+					import * as THREE from 'https://cdn.jsdelivr.net/npm/three/build/three.module.js';
 
 
 					const scene = new THREE.Scene();
 					const scene = new THREE.Scene();
 					const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
 					const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );

+ 3 - 3
docs/manual/ko/introduction/Installation.html

@@ -80,7 +80,7 @@
 &lt;script type="importmap">
 &lt;script type="importmap">
     {
     {
     "imports": {
     "imports": {
-        "three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js"
+        "three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js"
     }
     }
     }
     }
 &lt;/script>
 &lt;/script>
@@ -123,8 +123,8 @@
 &lt;script type="importmap">
 &lt;script type="importmap">
     {
     {
     "imports": {
     "imports": {
-        "three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js",
-        "three/addons/": "https://unpkg.com/three@&lt;version&gt;/examples/jsm/"
+        "three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js",
+        "three/addons/": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/examples/jsm/"
     }
     }
     }
     }
 &lt;/script>
 &lt;/script>

+ 2 - 2
docs/manual/pt-br/introduction/Creating-a-scene.html

@@ -27,7 +27,7 @@
 			&lt;/head&gt;
 			&lt;/head&gt;
 			&lt;body&gt;
 			&lt;body&gt;
 				&lt;script type="module"&gt;
 				&lt;script type="module"&gt;
-					import * as THREE from 'https://unpkg.com/three/build/three.module.js';
+					import * as THREE from 'https://cdn.jsdelivr.net/npm/three/build/three.module.js';
 
 
 					// Our Javascript will go here.
 					// Our Javascript will go here.
 				&lt;/script&gt;
 				&lt;/script&gt;
@@ -131,7 +131,7 @@
 			&lt;/head&gt;
 			&lt;/head&gt;
 			&lt;body&gt;
 			&lt;body&gt;
 				&lt;script type="module"&gt;
 				&lt;script type="module"&gt;
-					import * as THREE from 'https://unpkg.com/three/build/three.module.js';
+					import * as THREE from 'https://cdn.jsdelivr.net/npm/three/build/three.module.js';
 
 
 					const scene = new THREE.Scene();
 					const scene = new THREE.Scene();
 					const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
 					const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );

+ 3 - 3
docs/manual/pt-br/introduction/Installation.html

@@ -56,7 +56,7 @@
 		&lt;script type="importmap">
 		&lt;script type="importmap">
 		  {
 		  {
 		    "imports": {
 		    "imports": {
-		      "three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js"
+		      "three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js"
 		    }
 		    }
 		  }
 		  }
 		&lt;/script>
 		&lt;/script>
@@ -96,8 +96,8 @@
 		&lt;script type="importmap">
 		&lt;script type="importmap">
 			{
 			{
 			"imports": {
 			"imports": {
-				"three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js",
-				"three/addons/": "https://unpkg.com/three@&lt;version&gt;/examples/jsm/"
+				"three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js",
+				"three/addons/": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/examples/jsm/"
 			}
 			}
 			}
 			}
 		&lt;/script>
 		&lt;/script>

+ 2 - 2
docs/manual/ru/introduction/Creating-a-scene.html

@@ -29,7 +29,7 @@
 			&lt;/head&gt;
 			&lt;/head&gt;
 			&lt;body&gt;
 			&lt;body&gt;
 				&lt;script type="module"&gt;
 				&lt;script type="module"&gt;
-					import * as THREE from 'https://unpkg.com/three/build/three.module.js';
+					import * as THREE from 'https://cdn.jsdelivr.net/npm/three/build/three.module.js';
 
 
 					// Наш Javascript будет здесь..
 					// Наш Javascript будет здесь..
 				&lt;/script&gt;
 				&lt;/script&gt;
@@ -130,7 +130,7 @@
 			&lt;/head&gt;
 			&lt;/head&gt;
 			&lt;body&gt;
 			&lt;body&gt;
 				&lt;script type="module"&gt;
 				&lt;script type="module"&gt;
-					import * as THREE from 'https://unpkg.com/three/build/three.module.js';
+					import * as THREE from 'https://cdn.jsdelivr.net/npm/three/build/three.module.js';
 
 
 					const scene = new THREE.Scene();
 					const scene = new THREE.Scene();
 					const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
 					const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );

+ 3 - 3
docs/manual/ru/introduction/Installation.html

@@ -95,7 +95,7 @@
 		&lt;script type="importmap">
 		&lt;script type="importmap">
 		{
 		{
 			"imports": {
 			"imports": {
-				"three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js"
+				"three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js"
 			}
 			}
 		}
 		}
 		&lt;/script>
 		&lt;/script>
@@ -140,8 +140,8 @@
 		&lt;script type="importmap">
 		&lt;script type="importmap">
 		{
 		{
 			"imports": {
 			"imports": {
-				"three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js",
-				"three/addons/": "https://unpkg.com/three@&lt;version&gt;/examples/jsm/"
+				"three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js",
+				"three/addons/": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/examples/jsm/"
 			}
 			}
 		}
 		}
 		&lt;/script>
 		&lt;/script>

+ 2 - 2
docs/manual/zh/introduction/Installation.html

@@ -151,8 +151,8 @@ npm install --save-dev vite
 &lt;script type="importmap">
 &lt;script type="importmap">
   {
   {
     "imports": {
     "imports": {
-      "three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js",
-      "three/addons/": "https://unpkg.com/three@&lt;version&gt;/examples/jsm/"
+      "three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js",
+      "three/addons/": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/examples/jsm/"
     }
     }
   }
   }
 &lt;/script>
 &lt;/script>

+ 2 - 2
editor/index.html

@@ -52,8 +52,8 @@
 					"three/addons/": "../examples/jsm/",
 					"three/addons/": "../examples/jsm/",
 
 
 					"three/examples/": "../examples/",
 					"three/examples/": "../examples/",
-					"three-gpu-pathtracer": "https://unpkg.com/[email protected]/build/index.module.js",
-					"three-mesh-bvh": "https://unpkg.com/[email protected]/build/index.module.js"
+					"three-gpu-pathtracer": "https://cdn.jsdelivr.net/npm/[email protected]/build/index.module.js",
+					"three-mesh-bvh": "https://cdn.jsdelivr.net/npm/[email protected]/build/index.module.js"
 				}
 				}
 			}
 			}
 		</script>
 		</script>

+ 0 - 4
examples/webgl2_ubo_arrays.html

@@ -98,10 +98,6 @@
 
 
 		</script>
 		</script>
 
 
-		<!-- Import maps polyfill -->
-		<!-- Remove this when import maps will be widely supported -->
-		<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
-
 		<script type="importmap">
 		<script type="importmap">
 			{
 			{
 				"imports": {
 				"imports": {

+ 2 - 2
examples/webgl_geometry_csg.html

@@ -29,8 +29,8 @@
 				"imports": {
 				"imports": {
 					"three": "../build/three.module.js",
 					"three": "../build/three.module.js",
 					"three/addons/": "./jsm/",
 					"three/addons/": "./jsm/",
-					"three-mesh-bvh": "https://unpkg.com/[email protected]/build/index.module.js",
-					"three-bvh-csg": "https://unpkg.com/[email protected]/build/index.module.js"
+					"three-mesh-bvh": "https://cdn.jsdelivr.net/npm/[email protected]/build/index.module.js",
+					"three-bvh-csg": "https://cdn.jsdelivr.net/npm/[email protected]/build/index.module.js"
 				}
 				}
 			}
 			}
 		</script>
 		</script>

+ 4 - 4
examples/webgl_loader_ifc.html

@@ -23,9 +23,9 @@
 					"three": "../build/three.module.js",
 					"three": "../build/three.module.js",
 					"three/addons/": "./jsm/",
 					"three/addons/": "./jsm/",
 					"three/examples/jsm/utils/BufferGeometryUtils": "./jsm/utils/BufferGeometryUtils.js",
 					"three/examples/jsm/utils/BufferGeometryUtils": "./jsm/utils/BufferGeometryUtils.js",
-					"three-mesh-bvh": "https://unpkg.com/[email protected]/build/index.module.js",
-					"web-ifc": "https://unpkg.com/[email protected]/web-ifc-api.js",
-					"web-ifc-three": "https://unpkg.com/[email protected]/IFCLoader.js"
+					"three-mesh-bvh": "https://cdn.jsdelivr.net/npm/[email protected]/build/index.module.js",
+					"web-ifc": "https://cdn.jsdelivr.net/npm/[email protected]/web-ifc-api.js",
+					"web-ifc-three": "https://cdn.jsdelivr.net/npm/[email protected]/IFCLoader.js"
 				}
 				}
 			}
 			}
 		</script>
 		</script>
@@ -72,7 +72,7 @@
 
 
 				//Setup IFC Loader
 				//Setup IFC Loader
 				const ifcLoader = new IFCLoader();
 				const ifcLoader = new IFCLoader();
-				await ifcLoader.ifcManager.setWasmPath( 'https://unpkg.com/[email protected]/', true );
+				await ifcLoader.ifcManager.setWasmPath( 'https://cdn.jsdelivr.net/npm/[email protected]/', true );
 
 
 				await ifcLoader.ifcManager.parser.setupOptionalCategories( {
 				await ifcLoader.ifcManager.parser.setupOptionalCategories( {
 					[ IFCSPACE ]: false,
 					[ IFCSPACE ]: false,

+ 1 - 1
examples/webgl_loader_texture_hdrjpg.html

@@ -39,7 +39,7 @@
 				"imports": {
 				"imports": {
 					"three": "../build/three.module.js",
 					"three": "../build/three.module.js",
 					"three/addons/": "./jsm/",
 					"three/addons/": "./jsm/",
-					"@monogrid/gainmap-js": "https://unpkg.com/@monogrid/[email protected]/dist/decode.js"
+					"@monogrid/gainmap-js": "https://cdn.jsdelivr.net/npm/@monogrid/[email protected]/dist/decode.js"
 				}
 				}
 			}
 			}
 		</script>
 		</script>

+ 2 - 2
examples/webgl_modifier_subdivision.html

@@ -18,7 +18,7 @@
 				"imports": {
 				"imports": {
 					"three": "../build/three.module.js",
 					"three": "../build/three.module.js",
 					"three/addons/": "./jsm/",
 					"three/addons/": "./jsm/",
-					"three-subdivide": "https://unpkg.com/[email protected]/build/index.module.js"
+					"three-subdivide": "https://cdn.jsdelivr.net/npm/[email protected]/build/index.module.js"
 				}
 				}
 			}
 			}
 		</script>
 		</script>
@@ -324,4 +324,4 @@
 		</script>
 		</script>
 
 
 	</body>
 	</body>
-</html>
+</html>

+ 1 - 1
examples/webgl_raycaster_bvh.html

@@ -29,7 +29,7 @@
 				"imports": {
 				"imports": {
 					"three": "../build/three.module.js",
 					"three": "../build/three.module.js",
 					"three/addons/": "./jsm/",
 					"three/addons/": "./jsm/",
-					"three-mesh-bvh": "https://unpkg.com/[email protected]/build/index.module.js"
+					"three-mesh-bvh": "https://cdn.jsdelivr.net/npm/[email protected]/build/index.module.js"
 				}
 				}
 			}
 			}
 		</script>
 		</script>

+ 2 - 2
examples/webgl_renderer_pathtracer.html

@@ -44,8 +44,8 @@
 					"three": "../build/three.module.js",
 					"three": "../build/three.module.js",
 					"three/addons/": "./jsm/",
 					"three/addons/": "./jsm/",
 					"three/examples/": "./",
 					"three/examples/": "./",
-					"three-gpu-pathtracer": "https://unpkg.com/[email protected]/build/index.module.js",
-					"three-mesh-bvh": "https://unpkg.com/[email protected]/build/index.module.js"
+					"three-gpu-pathtracer": "https://cdn.jsdelivr.net/npm/[email protected]/build/index.module.js",
+					"three-mesh-bvh": "https://cdn.jsdelivr.net/npm/[email protected]/build/index.module.js"
 				}
 				}
 			}
 			}
 		</script>
 		</script>

+ 1 - 1
examples/webgpu_compute_particles_snow.html

@@ -17,7 +17,7 @@
 					"three": "../build/three.module.js",
 					"three": "../build/three.module.js",
 					"three/addons/": "./jsm/",
 					"three/addons/": "./jsm/",
 					"three/nodes": "./jsm/nodes/Nodes.js",
 					"three/nodes": "./jsm/nodes/Nodes.js",
-					"stats-gl": "https://www.unpkg.com/[email protected]/dist/main.js"
+					"stats-gl": "https://cdn.jsdelivr.net/npm/[email protected]/dist/main.js"
 				}
 				}
 			}
 			}
 		</script>
 		</script>

+ 1 - 1
examples/webgpu_mesh_batch.html

@@ -29,7 +29,7 @@
 				"three": "../build/three.module.js",
 				"three": "../build/three.module.js",
 				"three/addons/": "./jsm/",
 				"three/addons/": "./jsm/",
 				"three/nodes": "./jsm/nodes/Nodes.js",
 				"three/nodes": "./jsm/nodes/Nodes.js",
-				"stats-gl": "https://www.unpkg.com/[email protected]/dist/main.js"
+				"stats-gl": "https://cdn.jsdelivr.net/npm/[email protected]/dist/main.js"
 			}
 			}
 		}
 		}
 	</script>
 	</script>

+ 2 - 2
manual/en/fundamentals.html

@@ -404,8 +404,8 @@ You can also use a CDN
 <pre class="prettyprint showlinemods notranslate lang-html" translate="no">&lt;script type="importmap"&gt;
 <pre class="prettyprint showlinemods notranslate lang-html" translate="no">&lt;script type="importmap"&gt;
 {
 {
   "imports": {
   "imports": {
-    "three": "https://unpkg.com/three@&lt;version&gt;/build/three.module.js",
-    "three/addons/": "https://unpkg.com/three@&lt;version&gt;/examples/jsm/"
+    "three": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/build/three.module.js",
+    "three/addons/": "https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/examples/jsm/"
   }
   }
 }
 }
 &lt;/script&gt;
 &lt;/script&gt;

+ 4 - 4
manual/examples/resources/editor-settings.js

@@ -169,8 +169,8 @@
 
 
 		const moduleRE = /(import.*?)('|")(.*?)('|")/g;
 		const moduleRE = /(import.*?)('|")(.*?)('|")/g;
 
 
-		// convert https://threejs.org/build/three.module.js -> https://unpkg.com/three@<version>
-		// convert https://threejs.org/examples/jsm/.?? -> https://unpkg.com/three@<version>/examples/jsm/.??
+		// convert https://threejs.org/build/three.module.js -> https://cdn.jsdelivr.net/npm/three@<version>
+		// convert https://threejs.org/examples/jsm/.?? -> https://cdn.jsdelivr.net/npm/three@<version>/examples/jsm/.??
 
 
 		if ( ! version ) {
 		if ( ! version ) {
 
 
@@ -194,12 +194,12 @@
 
 
 				if ( href.includes( '/build/three.module.js' ) ) {
 				if ( href.includes( '/build/three.module.js' ) ) {
 
 
-					return `https://unpkg.com/three@${version}`;
+					return `https://cdn.jsdelivr.net/npm/three@${version}`;
 
 
 				} else if ( href.includes( '/examples/jsm/' ) ) {
 				} else if ( href.includes( '/examples/jsm/' ) ) {
 
 
 					const url = new URL( href );
 					const url = new URL( href );
-					return `https://unpkg.com/three@${version}${url.pathname}${url.search}${url.hash}`;
+					return `https://cdn.jsdelivr.net/npm/three@${version}${url.pathname}${url.search}${url.hash}`;
 
 
 				}
 				}
 
 

+ 1 - 1
manual/examples/resources/editor.html

@@ -277,7 +277,7 @@ button:focus {
   </div>
   </div>
 </div>
 </div>
 </body>
 </body>
-<script src="https://unpkg.com/[email protected]/min/vs/loader.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/[email protected]/min/vs/loader.js"></script>
 <script src="editor-settings.js"></script>
 <script src="editor-settings.js"></script>
 <script src="editor.js"></script>
 <script src="editor.js"></script>
 
 

+ 1 - 1
manual/examples/resources/editor.js

@@ -1961,7 +1961,7 @@ async function openInStackBlitz() {
 		} else {
 		} else {
 
 
 			applySubstitutions();
 			applySubstitutions();
-			require.config( { paths: { 'vs': 'https://unpkg.com/[email protected]/min/vs' } } );
+			require.config( { paths: { 'vs': 'https://cdn.jsdelivr.net/npm/[email protected]/min/vs' } } );
 			require( [ 'vs/editor/editor.main' ], main );
 			require( [ 'vs/editor/editor.main' ], main );
 
 
 		}
 		}

+ 2 - 2
manual/fr/fundamentals.html

@@ -418,8 +418,8 @@ import {OrbitControls} from './someFolder/addons/controls/OrbitControls.js';
 </pre>
 </pre>
 <p>Cela est valable aussi lors de l'utilisation d'un CDN. Assurez vous que vos chemins versThis includes when using a CDN. Be  <code class="notranslate" translate="no">three.modules.js</code> terminent par
 <p>Cela est valable aussi lors de l'utilisation d'un CDN. Assurez vous que vos chemins versThis includes when using a CDN. Be  <code class="notranslate" translate="no">three.modules.js</code> terminent par
 <code class="notranslate" translate="no">/build/three.modules.js</code>. Par exemple :</p>
 <code class="notranslate" translate="no">/build/three.modules.js</code>. Par exemple :</p>
-<pre class="prettyprint">import * as THREE from 'https://unpkg.com/three@&lt;version&gt;/<b>build/three.module.js</b>';
-import {OrbitControls} from 'https://unpkg.com/three@&lt;version&gt;/addons/controls/OrbitControls.js';
+<pre class="prettyprint">import * as THREE from 'https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/<b>build/three.module.js</b>';
+import {OrbitControls} from 'https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/addons/controls/OrbitControls.js';
 </pre>
 </pre>
 </div>
 </div>
 
 

+ 2 - 2
manual/ja/fundamentals.html

@@ -301,8 +301,8 @@ three.jsの場合、すべてのexamplesを正しいフォルダ階層に入れ
 import {OrbitControls} from './someFolder/addons/controls/OrbitControls.js';
 import {OrbitControls} from './someFolder/addons/controls/OrbitControls.js';
 </pre>
 </pre>
 <p>これにはCDNを使用する場合も含まれます。 <code class="notranslate" translate="no">three.modules.js</code> のパスが <code class="notranslate" translate="no">/build/three.modules.js</code> のようになってる事を確認して下さい。例えば</p>
 <p>これにはCDNを使用する場合も含まれます。 <code class="notranslate" translate="no">three.modules.js</code> のパスが <code class="notranslate" translate="no">/build/three.modules.js</code> のようになってる事を確認して下さい。例えば</p>
-<pre class="prettyprint">import * as THREE from 'https://unpkg.com/three@&lt;version&gt;/<b>build/three.module.js</b>';
-import {OrbitControls} from 'https://unpkg.com/three@&lt;version&gt;/addons/controls/OrbitControls.js';
+<pre class="prettyprint">import * as THREE from 'https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/<b>build/three.module.js</b>';
+import {OrbitControls} from 'https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/addons/controls/OrbitControls.js';
 </pre>
 </pre>
 </div>
 </div>
 
 

+ 3 - 3
manual/ko/fundamentals.html

@@ -389,8 +389,8 @@ import {OrbitControls} from './someFolder/addons/controls/OrbitControls.js';
 </pre>
 </pre>
 <p>아래는 CDN을 사용하는 예시입니다. <code class="notranslate" translate="no">three.modules.js</code>의 경로가 <code class="notranslate" translate="no">/build/three.modules.js</code>
 <p>아래는 CDN을 사용하는 예시입니다. <code class="notranslate" translate="no">three.modules.js</code>의 경로가 <code class="notranslate" translate="no">/build/three.modules.js</code>
 로 끝나야 한다는 것을 명심하세요.</p>
 로 끝나야 한다는 것을 명심하세요.</p>
-<pre class="prettyprint">import * as THREE from 'https://unpkg.com/three@&lt;version&gt;/<b>build/three.module.js</b>';
-import {OrbitControls} from 'https://unpkg.com/three@&lt;version&gt;/addons/controls/OrbitControls.js';
+<pre class="prettyprint">import * as THREE from 'https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/<b>build/three.module.js</b>';
+import {OrbitControls} from 'https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/addons/controls/OrbitControls.js';
 </pre>
 </pre>
 </div>
 </div>
         </div>
         </div>
@@ -403,4 +403,4 @@ import {OrbitControls} from 'https://unpkg.com/three@&lt;version&gt;/addons/cont
 
 
 
 
 
 
-</body></html>
+</body></html>

+ 3 - 3
manual/zh/fundamentals.html

@@ -302,8 +302,8 @@ import {OrbitControls} from './someFolder/addons/controls/OrbitControls.js';
 </pre>
 </pre>
 <p>在使用CDN时,是同样的道理。确保<code class="notranslate" translate="no">three.modules.js</code>的路径以
 <p>在使用CDN时,是同样的道理。确保<code class="notranslate" translate="no">three.modules.js</code>的路径以
 <code class="notranslate" translate="no">/build/three.modules.js</code>结尾,比如</p>
 <code class="notranslate" translate="no">/build/three.modules.js</code>结尾,比如</p>
-<pre class="prettyprint">import * as THREE from 'https://unpkg.com/three@&lt;version&gt;/<b>build/three.module.js</b>';
-import {OrbitControls} from 'https://unpkg.com/three@&lt;version&gt;/addons/controls/OrbitControls.js';
+<pre class="prettyprint">import * as THREE from 'https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/<b>build/three.module.js</b>';
+import {OrbitControls} from 'https://cdn.jsdelivr.net/npm/three@&lt;version&gt;/addons/controls/OrbitControls.js';
 </pre>
 </pre>
 </div>
 </div>
         </div>
         </div>
@@ -316,4 +316,4 @@ import {OrbitControls} from 'https://unpkg.com/three@&lt;version&gt;/addons/cont
 
 
 
 
 
 
-</body></html>
+</body></html>