Parcourir la source

Docs: Deprecate examples/js.

Mugen87 il y a 5 ans
Parent
commit
5a6a4cffc1

+ 2 - 2
docs/manual/en/introduction/Import-via-modules.html

@@ -66,8 +66,8 @@
 		<p>
 			The core of three.js is focused on the most important components of a 3D engine. Many other components like loaders or controls are part of the
 			examples directory. three.js ensures that these files are kept in sync with the core but users have to import them separately if they are required
-			for a project. You can find in the [link:https://github.com/mrdoob/three.js/tree/master/examples/jsm examples/jsm] directory an ES6
-			module version for almost all example files. If you install three.js via npm, you can import them like so:
+			for a project. You can find them in the [link:https://github.com/mrdoob/three.js/tree/master/examples/jsm examples/jsm] directory. If you install three.js
+			via npm, import example files like so:
 		</p>
 		<code>
 		import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';

+ 1 - 10
docs/manual/en/introduction/Loading-3D-models.html

@@ -81,19 +81,10 @@
 
 	<p>
 		Only a few loaders (e.g. [page:ObjectLoader]) are included by default with
-		three.js — others should be added to your page individually. Depending on your
-		preference and comfort with build tools, choose one of the following:
+		three.js — others should be added to your app individually.
 	</p>
 
 	<code>
-		// global script
-		&lt;script src="GLTFLoader.js"&gt;&lt;/script&gt;
-
-		// commonjs
-		var THREE = window.THREE = require('three');
-		require('three/examples/js/loaders/GLTFLoader');
-
-		// ES modules
 		import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
 	</code>
 

+ 4 - 4
docs/manual/zh/introduction/Import-via-modules.html

@@ -64,10 +64,10 @@
 
 		<h2>可引入的示例</h2>
 		<p>
-			three.js的核心专注于实现3D引擎中最为重要的组件。其他诸如加载器和控制器等组件,是示例文件夹中的一部分。
-			three.js确保这些文件能够与核心保持同步,但如果在一个项目中这些组件是必要的,用户将必须分别地引入它们。
-			你可以在[link:https://github.com/mrdoob/three.js/tree/master/examples/jsm examples/jsm]文件夹中找到所有示例文件的ES6版本。
-			如果你是通过npm来安装three.js的,那么你可以使用类似下面的代码来引入它们:
+			The core of three.js is focused on the most important components of a 3D engine. Many other components like loaders or controls are part of the
+			examples directory. three.js ensures that these files are kept in sync with the core but users have to import them separately if they are required
+			for a project. You can find them in the [link:https://github.com/mrdoob/three.js/tree/master/examples/jsm examples/jsm] directory. If you install three.js
+			via npm, import example files like so:
 		</p>
 		<code>
 		import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';

+ 2 - 10
docs/manual/zh/introduction/Loading-3D-models.html

@@ -70,19 +70,11 @@
 	<h2>加载</h2>
 
 	<p>
-		three.js中默认仅包含了几个加载器(例如:[page:ObjectLoader])——其它加载器需要你分别地添加到页面中。
-		取决于你对构建工具的偏好,选择以下任意一种方式:
+		Only a few loaders (e.g. [page:ObjectLoader]) are included by default with
+		three.js — others should be added to your app individually.
 	</p>
 
 	<code>
-		// global script
-		&lt;script src="GLTFLoader.js"&gt;&lt;/script&gt;
-
-		// commonjs
-		var THREE = window.THREE = require('three');
-		require('three/examples/js/loaders/GLTFLoader');
-
-		// ES modules
 		import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
 	</code>