webxr.externs.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251
  1. /*
  2. * WebXR Device API
  3. */
  4. /**
  5. * @type {XR}
  6. */
  7. Navigator.prototype.xr;
  8. /**
  9. * @constructor
  10. */
  11. function XRSessionInit() {};
  12. /**
  13. * @type {Array<string>}
  14. */
  15. XRSessionInit.prototype.requiredFeatures;
  16. /**
  17. * @type {Array<string>}
  18. */
  19. XRSessionInit.prototype.optionalFeatures;
  20. /**
  21. * @constructor
  22. */
  23. function XR() {}
  24. /**
  25. * @type {?function (Event)}
  26. */
  27. XR.prototype.ondevicechanged;
  28. /**
  29. * @param {string} mode
  30. *
  31. * @return {!Promise<boolean>}
  32. */
  33. XR.prototype.isSessionSupported = function(mode) {};
  34. /**
  35. * @param {string} mode
  36. * @param {XRSessionInit} options
  37. *
  38. * @return {!Promise<XRSession>}
  39. */
  40. XR.prototype.requestSession = function(mode, options) {};
  41. /**
  42. * @constructor
  43. */
  44. function XRSession() {}
  45. /**
  46. * @type {XRRenderState}
  47. */
  48. XRSession.prototype.renderState;
  49. /**
  50. * @type {Array<XRInputSource>}
  51. */
  52. XRSession.prototype.inputSources;
  53. /**
  54. * @type {string}
  55. */
  56. XRSession.prototype.visibilityState;
  57. /**
  58. * @type {?number}
  59. */
  60. XRSession.prototype.frameRate;
  61. /**
  62. * @type {?Float32Array}
  63. */
  64. XRSession.prototype.supportedFrameRates;
  65. /**
  66. * @type {?function (Event)}
  67. */
  68. XRSession.prototype.onend;
  69. /**
  70. * @type {?function (XRInputSourcesChangeEvent)}
  71. */
  72. XRSession.prototype.oninputsourceschange;
  73. /**
  74. * @type {?function (XRInputSourceEvent)}
  75. */
  76. XRSession.prototype.onselectstart;
  77. /**
  78. * @type {?function (XRInputSourceEvent)}
  79. */
  80. XRSession.prototype.onselect;
  81. /**
  82. * @type {?function (XRInputSourceEvent)}
  83. */
  84. XRSession.prototype.onselectend;
  85. /**
  86. * @type {?function (XRInputSourceEvent)}
  87. */
  88. XRSession.prototype.onsqueezestart;
  89. /**
  90. * @type {?function (XRInputSourceEvent)}
  91. */
  92. XRSession.prototype.onsqueeze;
  93. /**
  94. * @type {?function (XRInputSourceEvent)}
  95. */
  96. XRSession.prototype.onsqueezeend;
  97. /**
  98. * @type {?function (Event)}
  99. */
  100. XRSession.prototype.onvisibilitychange;
  101. /**
  102. * @param {XRRenderStateInit} state
  103. * @return {void}
  104. */
  105. XRSession.prototype.updateRenderState = function (state) {};
  106. /**
  107. * @param {XRFrameRequestCallback} callback
  108. * @return {number}
  109. */
  110. XRSession.prototype.requestAnimationFrame = function (callback) {};
  111. /**
  112. * @param {number} handle
  113. * @return {void}
  114. */
  115. XRSession.prototype.cancelAnimationFrame = function (handle) {};
  116. /**
  117. * @return {Promise<void>}
  118. */
  119. XRSession.prototype.end = function () {};
  120. /**
  121. * @param {string} referenceSpaceType
  122. * @return {Promise<XRReferenceSpace>}
  123. */
  124. XRSession.prototype.requestReferenceSpace = function (referenceSpaceType) {};
  125. /**
  126. * @param {number} rate
  127. * @return {Promise<undefined>}
  128. */
  129. XRSession.prototype.updateTargetFrameRate = function (rate) {};
  130. /**
  131. * @typedef {function(number, XRFrame): undefined}
  132. */
  133. var XRFrameRequestCallback;
  134. /**
  135. * @constructor
  136. */
  137. function XRRenderStateInit() {}
  138. /**
  139. * @type {number}
  140. */
  141. XRRenderStateInit.prototype.depthNear;
  142. /**
  143. * @type {number}
  144. */
  145. XRRenderStateInit.prototype.depthFar;
  146. /**
  147. * @type {number}
  148. */
  149. XRRenderStateInit.prototype.inlineVerticalFieldOfView;
  150. /**
  151. * @type {?XRWebGLLayer}
  152. */
  153. XRRenderStateInit.prototype.baseLayer;
  154. /**
  155. * @constructor
  156. */
  157. function XRRenderState() {};
  158. /**
  159. * @type {number}
  160. */
  161. XRRenderState.prototype.depthNear;
  162. /**
  163. * @type {number}
  164. */
  165. XRRenderState.prototype.depthFar;
  166. /**
  167. * @type {?number}
  168. */
  169. XRRenderState.prototype.inlineVerticalFieldOfView;
  170. /**
  171. * @type {?XRWebGLLayer}
  172. */
  173. XRRenderState.prototype.baseLayer;
  174. /**
  175. * @constructor
  176. */
  177. function XRFrame() {}
  178. /**
  179. * @type {XRSession}
  180. */
  181. XRFrame.prototype.session;
  182. /**
  183. * @param {XRReferenceSpace} referenceSpace
  184. * @return {?XRViewerPose}
  185. */
  186. XRFrame.prototype.getViewerPose = function (referenceSpace) {};
  187. /**
  188. * @param {XRSpace} space
  189. * @param {XRSpace} baseSpace
  190. * @return {XRPose}
  191. */
  192. XRFrame.prototype.getPose = function (space, baseSpace) {};
  193. /**
  194. * @param {Array<XRSpace>} spaces
  195. * @param {XRSpace} baseSpace
  196. * @param {Float32Array} transforms
  197. * @return {boolean}
  198. */
  199. XRFrame.prototype.fillPoses = function (spaces, baseSpace, transforms) {};
  200. /**
  201. * @param {Array<XRJointSpace>} jointSpaces
  202. * @param {Float32Array} radii
  203. * @return {boolean}
  204. */
  205. XRFrame.prototype.fillJointRadii = function (jointSpaces, radii) {};
  206. /**
  207. * @constructor
  208. */
  209. function XRReferenceSpace() {};
  210. /**
  211. * @type {Array<DOMPointReadOnly>}
  212. */
  213. XRReferenceSpace.prototype.boundsGeometry;
  214. /**
  215. * @param {XRRigidTransform} originOffset
  216. * @return {XRReferenceSpace}
  217. */
  218. XRReferenceSpace.prototype.getOffsetReferenceSpace = function(originOffset) {};
  219. /**
  220. * @type {?function (Event)}
  221. */
  222. XRReferenceSpace.prototype.onreset;
  223. /**
  224. * @constructor
  225. */
  226. function XRRigidTransform() {};
  227. /**
  228. * @type {DOMPointReadOnly}
  229. */
  230. XRRigidTransform.prototype.position;
  231. /**
  232. * @type {DOMPointReadOnly}
  233. */
  234. XRRigidTransform.prototype.orientation;
  235. /**
  236. * @type {Float32Array}
  237. */
  238. XRRigidTransform.prototype.matrix;
  239. /**
  240. * @type {XRRigidTransform}
  241. */
  242. XRRigidTransform.prototype.inverse;
  243. /**
  244. * @constructor
  245. */
  246. function XRView() {}
  247. /**
  248. * @type {string}
  249. */
  250. XRView.prototype.eye;
  251. /**
  252. * @type {Float32Array}
  253. */
  254. XRView.prototype.projectionMatrix;
  255. /**
  256. * @type {XRRigidTransform}
  257. */
  258. XRView.prototype.transform;
  259. /**
  260. * @constructor
  261. */
  262. function XRViewerPose() {}
  263. /**
  264. * @type {Array<XRView>}
  265. */
  266. XRViewerPose.prototype.views;
  267. /**
  268. * @constructor
  269. */
  270. function XRViewport() {}
  271. /**
  272. * @type {number}
  273. */
  274. XRViewport.prototype.x;
  275. /**
  276. * @type {number}
  277. */
  278. XRViewport.prototype.y;
  279. /**
  280. * @type {number}
  281. */
  282. XRViewport.prototype.width;
  283. /**
  284. * @type {number}
  285. */
  286. XRViewport.prototype.height;
  287. /**
  288. * @constructor
  289. */
  290. function XRWebGLLayerInit() {};
  291. /**
  292. * @type {boolean}
  293. */
  294. XRWebGLLayerInit.prototype.antialias;
  295. /**
  296. * @type {boolean}
  297. */
  298. XRWebGLLayerInit.prototype.depth;
  299. /**
  300. * @type {boolean}
  301. */
  302. XRWebGLLayerInit.prototype.stencil;
  303. /**
  304. * @type {boolean}
  305. */
  306. XRWebGLLayerInit.prototype.alpha;
  307. /**
  308. * @type {boolean}
  309. */
  310. XRWebGLLayerInit.prototype.ignoreDepthValues;
  311. /**
  312. * @type {boolean}
  313. */
  314. XRWebGLLayerInit.prototype.ignoreDepthValues;
  315. /**
  316. * @type {number}
  317. */
  318. XRWebGLLayerInit.prototype.framebufferScaleFactor;
  319. /**
  320. * @constructor
  321. *
  322. * @param {XRSession} session
  323. * @param {WebGLRenderContext|WebGL2RenderingContext} ctx
  324. * @param {?XRWebGLLayerInit} options
  325. */
  326. function XRWebGLLayer(session, ctx, options) {}
  327. /**
  328. * @type {boolean}
  329. */
  330. XRWebGLLayer.prototype.antialias;
  331. /**
  332. * @type {boolean}
  333. */
  334. XRWebGLLayer.prototype.ignoreDepthValues;
  335. /**
  336. * @type {number}
  337. */
  338. XRWebGLLayer.prototype.framebufferWidth;
  339. /**
  340. * @type {number}
  341. */
  342. XRWebGLLayer.prototype.framebufferHeight;
  343. /**
  344. * @type {WebGLFramebuffer}
  345. */
  346. XRWebGLLayer.prototype.framebuffer;
  347. /**
  348. * @param {XRView} view
  349. * @return {?XRViewport}
  350. */
  351. XRWebGLLayer.prototype.getViewport = function(view) {};
  352. /**
  353. * @param {XRSession} session
  354. * @return {number}
  355. */
  356. XRWebGLLayer.prototype.getNativeFramebufferScaleFactor = function (session) {};
  357. /**
  358. * @constructor
  359. */
  360. function WebGLRenderingContextBase() {};
  361. /**
  362. * @return {Promise<void>}
  363. */
  364. WebGLRenderingContextBase.prototype.makeXRCompatible = function () {};
  365. /**
  366. * @constructor
  367. */
  368. function XRInputSourcesChangeEvent() {};
  369. /**
  370. * @type {Array<XRInputSource>}
  371. */
  372. XRInputSourcesChangeEvent.prototype.added;
  373. /**
  374. * @type {Array<XRInputSource>}
  375. */
  376. XRInputSourcesChangeEvent.prototype.removed;
  377. /**
  378. * @constructor
  379. */
  380. function XRInputSourceEvent() {};
  381. /**
  382. * @type {XRFrame}
  383. */
  384. XRInputSourceEvent.prototype.frame;
  385. /**
  386. * @type {XRInputSource}
  387. */
  388. XRInputSourceEvent.prototype.inputSource;
  389. /**
  390. * @constructor
  391. */
  392. function XRInputSource() {};
  393. /**
  394. * @type {Gamepad}
  395. */
  396. XRInputSource.prototype.gamepad;
  397. /**
  398. * @type {XRSpace}
  399. */
  400. XRInputSource.prototype.gripSpace;
  401. /**
  402. * @type {string}
  403. */
  404. XRInputSource.prototype.handedness;
  405. /**
  406. * @type {string}
  407. */
  408. XRInputSource.prototype.profiles;
  409. /**
  410. * @type {string}
  411. */
  412. XRInputSource.prototype.targetRayMode;
  413. /**
  414. * @type {XRSpace}
  415. */
  416. XRInputSource.prototype.targetRaySpace;
  417. /**
  418. * @type {?XRHand}
  419. */
  420. XRInputSource.prototype.hand;
  421. /**
  422. * @constructor
  423. */
  424. function XRHand() {};
  425. /**
  426. * Note: In fact, XRHand acts like a Map<string, XRJointSpace>, but I don't know
  427. * how to represent that here. So, we're just giving the one method we call.
  428. *
  429. * @return {Array<XRJointSpace>}
  430. */
  431. XRHand.prototype.values = function () {};
  432. /**
  433. * @type {number}
  434. */
  435. XRHand.prototype.size;
  436. /**
  437. * @param {string} key
  438. * @return {XRJointSpace}
  439. */
  440. XRHand.prototype.get = function (key) {};
  441. /**
  442. * @constructor
  443. */
  444. function XRSpace() {};
  445. /**
  446. * @constructor
  447. * @extends {XRSpace}
  448. */
  449. function XRJointSpace() {};
  450. /**
  451. * @type {string}
  452. */
  453. XRJointSpace.prototype.jointName;
  454. /**
  455. * @constructor
  456. */
  457. function XRPose() {};
  458. /**
  459. * @type {XRRigidTransform}
  460. */
  461. XRPose.prototype.transform;
  462. /**
  463. * @type {boolean}
  464. */
  465. XRPose.prototype.emulatedPosition;
  466. /*
  467. * WebXR Layers API Level 1
  468. */
  469. /**
  470. * @constructor XRLayer
  471. */
  472. function XRLayer() {}
  473. /**
  474. * @constructor XRLayerEventInit
  475. */
  476. function XRLayerEventInit() {}
  477. /**
  478. * @type {XRLayer}
  479. */
  480. XRLayerEventInit.prototype.layer;
  481. /**
  482. * @constructor XRLayerEvent
  483. *
  484. * @param {string} type
  485. * @param {XRLayerEventInit} init
  486. */
  487. function XRLayerEvent(type, init) {};
  488. /**
  489. * @type {XRLayer}
  490. */
  491. XRLayerEvent.prototype.layer;
  492. /**
  493. * @constructor XRCompositionLayer
  494. * @extends {XRLayer}
  495. */
  496. function XRCompositionLayer() {};
  497. /**
  498. * @type {string}
  499. */
  500. XRCompositionLayer.prototype.layout;
  501. /**
  502. * @type {boolean}
  503. */
  504. XRCompositionLayer.prototype.blendTextureAberrationCorrection;
  505. /**
  506. * @type {?boolean}
  507. */
  508. XRCompositionLayer.prototype.chromaticAberrationCorrection;
  509. /**
  510. * @type {boolean}
  511. */
  512. XRCompositionLayer.prototype.forceMonoPresentation;
  513. /**
  514. * @type {number}
  515. */
  516. XRCompositionLayer.prototype.opacity;
  517. /**
  518. * @type {number}
  519. */
  520. XRCompositionLayer.prototype.mipLevels;
  521. /**
  522. * @type {boolean}
  523. */
  524. XRCompositionLayer.prototype.needsRedraw;
  525. /**
  526. * @return {void}
  527. */
  528. XRCompositionLayer.prototype.destroy = function () {};
  529. /**
  530. * @constructor XRProjectionLayer
  531. * @extends {XRCompositionLayer}
  532. */
  533. function XRProjectionLayer() {}
  534. /**
  535. * @type {number}
  536. */
  537. XRProjectionLayer.prototype.textureWidth;
  538. /**
  539. * @type {number}
  540. */
  541. XRProjectionLayer.prototype.textureHeight;
  542. /**
  543. * @type {number}
  544. */
  545. XRProjectionLayer.prototype.textureArrayLength;
  546. /**
  547. * @type {boolean}
  548. */
  549. XRProjectionLayer.prototype.ignoreDepthValues;
  550. /**
  551. * @type {?number}
  552. */
  553. XRProjectionLayer.prototype.fixedFoveation;
  554. /**
  555. * @type {XRRigidTransform}
  556. */
  557. XRProjectionLayer.prototype.deltaPose;
  558. /**
  559. * @constructor XRQuadLayer
  560. * @extends {XRCompositionLayer}
  561. */
  562. function XRQuadLayer() {}
  563. /**
  564. * @type {XRSpace}
  565. */
  566. XRQuadLayer.prototype.space;
  567. /**
  568. * @type {XRRigidTransform}
  569. */
  570. XRQuadLayer.prototype.transform;
  571. /**
  572. * @type {number}
  573. */
  574. XRQuadLayer.prototype.width;
  575. /**
  576. * @type {number}
  577. */
  578. XRQuadLayer.prototype.height;
  579. /**
  580. * @type {?function (XRLayerEvent)}
  581. */
  582. XRQuadLayer.prototype.onredraw;
  583. /**
  584. * @constructor XRCylinderLayer
  585. * @extends {XRCompositionLayer}
  586. */
  587. function XRCylinderLayer() {}
  588. /**
  589. * @type {XRSpace}
  590. */
  591. XRCylinderLayer.prototype.space;
  592. /**
  593. * @type {XRRigidTransform}
  594. */
  595. XRCylinderLayer.prototype.transform;
  596. /**
  597. * @type {number}
  598. */
  599. XRCylinderLayer.prototype.radius;
  600. /**
  601. * @type {number}
  602. */
  603. XRCylinderLayer.prototype.centralAngle;
  604. /**
  605. * @type {number}
  606. */
  607. XRCylinderLayer.prototype.aspectRatio;
  608. /**
  609. * @type {?function (XRLayerEvent)}
  610. */
  611. XRCylinderLayer.prototype.onredraw;
  612. /**
  613. * @constructor XREquirectLayer
  614. * @extends {XRCompositionLayer}
  615. */
  616. function XREquirectLayer() {}
  617. /**
  618. * @type {XRSpace}
  619. */
  620. XREquirectLayer.prototype.space;
  621. /**
  622. * @type {XRRigidTransform}
  623. */
  624. XREquirectLayer.prototype.transform;
  625. /**
  626. * @type {number}
  627. */
  628. XREquirectLayer.prototype.radius;
  629. /**
  630. * @type {number}
  631. */
  632. XREquirectLayer.prototype.centralHorizontalAngle;
  633. /**
  634. * @type {number}
  635. */
  636. XREquirectLayer.prototype.upperVerticalAngle;
  637. /**
  638. * @type {number}
  639. */
  640. XREquirectLayer.prototype.lowerVerticalAngle;
  641. /**
  642. * @type {?function (XRLayerEvent)}
  643. */
  644. XREquirectLayer.prototype.onredraw;
  645. /**
  646. * @constructor XRCubeLayer
  647. * @extends {XRCompositionLayer}
  648. */
  649. function XRCubeLayer() {}
  650. /**
  651. * @type {XRSpace}
  652. */
  653. XRCubeLayer.prototype.space;
  654. /**
  655. * @type {DOMPointReadOnly}
  656. */
  657. XRCubeLayer.prototype.orientation;
  658. /**
  659. * @type {?function (XRLayerEvent)}
  660. */
  661. XRCubeLayer.prototype.onredraw;
  662. /**
  663. * @constructor XRSubImage
  664. */
  665. function XRSubImage() {}
  666. /**
  667. * @type {XRViewport}
  668. */
  669. XRSubImage.prototype.viewport;
  670. /**
  671. * @constructor XRWebGLSubImage
  672. * @extends {XRSubImage}
  673. */
  674. function XRWebGLSubImage () {}
  675. /**
  676. * @type {WebGLTexture}
  677. */
  678. XRWebGLSubImage.prototype.colorTexture;
  679. /**
  680. * @type {?WebGLTexture}
  681. */
  682. XRWebGLSubImage.prototype.depthStencilTexture;
  683. /**
  684. * @type {?WebGLTexture}
  685. */
  686. XRWebGLSubImage.prototype.motionVectorTexture;
  687. /**
  688. * @type {?number}
  689. */
  690. XRWebGLSubImage.prototype.imageIndex;
  691. /**
  692. * @type {number}
  693. */
  694. XRWebGLSubImage.prototype.colorTextureWidth;
  695. /**
  696. * @type {number}
  697. */
  698. XRWebGLSubImage.prototype.colorTextureHeight;
  699. /**
  700. * @type {?number}
  701. */
  702. XRWebGLSubImage.prototype.depthStencilTextureWidth;
  703. /**
  704. * @type {?number}
  705. */
  706. XRWebGLSubImage.prototype.depthStencilTextureHeight;
  707. /**
  708. * @type {?number}
  709. */
  710. XRWebGLSubImage.prototype.motionVectorTextureWidth;
  711. /**
  712. * @type {?number}
  713. */
  714. XRWebGLSubImage.prototype.motionVectorTextureHeight;
  715. /**
  716. * @constructor XRProjectionLayerInit
  717. */
  718. function XRProjectionLayerInit() {}
  719. /**
  720. * @type {string}
  721. */
  722. XRProjectionLayerInit.prototype.textureType;
  723. /**
  724. * @type {number}
  725. */
  726. XRProjectionLayerInit.prototype.colorFormat;
  727. /**
  728. * @type {number}
  729. */
  730. XRProjectionLayerInit.prototype.depthFormat;
  731. /**
  732. * @type {number}
  733. */
  734. XRProjectionLayerInit.prototype.scaleFactor;
  735. /**
  736. * @constructor XRLayerInit
  737. */
  738. function XRLayerInit() {}
  739. /**
  740. * @type {XRSpace}
  741. */
  742. XRLayerInit.prototype.space;
  743. /**
  744. * @type {number}
  745. */
  746. XRLayerInit.prototype.colorFormat;
  747. /**
  748. * @type {number}
  749. */
  750. XRLayerInit.prototype.depthFormat;
  751. /**
  752. * @type {number}
  753. */
  754. XRLayerInit.prototype.mipLevels;
  755. /**
  756. * @type {number}
  757. */
  758. XRLayerInit.prototype.viewPixelWidth;
  759. /**
  760. * @type {number}
  761. */
  762. XRLayerInit.prototype.viewPixelHeight;
  763. /**
  764. * @type {string}
  765. */
  766. XRLayerInit.prototype.layout;
  767. /**
  768. * @type {boolean}
  769. */
  770. XRLayerInit.prototype.isStatic;
  771. /**
  772. * @constructor XRQuadLayerInit
  773. * @extends {XRLayerInit}
  774. */
  775. function XRQuadLayerInit() {}
  776. /**
  777. * @type {string}
  778. */
  779. XRQuadLayerInit.prototype.textureType;
  780. /**
  781. * @type {?XRRigidTransform}
  782. */
  783. XRQuadLayerInit.prototype.transform;
  784. /**
  785. * @type {number}
  786. */
  787. XRQuadLayerInit.prototype.width;
  788. /**
  789. * @type {number}
  790. */
  791. XRQuadLayerInit.prototype.height;
  792. /**
  793. * @constructor XRCylinderLayerInit
  794. * @extends {XRLayerInit}
  795. */
  796. function XRCylinderLayerInit() {}
  797. /**
  798. * @type {string}
  799. */
  800. XRCylinderLayerInit.prototype.textureType;
  801. /**
  802. * @type {?XRRigidTransform}
  803. */
  804. XRCylinderLayerInit.prototype.transform;
  805. /**
  806. * @type {number}
  807. */
  808. XRCylinderLayerInit.prototype.radius;
  809. /**
  810. * @type {number}
  811. */
  812. XRCylinderLayerInit.prototype.centralAngle;
  813. /**
  814. * @type {number}
  815. */
  816. XRCylinderLayerInit.prototype.aspectRatio;
  817. /**
  818. * @constructor XREquirectLayerInit
  819. * @extends {XRLayerInit}
  820. */
  821. function XREquirectLayerInit() {}
  822. /**
  823. * @type {string}
  824. */
  825. XREquirectLayerInit.prototype.textureType;
  826. /**
  827. * @type {?XRRigidTransform}
  828. */
  829. XREquirectLayerInit.prototype.transform;
  830. /**
  831. * @type {number}
  832. */
  833. XREquirectLayerInit.prototype.radius;
  834. /**
  835. * @type {number}
  836. */
  837. XREquirectLayerInit.prototype.centralHorizontalAngle;
  838. /**
  839. * @type {number}
  840. */
  841. XREquirectLayerInit.prototype.upperVerticalAngle;
  842. /**
  843. * @type {number}
  844. */
  845. XREquirectLayerInit.prototype.lowerVerticalAngle;
  846. /**
  847. * @constructor XRCubeLayerInit
  848. * @extends {XRLayerInit}
  849. */
  850. function XRCubeLayerInit() {}
  851. /**
  852. * @type {DOMPointReadOnly}
  853. */
  854. XRCubeLayerInit.prototype.orientation;
  855. /**
  856. * @constructor XRWebGLBinding
  857. *
  858. * @param {XRSession} session
  859. * @param {WebGLRenderContext|WebGL2RenderingContext} context
  860. */
  861. function XRWebGLBinding(session, context) {}
  862. /**
  863. * @type {number}
  864. */
  865. XRWebGLBinding.prototype.nativeProjectionScaleFactor;
  866. /**
  867. * @type {number}
  868. */
  869. XRWebGLBinding.prototype.usesDepthValues;
  870. /**
  871. * @param {XRProjectionLayerInit} init
  872. * @return {XRProjectionLayer}
  873. */
  874. XRWebGLBinding.prototype.createProjectionLayer = function (init) {};
  875. /**
  876. * @param {XRQuadLayerInit} init
  877. * @return {XRQuadLayer}
  878. */
  879. XRWebGLBinding.prototype.createQuadLayer = function (init) {};
  880. /**
  881. * @param {XRCylinderLayerInit} init
  882. * @return {XRCylinderLayer}
  883. */
  884. XRWebGLBinding.prototype.createCylinderLayer = function (init) {};
  885. /**
  886. * @param {XREquirectLayerInit} init
  887. * @return {XREquirectLayer}
  888. */
  889. XRWebGLBinding.prototype.createEquirectLayer = function (init) {};
  890. /**
  891. * @param {XRCubeLayerInit} init
  892. * @return {XRCubeLayer}
  893. */
  894. XRWebGLBinding.prototype.createCubeLayer = function (init) {};
  895. /**
  896. * @param {XRCompositionLayer} layer
  897. * @param {XRFrame} frame
  898. * @param {string} eye
  899. * @return {XRWebGLSubImage}
  900. */
  901. XRWebGLBinding.prototype.getSubImage = function (layer, frame, eye) {};
  902. /**
  903. * @param {XRProjectionLayer} layer
  904. * @param {XRView} view
  905. * @return {XRWebGLSubImage}
  906. */
  907. XRWebGLBinding.prototype.getViewSubImage = function (layer, view) {};
  908. /**
  909. * @constructor XRMediaLayerInit
  910. */
  911. function XRMediaLayerInit() {}
  912. /**
  913. * @type {XRSpace}
  914. */
  915. XRMediaLayerInit.prototype.space;
  916. /**
  917. * @type {string}
  918. */
  919. XRMediaLayerInit.prototype.layout;
  920. /**
  921. * @type {boolean}
  922. */
  923. XRMediaLayerInit.prototype.invertStereo;
  924. /**
  925. * @constructor XRMediaQuadLayerInit
  926. * @extends {XRMediaLayerInit}
  927. */
  928. function XRMediaQuadLayerInit() {}
  929. /**
  930. * @type {XRRigidTransform}
  931. */
  932. XRMediaQuadLayerInit.prototype.transform;
  933. /**
  934. * @type {number}
  935. */
  936. XRMediaQuadLayerInit.prototype.width;
  937. /**
  938. * @type {number}
  939. */
  940. XRMediaQuadLayerInit.prototype.height;
  941. /**
  942. * @constructor XRMediaCylinderLayerInit
  943. * @extends {XRMediaLayerInit}
  944. */
  945. function XRMediaCylinderLayerInit() {}
  946. /**
  947. * @type {XRRigidTransform}
  948. */
  949. XRMediaCylinderLayerInit.prototype.transform;
  950. /**
  951. * @type {number}
  952. */
  953. XRMediaCylinderLayerInit.prototype.radius;
  954. /**
  955. * @type {number}
  956. */
  957. XRMediaCylinderLayerInit.prototype.centralAngle;
  958. /**
  959. * @type {?number}
  960. */
  961. XRMediaCylinderLayerInit.prototype.aspectRatio;
  962. /**
  963. * @constructor XRMediaEquirectLayerInit
  964. * @extends {XRMediaLayerInit}
  965. */
  966. function XRMediaEquirectLayerInit() {}
  967. /**
  968. * @type {XRRigidTransform}
  969. */
  970. XRMediaEquirectLayerInit.prototype.transform;
  971. /**
  972. * @type {number}
  973. */
  974. XRMediaEquirectLayerInit.prototype.radius;
  975. /**
  976. * @type {number}
  977. */
  978. XRMediaEquirectLayerInit.prototype.centralHorizontalAngle;
  979. /**
  980. * @type {number}
  981. */
  982. XRMediaEquirectLayerInit.prototype.upperVerticalAngle;
  983. /**
  984. * @type {number}
  985. */
  986. XRMediaEquirectLayerInit.prototype.lowerVerticalAngle;
  987. /**
  988. * @constructor XRMediaBinding
  989. *
  990. * @param {XRSession} session
  991. */
  992. function XRMediaBinding(session) {}
  993. /**
  994. * @param {HTMLVideoElement} video
  995. * @param {XRMediaQuadLayerInit} init
  996. * @return {XRQuadLayer}
  997. */
  998. XRMediaBinding.prototype.createQuadLayer = function(video, init) {};
  999. /**
  1000. * @param {HTMLVideoElement} video
  1001. * @param {XRMediaCylinderLayerInit} init
  1002. * @return {XRCylinderLayer}
  1003. */
  1004. XRMediaBinding.prototype.createCylinderLayer = function(video, init) {};
  1005. /**
  1006. * @param {HTMLVideoElement} video
  1007. * @param {XRMediaEquirectLayerInit} init
  1008. * @return {XREquirectLayer}
  1009. */
  1010. XRMediaBinding.prototype.createEquirectLayer = function(video, init) {};
  1011. /**
  1012. * @type {Array<XRLayer>}
  1013. */
  1014. XRRenderState.prototype.layers;