Class: Renderer

SKARF. Renderer

<virtual> new Renderer()

Abstract class for renderers
Source:

Methods

addCallback(type, callbackFn)

Adds a callback function that will be called during specific events
Parameters:
Name Type Description
type string Type of callback: 'render' (only choice available now)
callbackFn function Callback function to call
Source:

getMainMarkerId() → {number}

Returns the designated main marker ID
Source:
Returns:
main marker ID
Type
number

<virtual> hideAllModels()

Hides all models that have been loaded
Source:

init()

Initializes the instance
Source:

<virtual> setLocalAxisVisible(isVisible)

Sets visibility of local axis
Parameters:
Name Type Description
isVisible boolean Visibility of local axis
Source:

<virtual> setWireframeVisible(isVisible)

Sets visibility of wireframe
Parameters:
Name Type Description
isVisible boolean Visibility of wireframe
Source:

showChildrenOfMarker(markerId, visible)

Shows all children of marker
Parameters:
Name Type Description
markerId number ID of marker
visible boolean Whether to show or hide the children
Source:

<virtual> update(dt)

Updates the renderer
Parameters:
Name Type Description
dt number Time elapsed since previous frame
Source: