Constructor
new DrawFuncRegistry(params)
A drawing function has the same signature as DrawFuncRegistry.draw
All of the provided fields can be changed later as well
Parameters:
Name |
Type |
Description |
params |
Object
|
Properties
Name |
Type |
Attributes |
Description |
typedDrawFuncs |
Object
|
<optional>
|
A map of typename -> drawing function pairs |
defaultDrawFunc |
function
|
<optional>
|
The function called for non registered types |
untypedDrawFunc |
function
|
<optional>
|
The drawing function for general untyped objects |
|
- Source:
Methods
draw(output, object, properties)
Draw an object to an output
Parameters:
Name |
Type |
Description |
output |
Object
|
The output object. Must be compatible with the registered functions |
object |
Object
|
The object to be drawn |
properties |
Object
|
Properties corresponding to the object |
- Source: