babylon.mixins.ts 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  1. // Mixins
  2. interface Window {
  3. mozIndexedDB(func: any): any;
  4. webkitIndexedDB(func: any): any;
  5. msIndexedDB: IDBFactory;
  6. IDBTransaction(func: any): any;
  7. webkitIDBTransaction(func: any): any;
  8. msIDBTransaction(func: any): any;
  9. IDBKeyRange(func: any): any;
  10. webkitIDBKeyRange(func: any): any;
  11. msIDBKeyRange(func: any): any;
  12. webkitURL: HTMLURL;
  13. webkitRequestAnimationFrame(func: any): any;
  14. mozRequestAnimationFrame(func: any): any;
  15. oRequestAnimationFrame(func: any): any;
  16. WebGLRenderingContext: WebGLRenderingContext;
  17. MSGesture: MSGesture;
  18. CANNON: any;
  19. SIMD: any;
  20. AudioContext: AudioContext;
  21. webkitAudioContext: AudioContext;
  22. PointerEvent: any;
  23. Math: Math;
  24. Uint8Array: Uint8ArrayConstructor;
  25. Float32Array: Float32ArrayConstructor;
  26. }
  27. interface AudioContext extends EventTarget {
  28. decodeAudioData(audioData: ArrayBuffer, successCallback: DecodeSuccessCallback, errorCallback?: any): void;
  29. }
  30. interface HTMLURL {
  31. createObjectURL(param1: any, param2?: any);
  32. }
  33. interface Document {
  34. exitFullscreen(): void;
  35. webkitCancelFullScreen(): void;
  36. mozCancelFullScreen(): void;
  37. msCancelFullScreen(): void;
  38. mozFullScreen: boolean;
  39. msIsFullScreen: boolean;
  40. fullscreen: boolean;
  41. mozPointerLockElement: HTMLElement;
  42. msPointerLockElement: HTMLElement;
  43. webkitPointerLockElement: HTMLElement;
  44. }
  45. interface HTMLCanvasElement {
  46. requestPointerLock(): void;
  47. msRequestPointerLock?(): void;
  48. mozRequestPointerLock?(): void;
  49. webkitRequestPointerLock?(): void;
  50. }
  51. interface CanvasRenderingContext2D {
  52. imageSmoothingEnabled: boolean;
  53. mozImageSmoothingEnabled: boolean;
  54. oImageSmoothingEnabled: boolean;
  55. webkitImageSmoothingEnabled: boolean;
  56. }
  57. interface WebGLTexture {
  58. isReady: boolean;
  59. isCube: boolean;
  60. url: string;
  61. noMipmap: boolean;
  62. samplingMode: number;
  63. references: number;
  64. generateMipMaps: boolean;
  65. type: number;
  66. onLoadedCallbacks: Array<Function>;
  67. _size: number;
  68. _baseWidth: number;
  69. _baseHeight: number;
  70. _width: number;
  71. _height: number;
  72. _workingCanvas: HTMLCanvasElement;
  73. _workingContext: CanvasRenderingContext2D;
  74. _framebuffer: WebGLFramebuffer;
  75. _depthBuffer: WebGLRenderbuffer;
  76. _cachedCoordinatesMode: number;
  77. _cachedWrapU: number;
  78. _cachedWrapV: number;
  79. _isDisabled: boolean;
  80. }
  81. interface WebGLBuffer {
  82. references: number;
  83. capacity: number;
  84. is32Bits: boolean;
  85. }
  86. interface MouseEvent {
  87. mozMovementX: number;
  88. mozMovementY: number;
  89. webkitMovementX: number;
  90. webkitMovementY: number;
  91. msMovementX: number;
  92. msMovementY: number;
  93. }
  94. interface MSStyleCSSProperties {
  95. webkitTransform: string;
  96. webkitTransition: string;
  97. }
  98. interface Navigator {
  99. getVRDisplays: () => any;
  100. mozGetVRDevices: (any: any) => any;
  101. isCocoonJS: boolean;
  102. }
  103. interface Screen {
  104. orientation: string;
  105. mozOrientation: string;
  106. }
  107. interface HTMLMediaElement {
  108. crossOrigin: string;
  109. }
  110. interface Math {
  111. fround(x: number): number;
  112. imul(a: number, b: number): number;
  113. }
  114. interface SIMDglobal {
  115. SIMD: SIMD;
  116. Math: Math;
  117. Uint8Array: Uint8ArrayConstructor;
  118. Float32Array: Float32ArrayConstructor;
  119. }
  120. interface SIMD {
  121. Float32x4: SIMD.Float32x4Constructor;
  122. Int32x4: SIMD.Int32x4Constructor;
  123. Int16x8: SIMD.Int16x8Constructor;
  124. Int8x16: SIMD.Int8x16Constructor;
  125. Uint32x4: SIMD.Uint32x4Constructor;
  126. Uint16x8: SIMD.Uint16x8Constructor;
  127. Uint8x16: SIMD.Uint8x16Constructor;
  128. Bool32x4: SIMD.Bool32x4Constructor;
  129. Bool16x8: SIMD.Bool16x8Constructor;
  130. Bool8x16: SIMD.Bool8x16Constructor;
  131. }
  132. declare namespace SIMD {
  133. interface Float32x4 {
  134. constructor: Float32x4Constructor;
  135. valueOf(): Float32x4;
  136. toLocaleString(): string;
  137. toString(): string;
  138. }
  139. interface Float32x4Constructor {
  140. (s0?: number, s1?: number, s2?: number, s3?: number): Float32x4;
  141. prototype: Float32x4;
  142. extractLane(simd: SIMD.Float32x4, lane: number): number;
  143. swizzle(a: SIMD.Float32x4, l1: number, l2: number, l3: number, l4: number): SIMD.Float32x4;
  144. shuffle(a: SIMD.Float32x4, b: SIMD.Float32x4, l1: number, l2: number, l3: number, l4: number): SIMD.Float32x4;
  145. check(a: SIMD.Float32x4): SIMD.Float32x4;
  146. splat(n: number): SIMD.Float32x4;
  147. replaceLane(simd: SIMD.Float32x4, lane: number, value: number): SIMD.Float32x4;
  148. select(selector: SIMD.Bool32x4, a: SIMD.Float32x4, b: SIMD.Float32x4): SIMD.Float32x4;
  149. equal(a: SIMD.Float32x4, b: SIMD.Float32x4): SIMD.Bool32x4;
  150. notEqual(a: SIMD.Float32x4, b: SIMD.Float32x4): SIMD.Bool32x4;
  151. lessThan(a: SIMD.Float32x4, b: SIMD.Float32x4): SIMD.Bool32x4;
  152. lessThanOrEqual(a: SIMD.Float32x4, b: SIMD.Float32x4): SIMD.Bool32x4;
  153. greaterThan(a: SIMD.Float32x4, b: SIMD.Float32x4): SIMD.Bool32x4;
  154. greaterThanOrEqual(a: SIMD.Float32x4, b: SIMD.Float32x4): SIMD.Bool32x4;
  155. add(a: SIMD.Float32x4, b: SIMD.Float32x4): SIMD.Float32x4;
  156. sub(a: SIMD.Float32x4, b: SIMD.Float32x4): SIMD.Float32x4;
  157. mul(a: SIMD.Float32x4, b: SIMD.Float32x4): SIMD.Float32x4;
  158. div(a: SIMD.Float32x4, b: SIMD.Float32x4): SIMD.Float32x4;
  159. neg(a: SIMD.Float32x4): SIMD.Float32x4;
  160. abs(a: SIMD.Float32x4): SIMD.Float32x4;
  161. min(a: SIMD.Float32x4, b: SIMD.Float32x4): SIMD.Float32x4;
  162. max(a: SIMD.Float32x4, b: SIMD.Float32x4): SIMD.Float32x4;
  163. minNum(a: SIMD.Float32x4, b: SIMD.Float32x4): SIMD.Float32x4;
  164. maxNum(a: SIMD.Float32x4, b: SIMD.Float32x4): SIMD.Float32x4;
  165. reciprocalApproximation(a: SIMD.Float32x4): SIMD.Float32x4;
  166. reciprocalSqrtApproximation(a: SIMD.Float32x4): SIMD.Float32x4;
  167. sqrt(a: SIMD.Float32x4): SIMD.Float32x4;
  168. load(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number): SIMD.Float32x4;
  169. load1(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number): SIMD.Float32x4;
  170. load2(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number): SIMD.Float32x4;
  171. load3(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number): SIMD.Float32x4;
  172. store(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number, value: SIMD.Float32x4): SIMD.Float32x4;
  173. store1(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number, value: SIMD.Float32x4): SIMD.Float32x4;
  174. store2(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number, value: SIMD.Float32x4): SIMD.Float32x4;
  175. store3(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number, value: SIMD.Float32x4): SIMD.Float32x4;
  176. fromInt32x4(value: SIMD.Int32x4): SIMD.Float32x4;
  177. fromUint32x4(value: SIMD.Uint32x4): SIMD.Float32x4;
  178. fromInt32x4Bits(value: SIMD.Int32x4): SIMD.Float32x4;
  179. fromInt16x8Bits(value: SIMD.Int16x8): SIMD.Float32x4;
  180. fromInt8x16Bits(value: SIMD.Int8x16): SIMD.Float32x4;
  181. fromUint32x4Bits(value: SIMD.Uint32x4): SIMD.Float32x4;
  182. fromUint16x8Bits(value: SIMD.Uint16x8): SIMD.Float32x4;
  183. fromUint8x16Bits(value: SIMD.Uint8x16): SIMD.Float32x4;
  184. }
  185. interface Int32x4 {
  186. constructor: Int32x4Constructor;
  187. valueOf(): Int32x4;
  188. toLocaleString(): string;
  189. toString(): string;
  190. }
  191. interface Int32x4Constructor {
  192. (s0?: number, s1?: number, s2?: number, s3?: number): Int32x4;
  193. prototype: Int32x4;
  194. extractLane(simd: SIMD.Int32x4, lane: number): number;
  195. swizzle(a: SIMD.Int32x4, l1: number, l2: number, l3: number, l4: number): SIMD.Int32x4;
  196. shuffle(a: SIMD.Int32x4, b: SIMD.Int32x4, l1: number, l2: number, l3: number, l4: number): SIMD.Int32x4;
  197. check(a: SIMD.Int32x4): SIMD.Int32x4;
  198. splat(n: number): SIMD.Int32x4;
  199. replaceLane(simd: SIMD.Int32x4, lane: number, value: number): SIMD.Int32x4;
  200. select(selector: SIMD.Bool32x4, a: SIMD.Int32x4, b: SIMD.Int32x4): SIMD.Int32x4;
  201. equal(a: SIMD.Int32x4, b: SIMD.Int32x4): SIMD.Bool32x4;
  202. notEqual(a: SIMD.Int32x4, b: SIMD.Int32x4): SIMD.Bool32x4;
  203. lessThan(a: SIMD.Int32x4, b: SIMD.Int32x4): SIMD.Bool32x4;
  204. lessThanOrEqual(a: SIMD.Int32x4, b: SIMD.Int32x4): SIMD.Bool32x4;
  205. greaterThan(a: SIMD.Int32x4, b: SIMD.Int32x4): SIMD.Bool32x4;
  206. greaterThanOrEqual(a: SIMD.Int32x4, b: SIMD.Int32x4): SIMD.Bool32x4;
  207. and(a: SIMD.Int32x4, b: SIMD.Int32x4): SIMD.Int32x4;
  208. or(a: SIMD.Int32x4, b: SIMD.Int32x4): SIMD.Int32x4;
  209. xor(a: SIMD.Int32x4, b: SIMD.Int32x4): SIMD.Int32x4;
  210. not(a: SIMD.Int32x4, b: SIMD.Int32x4): SIMD.Int32x4;
  211. add(a: SIMD.Int32x4, b: SIMD.Int32x4): SIMD.Int32x4;
  212. sub(a: SIMD.Int32x4, b: SIMD.Int32x4): SIMD.Int32x4;
  213. mul(a: SIMD.Int32x4, b: SIMD.Int32x4): SIMD.Int32x4;
  214. neg(a: SIMD.Int32x4): SIMD.Int32x4;
  215. shiftLeftByScalar(a: SIMD.Int32x4, bits: number): SIMD.Int32x4;
  216. shiftRightByScalar(a: SIMD.Int32x4, bits: number): SIMD.Int32x4;
  217. load(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number): SIMD.Int32x4;
  218. load1(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number): SIMD.Int32x4;
  219. load2(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number): SIMD.Int32x4;
  220. load3(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number): SIMD.Int32x4;
  221. store(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number, value: SIMD.Int32x4): SIMD.Int32x4;
  222. store1(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number, value: SIMD.Int32x4): SIMD.Int32x4;
  223. store2(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number, value: SIMD.Int32x4): SIMD.Int32x4;
  224. store3(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number, value: SIMD.Int32x4): SIMD.Int32x4;
  225. fromFloat32x4(value: SIMD.Float32x4): SIMD.Int32x4;
  226. fromUint32x4(value: SIMD.Uint32x4): SIMD.Int32x4;
  227. fromFloat32x4Bits(value: SIMD.Float32x4): SIMD.Int32x4;
  228. fromInt16x8Bits(value: SIMD.Int16x8): SIMD.Int32x4;
  229. fromInt8x16Bits(value: SIMD.Int8x16): SIMD.Int32x4;
  230. fromUint32x4Bits(value: SIMD.Uint32x4): SIMD.Int32x4;
  231. fromUint16x8Bits(value: SIMD.Uint16x8): SIMD.Int32x4;
  232. fromUint8x16Bits(value: SIMD.Uint8x16): SIMD.Int32x4;
  233. }
  234. interface Int16x8 {
  235. constructor: Int16x8Constructor;
  236. valueOf(): Int16x8;
  237. toLocaleString(): string;
  238. toString(): string;
  239. }
  240. interface Int16x8Constructor {
  241. (s0?: number, s1?: number, s2?: number, s3?: number, s4?: number, s5?: number, s6?: number, s7?: number): Int16x8;
  242. prototype: Int16x8;
  243. extractLane(simd: SIMD.Int16x8, lane: number): number;
  244. swizzle(a: SIMD.Int16x8, l1: number, l2: number, l3: number, l4: number, l5: number, l6: number, l7: number, l8: number): SIMD.Int16x8;
  245. shuffle(a: SIMD.Int16x8, b: SIMD.Int16x8, l1: number, l2: number, l3: number, l4: number, l5: number, l6: number, l7: number, l8: number): SIMD.Int16x8;
  246. check(a: SIMD.Int16x8): SIMD.Int16x8;
  247. splat(n: number): SIMD.Int16x8;
  248. replaceLane(simd: SIMD.Int16x8, lane: number, value: number): SIMD.Int16x8;
  249. select(selector: SIMD.Bool16x8, a: SIMD.Int16x8, b: SIMD.Int16x8): SIMD.Int16x8;
  250. equal(a: SIMD.Int16x8, b: SIMD.Int16x8): SIMD.Bool16x8;
  251. notEqual(a: SIMD.Int16x8, b: SIMD.Int16x8): SIMD.Bool16x8;
  252. lessThan(a: SIMD.Int16x8, b: SIMD.Int16x8): SIMD.Bool16x8;
  253. lessThanOrEqual(a: SIMD.Int16x8, b: SIMD.Int16x8): SIMD.Bool16x8;
  254. greaterThan(a: SIMD.Int16x8, b: SIMD.Int16x8): SIMD.Bool16x8;
  255. greaterThanOrEqual(a: SIMD.Int16x8, b: SIMD.Int16x8): SIMD.Bool16x8;
  256. and(a: SIMD.Int16x8, b: SIMD.Int16x8): SIMD.Int16x8;
  257. or(a: SIMD.Int16x8, b: SIMD.Int16x8): SIMD.Int16x8;
  258. xor(a: SIMD.Int16x8, b: SIMD.Int16x8): SIMD.Int16x8;
  259. not(a: SIMD.Int16x8, b: SIMD.Int16x8): SIMD.Int16x8;
  260. add(a: SIMD.Int16x8, b: SIMD.Int16x8): SIMD.Int16x8;
  261. sub(a: SIMD.Int16x8, b: SIMD.Int16x8): SIMD.Int16x8;
  262. mul(a: SIMD.Int16x8, b: SIMD.Int16x8): SIMD.Int16x8;
  263. neg(a: SIMD.Int16x8): SIMD.Int16x8;
  264. shiftLeftByScalar(a: SIMD.Int16x8, bits: number): SIMD.Int16x8;
  265. shiftRightByScalar(a: SIMD.Int16x8, bits: number): SIMD.Int16x8;
  266. addSaturate(a: SIMD.Int16x8, b: SIMD.Int16x8): SIMD.Int16x8;
  267. subSaturate(a: SIMD.Int16x8, b: SIMD.Int16x8): SIMD.Int16x8;
  268. load(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number): SIMD.Int16x8;
  269. store(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number, value: SIMD.Int16x8): SIMD.Int16x8;
  270. fromUint16x8(value: SIMD.Uint16x8): SIMD.Int16x8;
  271. fromFloat32x4Bits(value: SIMD.Float32x4): SIMD.Int16x8;
  272. fromInt32x4Bits(value: SIMD.Int32x4): SIMD.Int16x8;
  273. fromInt8x16Bits(value: SIMD.Int8x16): SIMD.Int16x8;
  274. fromUint32x4Bits(value: SIMD.Uint32x4): SIMD.Int16x8;
  275. fromUint16x8Bits(value: SIMD.Uint16x8): SIMD.Int16x8;
  276. fromUint8x16Bits(value: SIMD.Uint8x16): SIMD.Int16x8;
  277. }
  278. interface Int8x16 {
  279. constructor: Int8x16Constructor;
  280. valueOf(): Int8x16;
  281. toLocaleString(): string;
  282. toString(): string;
  283. }
  284. interface Int8x16Constructor {
  285. (s0?: number, s1?: number, s2?: number, s3?: number, s4?: number, s5?: number, s6?: number, s7?: number, s8?: number, s9?: number, s10?: number, s11?: number, s12?: number, s13?: number, s14?: number, s15?: number): Int8x16;
  286. prototype: Int8x16;
  287. extractLane(simd: SIMD.Int8x16, lane: number): number;
  288. swizzle(a: SIMD.Int8x16, l1: number, l2: number, l3: number, l4: number, l5: number, l6: number, l7: number, l8: number, l9: number, l10: number, l11: number, l12: number, l13: number, l14: number, l15: number, l16: number): SIMD.Int8x16;
  289. shuffle(a: SIMD.Int8x16, b: SIMD.Int8x16, l1: number, l2: number, l3: number, l4: number, l5: number, l6: number, l7: number, l8: number, l9: number, l10: number, l11: number, l12: number, l13: number, l14: number, l15: number, l16: number): SIMD.Int8x16;
  290. check(a: SIMD.Int8x16): SIMD.Int8x16;
  291. splat(n: number): SIMD.Int8x16;
  292. replaceLane(simd: SIMD.Int8x16, lane: number, value: number): SIMD.Int8x16;
  293. select(selector: SIMD.Bool8x16, a: SIMD.Int8x16, b: SIMD.Int8x16): SIMD.Int8x16;
  294. equal(a: SIMD.Int8x16, b: SIMD.Int8x16): SIMD.Bool8x16;
  295. notEqual(a: SIMD.Int8x16, b: SIMD.Int8x16): SIMD.Bool8x16;
  296. lessThan(a: SIMD.Int8x16, b: SIMD.Int8x16): SIMD.Bool8x16;
  297. lessThanOrEqual(a: SIMD.Int8x16, b: SIMD.Int8x16): SIMD.Bool8x16;
  298. greaterThan(a: SIMD.Int8x16, b: SIMD.Int8x16): SIMD.Bool8x16;
  299. greaterThanOrEqual(a: SIMD.Int8x16, b: SIMD.Int8x16): SIMD.Bool8x16;
  300. and(a: SIMD.Int8x16, b: SIMD.Int8x16): SIMD.Int8x16;
  301. or(a: SIMD.Int8x16, b: SIMD.Int8x16): SIMD.Int8x16;
  302. xor(a: SIMD.Int8x16, b: SIMD.Int8x16): SIMD.Int8x16;
  303. not(a: SIMD.Int8x16, b: SIMD.Int8x16): SIMD.Int8x16;
  304. add(a: SIMD.Int8x16, b: SIMD.Int8x16): SIMD.Int8x16;
  305. sub(a: SIMD.Int8x16, b: SIMD.Int8x16): SIMD.Int8x16;
  306. mul(a: SIMD.Int8x16, b: SIMD.Int8x16): SIMD.Int8x16;
  307. neg(a: SIMD.Int8x16): SIMD.Int8x16;
  308. shiftLeftByScalar(a: SIMD.Int8x16, bits: number): SIMD.Int8x16;
  309. shiftRightByScalar(a: SIMD.Int8x16, bits: number): SIMD.Int8x16;
  310. addSaturate(a: SIMD.Int8x16, b: SIMD.Int8x16): SIMD.Int8x16;
  311. subSaturate(a: SIMD.Int8x16, b: SIMD.Int8x16): SIMD.Int8x16;
  312. load(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number): SIMD.Int8x16;
  313. store(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number, value: SIMD.Int8x16): SIMD.Int8x16;
  314. fromUint8x16(value: SIMD.Uint8x16): SIMD.Int8x16;
  315. fromFloat32x4Bits(value: SIMD.Float32x4): SIMD.Int8x16;
  316. fromInt32x4Bits(value: SIMD.Int32x4): SIMD.Int8x16;
  317. fromInt16x8Bits(value: SIMD.Int16x8): SIMD.Int8x16;
  318. fromUint32x4Bits(value: SIMD.Uint32x4): SIMD.Int8x16;
  319. fromUint16x8Bits(value: SIMD.Uint16x8): SIMD.Int8x16;
  320. fromUint8x16Bits(value: SIMD.Uint8x16): SIMD.Int8x16;
  321. }
  322. interface Uint32x4 {
  323. constructor: Uint32x4Constructor;
  324. valueOf(): Uint32x4;
  325. toLocaleString(): string;
  326. toString(): string;
  327. }
  328. interface Uint32x4Constructor {
  329. (s0?: number, s1?: number, s2?: number, s3?: number): Uint32x4;
  330. prototype: Uint32x4;
  331. extractLane(simd: SIMD.Uint32x4, lane: number): number;
  332. swizzle(a: SIMD.Uint32x4, l1: number, l2: number, l3: number, l4: number): SIMD.Uint32x4;
  333. shuffle(a: SIMD.Uint32x4, b: SIMD.Uint32x4, l1: number, l2: number, l3: number, l4: number): SIMD.Uint32x4;
  334. check(a: SIMD.Uint32x4): SIMD.Uint32x4;
  335. splat(n: number): SIMD.Uint32x4;
  336. replaceLane(simd: SIMD.Uint32x4, lane: number, value: number): SIMD.Uint32x4;
  337. select(selector: SIMD.Bool32x4, a: SIMD.Uint32x4, b: SIMD.Uint32x4): SIMD.Uint32x4;
  338. equal(a: SIMD.Uint32x4, b: SIMD.Uint32x4): SIMD.Bool32x4;
  339. notEqual(a: SIMD.Uint32x4, b: SIMD.Uint32x4): SIMD.Bool32x4;
  340. lessThan(a: SIMD.Uint32x4, b: SIMD.Uint32x4): SIMD.Bool32x4;
  341. lessThanOrEqual(a: SIMD.Uint32x4, b: SIMD.Uint32x4): SIMD.Bool32x4;
  342. greaterThan(a: SIMD.Uint32x4, b: SIMD.Uint32x4): SIMD.Bool32x4;
  343. greaterThanOrEqual(a: SIMD.Uint32x4, b: SIMD.Uint32x4): SIMD.Bool32x4;
  344. and(a: SIMD.Uint32x4, b: SIMD.Uint32x4): SIMD.Uint32x4;
  345. or(a: SIMD.Uint32x4, b: SIMD.Uint32x4): SIMD.Uint32x4;
  346. xor(a: SIMD.Uint32x4, b: SIMD.Uint32x4): SIMD.Uint32x4;
  347. not(a: SIMD.Uint32x4, b: SIMD.Uint32x4): SIMD.Uint32x4;
  348. add(a: SIMD.Uint32x4, b: SIMD.Uint32x4): SIMD.Uint32x4;
  349. sub(a: SIMD.Uint32x4, b: SIMD.Uint32x4): SIMD.Uint32x4;
  350. mul(a: SIMD.Uint32x4, b: SIMD.Uint32x4): SIMD.Uint32x4;
  351. shiftLeftByScalar(a: SIMD.Uint32x4, bits: number): SIMD.Uint32x4;
  352. shiftRightByScalar(a: SIMD.Uint32x4, bits: number): SIMD.Uint32x4;
  353. load(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number): SIMD.Uint32x4;
  354. load1(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number): SIMD.Uint32x4;
  355. load2(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number): SIMD.Uint32x4;
  356. load3(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number): SIMD.Uint32x4;
  357. store(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number, value: SIMD.Uint32x4): SIMD.Uint32x4;
  358. store1(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number, value: SIMD.Uint32x4): SIMD.Uint32x4;
  359. store2(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number, value: SIMD.Uint32x4): SIMD.Uint32x4;
  360. store3(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number, value: SIMD.Uint32x4): SIMD.Uint32x4;
  361. fromFloat32x4(value: SIMD.Float32x4): SIMD.Uint32x4;
  362. fromInt32x4(value: SIMD.Int32x4): SIMD.Uint32x4;
  363. fromFloat32x4Bits(value: SIMD.Float32x4): SIMD.Uint32x4;
  364. fromInt32x4Bits(value: SIMD.Int32x4): SIMD.Uint32x4;
  365. fromInt16x8Bits(value: SIMD.Int16x8): SIMD.Uint32x4;
  366. fromInt8x16Bits(value: SIMD.Int8x16): SIMD.Uint32x4;
  367. fromUint16x8Bits(value: SIMD.Uint16x8): SIMD.Uint32x4;
  368. fromUint8x16Bits(value: SIMD.Uint8x16): SIMD.Uint32x4;
  369. }
  370. interface Uint16x8 {
  371. constructor: Uint16x8Constructor;
  372. valueOf(): Uint16x8;
  373. toLocaleString(): string;
  374. toString(): string;
  375. }
  376. interface Uint16x8Constructor {
  377. (s0?: number, s1?: number, s2?: number, s3?: number, s4?: number, s5?: number, s6?: number, s7?: number): Uint16x8;
  378. prototype: Uint16x8;
  379. extractLane(simd: SIMD.Uint16x8, lane: number): number;
  380. swizzle(a: SIMD.Uint16x8, l1: number, l2: number, l3: number, l4: number, l5: number, l6: number, l7: number, l8: number): SIMD.Uint16x8;
  381. shuffle(a: SIMD.Uint16x8, b: SIMD.Uint16x8, l1: number, l2: number, l3: number, l4: number, l5: number, l6: number, l7: number, l8: number): SIMD.Uint16x8;
  382. check(a: SIMD.Uint16x8): SIMD.Uint16x8;
  383. splat(n: number): SIMD.Uint16x8;
  384. replaceLane(simd: SIMD.Uint16x8, lane: number, value: number): SIMD.Uint16x8;
  385. select(selector: SIMD.Bool16x8, a: SIMD.Uint16x8, b: SIMD.Uint16x8): SIMD.Uint16x8;
  386. equal(a: SIMD.Uint16x8, b: SIMD.Uint16x8): SIMD.Bool16x8;
  387. notEqual(a: SIMD.Uint16x8, b: SIMD.Uint16x8): SIMD.Bool16x8;
  388. lessThan(a: SIMD.Uint16x8, b: SIMD.Uint16x8): SIMD.Bool16x8;
  389. lessThanOrEqual(a: SIMD.Uint16x8, b: SIMD.Uint16x8): SIMD.Bool16x8;
  390. greaterThan(a: SIMD.Uint16x8, b: SIMD.Uint16x8): SIMD.Bool16x8;
  391. greaterThanOrEqual(a: SIMD.Uint16x8, b: SIMD.Uint16x8): SIMD.Bool16x8;
  392. and(a: SIMD.Uint16x8, b: SIMD.Uint16x8): SIMD.Uint16x8;
  393. or(a: SIMD.Uint16x8, b: SIMD.Uint16x8): SIMD.Uint16x8;
  394. xor(a: SIMD.Uint16x8, b: SIMD.Uint16x8): SIMD.Uint16x8;
  395. not(a: SIMD.Uint16x8, b: SIMD.Uint16x8): SIMD.Uint16x8;
  396. add(a: SIMD.Uint16x8, b: SIMD.Uint16x8): SIMD.Uint16x8;
  397. sub(a: SIMD.Uint16x8, b: SIMD.Uint16x8): SIMD.Uint16x8;
  398. mul(a: SIMD.Uint16x8, b: SIMD.Uint16x8): SIMD.Uint16x8;
  399. shiftLeftByScalar(a: SIMD.Uint16x8, bits: number): SIMD.Uint16x8;
  400. shiftRightByScalar(a: SIMD.Uint16x8, bits: number): SIMD.Uint16x8;
  401. addSaturate(a: SIMD.Uint16x8, b: SIMD.Uint16x8): SIMD.Uint16x8;
  402. subSaturate(a: SIMD.Uint16x8, b: SIMD.Uint16x8): SIMD.Uint16x8;
  403. load(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number): SIMD.Uint16x8;
  404. store(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number, value: SIMD.Uint16x8): SIMD.Uint16x8;
  405. fromInt16x8(value: SIMD.Int16x8): SIMD.Uint16x8;
  406. fromFloat32x4Bits(value: SIMD.Float32x4): SIMD.Uint16x8;
  407. fromInt32x4Bits(value: SIMD.Int32x4): SIMD.Uint16x8;
  408. fromInt16x8Bits(value: SIMD.Int16x8): SIMD.Uint16x8;
  409. fromInt8x16Bits(value: SIMD.Int8x16): SIMD.Uint16x8;
  410. fromUint32x4Bits(value: SIMD.Uint32x4): SIMD.Uint16x8;
  411. fromUint8x16Bits(value: SIMD.Uint8x16): SIMD.Uint16x8;
  412. }
  413. interface Uint8x16 {
  414. constructor: Uint8x16Constructor;
  415. valueOf(): Uint8x16;
  416. toLocaleString(): string;
  417. toString(): string;
  418. }
  419. interface Uint8x16Constructor {
  420. (s0?: number, s1?: number, s2?: number, s3?: number, s4?: number, s5?: number, s6?: number, s7?: number, s8?: number, s9?: number, s10?: number, s11?: number, s12?: number, s13?: number, s14?: number, s15?: number): Uint8x16;
  421. prototype: Uint8x16;
  422. extractLane(simd: SIMD.Uint8x16, lane: number): number;
  423. swizzle(a: SIMD.Uint8x16, l1: number, l2: number, l3: number, l4: number, l5: number, l6: number, l7: number, l8: number, l9: number, l10: number, l11: number, l12: number, l13: number, l14: number, l15: number, l16: number): SIMD.Uint8x16;
  424. shuffle(a: SIMD.Uint8x16, b: SIMD.Uint8x16, l1: number, l2: number, l3: number, l4: number, l5: number, l6: number, l7: number, l8: number, l9: number, l10: number, l11: number, l12: number, l13: number, l14: number, l15: number, l16: number): SIMD.Uint8x16;
  425. check(a: SIMD.Uint8x16): SIMD.Uint8x16;
  426. splat(n: number): SIMD.Uint8x16;
  427. replaceLane(simd: SIMD.Uint8x16, lane: number, value: number): SIMD.Uint8x16;
  428. select(selector: SIMD.Bool8x16, a: SIMD.Uint8x16, b: SIMD.Uint8x16): SIMD.Uint8x16;
  429. equal(a: SIMD.Uint8x16, b: SIMD.Uint8x16): SIMD.Bool8x16;
  430. notEqual(a: SIMD.Uint8x16, b: SIMD.Uint8x16): SIMD.Bool8x16;
  431. lessThan(a: SIMD.Uint8x16, b: SIMD.Uint8x16): SIMD.Bool8x16;
  432. lessThanOrEqual(a: SIMD.Uint8x16, b: SIMD.Uint8x16): SIMD.Bool8x16;
  433. greaterThan(a: SIMD.Uint8x16, b: SIMD.Uint8x16): SIMD.Bool8x16;
  434. greaterThanOrEqual(a: SIMD.Uint8x16, b: SIMD.Uint8x16): SIMD.Bool8x16;
  435. and(a: SIMD.Uint8x16, b: SIMD.Uint8x16): SIMD.Uint8x16;
  436. or(a: SIMD.Uint8x16, b: SIMD.Uint8x16): SIMD.Uint8x16;
  437. xor(a: SIMD.Uint8x16, b: SIMD.Uint8x16): SIMD.Uint8x16;
  438. not(a: SIMD.Uint8x16, b: SIMD.Uint8x16): SIMD.Uint8x16;
  439. add(a: SIMD.Uint8x16, b: SIMD.Uint8x16): SIMD.Uint8x16;
  440. sub(a: SIMD.Uint8x16, b: SIMD.Uint8x16): SIMD.Uint8x16;
  441. mul(a: SIMD.Uint8x16, b: SIMD.Uint8x16): SIMD.Uint8x16;
  442. shiftLeftByScalar(a: SIMD.Uint8x16, bits: number): SIMD.Uint8x16;
  443. shiftRightByScalar(a: SIMD.Uint8x16, bits: number): SIMD.Uint8x16;
  444. addSaturate(a: SIMD.Uint8x16, b: SIMD.Uint8x16): SIMD.Uint8x16;
  445. subSaturate(a: SIMD.Uint8x16, b: SIMD.Uint8x16): SIMD.Uint8x16;
  446. load(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number): SIMD.Uint8x16;
  447. store(tarray: Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, index: number, value: SIMD.Uint8x16): SIMD.Uint8x16;
  448. fromInt8x16(value: SIMD.Int8x16): SIMD.Uint8x16;
  449. fromFloat32x4Bits(value: SIMD.Float32x4): SIMD.Uint8x16;
  450. fromInt32x4Bits(value: SIMD.Int32x4): SIMD.Uint8x16;
  451. fromInt16x8Bits(value: SIMD.Int16x8): SIMD.Uint8x16;
  452. fromInt8x16Bits(value: SIMD.Int8x16): SIMD.Uint8x16;
  453. fromUint32x4Bits(value: SIMD.Uint32x4): SIMD.Uint8x16;
  454. fromUint16x8Bits(value: SIMD.Uint16x8): SIMD.Uint8x16;
  455. }
  456. interface Bool32x4 {
  457. constructor: Bool32x4Constructor;
  458. valueOf(): Bool32x4;
  459. toLocaleString(): string;
  460. toString(): string;
  461. }
  462. interface Bool32x4Constructor {
  463. (s0?: boolean, s1?: boolean, s2?: boolean, s3?: boolean): Bool32x4;
  464. prototype: Bool32x4;
  465. extractLane(simd: SIMD.Bool32x4, lane: number): boolean;
  466. check(a: SIMD.Bool32x4): SIMD.Bool32x4;
  467. splat(n: boolean): SIMD.Bool32x4;
  468. replaceLane(simd: SIMD.Bool32x4, lane: number, value: boolean): SIMD.Bool32x4;
  469. allTrue(a: SIMD.Bool32x4): boolean;
  470. anyTrue(a: SIMD.Bool32x4): boolean;
  471. and(a: SIMD.Bool32x4, b: SIMD.Bool32x4): SIMD.Bool32x4;
  472. or(a: SIMD.Bool32x4, b: SIMD.Bool32x4): SIMD.Bool32x4;
  473. xor(a: SIMD.Bool32x4, b: SIMD.Bool32x4): SIMD.Bool32x4;
  474. not(a: SIMD.Bool32x4, b: SIMD.Bool32x4): SIMD.Bool32x4;
  475. }
  476. interface Bool16x8 {
  477. constructor: Bool16x8Constructor;
  478. valueOf(): Bool16x8;
  479. toLocaleString(): string;
  480. toString(): string;
  481. }
  482. interface Bool16x8Constructor {
  483. (s0?: boolean, s1?: boolean, s2?: boolean, s3?: boolean, s4?: boolean, s5?: boolean, s6?: boolean, s7?: boolean): Bool16x8;
  484. prototype: Bool16x8;
  485. extractLane(simd: SIMD.Bool16x8, lane: number): boolean;
  486. check(a: SIMD.Bool16x8): SIMD.Bool16x8;
  487. splat(n: boolean): SIMD.Bool16x8;
  488. replaceLane(simd: SIMD.Bool16x8, lane: number, value: boolean): SIMD.Bool16x8;
  489. allTrue(a: SIMD.Bool16x8): boolean;
  490. anyTrue(a: SIMD.Bool16x8): boolean;
  491. and(a: SIMD.Bool16x8, b: SIMD.Bool16x8): SIMD.Bool16x8;
  492. or(a: SIMD.Bool16x8, b: SIMD.Bool16x8): SIMD.Bool16x8;
  493. xor(a: SIMD.Bool16x8, b: SIMD.Bool16x8): SIMD.Bool16x8;
  494. not(a: SIMD.Bool16x8, b: SIMD.Bool16x8): SIMD.Bool16x8;
  495. }
  496. interface Bool8x16 {
  497. constructor: Bool8x16Constructor;
  498. valueOf(): Bool8x16;
  499. toLocaleString(): string;
  500. toString(): string;
  501. }
  502. interface Bool8x16Constructor {
  503. (s0?: boolean, s1?: boolean, s2?: boolean, s3?: boolean, s4?: boolean, s5?: boolean, s6?: boolean, s7?: boolean, s8?: boolean, s9?: boolean, s10?: boolean, s11?: boolean, s12?: boolean, s13?: boolean, s14?: boolean, s15?: boolean): Bool8x16;
  504. prototype: Bool8x16;
  505. extractLane(simd: SIMD.Bool8x16, lane: number): boolean;
  506. check(a: SIMD.Bool8x16): SIMD.Bool8x16;
  507. splat(n: boolean): SIMD.Bool8x16;
  508. replaceLane(simd: SIMD.Bool8x16, lane: number, value: boolean): SIMD.Bool8x16;
  509. allTrue(a: SIMD.Bool8x16): boolean;
  510. anyTrue(a: SIMD.Bool8x16): boolean;
  511. and(a: SIMD.Bool8x16, b: SIMD.Bool8x16): SIMD.Bool8x16;
  512. or(a: SIMD.Bool8x16, b: SIMD.Bool8x16): SIMD.Bool8x16;
  513. xor(a: SIMD.Bool8x16, b: SIMD.Bool8x16): SIMD.Bool8x16;
  514. not(a: SIMD.Bool8x16, b: SIMD.Bool8x16): SIMD.Bool8x16;
  515. }
  516. }