Class: Context

Context(config)

Context

Constructor

new Context(config)

Creates an instance of Context.
Parameters:
Name Type Description
config ContextConfig
Source:

Classes

Context

Methods

clearTextures()

Clear textures
Source:

deactivateTexture(textureInfo)

Deactivate TextureInfo
Parameters:
Name Type Description
textureInfo TextureInfo
Source:

destruct()

Destruct class
Source:

isLost() → {boolean}

Returns context lost state
Source:
Returns:
Type
boolean

setBlendMode(blendMode, drawCallback)

Set BlendModeInfo
Parameters:
Name Type Description
blendMode BlendModeInfo
drawCallback function
Source:

setCanvasSize(width, height)

Set canvas size
Parameters:
Name Type Description
width number
height number
Source:

setSize(width, height)

Set context size
Parameters:
Name Type Description
width number
height number
Source:

useBlendMode(blendMode)

Use BlendModeInfo
Parameters:
Name Type Description
blendMode BlendModeInfo
Source:

useProgram(program, vao) → {boolean}

Use WebGLProgram
Parameters:
Name Type Description
program WebGLProgram
vao Float32Array
Source:
Returns:
Type
boolean

useTexture(textureInfo, renderTime, forceBind, callback) → {number}

Use TextureInfo
Parameters:
Name Type Description
textureInfo TextureInfo
renderTime number
forceBind boolean
callback function
Source:
Returns:
Type
number

useTextureAt(textureInfo, textureId, renderTime, forceBind) → {number}

Use TextureInfo at
Parameters:
Name Type Description
textureInfo TextureInfo
textureId number
renderTime number
forceBind boolean
Source:
Returns:
Type
number