Skip to main content

xrfacescanning

Description

This event is emitted by xrface when all face AR resources have been loaded and scanning has begun.

xrfacescanning.detail : {maxDetections, pointsPerDetection, indices, uvs}

PropertyDescription
maxDetectionsThe maximum number of faces that can be simultaneously processed.
pointsPerDetectionNumber of vertices that will be extracted per face.
indices: [{a, b, c}]Indexes into the vertices array that form the triangles of the requested mesh, as specified with meshGeometry on configure.
uvs: [{u, v}]uv positions into a texture map corresponding to the returned vertex points.

Example

const initMesh = ({detail}) => {
const {pointsPerDetection, uvs, indices} = detail
this.el.object3D.add(generateMeshGeometry({pointsPerDetection, uvs, indices}))
}
this.el.sceneEl.addEventListener('xrfacescanning', initMesh)