getScene
Request the renderer scene.
Signatures
- Paramate.Configurator.getScene(sessionId, callback)
Details
The function requests the renderer scene settings.
Parameters
- sessionId
-
The renderer session ID.
- callback
-
Function to be called with the renderer scene object as argument.
Return value
The renderer scene object:
{
materials: // Material information (OpenGL/WebGL)
{
<matIndex>: // int: material index
{
vertexShader: ..., // string: URL of the vertex shader
fragmentShader: ..., // string: URL of the fragment shader
uniforms:
{
<uniform>: // string: name of the uniform
{
type: ..., // string: type of the uniform
value:
{
url: ..., // string: URL of the uniform resource, e.g. a matcap image
external: ... // bool: flag whether the URL is external or internal
}
},
...
}
},
...
},
lights: // Light sources information (mview/cudaMView)
[
{
intensity: ..., // number: light source intensity value
type: ..., // string: "relative" or "absolute" positioning of the light source
view: ..., // number: placment of the light along the camera "view" direction (relative light)
top: ..., // number: placment of the light along the camera "top" direction (relative light)
right: ..., // number: placment of the light along the camera "right" direction (relative light)
},
...
],
camera: // Camera information
{
aperture: ..., // number: camera aperture in radiants
origin: [..., ..., ...], // numbers: rotation center (point in 3D space [x,y,z]),
focus: [..., ..., ...], // numbers: position (point in 3D space [x,y,z]),
view: [..., ..., ...], // numbers: view direction of camera (vector in 3D space [x,y,z]),
top: [..., ..., ...], // numbers: top direction of camera (vector in 3D space [x,y,z]),
right: [..., ..., ...] // numbers: right direction of camera (vector in 3D space [x,y,z])
}
}