Skip to content

Commit b18b16c

Browse files
committed
texture documentation update
1 parent 92b8277 commit b18b16c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/engine/Source/Renderer/Texture.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ import TextureMinificationFilter from "./TextureMinificationFilter.js";
1818
* @typedef {object} Texture.ConstructorOptions
1919
*
2020
* @property {Context} context
21-
* @property {object} [source] The source for texel values to be loaded into the texture.
21+
* @property {object} [source] The source for texel values to be loaded into the texture. A {@link ImageData}, {@link HTMLImageElement}, {@link HTMLCanvasElement},
22+
* {@link HTMLVideoElement}, {@link OffscreenCanvas}, or {@link ImageBitmap},
23+
* or an object with width, height, and arrayBufferView properties.
2224
* @property {PixelFormat} [pixelFormat=PixelFormat.RGBA] The format of each pixel, i.e., the number of components it has and what they represent.
2325
* @property {PixelDatatype} [pixelDatatype=PixelDatatype.UNSIGNED_BYTE] The data type of each pixel.
2426
* @property {boolean} [flipY=true] If true, the source values will be read as if the y-axis is inverted (y=0 at the top).
@@ -830,7 +832,8 @@ function setupSampler(texture, sampler) {
830832
* Copy new image data into this texture, from a source {@link ImageData}, {@link HTMLImageElement}, {@link HTMLCanvasElement}, or {@link HTMLVideoElement}.
831833
* or an object with width, height, and arrayBufferView properties.
832834
* @param {object} options Object with the following properties:
833-
* @param {object} options.source The source {@link ImageData}, {@link HTMLImageElement}, {@link HTMLCanvasElement}, or {@link HTMLVideoElement},
835+
* @param {object} options.source The source {@link ImageData}, {@link HTMLImageElement}, {@link HTMLCanvasElement}, {@link HTMLVideoElement},
836+
* {@link OffscreenCanvas}, or {@link ImageBitmap},
834837
* or an object with width, height, and arrayBufferView properties.
835838
* @param {number} [options.xOffset=0] The offset in the x direction within the texture to copy into.
836839
* @param {number} [options.yOffset=0] The offset in the y direction within the texture to copy into.

0 commit comments

Comments
 (0)