浏览代码

Merge pull request #12690 from WestLangley/dev-cubetex

Docs: CubeTextureLoader Clarification
Mr.doob 7 年之前
父节点
当前提交
d6e2fe3d6a
共有 1 个文件被更改,包括 12 次插入8 次删除
  1. 12 8
      docs/api/loaders/CubeTextureLoader.html

+ 12 - 8
docs/api/loaders/CubeTextureLoader.html

@@ -31,12 +31,12 @@ var scene = new THREE.Scene();
 scene.background = new THREE.CubeTextureLoader()
 scene.background = new THREE.CubeTextureLoader()
 	.setPath( 'textures/cubeMaps/' )
 	.setPath( 'textures/cubeMaps/' )
 	.load( [
 	.load( [
-				'1.png',
-				'2.png',
-				'3.png',
-				'4.png',
-				'5.png',
-				'6.png'
+				'px.png',
+				'nx.png',
+				'py.png',
+				'ny.png',
+				'pz.png',
+				'nz.png'
 			] );
 			] );
 		</code>
 		</code>
 
 
@@ -73,8 +73,12 @@ scene.background = new THREE.CubeTextureLoader()
 
 
 		<h3>[method:null load]( [page:String urls], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<h3>[method:null load]( [page:String urls], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
 		<div>
 		<div>
-		[page:String urls] — array of 6 urls to images, one for each side of the CubeTexture. These can also be
-			[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URIs].<br />
+		[page:String urls] — array of 6 urls to images, one for each side of the CubeTexture.
+		The urls should be specified in the following order: pos-x, neg-x, pos-y, neg-y, pos-z, neg-z.
+		They can also be [link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URIs].<br />
+		Note that, by convention, cube maps are specified in a coordinate system in which positive-x is to the right
+		when looking up the positive-z axis -- in other words, using a left-handed coordinate system.
+		Since three.js uses a right-handed coordinate system, environment maps used in three.js will have pos-x and neg-x swapped.<br />
 		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Texture texture].<br />
 		[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Texture texture].<br />
 		[page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes.<br />
 		[page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes.<br />
 		[page:Function onError] — Will be called when load errors.<br />
 		[page:Function onError] — Will be called when load errors.<br />