Remoto - VFS
|
#include "remoto!stdlib:js/panes/panes/glCanvas.js"
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... | |
DOCME - will use the THREE Detector to check for WebGL support.
glCanvas | ( | layout | ) |
layout |
DOCME - by default, the renderer requests antialasing to be on.
antialias scale
stats grid cameraControlMode
activateScripts | ( | ) |
DOCME
addChild | ( | child | ) |
child |
DOCME
addGeometry | ( | geometry | ) |
geometry |
DOCME
addHelper | ( | helper | ) |
helper |
DOCME
addMaterial | ( | material | ) |
material |
DOCME
addObject | ( | object | ) |
object |
DOCME
addScript | ( | object, | |
script | |||
) |
object | |
script |
DOCME
addTexture | ( | texture | ) |
texture |
DOCME
getter antialias |
Set the antialias mode.
Get the antialias mode.
a | Boolean antialias |
Note that this will recreate the _renderer.
applyAttribute | ( | attribute, | |
value | |||
) |
attribute | |
value |
DOCME
applyDiff | ( | diff, | |
user | |||
) |
diff | |
user |
DOCME
applySettings | ( | diff | ) |
diff |
DOCME
applySubscription | ( | data, | |
metadata | |||
) |
data | |
metadata |
DOCME
setter background |
Set the background color of the renderer.
b | a 6-hex HTML color. The "#" should not be included. |
cameraControlMode |
Set camera Controller state.
When Set to orbit, mouse click and drag will move the camera, more modes can be added here.
setter cameraMode |
a setter DOCME
setter cameraPosition |
a setter DOCME
createHeader | ( | ) |
DOCME
createHTML | ( | ) |
Create the html DOM element for this pane.
This will also set a tab index and mousemove/enter listener so that keyboard commands over the canvas will work.
createRenderer | ( | ) |
Create a THREE.WebGLRenderer with the attributes of this object.
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 | ( | ) |
DOCME
destroy | ( | ) |
Destroy the renderer, the pane, and the objectLoader.
Also sets member variables to null.
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
.
setter grid |
Show or hide the ground plane grid.
g | boolean grid visibility |
setter gridSize |
Set the size of the ground plane grid.
s | The grid size |
loaded | ( | ) |
DOCME
loadStarted | ( | ) |
DOCME
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 | ( | ) |
DOCME
recordPost | ( | evt, | |
type, | |||
diff | |||
) |
evt | |
type | |
diff |
DOCME
removeChild | ( | child | ) |
child |
DOCME
render | ( | ) |
DOCME
requestRender | ( | ) |
DOCME
resize | ( | ) |
DOCME
getter scale |
Set a scale value for rendering.
Get the scale value for this glCanvas.
s | Float 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 | ( | camera | ) |
camera |
DOCME
setScene | ( | scene | ) |
scene |
DOCME
setScreen | ( | which, | |
value | |||
) |
which | |
value |
DOCME
setter stats |
Set the stats mode. -1=none, 0=fps, 1=ms, 2=memory.
s | The stats mode |
The stats are only visible in play mode
toggleBorderless | ( | evt, | |
nosave | |||
) |
evt | |
nosave |
DOCME
togglePlay | ( | ) |
DOCME
updateCameraMatrix | ( | ) |
DOCME
updateCaveMatrix | ( | ) |
DOCME