Render

Description

The Render API allows you to configure the graphics engine

Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts

Methods

Name Return Value Summary
getAmbientOcclusionEnabled bool Whether or not ambient occlusion is enabled
getAntialiasingEnabled bool Whether or not anti-aliasing is enabled
getConfig object Get a config for a job by name
getConfig object
getNumSubs number
getRenderMethod number Gets the current render method
getRenderMethodNames Gets the possible enum names of the RenderMethod type
getShadowsEnabled bool Whether or not shadows are enabled
getSubConfig object
getSubConfigs Array.<object>
getViewportResolutionScale number Gets the current viewport resolution scale
isTask boolean
load None
load None
refresh None
setAmbientOcclusionEnabled None Enables or disables ambient occlusion
setAntialiasingEnabled None Enables or disables anti-aliasing
setRenderMethod None Sets the current render method
setShadowsEnabled None Enables or disables shadows
setViewportResolutionScale None Sets the current viewport resolution scale
toJSON string

Signals

Name Summary
dirtyEnabled
loaded
newStats

Method Details

(static) getAmbientOcclusionEnabled( ) → {bool}
Returns: true if ambient occlusion is enabled, otherwise false

Whether or not ambient occlusion is enabled

(static) getAntialiasingEnabled( ) → {bool}
Returns: true if anti-aliasing is enabled, otherwise false

Whether or not anti-aliasing is enabled

(static) getConfig( name ) → {object}
Returns: The sub job config.

Get a config for a job by name

Parameters

Name Type Description
name string Can be: - : Search for the first job named job_name traversing the the sub graph of task and jobs (from this task as root) - .[.]: Allows you to first look for the parent_name job (from this task as root) and then search from there for the optional sub_parent_names and finally from there looking for the job_name (assuming every job in the path is found)
(static) getConfig( name ) → {object}
Returns: object

Parameters

Name Type Description
name string
(static) getNumSubs( ) → {number}
Returns: number

(static) getRenderMethod( ) → {number}
Returns: "DEFERRED" or "FORWARD"

Gets the current render method

(static) getRenderMethodNames( )
Returns: [string] [ "DEFERRED", "FORWARD" ]

Gets the possible enum names of the RenderMethod type

(static) getShadowsEnabled( ) → {bool}
Returns: true if shadows are enabled, otherwise false

Whether or not shadows are enabled

(static) getSubConfig( index ) → {object}
Returns: object

Parameters

Name Type Description
index number
(static) getSubConfigs( ) → {Array.<object>}
Returns: Array.<object>

(static) getViewportResolutionScale( ) → {number}
Returns: number

Gets the current viewport resolution scale

(static) isTask( ) → {boolean}
Returns: boolean

(static) load( map )

Parameters

Name Type Description
map object
(static) load( map )

Parameters

Name Type Description
map object
(static) refresh( )

(static) setAmbientOcclusionEnabled( enabled )

Enables or disables ambient occlusion

Parameters

Name Type Description
enabled bool true to enable ambient occlusion, false to disable it
(static) setAntialiasingEnabled( enabled )

Enables or disables anti-aliasing

Parameters

Name Type Description
enabled bool true to enable anti-aliasing, false to disable it
(static) setRenderMethod( renderMethod )

Sets the current render method

Parameters

Name Type Description
renderMethod number "DEFERRED" or "FORWARD"
(static) setShadowsEnabled( enabled )

Enables or disables shadows

Parameters

Name Type Description
enabled bool true to enable shadows, false to disable them
(static) setViewportResolutionScale( resolutionScale )

Sets the current viewport resolution scale

Parameters

Name Type Description
resolutionScale number between epsilon and 1.0
(static) toJSON( ) → {string}
Returns: string

Signal Details

dirtyEnabled( )
Returns: Signal

loaded( )
Returns: Signal

newStats( )
Returns: Signal

Description

Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts

Properties

Name Type Summary
cpuRunTime number Read-only.
enabled boolean

Methods

Name Return Value Summary
getAmbientOcclusionEnabled bool Whether or not ambient occlusion is enabled
getAntialiasingEnabled bool Whether or not anti-aliasing is enabled
getConfig object Get a config for a job by name
getConfig object
getNumSubs number
getRenderMethod number Gets the current render method
getRenderMethodNames Gets the possible enum names of the RenderMethod type
getShadowsEnabled bool Whether or not shadows are enabled
getSubConfig object
getSubConfigs Array.<object>
getViewportResolutionScale number Gets the current viewport resolution scale
isTask boolean
load None
load None
refresh None
setAmbientOcclusionEnabled None Enables or disables ambient occlusion
setAntialiasingEnabled None Enables or disables anti-aliasing
setRenderMethod None Sets the current render method
setShadowsEnabled None Enables or disables shadows
setViewportResolutionScale None Sets the current viewport resolution scale
toJSON string

Signals

Name Summary
dirtyEnabled
loaded
newStats

Method Details

(static) getAmbientOcclusionEnabled( ) → {bool}
Returns: true if ambient occlusion is enabled, otherwise false

Whether or not ambient occlusion is enabled

(static) getAntialiasingEnabled( ) → {bool}
Returns: true if anti-aliasing is enabled, otherwise false

Whether or not anti-aliasing is enabled

(static) getConfig( name ) → {object}
Returns: The sub job config.

Get a config for a job by name

Parameters

Name Type Description
name string Can be: - : Search for the first job named job_name traversing the the sub graph of task and jobs (from this task as root) - .[.]: Allows you to first look for the parent_name job (from this task as root) and then search from there for the optional sub_parent_names and finally from there looking for the job_name (assuming every job in the path is found)
(static) getConfig( name ) → {object}
Returns: object

Parameters

Name Type Description
name string
(static) getNumSubs( ) → {number}
Returns: number

(static) getRenderMethod( ) → {number}
Returns: "DEFERRED" or "FORWARD"

Gets the current render method

(static) getRenderMethodNames( )
Returns: [string] [ "DEFERRED", "FORWARD" ]

Gets the possible enum names of the RenderMethod type

(static) getShadowsEnabled( ) → {bool}
Returns: true if shadows are enabled, otherwise false

Whether or not shadows are enabled

(static) getSubConfig( index ) → {object}
Returns: object

Parameters

Name Type Description
index number
(static) getSubConfigs( ) → {Array.<object>}
Returns: Array.<object>

(static) getViewportResolutionScale( ) → {number}
Returns: number

Gets the current viewport resolution scale

(static) isTask( ) → {boolean}
Returns: boolean

(static) load( map )

Parameters

Name Type Description
map object
(static) load( map )

Parameters

Name Type Description
map object
(static) refresh( )

(static) setAmbientOcclusionEnabled( enabled )

Enables or disables ambient occlusion

Parameters

Name Type Description
enabled bool true to enable ambient occlusion, false to disable it
(static) setAntialiasingEnabled( enabled )

Enables or disables anti-aliasing

Parameters

Name Type Description
enabled bool true to enable anti-aliasing, false to disable it
(static) setRenderMethod( renderMethod )

Sets the current render method

Parameters

Name Type Description
renderMethod number "DEFERRED" or "FORWARD"
(static) setShadowsEnabled( enabled )

Enables or disables shadows

Parameters

Name Type Description
enabled bool true to enable shadows, false to disable them
(static) setViewportResolutionScale( resolutionScale )

Sets the current viewport resolution scale

Parameters

Name Type Description
resolutionScale number between epsilon and 1.0
(static) toJSON( ) → {string}
Returns: string

Signal Details

dirtyEnabled( )
Returns: Signal

loaded( )
Returns: Signal

newStats( )
Returns: Signal