renderBlob
Render to a blob.
Signatures
- Paramate.Configurator.renderBlob(sessionId, settings, callback = undefined)
Details
The function requests a rendering in the format of a PNG blob. This only works with server-side renderers, does not work with WebGL rendering.
Parameters
- sessionId
-
The renderer session ID.
- settings
-
Object containing parameters for the rendering:
{
width: ..., // number: the width of the image in pixels
height: ..., // number: the height of the image in pixels
posX: ..., // number: camera position X
posY: ..., // number: camera position Y
posZ: ..., // number: camera position Z
viewX: ..., // number: camera view direction X
viewY: ..., // number: camera view direction Y
viewZ: ..., // number: camera view direction Z
topX: ..., // number: camera top direction X
topY: ..., // number: camera top direction Y
topZ: ..., // number: camera top direction Z
rightX: ..., // number: camera right direction X
rightY: ..., // number: camera right direction Y
rightZ: ..., // number: camera right direction Z
aperture: ..., // number: camera aperture
scale: ... // number: scale parameter to calculate lights
}
- callback
-
Function to be called with the PNG image content as a blob as argument.
Return value
The PNG image content as a blob.