浏览代码

Merge pull request #16896 from Mugen87/dev35

Docs: Correct ".data" description/typing of data textures.
Mr.doob 6 年之前
父节点
当前提交
02abc250eb

+ 1 - 1
docs/api/en/textures/DataTexture.html

@@ -19,7 +19,7 @@
 
 		<h3>[name]( data, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy )</h3>
 		<p>
-			The data argument must be an ArrayBuffer or a typed array view.
+			The data argument must be an [link:https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView ArrayBufferView].
 			Further parameters correspond to the properties inherited from [page:Texture], where both magFilter and minFilter default to THREE.NearestFilter. The properties flipY and generateMipmaps are intially set to false.
 		</p>
 		<p>

+ 1 - 1
docs/api/zh/textures/DataTexture.html

@@ -19,7 +19,7 @@
 
 		<h3>[name]( data, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy )</h3>
 		<p>
-			The data argument must be an ArrayBuffer or a typed array view.
+			The data argument must be an [link:https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView ArrayBufferView].
 			Further parameters correspond to the properties inherited from [page:Texture], where both magFilter and minFilter default to THREE.NearestFilter. The properties flipY and generateMipmaps are intially set to false.
 		</p>
 		<p>

+ 1 - 1
src/textures/DataTexture.d.ts

@@ -12,7 +12,7 @@ import { TypedArray } from '../polyfills';
 export class DataTexture extends Texture {
 
 	constructor(
-		data: ArrayBuffer | TypedArray,
+		data: TypedArray,
 		width: number,
 		height: number,
 		format?: PixelFormat,

+ 1 - 1
src/textures/DataTexture2DArray.d.ts

@@ -4,7 +4,7 @@ import { TypedArray } from '../polyfills';
 export class DataTexture2DArray extends Texture {
 
 	constructor(
-		data: ArrayBuffer | TypedArray,
+		data: TypedArray,
 		width: number,
 		height: number,
 		depth: number

+ 1 - 1
src/textures/DataTexture3D.d.ts

@@ -4,7 +4,7 @@ import { TypedArray } from '../polyfills';
 export class DataTexture3D extends Texture {
 
 	constructor(
-		data: ArrayBuffer | TypedArray,
+		data: TypedArray,
 		width: number,
 		height: number,
 		depth: number