本文へスキップ

xrfaceloading(エックスアールファクローディング

説明

このイベントはxrfaceによって、追加の顔ARリソースのロードが開始されたときに発行されます。

xrfaceloading.detail : {maxDetections、pointsPerDetection、indices、uvs}

プロパティ説明
最大検出数同時に処理できる面の最大数。
ポイント・パー・ディテクション面ごとに抽出される頂点の数。
インデックスを作成した:[{a, b, c}]。configureのmeshGeometryで指定された、要求されたメッシュの三角形を形成する頂点配列へのインデックス。
uvs:[{u, v}]返された頂点ポイントに対応するテクスチャ・マップのuv位置。

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