本文へスキップ

xrfacescanning

説明

このイベントは、すべての顔ARリソースがロードされ、スキャンが開始されると、xrfaceによって発行される。

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