Class

Context

Context()

A context

Constructor

new Context()

Constructor

View Source Context.js, line 6

Members

Context

static current

Active context

View Source Context.js, line 125

Object

static getActive

Shortcut to the active context's instance

View Source Context.js, line 32

number

static Type

Type of context
Properties:
Name Type Description
WebGL number

View Source Context.js, line 118

Element

domElement

The DOM element

View Source Context.js, line 16

WebGLRenderingContext | Object

instance

Context instance

View Source Context.js, line 24

Methods

activate()

Activate the context The context become the one used by the renderer

View Source Context.js, line 99

getSize() → {Array.<number>}

Get size

View Source Context.js, line 108

A array with size on x and y
Array.<number>

init(type, options, targetID)

Init
Parameters:
Name Type Description
type Context.Type Type of context
options Object Options
targetID string Targeted DOM element

View Source Context.js, line 43

resize(width, height)

Resize context
Parameters:
Name Type Description
width number Width to assign in pixel
height number Height to assign in pixel

View Source Context.js, line 80