API Docs for: 2.0.0

Class SAGE2_WebGLApp

Class defined in: public/src/SAGE2_WebGLApp.js:25

Base class for WebGL applications

init( data )
public/src/SAGE2_WebGLApp.js:32

Init method, creates an 'canvas' tag in the DOM and setups up WebGL

Parameters:
  • data <Object>

    contains initialization values (id, width, height, ...)

initGL( )
public/src/SAGE2_WebGLApp.js:62

Gets a WebGL context from the canvas

move( date )
public/src/SAGE2_WebGLApp.js:153

After move, show the canvas and update the coordinate system (resizeCanvas)

Parameters:
  • date <Date>

    current time from the server

resize( date )
public/src/SAGE2_WebGLApp.js:174

After resize, show the canvas and update the coordinate system (resizeCanvas)

Parameters:
  • date <Date>

    current time from the server

resizeCanvas( )
public/src/SAGE2_WebGLApp.js:77

Resize the canvas in local (client) coordinates, never bigger than the local screen

startMove( date )
public/src/SAGE2_WebGLApp.js:144

When a move starts, hide the canvas

Parameters:
  • date <Date>

    current time from the server

startResize( date )
public/src/SAGE2_WebGLApp.js:164

When a resize starts, hide the canvas

Parameters:
  • date <Date>

    current time from the server