Remoto - VFS: glCanvas Class Reference
Remoto - VFS

#include "remoto!stdlib:js/panes/panes/glCanvas.js"

Inheritance diagram for glCanvas:
pane

Public Member Functions

 glCanvas (layout)
 
 activateScripts ()
 
 addChild (child)
 
 addGeometry (geometry)
 
 addHelper (helper)
 
 addMaterial (material)
 
 addObject (object)
 
 addScript (object, script)
 
 addTexture (texture)
 
 applyAttribute (attribute, value)
 
 applyDiff (diff, user)
 
 applySettings (diff)
 
 applySubscription (data, metadata)
 
 createHeader ()
 
 createHTML ()
 Create the html DOM element for this pane. More...
 
 createRenderer ()
 Create a THREE.WebGLRenderer with the attributes of this object. More...
 
 deactivateScripts ()
 
 destroy ()
 Destroy the renderer, the pane, and the objectLoader. More...
 
 frameNodes ()
 Frame the currently selected objects. More...
 
 loaded ()
 
 loadStarted ()
 
 postDiff ()
 
 recordPost (evt, type, diff)
 
 removeChild (child)
 
 render ()
 
 requestRender ()
 
 resize ()
 
 setCamera (camera)
 
 setScene (scene)
 
 setScreen (which, value)
 
 toggleBorderless (evt, nosave)
 
 togglePlay ()
 
 updateCameraMatrix ()
 
 updateCaveMatrix ()
 
- Public Member Functions inherited from pane
 pane (layout, object)
 
 activate ()
 DOCME. More...
 
 applyDiff (data, user)
 
 applyReleaseLock (data)
 
 applyRequestError (command, id, reason)
 
 applyRequestLock (data)
 
 applyRequestSuccess (command, id, data, metadata)
 
 applySettings (settings)
 
 applySubscription (data, metadata)
 
 area ()
 
 attach ()
 Provides an opportunity for a pane to pass an attach command to its object. More...
 
 attached ()
 Detects is this pane is attached to the DOM. More...
 
 createHTML ()
 
 deactivate ()
 If a deactivate method is present on this pane's _object, call it. More...
 
 destroy ()
 DOCME. More...
 
 detach ()
 Detach this._html and call this._object.detach(). More...
 
 find (p, type)
 
 hasHelp ()
 
 mounted (mountState)
 Notify this pane that the mounted state has changed. More...
 
 rename (name)
 
 resize ()
 DOCME. More...
 
 saveLayout ()
 Build the layout for this pane. More...
 
 triggerCurrentPane ()
 DOCME. More...
 
getter help
 A getter that will return a pane object's help message, or a default message indicating that no help is available. More...
 
getter paneType
 A getter which will calculate the pane type based on the _object, or return the default "pane". More...
 

Getters & Setters

 cameraControlMode
 Set camera Controller state. More...
 
setter playing
 Set play state. More...
 
setter grid
 Show or hide the ground plane grid. More...
 
setter gridSize
 Set the size of the ground plane grid. More...
 
setter stats
 Set the stats mode. -1=none, 0=fps, 1=ms, 2=memory. More...
 
setter background
 Set the background color of the renderer. More...
 
setter antialias
 Set the antialias mode. More...
 
setter scale
 Set a scale value for rendering. More...
 
setter cameraMode
 a setter DOCME More...
 
setter cameraPosition
 a setter DOCME More...
 

Detailed Description

DOCME - will use the THREE Detector to check for WebGL support.

Constructor & Destructor Documentation

◆ glCanvas()

glCanvas (   layout)
Parameters
layout

DOCME - by default, the renderer requests antialasing to be on.

antialias scale

stats grid cameraControlMode

Member Function Documentation

◆ activateScripts()

activateScripts ( )

DOCME

◆ addChild()

addChild (   child)
Parameters
child

DOCME

◆ addGeometry()

addGeometry (   geometry)
Parameters
geometry

DOCME

◆ addHelper()

addHelper (   helper)
Parameters
helper

DOCME

◆ addMaterial()

addMaterial (   material)
Parameters
material

DOCME

◆ addObject()

addObject (   object)
Parameters
object

DOCME

◆ addScript()

addScript (   object,
  script 
)
Parameters
object
script

