Skip to content

Commit a343d9e

Browse files
🤖 dprint fmt
1 parent d934214 commit a343d9e

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

types/webxr/index.d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,6 @@ interface XRPlane {
654654
planeSpace: XRSpace;
655655
polygon: DOMPointReadOnly[];
656656
lastChangedTime: DOMHighResTimeStamp;
657-
658657
}
659658

660659
interface XRFrame {
@@ -701,7 +700,7 @@ interface XRFrame {
701700
declare abstract class XRMesh implements XRMesh {}
702701

703702
interface XRSession {
704-
/**
703+
/**
705704
* XRSession is extended to contain the initiateRoomCapture method which,
706705
* if supported, will ask the XR Compositor to capture the current room layout.
707706
* It is up to the XRCompositor if this will replace or augment the set of tracked planes.
@@ -711,7 +710,7 @@ interface XRSession {
711710
*
712711
* @see https://immersive-web.github.io/real-world-geometry/plane-detection.html#plane-set
713712
*/
714-
initiateRoomCapture?():Promise<undefined>;
713+
initiateRoomCapture?(): Promise<undefined>;
715714
}
716715

717716
/**

types/webxr/webxr-tests.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ function assertNever(value: never) {
8686
const handle = session.requestAnimationFrame(loop);
8787
session.cancelAnimationFrame(handle);
8888

89-
if(session.initiateRoomCapture){
90-
session.initiateRoomCapture().then(()=>{
89+
if (session.initiateRoomCapture) {
90+
session.initiateRoomCapture().then(() => {
9191
console.log("Room capture initiated");
9292
});
9393
}
@@ -110,9 +110,9 @@ function assertNever(value: never) {
110110
}
111111

112112
const detectedMeshes = frame.detectedMeshes;
113-
detectedMeshes?.forEach((mesh:XRMesh) => {
113+
detectedMeshes?.forEach((mesh: XRMesh) => {
114114
const meshPose = frame.getPose(mesh.meshSpace, space);
115-
if(meshPose){
115+
if (meshPose) {
116116
const transform = meshPose.transform;
117117
}
118118
console.log(mesh.lastChangedTime);
@@ -123,13 +123,12 @@ function assertNever(value: never) {
123123
});
124124

125125
const detectedPlanes = frame.detectedPlanes;
126-
detectedPlanes?.forEach((plane:XRPlane) => {
126+
detectedPlanes?.forEach((plane: XRPlane) => {
127127
const planePose = frame.getPose(plane.planeSpace, space);
128128
console.log(plane.lastChangedTime);
129129
console.log(plane.orientation);
130130
console.log(plane.polygon);
131131
});
132-
133132
};
134133

135134
navigator.xr.addEventListener("devicechange", (e: Event) => {

0 commit comments

Comments
 (0)