Members
-
width :number
-
Description
width of texture in pixels -
height :number
-
Description
height of texture in pixels -
channels :number
-
Description
number of color channels for texture (RGBA)Details
-
Number :number
-
Description
Number of pixels per data elementDetails
-
data :Uint8Array
-
Description
Uint8Array of texture image data -
texture :WebglTexture
-
Description
WebglTexture that is initialized in the WebglContext -
isInit :boolean
-
Description
Has the texture been initialized in the WebglContext -
init
-
Description
initializes texture in WebglContextParameters
Name Type Description gl
WebglContext WebglContext -
updatePixel
-
Parameters
Name Type Description gl
WebglContext WebglContext to update texture in c
Array Color to update pixel with in RGBA[0-1] row
number Row of pixel to update column
number Column of pixel to update -
updatePixelId
-
Description
Update pixel with new data, id: 0 = (0,0), id:1 = (0,1),...etcParameters
Name Type Description gl
WebglContext WebglContext to update texture in c
number Color to update pixel with id
number Id to update -
updateSubrect
-
Description
Update entire textureParameters
Name Type Description gl
WebglContext WebglContext to update texture in c
Array Colors to update rect with -
getIdColor
-
Description
Gets current color for id in [r,g,b,a] formatParameters
Name Type Description id
number Returns