|
@@ -122,13 +122,10 @@
|
|
|
|
|
|
<h3>[property:String internalFormat]</h3>
|
|
|
<p>
|
|
|
- The default value is obtained using a combination of [page:Texture.format .format] and
|
|
|
- [page:Texture.type .type].<br />
|
|
|
+ 此项的默认值由[page:Texture.format .format]和[page:Texture.type .type]混合并决定。<br />
|
|
|
|
|
|
- The GPU format allows the developer to specify how the data is going to be
|
|
|
- stored on the GPU.<br /><br />
|
|
|
-
|
|
|
- See the [page:Textures texture constants] page for details regarding all supported internal formats.
|
|
|
+ 这项GPU格式设置允许开发者决定在GPU中的数据存储方式。<br /><br />
|
|
|
+ 查看[page:Textures texture constants]页面来了解所有可用的Internal Formats以及其细节。
|
|
|
</p>
|
|
|
|
|
|
<h3>[property:number type]</h3>
|
|
@@ -141,12 +138,12 @@
|
|
|
|
|
|
<h3>[property:Vector2 offset]</h3>
|
|
|
<p>
|
|
|
- How much a single repetition of the texture is offset from the beginning, in each direction U and V.
|
|
|
- Typical range is *0.0* to *1.0*.
|
|
|
+ 贴图单次重复中的起始偏移量,分别表示U和V。
|
|
|
+ 一般范围是由`0.0`到`1.0`。
|
|
|
</p>
|
|
|
<p>
|
|
|
- The below texture types share the *first* uv channel in the engine. The offset (and repeat) setting is evaluated according to
|
|
|
- the following priorities and then shared by those textures:
|
|
|
+ 在此引擎中下列纹理共享`第一套`uv通道。
|
|
|
+ 偏移量(以及重复次数)的设置项按照下列纹理进行优先级排列并共享:
|
|
|
<ol>
|
|
|
<li>color map</li>
|
|
|
<li>specular map</li>
|
|
@@ -163,8 +160,8 @@
|
|
|
</ol>
|
|
|
</p>
|
|
|
<p>
|
|
|
- The below texture types share the *second* uv channel in the engine. The offset (and repeat) setting is evaluated according to
|
|
|
- the following priorities and then shared by those textures:
|
|
|
+ 在此引擎中下列纹理类型共享`第二套`uv通道。
|
|
|
+ 偏移量(以及重复次数)的设置项按照下列纹理进行优先级排列并共享:
|
|
|
<ol>
|
|
|
<li>ao map</li>
|
|
|
<li>light map</li>
|
|
@@ -173,10 +170,9 @@
|
|
|
|
|
|
<h3>[property:Vector2 repeat]</h3>
|
|
|
<p>
|
|
|
- How many times the texture is repeated across the surface, in each direction U and V. If repeat is set
|
|
|
- greater than 1 in either direction, the corresponding Wrap parameter should also be set to
|
|
|
- [page:Textures THREE.RepeatWrapping] or [page:Textures THREE.MirroredRepeatWrapping] to achieve the desired
|
|
|
- tiling effect. Setting different repeat values for textures is restricted in the same way like [page:.offset].
|
|
|
+ 决定纹理在表面的重复次数,两个方向分别表示U和V,如果重复次数在任何方向上设置了超过1的数值,
|
|
|
+ 对应的Wrap需要设置为[page:Textures THREE.RepeatWrapping]或者[page:Textures THREE.MirroredRepeatWrapping]来
|
|
|
+ 达到想要的平铺效果。此项设置有和[page:.offset]一样的限制。
|
|
|
</p>
|
|
|
|
|
|
<h3>[property:number rotation]</h3>
|
|
@@ -213,18 +209,18 @@
|
|
|
|
|
|
<h3>[property:Boolean premultiplyAlpha]</h3>
|
|
|
<p>
|
|
|
- If set to *true*, the alpha channel, if present, is multiplied into the color channels when the texture is uploaded to the GPU. Default is *false*.<br /><br />
|
|
|
+ 如果设置为*true*并且alpha通道存在的话,上传到GPU时alpha的数值将会与颜色通道的数值相乘。默认为*false*。<br /><br />
|
|
|
|
|
|
- Note that this property has no effect for [link:https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap ImageBitmap].
|
|
|
- You need to configure on bitmap creation instead. See [page:ImageBitmapLoader].
|
|
|
+ 注意此项属性不会影响到[link:https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap ImageBitmap]。
|
|
|
+ 如果你想要则需要在bitmap创建的时候进行配置,如何配置请查看[page:ImageBitmapLoader]。
|
|
|
</p>
|
|
|
|
|
|
<h3>[property:Boolean flipY]</h3>
|
|
|
<p>
|
|
|
- If set to *true*, the texture is flipped along the vertical axis when uploaded to the GPU. Default is *true*.<br /><br />
|
|
|
+ 如果设置为*true*,纹理在上传到GPU的时候会进行纵向的翻转。默认值为*true*。<br /><br />
|
|
|
|
|
|
- Note that this property has no effect for [link:https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap ImageBitmap].
|
|
|
- You need to configure on bitmap creation instead. See [page:ImageBitmapLoader].
|
|
|
+ 注意此项属性不会影响到[link:https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap ImageBitmap]。
|
|
|
+ 如果你想要则需要在bitmap创建的时候进行配置,如何配置请查看[page:ImageBitmapLoader]。
|
|
|
</p>
|
|
|
|
|
|
<h3>[property:number unpackAlignment]</h3>
|
|
@@ -262,14 +258,12 @@
|
|
|
|
|
|
<h3>[property:Object userData]</h3>
|
|
|
<p>
|
|
|
- An object that can be used to store custom data about the texture. It should not hold
|
|
|
- references to functions as these will not be cloned.
|
|
|
+ 保存关于纹理的自定义信息的对象。不应该放函数引用,因为函数不会拷贝。
|
|
|
</p>
|
|
|
|
|
|
<h3>[property:Source source]</h3>
|
|
|
<p>
|
|
|
- The data definition of a texture. A reference to the data source can be shared across textures.
|
|
|
- This is often useful in context of spritesheets where multiple textures render the same data but with different texture transformations.
|
|
|
+ 纹理的数据源信息。可以在不同的纹理之间引用相同的数据源,这在使用精灵表的情况下很好用,因为在这种情况下不同的纹理只是使用了不同的偏移,但是其数据源是相同的。
|
|
|
</p>
|
|
|
|
|
|
<h2>方法</h2>
|
|
@@ -285,7 +279,7 @@
|
|
|
<h3>[method:Texture clone]()</h3>
|
|
|
<p>
|
|
|
拷贝纹理。请注意。这不是“深拷贝”,图像是共用的。
|
|
|
- Besides, cloning a texture does not automatically mark it for a texture upload. You have to set [page:Texture.needsUpdate] to true as soon as its image property (the data source) is fully loaded or ready.
|
|
|
+ 除此之外,拷贝一个纹理并不会将此纹理自动标记并上传。你需要在图片的属性变更或者源数据完全加载完的时候并准备好的时候将[page:Texture.needsUpdate]设置为true。
|
|
|
</p>
|
|
|
|
|
|
<h3>[method:Object toJSON]( [param:Object meta] )</h3>
|