Factory which creates SKARF.ArLibs
NOTE: This is meant for internal usage only as the created instance needs some manual variable assignments and initializations before they are usable. These are done internally by a
NOTE: This is meant for internal usage only as the created instance needs some manual variable assignments and initializations before they are usable. These are done internally by a
Skarf instance.Methods
-
<static> create(type, options)
-
Function to create a SKARF.ArLib instance
Parameters:
Name Type Description typestring Type of ArLib to create: 'jsartoolkit', 'jsaruco' optionsobject Options Properties
Name Type Argument Default Description trackingElemcanvas Canvas DOM element used for tracking markerSizenumber Size of marker in mm, determines scale of scene mainMarkerIdnumber ID of main marker verticalFovnumber <optional>
Vertical field-of-view of web cam (you will have to estimate this). If this is not defined, it will use use some default field-of-view which works in general for web cams. thresholdnumber <optional>
128 Threshold value for turning tracking stream into a binary image. Ranges from 0 to 255. Used only for JSARToolKit. debugboolean <optional>
false Whether to turn on debug view/mode -
<static> register(mappingName, mappingClass)
-
Registers a type string to a class
Parameters:
Name Type Description mappingNamestring Name of the mapping which is used to identify the type when creating instances e.g. 'jsartoolkit' mappingClassSKARF.ArLib ArLib class that will be created when the associated type is used