Factory which creates SKARF.Renderer
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.Renderer instance
Parameters:
Name Type Description type
string Type of ArLib to create: 'threejs' (only choice available now) options
object Options Properties
Name Type Description renderer
THREE.WebGLRenderer Three.js renderer scene
THREE.Scene Three.js scene camera
THREE.Camera Three.js camera markersJsonFile
string Path to a JSON file that specifies markers and models to load -
<static> register(mappingName, mappingClass)
-
Registers a type string to a class
Parameters:
Name Type Description mappingName
string Name of the mapping which is used to identify the type when creating instances e.g. 'threejs' mappingClass
SKARF.Renderer Renderer class that will be created when the associated type is used