未验证 提交 d6e2fe3d 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #12690 from WestLangley/dev-cubetex

Docs: CubeTextureLoader Clarification
......@@ -31,12 +31,12 @@ var scene = new THREE.Scene();
scene.background = new THREE.CubeTextureLoader()
.setPath( 'textures/cubeMaps/' )
.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>
......@@ -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>
<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 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 />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册