Changes
Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com>
This commit is contained in:
@@ -35,9 +35,8 @@ export function SceneStatsProbe() {
|
|||||||
|
|
||||||
if (frame) {
|
if (frame) {
|
||||||
try {
|
try {
|
||||||
// @ts-expect-error detectedPlanes is experimental
|
const planes = (frame as unknown as { detectedPlanes?: { size?: number } }).detectedPlanes;
|
||||||
const planes = frame.detectedPlanes;
|
sceneStats.xrPlanesCount = planes?.size ?? 0;
|
||||||
sceneStats.xrPlanesCount = planes ? (planes.size ?? planes.length ?? 0) : 0;
|
|
||||||
} catch { sceneStats.xrPlanesCount = 0; }
|
} catch { sceneStats.xrPlanesCount = 0; }
|
||||||
sceneStats.xrInputCount = frame.session?.inputSources?.length ?? 0;
|
sceneStats.xrInputCount = frame.session?.inputSources?.length ?? 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user