Skip to main content

xrfaceloading

Description

This event is emitted by xrface when when loading begins for additional face AR resources.

xrfaceloading.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('xrfaceloading', initMesh)