Skip to main content

XR8.PlayCanvas.runFaceEffects() (deprecated)

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

Description

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

Parameters

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

config is an object with the following properties:

PropertyTypeDefaultDescription
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: XR8.XrConfig.camera().BACK}Desired camera to use. Supported values for direction are XR8.XrConfig.camera().BACK or XR8.XrConfig.camera().FRONT
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.

Returns

None