Skip to content

Instantly share code, notes, and snippets.

View robrohan's full-sized avatar
🌱
Be excellent to each other

Rob Rohan robrohan

🌱
Be excellent to each other
View GitHub Profile
@robrohan
robrohan / WebXR Typescript types
Created May 17, 2020 05:52
WebXR Typescript types
///////////////////////////////////////////////////////////////////////
// XR types
type EventHandler = (event: Event) => any;
export type XRSessionMode = 'immersive-vr' | 'inline' | 'immersive-ar';
export interface XRSystem {
isSessionSupported: (sessionMode: XRSessionMode) => Promise<boolean>,
requestSession: (sessionMode: XRSessionMode, sessionInit?: any) => Promise<XRSession>,