webxr.externs.js 19 KB

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