Class: VisageAR

VisageAR

new VisageAR()

VisageAR

Methods

initialize(container, video)

Initializes Visage AR and sets up rendering and tracking. The video resolution is used for the canvas resolution.
Parameters:
Name Type Description
container element The HTML element in which to put the rendering canvas.
video element The HTML video element required for camera access.

loadOccluder(url)

Loads the occlusion mask in OBJ format and its material in MTL format.

Parameters:
Name Type Description
url string The URL from which to load occlusion mask, without the extension.

clearOccluder()

Clear the current active occlusion mask and removes it from the occlusion scene.

loadObject(urlObject)

Loads the 3D object and adds it to the main scene to be rendered from the given URL and makes it active. The object should be in OBJ format and the material should be in MTL format. The MTL file should have the same name as the OBJ file. See the modeling guide on how to prepare models for use with VisageAR.
Parameters:
Name Type Description
urlObject string The URL from which to load the model, without the extension.

startTracking()

Starts tracking the face and displaying (rendering) any 3D objects loaded using loadObject(). Object is overlayed on the face.

stopTracking()

Stops tracking.