Skip to main content

XR8.PlayCanvas.runFaceEffects() (deprecated)

XR8.PlayCanvas.runFaceEffects( {pcCamera, pcApp}, [extraModules], config )


Opens the camera and starts running XR World Tracking and/or Image Targets in a PlayCanvas scene.


pcCameraThe PlayCanvas scene camera to drive with AR.
pcAppThe PlayCanvas app, typically
extraModules [Optional]An optional array of extra pipeline modules to install.
configConfiguration parameters to pass to

config is an object with the following properties:

canvasHTMLCanvasElementThe HTML Canvas that the camera feed will be drawn to. Typically this is 'application-canvas'.
webgl2 [Optional]BooleanfalseIf true, use WebGL2 if available, otherwise fallback to WebGL1. If false, always use WebGL1.
ownRunLoop [Optional]BooleanfalseIf true, XR should use it's own run loop. If false, you will provide your own run loop and be responsible for calling XR8.runPreRender() and XR8.runPostRender() yourself [Advanced Users only]
cameraConfig: {direction} [Optional]Object{direction:}Desired camera to use. Supported values for direction are or
glContextConfig [Optional]WebGLContextAttributesnullThe attributes to configure the WebGL canvas context.
allowedDevices [Optional]XR8.XrConfig.device()XR8.XrConfig.device().MOBILESpecify the class of devices that the pipeline should run on. If the current device is not in that class, running will fail prior prior to opening the camera. If allowedDevices is XR8.XrConfig.device().ANY, always open the camera. Note that world tracking can only be used with XR8.XrConfig.device().MOBILE.