DOCME

◆ addTexture()

addTexture (   texture)
Parameters
texture

DOCME

◆ antialias()

getter antialias

Set the antialias mode.

Get the antialias mode.

Parameters
aBoolean antialias

Note that this will recreate the _renderer.

◆ applyAttribute()

applyAttribute (   attribute,
  value 
)
Parameters
attribute
value

DOCME

◆ applyDiff()

applyDiff (   diff,
  user 
)
Parameters
diff
user

DOCME

◆ applySettings()

applySettings (   diff)
Parameters
diff

DOCME

◆ applySubscription()

applySubscription (   data,
  metadata 
)
Parameters
data
metadata
Returns

DOCME

◆ background()

setter background

Set the background color of the renderer.

Parameters
ba 6-hex HTML color. The "#" should not be included.

◆ cameraControlMode()

cameraControlMode

Set camera Controller state.

When Set to orbit, mouse click and drag will move the camera, more modes can be added here.

◆ cameraMode()

setter cameraMode

a setter DOCME

◆ cameraPosition()

setter cameraPosition

a setter DOCME

◆ createHeader()

createHeader ( )
Returns

DOCME

◆ createHTML()

createHTML ( )

Create the html DOM element for this pane.

Returns
this._html

This will also set a tab index and mousemove/enter listener so that keyboard commands over the canvas will work.

◆ createRenderer()

createRenderer ( )

Create a THREE.WebGLRenderer with the attributes of this object.

Returns
this._renderer

Recreation of the renderer is needed if certain attributes change, namely antialiasing. This will make a new renderer and a new context and attach or create a canvas, camera controller, etc.

◆ deactivateScripts()

deactivateScripts ( )

DOCME

◆ destroy()

destroy ( )

Destroy the renderer, the pane, and the objectLoader.

Also sets member variables to null.

◆ frameNodes()

frameNodes ( )

Frame the currently selected objects.

Effectively finds the bounding box of the selected nodes, and sets the orbit target to the center of that bounding box. If nothing is selected, move the orbit target to 0,0,0.

◆ grid()

setter grid

Show or hide the ground plane grid.

Parameters
gboolean grid visibility

◆ gridSize()

setter gridSize

Set the size of the ground plane grid.

Parameters
sThe grid size

◆ loaded()

loaded ( )

DOCME

◆ loadStarted()

loadStarted ( )

DOCME

◆ playing()

getter playing

Set play state.

Get the play state.

When playing, a frame will be rendererd at requestAnimationFrame interval.

A script with a "render" function will run on each frame.

◆ postDiff()

postDiff ( )

DOCME

◆ recordPost()

recordPost (   evt,
  type,
  diff 
)
Parameters
evt
type
diff

DOCME

◆ removeChild()

removeChild (   child)
Parameters
child

DOCME

◆ render()

render ( )

DOCME

◆ requestRender()

requestRender ( )

DOCME

◆ resize()

resize ( )

DOCME

◆ scale()

getter scale

Set a scale value for rendering.

Get the scale value for this glCanvas.

Parameters
sFloat scale

Despite the apparent size of the canvas on the screen, this setting allows us to render at a different size.

For instance, a canvas may be given a 1000x1000 region of the screen, but a scale of 0.5 would set the width and height of the canvas to 500x500, and scale the result using css to its final apparent size.

This technique can also be used to antialias a canvas by setting scale to 2.0, for instance.

◆ setCamera()

setCamera (   camera)
Parameters
camera

DOCME

◆ setScene()

setScene (   scene)
Parameters
scene

DOCME

◆ setScreen()

setScreen (   which,
  value 
)
Parameters
which
value

DOCME

◆ stats()

setter stats

Set the stats mode. -1=none, 0=fps, 1=ms, 2=memory.

Parameters
sThe stats mode

The stats are only visible in play mode

◆ toggleBorderless()

toggleBorderless (   evt,
  nosave 
)
Parameters
evt
nosave

DOCME

◆ togglePlay()

togglePlay ( )

DOCME

◆ updateCameraMatrix()

updateCameraMatrix ( )

DOCME

◆ updateCaveMatrix()

updateCaveMatrix ( )

DOCME


The documentation for this class was generated from the following file: