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)