提交 968581b4 编写于 作者: G gogoend

translate most files in the textures floder,and modify list.js

上级 c94eaed4
...@@ -10,67 +10,67 @@ ...@@ -10,67 +10,67 @@
<body> <body>
[page:Texture] &rarr; [page:Texture] &rarr;
<h1>[name]</h1> <h1>Canvas纹理([name])</h1>
<p class="desc"> <p class="desc">
Creates a texture from a canvas element.<br /><br /> 从Canvas元素中创建纹理贴图。<br /><br />
This is almost the same as the base [page:Texture Texture] class, except that it sets [page:Texture.needsUpdate needsUpdate] to *true* immediately. 它几乎与其基类[page:Texture Texture]相同,但它直接将[page:Texture.needsUpdate needsUpdate](需要更新)设置为了*true*。
</p> </p>
<h2>Constructor</h2> <h2>构造函数</h2>
<h3>[name]( [param:HTMLElement canvas], [param:Constant mapping], [param:Constant wrapS], [param:Constant wrapT], [param:Constant magFilter], [param:Constant minFilter], [param:Constant format], [param:Constant type], [param:Number anisotropy] )</h3> <h3>[name]( [param:HTMLElement canvas], [param:Constant mapping], [param:Constant wrapS], [param:Constant wrapT], [param:Constant magFilter], [param:Constant minFilter], [param:Constant format], [param:Constant type], [param:Number anisotropy] )</h3>
<p> <p>
[page:HTMLElement canvas] -- The HTML canvas element from which to load the texture. <br /> [page:HTMLElement canvas] -- 将会被用于加载纹理贴图的Canvas元素。<br />
[page:Constant mapping] -- How the image is applied to the object. An object type of [page:Textures THREE.UVMapping]. [page:Constant mapping] -- 纹理贴图将被如何应用(映射)到物体上,它是[page:Textures THREE.UVMapping]中的对象类型。
See [page:Textures mapping constants] for other choices.<br /> 请参阅[page:Textures mapping constants](映射模式常量)来了解其他选项。<br />
[page:Constant wrapS] -- The default is [page:Textures THREE.ClampToEdgeWrapping]. [page:Constant wrapS] -- 默认值是[page:Textures THREE.ClampToEdgeWrapping].
See [page:Textures wrap mode constants] for other choices.<br /> 请参阅[page:Textures wrap mode constants](包裹模式常量)来了解其他选项。<br />
[page:Constant wrapT] -- The default is [page:Textures THREE.ClampToEdgeWrapping]. [page:Constant wrapT] -- 默认值是[page:Textures THREE.ClampToEdgeWrapping].
See [page:Textures wrap mode constants] for other choices.<br /> 请参阅[page:Textures wrap mode constants](包裹模式常量)来了解其他选项。<br />
[page:Constant magFilter] -- How the texture is sampled when a texel covers more than one pixel. [page:Constant magFilter] -- 当一个纹素覆盖大于一个像素时,贴图将如何采样。
The default is [page:Textures THREE.LinearFilter]. See [page:Textures magnification filter constants] for other choices.<br /> 其默认值为[page:Textures THREE.LinearFilter]。请参阅[page:Textures magnification filter constants](放大滤镜常量)来了解其它选项。<br />
[page:Constant minFilter] -- How the texture is sampled when a texel covers less than one pixel. [page:Constant minFilter] -- 当一个纹素覆盖小于一个像素时,贴图将如何采样。
The default is [page:Textures THREE.LinearMipMapLinearFilter]. See [page:Textures minification filter constants] for other choices.<br /> 其默认值为[page:Textures THREE.LinearMipMapLinearFilter]。请参阅[page:Textures minification filter constants](缩小滤镜常量)来了解其它选项。<br />
[page:Constant format] -- The format used in the texture. [page:Constant format] -- 在纹理贴图中使用的格式。
See [page:Textures format constants] for other choices.<br /> 请参阅[page:Textures format constants](格式常量)来了解各个选项。<br />
[page:Constant type] -- Default is [page:Textures THREE.UnsignedByteType]. [page:Constant type] -- 默认值是[page:Textures THREE.UnsignedByteType].
See [page:Textures type constants] for other choices.<br /> 请参阅[page:Textures type constants](类型常量)来了解其他选项。<br />
[page:Number anisotropy] -- The number of samples taken along the axis through the pixel that has the highest density of texels. [page:Number anisotropy] -- 沿着轴,通过具有最高纹素密度的像素的样本数。
By default, this value is 1. A higher value gives a less blurry result than a basic mipmap, at the cost of more texture samples being used. 默认情况下,这个值为1。设置一个较高的值将会产生比基本的mipmap更清晰的效果,代价是需要使用更多纹理样本。
Use [page:WebGLrenderer.getMaxAnisotropy renderer.getMaxAnisotropy]() to find the maximum valid anisotropy value for the GPU; this value is usually a power of 2.<br /><br /> 使用[page:WebGLrenderer.getMaxAnisotropy renderer.getMaxAnisotropy]() 来查询GPU中各向异性的最大有效值;这个值通常是2的幂。<br /><br />
</p> </p>
<h2>Properties</h2> <h2>属性</h2>
<p> <p>
See the base [page:Texture Texture] class for common properties. 请参阅其基类[page:Texture Texture]来了解共有属性。
</p> </p>
<h3>[property:boolean needsUpdate]</h3> <h3>[property:boolean needsUpdate]</h3>
<p> <p>
True by default. This is required so that the canvas data is loaded. 默认值为true,这是必须的,以便使得Canvas中的数据能够载入。
</p> </p>
<h2>Methods</h2> <h2>方法</h2>
<p> <p>
See the base [page:Texture Texture] class for common methods. 请参阅[page:Texture Texture]来了解共有方法。
</p> </p>
<h2>Source</h2> <h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body> </body>
......
...@@ -10,78 +10,78 @@ ...@@ -10,78 +10,78 @@
<body> <body>
[page:Texture] &rarr; [page:Texture] &rarr;
<h1>[name]</h1> <h1>压缩的纹理([name])</h1>
<p class="desc"> <p class="desc">
Creates a texture based on data in compressed form, for example from a [link:https://en.wikipedia.org/wiki/DirectDraw_Surface DDS] file.<br /><br /> 基于被压缩的数据,创建一个纹理贴图,例如从一个[link:https://en.wikipedia.org/wiki/DirectDraw_Surface DDS]文件中。<br /><br />
For use with the [page:CompressedTextureLoader CompressedTextureLoader]. 它和[page:CompressedTextureLoader CompressedTextureLoader]一起使用。
</p> </p>
<h2>Constructor</h2> <h2>构造函数</h2>
<h3>[name]( [param:Array mipmaps], [param:Number width], [param:Number height], [param:Constant format], [param:Constant type], [param:Constant mapping], [param:Constant wrapS], [param:Constant wrapT], [param:Constant magFilter], [param:Constant minFilter], [param:Number anisotropy] )</h3> <h3>[name]( [param:Array mipmaps], [param:Number width], [param:Number height], [param:Constant format], [param:Constant type], [param:Constant mapping], [param:Constant wrapS], [param:Constant wrapT], [param:Constant magFilter], [param:Constant minFilter], [param:Number anisotropy] )</h3>
<p> <p>
[page:Array mipmaps] -- The mipmaps array should contain objects with data, width and height. The mipmaps should be of the correct format and type.<br /> [page:Array mipmaps] -- mipmaps数组中需要包含具有数据、宽、高的对象。mipmaps应当具有正确的格式与类型。<br />
[page:Number width] -- The width of the biggest mipmap.<br /> [page:Number width] -- 最大的mipmap的宽。<br />
[page:Number height] -- The height of the biggest mipmap.<br /> [page:Number height] -- 最大的mipmap的高。<br />
[page:Constant format] -- The format used in the mipmaps. [page:Constant format] -- 在mipmaps中使用的格式。
See [page:Textures ST3C Compressed Texture Formats], 请参阅[page:Textures ST3C Compressed Texture Formats]、
[page:Textures PVRTC Compressed Texture Formats] and [page:Textures PVRTC Compressed Texture Formats]
[page:Textures ETC Compressed Texture Format] for other choices.<br /> [page:Textures ETC Compressed Texture Format]页面来了解其它选项。<br />
[page:Constant type] -- Default is [page:Textures THREE.UnsignedByteType]. [page:Constant type] -- 默认值是[page:Textures THREE.UnsignedByteType]。
See [page:Textures type constants] for other choices.<br /> 请参阅[page:Textures type constants]页面来了解其它选项。<br />
[page:Constant mapping] -- How the image is applied to the object. An object type of [page:Textures THREE.UVMapping]. [page:Constant mapping] -- 纹理贴图将被如何应用(映射)到物体上,它是[page:Textures THREE.UVMapping]中的对象类型。
See [page:Textures mapping constants] for other choices.<br /> 请参阅[page:Textures mapping constants](映射模式常量)来了解其他选项。<br />
[page:Constant wrapS] -- The default is [page:Textures THREE.ClampToEdgeWrapping]. [page:Constant wrapS] -- 默认值是[page:Textures THREE.ClampToEdgeWrapping].
See [page:Textures wrap mode constants] for other choices.<br /> 请参阅[page:Textures wrap mode constants](包裹模式常量)来了解其他选项。<br />
[page:Constant wrapT] -- The default is [page:Textures THREE.ClampToEdgeWrapping]. [page:Constant wrapT] -- 默认值是[page:Textures THREE.ClampToEdgeWrapping].
See [page:Textures wrap mode constants] for other choices.<br /> 请参阅[page:Textures wrap mode constants](包裹模式常量)来了解其他选项。<br />
[page:Constant magFilter] -- How the texture is sampled when a texel covers more than one pixel. [page:Constant magFilter] -- 当一个纹素覆盖大于一个像素时,贴图将如何采样。
The default is [page:Textures THREE.LinearFilter]. See [page:Textures magnification filter constants] for other choices.<br /> 其默认值为[page:Textures THREE.LinearFilter]。请参阅[page:Textures magnification filter constants](放大滤镜常量)来了解其它选项。<br />
[page:Constant minFilter] -- How the texture is sampled when a texel covers less than one pixel. [page:Constant minFilter] -- 当一个纹素覆盖小于一个像素时,贴图将如何采样。
The default is [page:Textures THREE.LinearMipMapLinearFilter]. See [page:Textures minification filter constants] for other choices.<br /> 其默认值为[page:Textures THREE.LinearMipMapLinearFilter]。请参阅[page:Textures minification filter constants](缩小滤镜常量)来了解其它选项。<br />
[page:Number anisotropy] -- The number of samples taken along the axis through the pixel that has the highest density of texels. [page:Number anisotropy] -- 沿着轴,通过具有最高纹素密度的像素的样本数。
By default, this value is 1. A higher value gives a less blurry result than a basic mipmap, at the cost of more texture samples being used. 默认情况下,这个值为1。设置一个较高的值将会产生比基本的mipmap更清晰的效果,代价是需要使用更多纹理样本。
Use renderer.getMaxAnisotropy() to find the maximum valid anisotropy value for the GPU; this value is usually a power of 2.<br /><br /> 使用[page:WebGLrenderer.getMaxAnisotropy renderer.getMaxAnisotropy]() 来查询GPU中各向异性的最大有效值;这个值通常是2的幂。<br /><br />
</p> </p>
<h2>Properties</h2> <h2>属性</h2>
See the base [page:Texture Texture] class for common properties. 请参阅其基类[page:Texture Texture]来了解共有属性。
<h3>[property:boolean flipY]</h3> <h3>[property:boolean flipY]</h3>
<p> <p>
False by default. Flipping textures does not work for compressed textures. 默认值为false。翻转纹理在压缩的纹理贴图中无法工作。
</p> </p>
<h3>[property:boolean generateMipmaps]</h3> <h3>[property:boolean generateMipmaps]</h3>
<p> <p>
False by default. Mipmaps can't be generated for compressed textures 默认值为false。无法为压缩的纹理贴图生成Mipmap。
</p> </p>
<h2>Methods</h2> <h2>方法</h2>
<h2>Source</h2> <h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body> </body>
......
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
<body> <body>
[page:Texture] &rarr; [page:Texture] &rarr;
<h1>[name]</h1> <h1>立方纹理([name])</h1>
<p class="desc">Creates a cube texture made up of six images.</p> <p class="desc">创建一个由6张图片所组成的纹理对象。</p>
<h2>Example</h2> <h2>示例</h2>
<code> <code>
var loader = new THREE.CubeTextureLoader(); var loader = new THREE.CubeTextureLoader();
...@@ -29,28 +29,27 @@ ...@@ -29,28 +29,27 @@
var material = new THREE.MeshBasicMaterial( { color: 0xffffff, envMap: textureCube } ); var material = new THREE.MeshBasicMaterial( { color: 0xffffff, envMap: textureCube } );
</code> </code>
<h2>Constructor</h2> <h2>构造函数</h2>
<h3>[name]( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy )</h3> <h3>[name]( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy )</h3>
<p> <p>
CubeTexture is almost equivalent in functionality and usage to [page:Texture]. The only differences are that the CubeTexture(立方贴图)的功能以及用法几乎和[page:Texture]是相同的。区别在于,CubeTexture中的图像是6个单独的图像所组成的数组,
images are an array of 6 images as opposed to a single image, and the mapping options are 纹理映射选项为[page:Textures THREE.CubeReflectionMapping](默认值)或[page:Textures THREE.CubeRefractionMapping]。
[page:Textures THREE.CubeReflectionMapping] (default) or [page:Textures THREE.CubeRefractionMapping]
</p> </p>
<h2>Properties</h2> <h2>属性</h2>
<h3>See [page:Texture]</h3> <h3>请参阅[page:Texture]页面。</h3>
<h2>Methods</h2> <h2>方法</h2>
<h3>See [page:Texture]</h3> <h3>请参阅[page:Texture]页面。</h3>
<h2>Source</h2> <h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body> </body>
......
...@@ -12,39 +12,39 @@ ...@@ -12,39 +12,39 @@
<h1>[name]</h1> <h1>[name]</h1>
<p class="desc">Creates a three-dimensional texture. This type of texture can only be used with a WebGL 2 rendering context.</p> <p class="desc">创建一个三维的纹理贴图。这种纹理贴图只能被用于WebGL 2渲染环境中。</p>
<h2>Constructor</h2> <h2>构造函数</h2>
<h3>[name]( [param:TypedArray data], [param:Number width], [param:Number height], [param:Number depth] )</h3> <h3>[name]( [param:TypedArray data], [param:Number width], [param:Number height], [param:Number depth] )</h3>
<p> <p>
[page:Object data] -- data of the texture.<br /> [page:Object data] -- 纹理的数据。<br />
[page:Number width] -- width of the texture.<br /> [page:Number width] -- 纹理的宽度。<br />
[page:Number height] -- height of the texture.<br /> [page:Number height] -- 纹理的高度。<br />
[page:Number depth] -- depth of the texture. [page:Number depth] -- 纹理的深度。
</p> </p>
<h2>Example</h2> <h2>示例</h2>
<div>[example:webgl2_materials_texture3d WebGL2 / materials / texture3d]</div> <div>[example:webgl2_materials_texture3d WebGL2 / materials / texture3d]</div>
<div>[example:webgl2_materials_texture3d_volume WebGL2 / materials / texture3d / volume]</div> <div>[example:webgl2_materials_texture3d_volume WebGL2 / materials / texture3d / volume]</div>
<h2>Properties</h2> <h2>属性</h2>
<p> <p>
See the base [page:Texture Texture] class for common properties. 请参阅其基类[page:Texture Texture]来了解共有属性。
</p> </p>
<h2>Methods</h2> <h2>方法</h2>
<p> <p>
See the base [page:Texture Texture] class for common methods. 请参阅其基类[page:Texture Texture]来了解共有方法。
</p> </p>
<h2>Source</h2> <h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body> </body>
......
...@@ -10,103 +10,102 @@ ...@@ -10,103 +10,102 @@
<body> <body>
[page:Texture] &rarr; [page:Texture] &rarr;
<h1>[name]</h1> <h1>深度纹理([name])</h1>
<p class="desc"> <p class="desc">
Creates a texture for use as a Depth Texture. Require support for the 创建一个作为深度纹理贴图来使用的纹理。需要支持[link:https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/ WEBGL_depth_texture]扩展。
[link:https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/ WEBGL_depth_texture] extension.
</p> </p>
<h2>Example</h2> <h2>示例</h2>
[example:webgl_depth_texture depth / texture] [example:webgl_depth_texture depth / texture]
<h2>Constructor</h2> <h2>构造函数</h2>
<h3>[name]( [param:Number width], [param:Number height], [param:Constant type], [param:Constant wrapS], [param:Constant wrapT], [param:Constant magFilter], [param:Constant minFilter], [param:Number anisotropy], [param:Constant format] )</h3> <h3>[name]( [param:Number width], [param:Number height], [param:Constant type], [param:Constant wrapS], [param:Constant wrapT], [param:Constant magFilter], [param:Constant minFilter], [param:Number anisotropy], [param:Constant format] )</h3>
<p> <p>
[page:Number width] -- width of the texture.<br /> [page:Number width] -- 纹理的宽度。<br />
[page:Number height] -- height of the texture.<br /> [page:Number height] -- 纹理的高度。<br />
[page:Constant type] -- Default is [page:Textures THREE.UnsignedShortType]. [page:Constant type] -- 默认值是[page:Textures THREE.UnsignedShortType]。
See [page:Textures type constants] for other choices.<br /> 请参阅[page:Textures type constants](类型常量)来了解其他选项。<br />
[page:Constant mapping] -- [page:Constant mapping] --
See [page:Textures type constants] for details.<br /> 请参阅[page:Textures mapping constants](映射模式常量)来了解其他选项。<br />
[page:Constant wrapS] -- The default is [page:Textures THREE.ClampToEdgeWrapping]. [page:Constant wrapS] -- 默认值是[page:Textures THREE.ClampToEdgeWrapping].
See [page:Textures wrap mode constants] for other choices.<br /> 请参阅[page:Textures wrap mode constants](包裹模式常量)来了解其他选项。<br />
[page:Constant wrapT] -- The default is [page:Textures THREE.ClampToEdgeWrapping]. [page:Constant wrapT] -- 默认值是[page:Textures THREE.ClampToEdgeWrapping].
See [page:Textures wrap mode constants] for other choices.<br /> 请参阅[page:Textures wrap mode constants](包裹模式常量)来了解其他选项。<br />
[page:Constant magFilter] -- How the texture is sampled when a texel covers more than one pixel. [page:Constant magFilter] -- 当一个纹素覆盖大于一个像素时,贴图将如何采样。
The default is [page:Textures THREE.NearestFilter]. See [page:Textures magnification filter constants] for other choices.<br /> 其默认值为[page:Textures THREE.LinearFilter]。请参阅[page:Textures magnification filter constants](放大滤镜常量)来了解其它选项。<br />
[page:Constant minFilter] -- How the texture is sampled when a texel covers less than one pixel. [page:Constant minFilter] -- 当一个纹素覆盖小于一个像素时,贴图将如何采样。
The default is [page:Textures THREE.NearestFilter]. See [page:Textures minification filter constants] for other choices.<br /> 其默认值为[page:Textures THREE.LinearMipMapLinearFilter]。请参阅[page:Textures minification filter constants](缩小滤镜常量)来了解其它选项。<br />
[page:Number anisotropy] -- The number of samples taken along the axis through the pixel that has the highest density of texels. [page:Number anisotropy] -- 沿着轴,通过具有最高纹素密度的像素的样本数。
By default, this value is 1. A higher value gives a less blurry result than a basic mipmap, at the cost of more texture samples being used. 默认情况下,这个值为1。设置一个较高的值将会产生比基本的mipmap更清晰的效果,代价是需要使用更多纹理样本。
Use [page:WebGLrenderer.getMaxAnisotropy renderer.getMaxAnisotropy]() to find the maximum valid anisotropy value for the GPU; this value is usually a power of 2.<br /> 使用[page:WebGLrenderer.getMaxAnisotropy renderer.getMaxAnisotropy]() 来查询GPU中各向异性的最大有效值;这个值通常是2的幂。<br /><br />
[page:Constant format] -- must be either [page:Textures DepthFormat] (default) or [page:Textures DepthStencilFormat]. [page:Constant format] -- 这个值必须是[page:Textures DepthFormat](默认值)或者[page:Textures DepthStencilFormat]。
See [page:Textures format constants] for details.<br /> 请参阅[page:Textures format constants](格式常量)来了解详细信息。<br />
</p> </p>
<h2>Properties</h2> <h2>属性</h2>
<p> <p>
See the base [page:Texture Texture] class for common properties 请参阅其基类[page:Texture Texture]来了解共有属性。
- the following are also part of the texture class, but have different defaults here. —— 以下属性也是texture类中的一部分,但在这里默认值不同。
</p> </p>
<h3>[page:Texture.format .format]</h3> <h3>[page:Texture.format .format]</h3>
<p> <p>
Either [page:Textures DepthFormat] (default) or [page:Textures DepthStencilFormat]. [page:Textures DepthFormat](默认值)或者[page:Textures DepthStencilFormat]中的一个。
See [page:Textures format constants] for details.<br /> 请参阅[page:Textures format constants]来了解详细信息。<br />
</p> </p>
<h3>[page:Texture.type .type]</h3> <h3>[page:Texture.type .type]</h3>
<p> <p>
Default is [page:Textures THREE.UnsignedShortType]. 默认值是[page:Textures THREE.UnsignedShortType]。
See [page:Textures format constants] for details.<br /> 请参阅[page:Textures format constants]来了解详细信息。<br />
</p> </p>
<h3>[page:Texture.magFilter .magFilter]</h3> <h3>[page:Texture.magFilter .magFilter]</h3>
<p> <p>
How the texture is sampled when a texel covers more than one pixel. 当一个纹素覆盖大于一个像素时,贴图将如何采样。
The default is [page:Textures THREE.NearestFilter]. 其默认值为[page:Textures THREE.NearestFilter]。
See [page:Textures magnification filter constants] for other choices. 请参阅[page:Textures magnification filter constants](放大滤镜常量)来了解其他选项。
</p> </p>
<h3>[page:Texture.minFilter .minFilter]</h3> <h3>[page:Texture.minFilter .minFilter]</h3>
<p> <p>
How the texture is sampled when a texel covers less than one pixel. 当一个纹素覆盖小于一个像素时,贴图将如何采样。
The default is [page:Textures THREE.NearestFilter]. 其默认值为[page:Textures THREE.NearestFilter]。
See [page:Textures magnification filter constants] for other choices. 请参阅[page:Textures minification filter constants](缩小滤镜常量)来了解其他选项。
</p> </p>
<h3>[page:Texture.flipY .flipY]</h3> <h3>[page:Texture.flipY .flipY]</h3>
<p> <p>
Depth textures do not need to be flipped so this is *false* by default. 深度贴图不需要被翻转,因此其默认值为*false*。
</p> </p>
<h3>[page:Texture.generateMipmaps .generateMipmaps]</h3> <h3>[page:Texture.generateMipmaps .generateMipmaps]</h3>
<p> <p>
Depth textures do not use mipmaps. 深度贴图不使用mipmap。
</p> </p>
<h2>Methods</h2> <h2>方法</h2>
<p> <p>
See the base [page:Texture Texture] class for common methods. 请参阅其基类[page:Texture Texture]来了解共有方法。
</p> </p>
<h2>Source</h2> <h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body> </body>
......
...@@ -8,16 +8,16 @@ ...@@ -8,16 +8,16 @@
<link type="text/css" rel="stylesheet" href="page.css" /> <link type="text/css" rel="stylesheet" href="page.css" />
</head> </head>
<body> <body>
<h1>[name]</h1> <h1>纹理([name])</h1>
<p class="desc">Create a texture to apply to a surface or as a reflection or refraction map.</p> <p class="desc">创建一个纹理贴图,将其应用到一个表面,或者作为反射/折射贴图。</p>
<h2>Constructor</h2> <h2>构造函数</h2>
<h3>[name]( image, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding )</h3> <h3>[name]( image, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding )</h3>
<h2>Example</h2> <h2>源代码</h2>
<code> <code>
// load a texture, set wrap mode to repeat // load a texture, set wrap mode to repeat
...@@ -27,236 +27,233 @@ ...@@ -27,236 +27,233 @@
texture.repeat.set( 4, 4 ); texture.repeat.set( 4, 4 );
</code> </code>
<h2>Properties</h2> <h2>属性</h2>
<h3>[property:Integer id]</h3> <h3>[property:Integer id]</h3>
<p> <p>
Readonly - unique number for this texture instance. 只读 - 表示该纹理实例的唯一数字。
</p> </p>
<h3>[property:String uuid]</h3> <h3>[property:String uuid]</h3>
<p> <p>
[link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of this object instance. 该对象实例的[link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID]。
This gets automatically assigned, so this shouldn't be edited. 这个值是自动分配的,因此不应当对其进行编辑。
</p> </p>
<h3>[property:String name]</h3> <h3>[property:String name]</h3>
<p> <p>
Optional name of the object (doesn't need to be unique). Default is an empty string. 该对象的名称,可选,且无需唯一。默认值是一个空字符串。
</p> </p>
<h3>[property:Image image]</h3> <h3>[property:Image image]</h3>
<p> <p>
An image object, typically created using the [page:TextureLoader.load] method. 一个图片对象,通常由[page:TextureLoader.load]方法创建。
This can be any image (e.g., PNG, JPG, GIF, DDS) or video (e.g., MP4, OGG/OGV) type supported by three.js.<br /><br /> 该对象可以是被three.js所支持的任意图片(例如PNG、JPG、GIF、DDS)或视频(例如MP4、OGG/OGV)格式。<br /><br />
To use video as a texture you need to have a playing HTML5 要使用视频来作为纹理贴图,你需要有一个正在播放的HTML5 Video元素来作为你纹理贴图的源图像,
video element as a source for your texture image and continuously update this texture 并在视频播放时不断地更新这个纹理贴图。——[page:VideoTexture VideoTexture] 类会对此自动进行处理。
as long as video is playing - the [page:VideoTexture VideoTexture] class handles this automatically.
</p> </p>
<h3>[property:array mipmaps]</h3> <h3>[property:array mipmaps]</h3>
<p> <p>
Array of user-specified mipmaps (optional). 用户所给定的mipmap数组(可选)。
</p> </p>
<h3>[property:number mapping]</h3> <h3>[property:number mapping]</h3>
<p> <p>
How the image is applied to the object. An object type of [page:Textures THREE.UVMapping] is the default, 图像将如何应用到物体(对象)上。默认值是[page:Textures THREE.UVMapping]对象类型,
where the U,V coordinates are used to apply the map.<br /> 即UV坐标将被用于纹理映射。<br />
See the [page:Textures texture constants] page for other mapping types. 请参阅[page:Textures texture constants](映射模式常量)来了解其他映射类型。
</p> </p>
<h3>[property:number wrapS]</h3> <h3>[property:number wrapS]</h3>
<p> <p>
This defines how the texture is wrapped horizontally and corresponds to *U* in UV mapping.<br /> 这个值定义了纹理贴图在水平方向上将如何包裹,在UV映射中对应于*U*。<br />
The default is [page:Textures THREE.ClampToEdgeWrapping], where the edge is clamped to the outer edge texels. 默认值是[page:Textures THREE.ClampToEdgeWrapping],即纹理边缘将被推到外部边缘的纹素。
The other two choices are [page:Textures THREE.RepeatWrapping] and [page:Textures THREE.MirroredRepeatWrapping].
See the [page:Textures texture constants] page for details. 其它的两个选项分别是[page:Textures THREE.RepeatWrapping]和[page:Textures THREE.MirroredRepeatWrapping]。
请参阅[page:Textures texture constants]来了解详细信息。
</p> </p>
<h3>[property:number wrapT]</h3> <h3>[property:number wrapT]</h3>
<p> <p>
This defines how the texture is wrapped vertically and corresponds to *V* in UV mapping.<br /> 这个值定义了纹理贴图在垂直方向上将如何包裹,在UV映射中对应于*V*。<br />
The same choices are available as for [property:number wrapS].<br /><br /> 可以使用与[property:number wrapS]相同的选项。<br /><br />
NOTE: tiling of images in textures only functions if image dimensions are powers of two 请注意:纹理中图像的平铺,仅有当图像大小(以像素为单位)为2的幂(2、4、8、16、32、64、128、256、512、1024、2048、……)时才起作用。
(2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...) in terms of pixels. 宽度、高度无需相等,但每个维度的长度必须都是2的幂。
Individual dimensions need not be equal, but each must be a power of two. 这是WebGL中的限制,不是由three.js所限制的。
This is a limitation of WebGL, not three.js.
</p> </p>
<h3>[property:number magFilter]</h3> <h3>[property:number magFilter]</h3>
<p> <p>
How the texture is sampled when a texel covers more than one pixel. The default is 当一个纹素覆盖大于一个像素时,贴图将如何采样。默认值为[page:Textures THREE.LinearFilter],
[page:Textures THREE.LinearFilter], which takes the four closest texels and bilinearly interpolates among them. 它将获取四个最接近的纹素,并在他们之间进行双线性插值。
The other option is [page:Textures THREE.NearestFilter], which uses the value of the closest texel.<br /> 另一个选项是[page:Textures THREE.NearestFilter],它将使用最接近的纹素的值。<br />
See the [page:Textures texture constants] page for details. 请参阅[page:Textures texture constants]页面来了解详细信息。
</p> </p>
<h3>[property:number minFilter]</h3> <h3>[property:number minFilter]</h3>
<p> <p>
How the texture is sampled when a texel covers less than one pixel. The default is 当一个纹素覆盖小于一个像素时,贴图将如何采样。默认值为[page:Textures THREE.LinearMipMapLinearFilter],
[page:Textures THREE.LinearMipMapLinearFilter], which uses mipmapping and a trilinear filter. <br /><br /> 它将使用mipmapping以及三次线性滤镜。<br /><br />
See the [page:Textures texture constants] page for all possible choices. 请参阅[page:Textures texture constants]页面来了解所有可能的选项。
</p> </p>
<h3>[property:number anisotropy]</h3> <h3>[property:number anisotropy]</h3>
<p> <p>
The number of samples taken along the axis through the pixel that has the highest density of texels. 沿着轴,通过具有最高纹素密度的像素的样本数。
By default, this value is 1. A higher value gives a less blurry result than a basic mipmap, 默认情况下,这个值为1。设置一个较高的值将会产生比基本的mipmap更清晰的效果,代价是需要使用更多纹理样本。
at the cost of more texture samples being used. Use [page:WebGLRenderer.getMaxAnisotropy renderer.getMaxAnisotropy]() to 使用[page:WebGLrenderer.getMaxAnisotropy renderer.getMaxAnisotropy]() 来查询GPU中各向异性的最大有效值;这个值通常是2的幂。
find the maximum valid anisotropy value for the GPU; this value is usually a power of 2.
</p> </p>
<h3>[property:number format]</h3> <h3>[property:number format]</h3>
<p> <p>
The default is [page:Textures THREE.RGBAFormat], although the [page:TextureLoader TextureLoader] will automatically 默认值为[page:Textures THREE.RGBAFormat],
set this to [page:Textures THREE.RGBFormat] for JPG images. <br /><br /> 但[page:TextureLoader TextureLoader]将会在载入JPG图片时自动将这个值设置为[page:Textures THREE.RGBFormat]。<br /><br />
See the [page:Textures texture constants] page for details of other formats. 请参阅[page:Textures texture constants]页面来了解其它格式。
</p> </p>
<h3>[property:number type]</h3> <h3>[property:number type]</h3>
<p> <p>
This must correspond to the [page:Texture.format .format]. The default is [page:Textures THREE.UnsignedByteType], 这个值必须与[page:Texture.format .format]相对应。默认值为[page:Textures THREE.UnsignedByteType],
which will be used for most texture formats.<br /><br /> 它将会被用于绝大多数纹理格式。<br /><br />
See the [page:Textures texture constants] page for details of other formats. 请参阅[page:Textures texture constants]来了解其它格式。
</p> </p>
<h3>[property:Vector2 offset]</h3> <h3>[property:Vector2 offset]</h3>
<p> <p>
How much a single repetition of the texture is offset from the beginning, in each direction U and V. 纹理在单次重复时,从一开始将分别在U、V方向上偏移多少。
Typical range is *0.0* to *1.0*. _Note:_ The offset property is a convenience modifier and only affects 这个值的范围通常在*0.0*之间*1.0*。
the Texture's application to the first set of UVs on a model. If the Texture is used as a map requiring 请注意:这一属性是一个非常方便的修改器,仅仅影响纹理对模型上第一组UV的应用。
additional UV sets (e.g. the aoMap or lightMap of most stock materials), those UVs must be manually 如果该纹理被用于需要额外的UV集的贴图(例如一些成品材质中的aoMap或lightMap),
assigned to achieve the desired offset. 这些UV必须被手动调整来实现所期望的偏移。
</p> </p>
<h3>[property:Vector2 repeat]</h3> <h3>[property:Vector2 repeat]</h3>
<p> <p>
How many times the texture is repeated across the surface, in each direction U and V. If repeat is set 纹理将在表面上,分别在U、V方向重复多少次。如果这个值在任意方向上设置为大于1,
greater than 1 in either direction, the corresponding Wrap parameter should also be set to 则对应的Wrap参数应当也被设为[page:Textures THREE.RepeatWrapping]或[page:Textures THREE.MirroredRepeatWrapping],
[page:Textures THREE.RepeatWrapping] or [page:Textures THREE.MirroredRepeatWrapping] to achieve the desired 以实现所期望的平铺效果。
tiling effect. _Note:_ The repeat property is a convenience modifier and only affects 请注意:这一属性是一个非常方便的修改器,仅仅影响纹理对模型上第一组UV的应用。
the Texture's application to the first set of UVs on a model. If the Texture is used as a map requiring 如果该纹理被用于需要额外的UV集的贴图(例如一些成品材质中的aoMap或lightMap),
additional UV sets (e.g. the aoMap or lightMap of most stock materials), those UVs must be manually 这些UV必须被手动调整来实现所期望的重复。
assigned to achieve the desired repetiton.
</p> </p>
<h3>[property:number rotation]</h3> <h3>[property:number rotation]</h3>
<p> <p>
How much the texture is rotated around the center point, in radians. Postive values are counter-clockwise. Default is *0*. 纹理将围绕中心点旋转多少度,单位为弧度(rad)。正值为逆时针方向旋转,默认值为*0*。
</p> </p>
<h3>[property:Vector2 center]</h3> <h3>[property:Vector2 center]</h3>
<p> <p>
The point around which rotation occurs. A value of (0.5, 0.5) corresponds to the center of the texture. Default is (0, 0), the lower left. 旋转中心点。(0.5, 0.5)对应纹理的正中心。默认值为(0,0),即左下角。
</p> </p>
<h3>[property:boolean matrixAutoUpdate]</h3> <h3>[property:boolean matrixAutoUpdate]</h3>
<p> <p>
Whether to update the texture's uv-transform [page:Texture.matrix .matrix] from the texture properties [page:Texture.offset .offset], [page:Texture.repeat .repeat], 是否从纹理的[page:Texture.offset .offset]、[page:Texture.repeat .repeat]、[page:Texture.rotation .rotation]和[page:Texture.center .center]属性更新纹理的UV变换矩阵(uv-transform [page:Texture.matrix .matrix])。
[page:Texture.rotation .rotation], and [page:Texture.center .center]. True by default. 默认值为true。
Set this to false if you are specifying the uv-transform matrix directly. 如果你要直接指定纹理的变换矩阵,请将其设为false。
</p> </p>
<h3>[property:Matrix3 matrix]</h3> <h3>[property:Matrix3 matrix]</h3>
<p> <p>
The uv-transform matrix for the texture. Updated by the renderer from the texture properties [page:Texture.offset .offset], [page:Texture.repeat .repeat], 纹理的UV变换矩阵。
[page:Texture.rotation .rotation], and [page:Texture.center .center] when the texture's [page:Texture.matrixAutoUpdate .matrixAutoUpdate] property is true. 当纹理的[page:Texture.matrixAutoUpdate .matrixAutoUpdate]属性为true时,
When [page:Texture.matrixAutoUpdate .matrixAutoUpdate] property is false, this matrix may be set manually. 由渲染器从纹理的[page:Texture.offset .offset]、[page:Texture.repeat .repeat]、[page:Texture.rotation .rotation]和[page:Texture.center .center]属性中进行更新。
Default is the identity matrix. 当[page:Texture.matrixAutoUpdate .matrixAutoUpdate]属性为false时,该矩阵可以被手动设置。
默认值为单位矩阵。
</p> </p>
<h3>[property:boolean generateMipmaps]</h3> <h3>[property:boolean generateMipmaps]</h3>
<p> <p>
Whether to generate mipmaps (if possible) for a texture. True by default. Set this to false if you are 是否为纹理生成mipmap(如果可用)。默认为true。
creating mipmaps manually. 如果你手动生成mipmap,请将其设为false。
</p> </p>
<h3>[property:boolean premultiplyAlpha]</h3> <h3>[property:boolean premultiplyAlpha]</h3>
<p> <p>
False by default, which is the norm for PNG images. Set to true if the RGB values have 默认为false,这是PNG图像的规范。
been stored premultiplied by alpha. 如果RGB值已被Alpha预乘,请将其设为true。
</p> </p>
<h3>[property:boolean flipY]</h3> <h3>[property:boolean flipY]</h3>
<p> <p>
True by default. Flips the image's Y axis to match the WebGL texture coordinate space. 默认为true。翻转图像的Y轴以匹配WebGL纹理坐标空间。
</p> </p>
<h3>[property:number unpackAlignment]</h3> <h3>[property:number unpackAlignment]</h3>
<p> <p>
4 by default. Specifies the alignment requirements for the start of each pixel row in memory. 默认为4。指定内存中每个像素行起点的对齐要求。
The allowable values are 1 (byte-alignment), 2 (rows aligned to even-numbered bytes), 允许的值为1(字节对齐)、2(行对齐到偶数字节)、4(字对齐)和8(行从双字边界开始)。
4 (word-alignment), and 8 (rows start on double-word boundaries). 请参阅[link:http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml glPixelStorei]来了解详细信息。
See [link:http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml glPixelStorei]
for more information.
</p> </p>
<h3>[property:number encoding]</h3> <h3>[property:number encoding]</h3>
<p> <p>
[page:Textures THREE.LinearEncoding] is the default. 默认值为[page:Textures THREE.LinearEncoding]。
See the [page:Textures texture constants] page for details of other formats.<br /><br /> 请参阅[page:Textures texture constants]来了解其他格式的详细信息。<br /><br />
Note that if this value is changed on a texture after the material has been used, 请注意,如果在材质被使用之后,纹理贴图中这个值发生了改变,
it is necessary to trigger a Material.needsUpdate for this value to be realized in the shader. 需要触发Material.needsUpdate,来使得这个值在着色器中实现。
</p> </p>
<h3>[property:Integer version]</h3> <h3>[property:Integer version]</h3>
<p> <p>
This starts at *0* and counts how many times [property:Boolean needsUpdate] is set to *true*. 这个值起始值为*0*,计算[property:Boolean needsUpdate]被设置为*true*的次数。
</p> </p>
<h3>[property:Function onUpdate]</h3> <h3>[property:Function onUpdate]</h3>
<p> <p>
A callback function, called when the texture is updated (e.g., when needsUpdate has been set to true 一个回调函数,在纹理被更新后调用。
and then the texture is used). (例如,当needsUpdate被设为true且纹理被使用。)
</p> </p>
<h3>[property:Boolean needsUpdate]</h3> <h3>[property:Boolean needsUpdate]</h3>
<p> <p>
Set this to *true* to trigger an update next time the texture is used. Particularly important for setting the wrap mode. 将其设置为*true*,以便在下次使用纹理时触发一次更新。
这对于设置包裹模式尤其重要。
</p> </p>
<h2>Methods</h2> <h2>方法</h2>
<h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3> <h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
<h3>[method:null updateMatrix]()</h3> <h3>[method:null updateMatrix]()</h3>
<p> <p>
Update the texture's uv-transform [page:Texture.matrix .matrix] from the texture properties [page:Texture.offset .offset], [page:Texture.repeat .repeat], 从纹理的[page:Texture.offset .offset]、[page:Texture.repeat .repeat]、
[page:Texture.rotation .rotation], and [page:Texture.center .center]. [page:Texture.rotation .rotation]和[page:Texture.center .center]属性来更新纹理的UV变换矩阵(uv-transform [page:Texture.matrix .matrix])。
</p> </p>
<h3>[method:Texture clone]()</h3> <h3>[method:Texture clone]()</h3>
<p> <p>
Make copy of the texture. Note this is not a "deep copy", the image is shared. 拷贝纹理。请注意。这不是“深拷贝”,图像是共用的。
</p> </p>
<h3>[method:Texture toJSON]( [param:Object meta] )</h3> <h3>[method:Texture toJSON]( [param:Object meta] )</h3>
<p> <p>
meta -- optional object containing metadata.<br /> meta -- 可选,包含有元数据的对象。<br />
Convert the material to three.js JSON format. 将材质转换为three.js JSON格式。
</p> </p>
<h3>[method:null dispose]()</h3> <h3>[method:null dispose]()</h3>
<p> <p>
Call [page:EventDispatcher EventDispatcher].dispatchEvent with a 'dispose' event type. 使用“dispose”事件类型调用[page:EventDispatcher EventDispatcher].dispatchEvent。
</p> </p>
<h3>[method:Vector2 transformUv]( [param:Vector2 uv] )</h3> <h3>[method:Vector2 transformUv]( [param:Vector2 uv] )</h3>
<p> <p>
Transform the uv based on the value of this texture's [page:Texture.offset .offset], [page:Texture.repeat .repeat], 基于纹理的[page:Texture.offset .offset]、[page:Texture.repeat .repeat]、
[page:Texture.wrapS .wrapS], [page:Texture.wrapT .wrapT] and [page:Texture.flipY .flipY] properties. [page:Texture.wrapS .wrapS]、[page:Texture.wrapT .wrapT]和[page:Texture.flipY .flipY]属性值来变换uv。
</p> </p>
<h2>Source</h2> <h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body> </body>
......
...@@ -10,15 +10,15 @@ ...@@ -10,15 +10,15 @@
<body> <body>
[page:Texture] &rarr; [page:Texture] &rarr;
<h1>[name]</h1> <h1>视频纹理([name])</h1>
<p class="desc"> <p class="desc">
Creates a texture for use with a video texture.<br /><br /> 创建一个使用视频来作为贴图的纹理对象。<br /><br />
This is almost the same as the base [page:Texture Texture] class, except that it continuosly sets [page:Texture.needsUpdate needsUpdate] to *true* so that the texture is updated as the video plays. Automatic creation of [page:Texture.mipmaps mipmaps] is also disabled. 它和其基类[page:Texture Texture]几乎是相同的,除了它总是将[page:Texture.needsUpdate needsUpdate]设置为*true*,以便使得贴图能够在视频播放时进行更新。自动创建[page:Texture.mipmaps mipmaps]也会被禁用。
</p> </p>
<h2>Example</h2> <h2>示例</h2>
<p>[example:webgl_materials_video materials / video ]</p> <p>[example:webgl_materials_video materials / video ]</p>
...@@ -33,63 +33,63 @@ texture.format = THREE.RGBFormat; ...@@ -33,63 +33,63 @@ texture.format = THREE.RGBFormat;
</code> </code>
<h2>Constructor</h2> <h2>构造函数</h2>
<h3>[name]( [param:Video video], [param:Constant mapping], [param:Constant wrapS], [param:Constant wrapT], [param:Constant magFilter], [param:Constant minFilter], [param:Constant format], [param:Constant type], [param:Number anisotropy] )</h3> <h3>[name]( [param:Video video], [param:Constant mapping], [param:Constant wrapS], [param:Constant wrapT], [param:Constant magFilter], [param:Constant minFilter], [param:Constant format], [param:Constant type], [param:Number anisotropy] )</h3>
<p> <p>
[page:Video video] -- The video element to use as the texture. <br /> [page:Video video] -- 将被作为纹理贴图来使用的Video元素。<br />
[page:Constant mapping] -- How the image is applied to the object. An object type of [page:Textures THREE.UVMapping]. [page:Constant mapping] -- 纹理贴图将被如何应用(映射)到物体上,它是[page:Textures THREE.UVMapping]中的对象类型。
See [page:Textures mapping constants] for other choices.<br /> 请参阅[page:Textures mapping constants](映射模式常量)来了解其他选项。<br />
[page:Constant wrapS] -- The default is [page:Textures THREE.ClampToEdgeWrapping]. [page:Constant wrapS] -- 默认值是[page:Textures THREE.ClampToEdgeWrapping].
See [page:Textures wrap mode constants] for other choices.<br /> 请参阅[page:Textures wrap mode constants](包裹模式常量)来了解其他选项。<br />
[page:Constant wrapT] -- The default is [page:Textures THREE.ClampToEdgeWrapping]. [page:Constant wrapT] -- 默认值是[page:Textures THREE.ClampToEdgeWrapping].
See [page:Textures wrap mode constants] for other choices.<br /> 请参阅[page:Textures wrap mode constants](包裹模式常量)来了解其他选项。<br />
[page:Constant magFilter] -- How the texture is sampled when a texel covers more than one pixel. [page:Constant magFilter] -- 当一个纹素覆盖大于一个像素时,贴图将如何采样。
The default is [page:Textures THREE.LinearFilter]. See [page:Textures magnification filter constants] for other choices.<br /> 其默认值为[page:Textures THREE.LinearFilter]。请参阅[page:Textures magnification filter constants](放大滤镜常量)来了解其它选项。<br />
[page:Constant minFilter] -- How the texture is sampled when a texel covers less than one pixel. [page:Constant minFilter] -- 当一个纹素覆盖小于一个像素时,贴图将如何采样。
The default is [page:Textures THREE.LinearMipMapLinearFilter]. See [page:Textures minification filter constants] for other choices.<br /> 其默认值为[page:Textures THREE.LinearMipMapLinearFilter]。请参阅[page:Textures minification filter constants](缩小滤镜常量)来了解其它选项。<br />
[page:Constant format] -- The format used in the texture. [page:Constant format] -- 在纹理贴图中使用的格式。
See [page:Textures format constants] for other choices.<br /> 请参阅[page:Textures format constants](格式常量)来了解各个选项。<br />
[page:Constant type] -- Default is [page:Textures THREE.UnsignedByteType]. [page:Constant type] -- 默认值是[page:Textures THREE.UnsignedByteType].
See [page:Textures type constants] for other choices.<br /> 请参阅[page:Textures type constants](类型常量)来了解其他选项。<br />
[page:Number anisotropy] -- The number of samples taken along the axis through the pixel that has the highest density of texels. [page:Number anisotropy] -- 沿着轴,通过具有最高纹素密度的像素的采样数。
By default, this value is 1. A higher value gives a less blurry result than a basic mipmap, at the cost of more texture samples being used. 默认情况下,这个值为1。设置一个较高的值将会比基本的mipmap产生更清晰的效果,代价是需要使用更多纹理样本。
Use [page:WebGLrenderer.getMaxAnisotropy renderer.getMaxAnisotropy]() to find the maximum valid anisotropy value for the GPU; this value is usually a power of 2.<br /><br /> 使用[page:WebGLrenderer.getMaxAnisotropy renderer.getMaxAnisotropy]() 来查询GPU中各向异性的最大有效值;这个值通常是2的幂。<br /><br />
</p> </p>
<h2>Properties</h2> <h2>属性</h2>
<p> <p>
See the base [page:Texture Texture] class for common properties. 请参阅其基类[page:Texture Texture]来了解共有属性。
</p> </p>
<h3>[property:boolean needsUpdate]</h3> <h3>[property:boolean needsUpdate]</h3>
<p> <p>
You will not need to set this manually here as it is handled by the [page:VideoTexture.update update] method. 在这里,你不必手动设置这个值,因为它是由[page:VideoTexture.update update]方法来进行控制的。
</p> </p>
<h2>Methods</h2> <h2>方法</h2>
<p> <p>
See the base [page:Texture Texture] class for common methods. 请参阅其基类[page:Texture Texture]来查看共有方法。
</p> </p>
<h3>[method:null update]()</h3> <h3>[method:null update]()</h3>
<p> <p>
This is called automatically and sets [property:boolean needsUpdate] to *true* every time 在每一次新的一帧可用时,这个方法将被自动调用,
a new frame is available. 并将[property:boolean needsUpdate]设置为*true*。
</p> </p>
<h2>Source</h2> <h2>源代码</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body> </body>
......
...@@ -758,7 +758,7 @@ var list = { ...@@ -758,7 +758,7 @@ var list = {
"CompressedTexture": "api/zh/textures/CompressedTexture", "CompressedTexture": "api/zh/textures/CompressedTexture",
"CubeTexture": "api/zh/textures/CubeTexture", "CubeTexture": "api/zh/textures/CubeTexture",
"DataTexture": "api/zh/textures/DataTexture", "DataTexture": "api/zh/textures/DataTexture",
"DataTexture3D": "api/en/textures/DataTexture3D", "DataTexture3D": "api/zh/textures/DataTexture3D",
"DepthTexture": "api/zh/textures/DepthTexture", "DepthTexture": "api/zh/textures/DepthTexture",
"Texture": "api/zh/textures/Texture", "Texture": "api/zh/textures/Texture",
"VideoTexture": "api/zh/textures/VideoTexture" "VideoTexture": "api/zh/textures/VideoTexture"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册