viewer

vgl. viewer

new viewer(canvas, options) → {vgl.viewer}

Description:
  • Create a new instance of class viewer.

Source:
Parameters:
Name Type Description
canvas HTMLElement

Canvas element associated with the viewer.

options object

Options to send to the renderer.

Returns:
Type
vgl.viewer

Extends

  • vgl.object

Methods

bindEventHandlers()

Description:
  • Bind canvas mouse events to their default handlers.

Source:

canvas() → {HTMLElement}

Description:
  • Get canvas of the viewer.

Source:
Returns:
Type
HTMLElement

exit(renderState)

Description:
  • Remove the viewer.

Source:
Parameters:
Name Type Description
renderState vgl.renderState

Current render state.

init()

Description:
  • Initialize the viewer.

    This is a must call or otherwise render context may not initialized properly.

Source:

render()

Description:
  • Render.

Source:

renderWindow() → {vgl.renderWindow}

Description:
  • Return render window of the viewer.

Source:
Returns:
Type
vgl.renderWindow

unbindEventHandlers()

Description:
  • Undo earlier bound handlers for canvas mouse events.

Source: