Extensions

Global

Members

(constant) Const :Object

Contains all constant values for WebGL
Type:
  • Object
Source:

(constant) TintType

Tint type
Properties:
Name Type Description
NONE number output color = source color * 1 + tint color * 0
MULTIPLY number output color = source color * tint color
GRAYSCALE number output color = if source color red channel == source color green channel and source color red channel == source color blue channel then source color * tint color else source color
OVERRIDE number output color = tint color
ADD number output color = source color + tint color
Source:

(constant) layoutText

Layouts text into lines based on the maximum width.
Source:

Type Definitions

AmbientOcclusionMapRendererConfig

Type:
  • Object
Properties:
Name Type Description
sourceTexture TextureInfo // Optional source texture
heightMap TextureInfo // Height map texture
radius number // Sampling radius
samples number // Number of samples
multiplier number // Occlusion multiplier
depthMultiplier number // Depth multiplier
offsetX number // Offset x
offsetY number // Offset y
Source:

BaseRendererConfig

Type:
  • Object
Properties:
Name Type Description
clearColor Color
context WebGL2Context
resized boolean
width number
height number
widthHalf number
heightHalf number
Source:

BatchRendererConfig

Type:
  • Object
Source:

BlendMode

Type:
  • Object
Properties:
Name Type Description
createBlendMode createBlendMode
NONE BlendModeInfo
NORMAL_PM BlendModeInfo
ADD_PM BlendModeInfo
MULTIPLY_PM BlendModeInfo
SCREEN_PM BlendModeInfo
ADD_NPM BlendModeInfo
SRC_IN BlendModeInfo
SRC_OUT BlendModeInfo
SRC_ATOP BlendModeInfo
DST_OVER BlendModeInfo
DST_IN BlendModeInfo
DST_OUT BlendModeInfo
DST_ATOP BlendModeInfo
XOR BlendModeInfo
NORMAL BlendModeInfo
ADD BlendModeInfo
MULTIPLY BlendModeInfo
SCREEN BlendModeInfo
OVERLAY BlendModeInfo
EXCLUSION BlendModeInfo
LIGHTEN BlendModeInfo
DARKEN BlendModeInfo
SHADOW BlendModeInfo
Source:

BlendModeInfo

Type:
  • Object
Properties:
Name Type Description
functionName string
functions Array.<number>
equationName string
equations Array.<number>
Source:

ContextConfig

Type:
  • Object
Properties:
Name Type Description
canvas HTMLCanvasElement
initCallback function
contextAttributes Object
Source:

FilterRendererConfig

Type:
  • Object
Properties:
Name Type Description
filters Array.<BaseFilter>
sourceTexture TextureInfo
Source:

Frame

Frame
Type:
  • Object
Properties:
Name Type Description
length number optional frame length
x number
y number
width number
height number
Source:

LightRendererConfig

Type:
  • Object
Properties:
Name Type Description
maxRenderCount number
sourceTexture TextureInfo
normalMap TextureInfo
heightMap TextureInfo
roughnessMap TextureInfo
Source:

Matrix3

Type:
  • Float32Array
Source:

Matrix3Utilities

Matrix calculation utilities
Type:
  • Object
Properties:
Name Type Description
identity function Create irentity matrix
projection function Update projection matrix
transformLocal function Calculate local transformation
transform function Calculate global transformation
inverse function Create inverse matrix
isPointInMatrix function Returns true if the point in the matrix
calcCorners function Calculate cornrers
Source:

NormalMapRendererConfig

Type:
  • Object
Properties:
Name Type Description
heightMap TextureInfo
Source:

Point

Point
Type:
  • Object
Properties:
Name Type Description
x number
y number
Source:

Rectangle

Rectangle
Type:
  • Object
Properties:
Name Type Description
x number
y number
width number
height number
Source:

RendererConfig

Type:
  • Object
Properties:
Name Type Description
locations Array.<string>
context WebGLContext
Source:

Stage2DConfig

Type:
  • Object
Source:

Utils

Common utilities
Type:
  • Object
Properties:
Name Type Description
THETA number Useful number for conversion between rad and deg
GLSL Object Common glsl scripts
INFO Object Information about WebGL
initContextConfig function Create new context config
initRendererConfig function Create new renderer config
initApplication function Call the callback function if the document.readyState interactive or complete
createProgram function Create a WebGL program
getLocationsFor function
Source:

WebGLContext

Type:
  • Object
Source:

WebGLProgram

Type:
  • Object
Source:

createBlendMode(functions, equations) → {BlendModeInfo}

Parameters:
Name Type Description
functions Array.<number>
equations Array.<number>
Source:
Returns:
Type
BlendModeInfo