Home Reference Source

Typedef

Static Public Summary
public

PatchConfig: Object

configuration object for loading a patch

Static Public

public PatchConfig: Object source

configuration object for loading a patch

Properties:

NameTypeAttributeDescription
prefixAssetPath String
  • optional
  • default: ''

prefix for path to assets

assetPath String
  • optional
  • default: ''

path to assets

jsPath String
  • optional
  • default: ''

path to javascript files

glCanvasId String
  • optional
  • default: 'glcanvas'

dom element id of canvas element

onError Function
  • optional
  • default: null

called when an error occurs

onFinishedLoading Function
  • optional
  • default: null

called when patch finished loading all assets

onFirstFrameRendered Function
  • optional
  • default: null

called when patch rendered it's first frame

glCanvasResizeToWindow Boolean
  • optional
  • default: false

resize canvas automatically to window size

doRequestAnimation Boolean
  • optional
  • default: true

do requestAnimationFrame set to false if you want to trigger exec() from outside (only do if you know what you are doing)

clearCanvasColor Boolean
  • optional
  • default: true

clear canvas in transparent color every frame

clearCanvasDepth Boolean
  • optional
  • default: true

clear depth every frame

glValidateShader Boolean
  • optional
  • default: true

enable/disable validation of shaders *

silent Boolean
  • optional
  • default: false
fpsLimit Number
  • optional
  • default: 0

0 for maximum possible frames per second

glslPrecision String
  • optional
  • default: 'mediump'

default precision for glsl shader