@nativescript/canvas 0.9.22-v6 → 1.0.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/Canvas/common.d.ts +17 -24
  2. package/Canvas/common.js +207 -182
  3. package/Canvas/common.js.map +1 -1
  4. package/Canvas/index.android.d.ts +8 -6
  5. package/Canvas/index.android.js +155 -156
  6. package/Canvas/index.android.js.map +1 -1
  7. package/Canvas/index.ios.d.ts +10 -7
  8. package/Canvas/index.ios.js +141 -153
  9. package/Canvas/index.ios.js.map +1 -1
  10. package/Canvas2D/CanvasGradient/CanvasGradient.android.d.ts +2 -2
  11. package/Canvas2D/CanvasGradient/CanvasGradient.android.js +13 -23
  12. package/Canvas2D/CanvasGradient/CanvasGradient.android.js.map +1 -1
  13. package/Canvas2D/CanvasGradient/CanvasGradient.d.ts +1 -1
  14. package/Canvas2D/CanvasGradient/CanvasGradient.ios.d.ts +1 -1
  15. package/Canvas2D/CanvasGradient/CanvasGradient.ios.js +13 -23
  16. package/Canvas2D/CanvasGradient/CanvasGradient.ios.js.map +1 -1
  17. package/Canvas2D/CanvasGradient/common.d.ts +1 -1
  18. package/Canvas2D/CanvasGradient/common.js +2 -8
  19. package/Canvas2D/CanvasGradient/common.js.map +1 -1
  20. package/Canvas2D/CanvasGradient/index.js +2 -7
  21. package/Canvas2D/CanvasGradient/index.js.map +1 -1
  22. package/Canvas2D/CanvasPattern/CanvasPattern.android.js +8 -14
  23. package/Canvas2D/CanvasPattern/CanvasPattern.android.js.map +1 -1
  24. package/Canvas2D/CanvasPattern/CanvasPattern.ios.js +7 -12
  25. package/Canvas2D/CanvasPattern/CanvasPattern.ios.js.map +1 -1
  26. package/Canvas2D/CanvasPattern/common.d.ts +1 -1
  27. package/Canvas2D/CanvasPattern/common.js +6 -14
  28. package/Canvas2D/CanvasPattern/common.js.map +1 -1
  29. package/Canvas2D/CanvasPattern/index.js +2 -7
  30. package/Canvas2D/CanvasPattern/index.js.map +1 -1
  31. package/Canvas2D/CanvasRenderingContext2D/common.d.ts +21 -21
  32. package/Canvas2D/CanvasRenderingContext2D/common.js +9 -21
  33. package/Canvas2D/CanvasRenderingContext2D/common.js.map +1 -1
  34. package/Canvas2D/CanvasRenderingContext2D/index.android.d.ts +40 -21
  35. package/Canvas2D/CanvasRenderingContext2D/index.android.js +602 -638
  36. package/Canvas2D/CanvasRenderingContext2D/index.android.js.map +1 -1
  37. package/Canvas2D/CanvasRenderingContext2D/index.ios.d.ts +40 -21
  38. package/Canvas2D/CanvasRenderingContext2D/index.ios.js +621 -737
  39. package/Canvas2D/CanvasRenderingContext2D/index.ios.js.map +1 -1
  40. package/Canvas2D/DOMMatrix/DOMMatrix.android.d.ts +44 -22
  41. package/Canvas2D/DOMMatrix/DOMMatrix.android.js +141 -231
  42. package/Canvas2D/DOMMatrix/DOMMatrix.android.js.map +1 -1
  43. package/Canvas2D/DOMMatrix/DOMMatrix.d.ts +1 -1
  44. package/Canvas2D/DOMMatrix/DOMMatrix.ios.d.ts +44 -22
  45. package/Canvas2D/DOMMatrix/DOMMatrix.ios.js +141 -225
  46. package/Canvas2D/DOMMatrix/DOMMatrix.ios.js.map +1 -1
  47. package/Canvas2D/DOMMatrix/common.d.ts +23 -7
  48. package/Canvas2D/DOMMatrix/common.js +6 -14
  49. package/Canvas2D/DOMMatrix/common.js.map +1 -1
  50. package/Canvas2D/DOMMatrix/index.js +2 -7
  51. package/Canvas2D/DOMMatrix/index.js.map +1 -1
  52. package/Canvas2D/ImageData/ImageData.android.d.ts +4 -0
  53. package/Canvas2D/ImageData/ImageData.android.js +41 -16
  54. package/Canvas2D/ImageData/ImageData.android.js.map +1 -1
  55. package/Canvas2D/ImageData/ImageData.ios.d.ts +4 -0
  56. package/Canvas2D/ImageData/ImageData.ios.js +41 -16
  57. package/Canvas2D/ImageData/ImageData.ios.js.map +1 -1
  58. package/Canvas2D/ImageData/common.d.ts +5 -5
  59. package/Canvas2D/ImageData/common.js +6 -17
  60. package/Canvas2D/ImageData/common.js.map +1 -1
  61. package/Canvas2D/ImageData/index.js +2 -7
  62. package/Canvas2D/ImageData/index.js.map +1 -1
  63. package/Canvas2D/Path2D/Path2D.android.js +26 -35
  64. package/Canvas2D/Path2D/Path2D.android.js.map +1 -1
  65. package/Canvas2D/Path2D/Path2D.ios.js +26 -35
  66. package/Canvas2D/Path2D/Path2D.ios.js.map +1 -1
  67. package/Canvas2D/Path2D/common.d.ts +1 -1
  68. package/Canvas2D/Path2D/common.js +6 -14
  69. package/Canvas2D/Path2D/common.js.map +1 -1
  70. package/Canvas2D/Path2D/index.js +2 -7
  71. package/Canvas2D/Path2D/index.js.map +1 -1
  72. package/Canvas2D/TextMetrics/TextMetrics.android.d.ts +13 -14
  73. package/Canvas2D/TextMetrics/TextMetrics.android.js +41 -94
  74. package/Canvas2D/TextMetrics/TextMetrics.android.js.map +1 -1
  75. package/Canvas2D/TextMetrics/TextMetrics.d.ts +1 -12
  76. package/Canvas2D/TextMetrics/TextMetrics.ios.d.ts +12 -12
  77. package/Canvas2D/TextMetrics/TextMetrics.ios.js +41 -94
  78. package/Canvas2D/TextMetrics/TextMetrics.ios.js.map +1 -1
  79. package/Canvas2D/TextMetrics/common.d.ts +14 -2
  80. package/Canvas2D/TextMetrics/common.js +6 -14
  81. package/Canvas2D/TextMetrics/common.js.map +1 -1
  82. package/Canvas2D/TextMetrics/index.js +2 -7
  83. package/Canvas2D/TextMetrics/index.js.map +1 -1
  84. package/Canvas2D/index.js +6 -11
  85. package/Canvas2D/index.js.map +1 -1
  86. package/ImageAsset/ImageAsset.android.d.ts +4 -4
  87. package/ImageAsset/ImageAsset.android.js +79 -101
  88. package/ImageAsset/ImageAsset.android.js.map +1 -1
  89. package/ImageAsset/ImageAsset.d.ts +1 -1
  90. package/ImageAsset/ImageAsset.ios.d.ts +5 -4
  91. package/ImageAsset/ImageAsset.ios.js +82 -107
  92. package/ImageAsset/ImageAsset.ios.js.map +1 -1
  93. package/ImageAsset/common.d.ts +1 -1
  94. package/ImageAsset/common.js +8 -16
  95. package/ImageAsset/common.js.map +1 -1
  96. package/ImageAsset/index.js +2 -7
  97. package/ImageAsset/index.js.map +1 -1
  98. package/ImageBitmap/common.d.ts +8 -0
  99. package/ImageBitmap/common.js +9 -0
  100. package/ImageBitmap/common.js.map +1 -0
  101. package/ImageBitmap/index.android.d.ts +12 -0
  102. package/ImageBitmap/index.android.js +332 -0
  103. package/ImageBitmap/index.android.js.map +1 -0
  104. package/ImageBitmap/index.ios.d.ts +12 -0
  105. package/ImageBitmap/index.ios.js +283 -0
  106. package/ImageBitmap/index.ios.js.map +1 -0
  107. package/README.md +26 -27
  108. package/SVG/Circle.d.ts +3 -3
  109. package/SVG/Circle.js +16 -89
  110. package/SVG/Circle.js.map +1 -1
  111. package/SVG/ClipPath.d.ts +1 -0
  112. package/SVG/ClipPath.js +7 -10
  113. package/SVG/ClipPath.js.map +1 -1
  114. package/SVG/Defs.d.ts +1 -4
  115. package/SVG/Defs.js +7 -18
  116. package/SVG/Defs.js.map +1 -1
  117. package/SVG/Ellipse.d.ts +1 -2
  118. package/SVG/Ellipse.js +16 -43
  119. package/SVG/Ellipse.js.map +1 -1
  120. package/SVG/G.d.ts +1 -7
  121. package/SVG/G.js +7 -64
  122. package/SVG/G.js.map +1 -1
  123. package/SVG/Image.d.ts +5 -4
  124. package/SVG/Image.js +28 -74
  125. package/SVG/Image.js.map +1 -1
  126. package/SVG/Line.d.ts +1 -1
  127. package/SVG/Line.js +16 -39
  128. package/SVG/Line.js.map +1 -1
  129. package/SVG/LinearGradient.d.ts +1 -4
  130. package/SVG/LinearGradient.js +11 -54
  131. package/SVG/LinearGradient.js.map +1 -1
  132. package/SVG/Path.d.ts +2 -2
  133. package/SVG/Path.js +10 -81
  134. package/SVG/Path.js.map +1 -1
  135. package/SVG/Pattern.d.ts +1 -9
  136. package/SVG/Pattern.js +7 -89
  137. package/SVG/Pattern.js.map +1 -1
  138. package/SVG/Polygon.d.ts +2 -2
  139. package/SVG/Polygon.js +10 -63
  140. package/SVG/Polygon.js.map +1 -1
  141. package/SVG/Polyline.d.ts +1 -1
  142. package/SVG/Polyline.js +10 -64
  143. package/SVG/Polyline.js.map +1 -1
  144. package/SVG/Rect.d.ts +1 -1
  145. package/SVG/Rect.js +11 -74
  146. package/SVG/Rect.js.map +1 -1
  147. package/SVG/SVG.d.ts +23 -9
  148. package/SVG/SVG.js +162 -55
  149. package/SVG/SVG.js.map +1 -1
  150. package/SVG/SVGItem.d.ts +2 -19
  151. package/SVG/SVGItem.js +6 -191
  152. package/SVG/SVGItem.js.map +1 -1
  153. package/SVG/Stop.d.ts +1 -2
  154. package/SVG/Stop.js +7 -32
  155. package/SVG/Stop.js.map +1 -1
  156. package/SVG/Symbol.d.ts +1 -4
  157. package/SVG/Symbol.js +7 -18
  158. package/SVG/Symbol.js.map +1 -1
  159. package/SVG/Text.d.ts +6 -5
  160. package/SVG/Text.js +18 -19
  161. package/SVG/Text.js.map +1 -1
  162. package/SVG/Use.d.ts +1 -10
  163. package/SVG/Use.js +7 -96
  164. package/SVG/Use.js.map +1 -1
  165. package/SVG/index.js +18 -40
  166. package/SVG/index.js.map +1 -1
  167. package/TextDecoder/TextDecoder.android.d.ts +2 -1
  168. package/TextDecoder/TextDecoder.android.js +39 -40
  169. package/TextDecoder/TextDecoder.android.js.map +1 -1
  170. package/TextDecoder/TextDecoder.ios.d.ts +1 -1
  171. package/TextDecoder/TextDecoder.ios.js +23 -36
  172. package/TextDecoder/TextDecoder.ios.js.map +1 -1
  173. package/TextDecoder/common.d.ts +4 -4
  174. package/TextDecoder/common.js +6 -17
  175. package/TextDecoder/common.js.map +1 -1
  176. package/TextDecoder/index.js +2 -7
  177. package/TextDecoder/index.js.map +1 -1
  178. package/TextEncoder/TextEncoder.android.d.ts +1 -1
  179. package/TextEncoder/TextEncoder.android.js +11 -21
  180. package/TextEncoder/TextEncoder.android.js.map +1 -1
  181. package/TextEncoder/TextEncoder.ios.d.ts +1 -1
  182. package/TextEncoder/TextEncoder.ios.js +11 -21
  183. package/TextEncoder/TextEncoder.ios.js.map +1 -1
  184. package/TextEncoder/common.d.ts +4 -4
  185. package/TextEncoder/common.js +6 -17
  186. package/TextEncoder/common.js.map +1 -1
  187. package/TextEncoder/index.js +2 -7
  188. package/TextEncoder/index.js.map +1 -1
  189. package/WebGL/WebGLActiveInfo.js +8 -10
  190. package/WebGL/WebGLActiveInfo.js.map +1 -1
  191. package/WebGL/WebGLBuffer.d.ts +1 -1
  192. package/WebGL/WebGLBuffer.js +11 -17
  193. package/WebGL/WebGLBuffer.js.map +1 -1
  194. package/WebGL/WebGLExtensions/index.android.js +137 -190
  195. package/WebGL/WebGLExtensions/index.android.js.map +1 -1
  196. package/WebGL/WebGLExtensions/index.ios.js +110 -163
  197. package/WebGL/WebGLExtensions/index.ios.js.map +1 -1
  198. package/WebGL/WebGLFramebuffer.d.ts +1 -1
  199. package/WebGL/WebGLFramebuffer.js +11 -17
  200. package/WebGL/WebGLFramebuffer.js.map +1 -1
  201. package/WebGL/WebGLProgram.d.ts +1 -1
  202. package/WebGL/WebGLProgram.js +11 -17
  203. package/WebGL/WebGLProgram.js.map +1 -1
  204. package/WebGL/WebGLRenderbuffer.d.ts +1 -1
  205. package/WebGL/WebGLRenderbuffer.js +11 -17
  206. package/WebGL/WebGLRenderbuffer.js.map +1 -1
  207. package/WebGL/WebGLRenderingContext/common.d.ts +301 -301
  208. package/WebGL/WebGLRenderingContext/common.js +940 -2140
  209. package/WebGL/WebGLRenderingContext/common.js.map +1 -1
  210. package/WebGL/WebGLRenderingContext/index.android.d.ts +10 -5
  211. package/WebGL/WebGLRenderingContext/index.android.js +1014 -587
  212. package/WebGL/WebGLRenderingContext/index.android.js.map +1 -1
  213. package/WebGL/WebGLRenderingContext/index.d.ts +2 -0
  214. package/WebGL/WebGLRenderingContext/index.ios.d.ts +3 -3
  215. package/WebGL/WebGLRenderingContext/index.ios.js +502 -573
  216. package/WebGL/WebGLRenderingContext/index.ios.js.map +1 -1
  217. package/WebGL/WebGLShader.d.ts +1 -1
  218. package/WebGL/WebGLShader.js +11 -17
  219. package/WebGL/WebGLShader.js.map +1 -1
  220. package/WebGL/WebGLShaderPrecisionFormat.js +8 -10
  221. package/WebGL/WebGLShaderPrecisionFormat.js.map +1 -1
  222. package/WebGL/WebGLTexture.d.ts +1 -1
  223. package/WebGL/WebGLTexture.js +11 -17
  224. package/WebGL/WebGLTexture.js.map +1 -1
  225. package/WebGL/WebGLUniformLocation.d.ts +1 -1
  226. package/WebGL/WebGLUniformLocation.js +11 -17
  227. package/WebGL/WebGLUniformLocation.js.map +1 -1
  228. package/WebGL/index.js +9 -14
  229. package/WebGL/index.js.map +1 -1
  230. package/WebGL2/WebGL2RenderingContext/common.d.ts +265 -265
  231. package/WebGL2/WebGL2RenderingContext/common.js +817 -1885
  232. package/WebGL2/WebGL2RenderingContext/common.js.map +1 -1
  233. package/WebGL2/WebGL2RenderingContext/index.android.d.ts +4 -1
  234. package/WebGL2/WebGL2RenderingContext/index.android.js +359 -293
  235. package/WebGL2/WebGL2RenderingContext/index.android.js.map +1 -1
  236. package/WebGL2/WebGL2RenderingContext/index.ios.d.ts +3 -1
  237. package/WebGL2/WebGL2RenderingContext/index.ios.js +289 -260
  238. package/WebGL2/WebGL2RenderingContext/index.ios.js.map +1 -1
  239. package/WebGL2/WebGLQuery.d.ts +1 -1
  240. package/WebGL2/WebGLQuery.js +11 -17
  241. package/WebGL2/WebGLQuery.js.map +1 -1
  242. package/WebGL2/WebGLSampler.d.ts +1 -1
  243. package/WebGL2/WebGLSampler.js +11 -17
  244. package/WebGL2/WebGLSampler.js.map +1 -1
  245. package/WebGL2/WebGLSync.d.ts +1 -1
  246. package/WebGL2/WebGLSync.js +11 -17
  247. package/WebGL2/WebGLSync.js.map +1 -1
  248. package/WebGL2/WebGLTransformFeedback.d.ts +1 -1
  249. package/WebGL2/WebGLTransformFeedback.js +11 -17
  250. package/WebGL2/WebGLTransformFeedback.js.map +1 -1
  251. package/WebGL2/WebGLVertexArrayObject.d.ts +1 -1
  252. package/WebGL2/WebGLVertexArrayObject.js +11 -17
  253. package/WebGL2/WebGLVertexArrayObject.js.map +1 -1
  254. package/WebGL2/index.js +5 -10
  255. package/WebGL2/index.js.map +1 -1
  256. package/angular/bundles/nativescript-canvas-angular.umd.js +29 -0
  257. package/angular/bundles/nativescript-canvas-angular.umd.js.map +1 -0
  258. package/angular/esm2015/index.js +12 -0
  259. package/angular/esm2015/nativescript-canvas-angular.js +5 -0
  260. package/angular/fesm2015/nativescript-canvas-angular.js +19 -0
  261. package/angular/fesm2015/nativescript-canvas-angular.js.map +1 -0
  262. package/angular/nativescript-canvas-angular.d.ts +4 -0
  263. package/angular/nativescript-canvas-angular.metadata.json +1 -0
  264. package/angular/package.json +14 -0
  265. package/common.js +4 -12
  266. package/common.js.map +1 -1
  267. package/index.d.ts +2 -2
  268. package/index.js +56 -28
  269. package/index.js.map +1 -1
  270. package/package.json +10 -6
  271. package/platforms/android/include.gradle +22 -1
  272. package/platforms/ios/Podfile +2 -4
  273. package/react/index.js +2 -4
  274. package/react/index.js.map +1 -1
  275. package/svelte/index.js +2 -4
  276. package/svelte/index.js.map +1 -1
  277. package/utils.d.ts +4 -0
  278. package/utils.js +46 -22
  279. package/utils.js.map +1 -1
  280. package/vue/index.d.ts +4 -0
  281. package/vue/index.js +6 -0
  282. package/vue/index.js.map +1 -0
  283. package/Canvas/common.metadata.json +0 -1
  284. package/Canvas/index.android.metadata.json +0 -1
  285. package/Canvas/index.ios.metadata.json +0 -1
  286. package/Canvas2D/CanvasGradient/CanvasGradient.android.metadata.json +0 -1
  287. package/Canvas2D/CanvasGradient/CanvasGradient.ios.metadata.json +0 -1
  288. package/Canvas2D/CanvasGradient/common.metadata.json +0 -1
  289. package/Canvas2D/CanvasGradient/index.metadata.json +0 -1
  290. package/Canvas2D/CanvasPattern/CanvasPattern.android.metadata.json +0 -1
  291. package/Canvas2D/CanvasPattern/CanvasPattern.ios.metadata.json +0 -1
  292. package/Canvas2D/CanvasPattern/common.metadata.json +0 -1
  293. package/Canvas2D/CanvasPattern/index.metadata.json +0 -1
  294. package/Canvas2D/CanvasRenderingContext2D/common.metadata.json +0 -1
  295. package/Canvas2D/CanvasRenderingContext2D/index.android.metadata.json +0 -1
  296. package/Canvas2D/CanvasRenderingContext2D/index.ios.metadata.json +0 -1
  297. package/Canvas2D/DOMMatrix/DOMMatrix.android.metadata.json +0 -1
  298. package/Canvas2D/DOMMatrix/DOMMatrix.ios.metadata.json +0 -1
  299. package/Canvas2D/DOMMatrix/common.metadata.json +0 -1
  300. package/Canvas2D/DOMMatrix/index.metadata.json +0 -1
  301. package/Canvas2D/ImageData/ImageData.android.metadata.json +0 -1
  302. package/Canvas2D/ImageData/ImageData.ios.metadata.json +0 -1
  303. package/Canvas2D/ImageData/common.metadata.json +0 -1
  304. package/Canvas2D/ImageData/index.metadata.json +0 -1
  305. package/Canvas2D/Path2D/Path2D.android.metadata.json +0 -1
  306. package/Canvas2D/Path2D/Path2D.ios.metadata.json +0 -1
  307. package/Canvas2D/Path2D/common.metadata.json +0 -1
  308. package/Canvas2D/Path2D/index.metadata.json +0 -1
  309. package/Canvas2D/TextMetrics/TextMetrics.android.metadata.json +0 -1
  310. package/Canvas2D/TextMetrics/TextMetrics.ios.metadata.json +0 -1
  311. package/Canvas2D/TextMetrics/common.metadata.json +0 -1
  312. package/Canvas2D/TextMetrics/index.metadata.json +0 -1
  313. package/Canvas2D/index.metadata.json +0 -1
  314. package/ImageAsset/ImageAsset.android.metadata.json +0 -1
  315. package/ImageAsset/ImageAsset.ios.metadata.json +0 -1
  316. package/ImageAsset/common.metadata.json +0 -1
  317. package/ImageAsset/index.metadata.json +0 -1
  318. package/SVG/Circle.metadata.json +0 -1
  319. package/SVG/ClipPath.metadata.json +0 -1
  320. package/SVG/Defs.metadata.json +0 -1
  321. package/SVG/Ellipse.metadata.json +0 -1
  322. package/SVG/G.metadata.json +0 -1
  323. package/SVG/Image.metadata.json +0 -1
  324. package/SVG/Line.metadata.json +0 -1
  325. package/SVG/LinearGradient.metadata.json +0 -1
  326. package/SVG/Path.metadata.json +0 -1
  327. package/SVG/Pattern.metadata.json +0 -1
  328. package/SVG/Polygon.metadata.json +0 -1
  329. package/SVG/Polyline.metadata.json +0 -1
  330. package/SVG/Rect.metadata.json +0 -1
  331. package/SVG/SVG.metadata.json +0 -1
  332. package/SVG/SVGItem.metadata.json +0 -1
  333. package/SVG/Stop.metadata.json +0 -1
  334. package/SVG/Symbol.metadata.json +0 -1
  335. package/SVG/Text.metadata.json +0 -1
  336. package/SVG/Use.metadata.json +0 -1
  337. package/SVG/index.metadata.json +0 -1
  338. package/TextDecoder/TextDecoder.android.metadata.json +0 -1
  339. package/TextDecoder/TextDecoder.ios.metadata.json +0 -1
  340. package/TextDecoder/common.metadata.json +0 -1
  341. package/TextDecoder/index.metadata.json +0 -1
  342. package/TextEncoder/TextEncoder.android.metadata.json +0 -1
  343. package/TextEncoder/TextEncoder.ios.metadata.json +0 -1
  344. package/TextEncoder/common.metadata.json +0 -1
  345. package/TextEncoder/index.metadata.json +0 -1
  346. package/WebGL/WebGLActiveInfo.metadata.json +0 -1
  347. package/WebGL/WebGLBuffer.metadata.json +0 -1
  348. package/WebGL/WebGLExtensions/index.android.metadata.json +0 -1
  349. package/WebGL/WebGLExtensions/index.ios.metadata.json +0 -1
  350. package/WebGL/WebGLFramebuffer.metadata.json +0 -1
  351. package/WebGL/WebGLProgram.metadata.json +0 -1
  352. package/WebGL/WebGLRenderbuffer.metadata.json +0 -1
  353. package/WebGL/WebGLRenderingContext/common.metadata.json +0 -1
  354. package/WebGL/WebGLRenderingContext/index.android.metadata.json +0 -1
  355. package/WebGL/WebGLRenderingContext/index.ios.metadata.json +0 -1
  356. package/WebGL/WebGLShader.metadata.json +0 -1
  357. package/WebGL/WebGLShaderPrecisionFormat.metadata.json +0 -1
  358. package/WebGL/WebGLTexture.metadata.json +0 -1
  359. package/WebGL/WebGLUniformLocation.metadata.json +0 -1
  360. package/WebGL/index.metadata.json +0 -1
  361. package/WebGL2/WebGL2RenderingContext/common.metadata.json +0 -1
  362. package/WebGL2/WebGL2RenderingContext/index.android.metadata.json +0 -1
  363. package/WebGL2/WebGL2RenderingContext/index.ios.metadata.json +0 -1
  364. package/WebGL2/WebGLQuery.metadata.json +0 -1
  365. package/WebGL2/WebGLSampler.metadata.json +0 -1
  366. package/WebGL2/WebGLSync.metadata.json +0 -1
  367. package/WebGL2/WebGLTransformFeedback.metadata.json +0 -1
  368. package/WebGL2/WebGLVertexArrayObject.metadata.json +0 -1
  369. package/WebGL2/index.metadata.json +0 -1
  370. package/angular/index.js +0 -19
  371. package/angular/index.js.map +0 -1
  372. package/angular/index.metadata.json +0 -1
  373. package/common.metadata.json +0 -1
  374. package/index.metadata.json +0 -1
  375. package/react/index.metadata.json +0 -1
  376. package/utils.metadata.json +0 -1
@@ -1,23 +1,21 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var WebGLQuery_1 = require("../WebGLQuery");
4
- var WebGLSampler_1 = require("../WebGLSampler");
5
- var WebGLTransformFeedback_1 = require("../WebGLTransformFeedback");
6
- var WebGLVertexArrayObject_1 = require("../WebGLVertexArrayObject");
7
- var WebGLActiveInfo_1 = require("../../WebGL/WebGLActiveInfo");
8
- var WebGLBuffer_1 = require("../../WebGL/WebGLBuffer");
9
- var ImageAsset_1 = require("../../ImageAsset");
10
- var core_1 = require("@nativescript/core");
11
- var common_1 = require("./common");
12
- var Canvas_1 = require("../../Canvas");
13
- var WebGL2RenderingContext = /** @class */ (function (_super) {
14
- __extends(WebGL2RenderingContext, _super);
15
- function WebGL2RenderingContext(context) {
16
- return _super.call(this, context) || this;
17
- }
18
- // native: org.nativescript.canvas.WebGL2RenderingContext;
1
+ import { WebGLQuery } from '../WebGLQuery';
2
+ import { WebGLSampler } from '../WebGLSampler';
3
+ import { WebGLTransformFeedback } from '../WebGLTransformFeedback';
4
+ import { WebGLVertexArrayObject } from '../WebGLVertexArrayObject';
5
+ import { WebGLFramebuffer } from '../../WebGL/WebGLFramebuffer';
6
+ import { WebGLActiveInfo } from '../../WebGL/WebGLActiveInfo';
7
+ import { WebGLBuffer } from '../../WebGL/WebGLBuffer';
8
+ import { ImageAsset } from '../../ImageAsset';
9
+ import { ImageSource } from '@nativescript/core';
10
+ import { WebGL2RenderingContextBase } from "./common";
11
+ import { Canvas } from '../../Canvas';
12
+ import { ImageBitmap } from '../../ImageBitmap';
13
+ export class WebGL2RenderingContext extends WebGL2RenderingContextBase {
14
+ constructor(context) {
15
+ super(context);
16
+ }
19
17
  /* Transform feedback */
20
- WebGL2RenderingContext.toPrimitive = function (value) {
18
+ static toPrimitive(value) {
21
19
  if (value instanceof java.lang.Integer) {
22
20
  return value.intValue();
23
21
  }
@@ -43,82 +41,80 @@ var WebGL2RenderingContext = /** @class */ (function (_super) {
43
41
  return value.doubleValue();
44
42
  }
45
43
  return value;
46
- };
47
- WebGL2RenderingContext.prototype.beginQuery = function (target, query) {
44
+ }
45
+ beginQuery(target, query) {
48
46
  this._glCheckError('beginQuery');
49
- var value = query ? query.native : 0;
47
+ const value = query ? query.native : 0;
50
48
  this.native.beginQuery(target, value);
51
- };
52
- WebGL2RenderingContext.prototype.beginTransformFeedback = function (primitiveMode) {
49
+ }
50
+ beginTransformFeedback(primitiveMode) {
53
51
  this._glCheckError('beginTransformFeedback');
54
52
  this.native.beginTransformFeedback(primitiveMode);
55
- };
56
- WebGL2RenderingContext.prototype.bindBufferBase = function (target, index, buffer) {
53
+ }
54
+ bindBufferBase(target, index, buffer) {
57
55
  this._glCheckError('bindBufferBase');
58
- var value = buffer ? buffer.native : 0;
56
+ const value = buffer ? buffer.native : 0;
59
57
  this.native.bindBufferBase(target, index, value);
60
- };
61
- WebGL2RenderingContext.prototype.bindBufferRange = function (target, index, buffer, offset, size) {
58
+ }
59
+ bindBufferRange(target, index, buffer, offset, size) {
62
60
  this._glCheckError('bindBufferRange');
63
- var value = buffer ? buffer.native : 0;
61
+ const value = buffer ? buffer.native : 0;
64
62
  this.native.bindBufferRange(target, index, value, offset, size);
65
- };
66
- WebGL2RenderingContext.prototype.bindSampler = function (unit, sampler) {
63
+ }
64
+ bindSampler(unit, sampler) {
67
65
  this._glCheckError('bindSampler');
68
- var value = sampler ? sampler.native : 0;
66
+ const value = sampler ? sampler.native : 0;
69
67
  this.native.bindSampler(unit, value);
70
- };
71
- WebGL2RenderingContext.prototype.bindTransformFeedback = function (target, transformFeedback) {
68
+ }
69
+ bindTransformFeedback(target, transformFeedback) {
72
70
  this._glCheckError('bindTransformFeedback');
73
- var value = transformFeedback ? transformFeedback.native : 0;
71
+ const value = transformFeedback ? transformFeedback.native : 0;
74
72
  this.native.bindTransformFeedback(target, value);
75
- };
76
- WebGL2RenderingContext.prototype.bindVertexArray = function (vertexArray) {
73
+ }
74
+ bindVertexArray(vertexArray) {
77
75
  this._glCheckError('bindVertexArray');
78
- var value = vertexArray ? vertexArray.native : 0;
76
+ const value = vertexArray ? vertexArray.native : 0;
79
77
  this.native.bindVertexArray(value);
80
- };
81
- WebGL2RenderingContext.prototype.blitFramebuffer = function (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter) {
78
+ }
79
+ blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter) {
82
80
  this._glCheckError('blitFramebuffer');
83
81
  this.native.blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
84
- };
85
- WebGL2RenderingContext.prototype.clearBufferfi = function (buffer, drawbuffer, depth, stencil) {
82
+ }
83
+ clearBufferfi(buffer, drawbuffer, depth, stencil) {
86
84
  this._glCheckError('clearBufferfi');
87
- var value = buffer ? buffer.native : 0;
85
+ const value = buffer ? buffer.native : 0;
88
86
  this.native.clearBufferfi(value, drawbuffer, depth, stencil);
89
- };
90
- WebGL2RenderingContext.prototype.clearBufferfv = function (buffer, drawbuffer, values) {
87
+ }
88
+ clearBufferfv(buffer, drawbuffer, values) {
91
89
  this._glCheckError('clearBufferfv');
92
- var value = buffer ? buffer.native : 0;
90
+ const value = buffer ? buffer.native : 0;
93
91
  if (values instanceof Float32Array) {
94
92
  values = this.toNativeArray(values, 'float');
95
93
  }
96
94
  this.native.clearBufferfv(value, drawbuffer, values);
97
- };
98
- WebGL2RenderingContext.prototype.clearBufferiv = function (buffer, drawbuffer, values) {
95
+ }
96
+ clearBufferiv(buffer, drawbuffer, values) {
99
97
  this._glCheckError('clearBufferiv');
100
- var value = buffer ? buffer.native : 0;
98
+ const value = buffer ? buffer.native : 0;
101
99
  if (values instanceof Int32Array) {
102
100
  values = this.toNativeArray(values, 'int');
103
101
  }
104
102
  this.native.clearBufferiv(value, drawbuffer, values);
105
- };
106
- WebGL2RenderingContext.prototype.clearBufferuiv = function (buffer, drawbuffer, values) {
103
+ }
104
+ clearBufferuiv(buffer, drawbuffer, values) {
107
105
  this._glCheckError('clearBufferuiv');
108
- var value = buffer ? buffer.native : 0;
106
+ const value = buffer ? buffer.native : 0;
109
107
  if (values instanceof Uint32Array) {
110
108
  values = this.toNativeArray(values, 'int');
111
109
  }
112
110
  this.native.clearBufferuiv(value, drawbuffer, values);
113
- };
114
- WebGL2RenderingContext.prototype.clientWaitSync = function (sync, flags, timeout) {
111
+ }
112
+ clientWaitSync(sync, flags, timeout) {
115
113
  this._glCheckError('clientWaitSync');
116
- var value = sync ? sync.native : 0;
114
+ const value = sync ? sync.native : 0;
117
115
  return this.native.clientWaitSync(value, flags, timeout);
118
- };
119
- WebGL2RenderingContext.prototype.compressedTexSubImage3D = function (target, level, xoffset, yoffset, zoffset, width, height, depth, format, srcData, srcOffset, srcLengthOverride) {
120
- if (srcOffset === void 0) { srcOffset = 0; }
121
- if (srcLengthOverride === void 0) { srcLengthOverride = 0; }
116
+ }
117
+ compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, srcData, srcOffset = 0, srcLengthOverride = 0) {
122
118
  this._glCheckError('compressedTexSubImage3D');
123
119
  if (typeof srcOffset === 'number') {
124
120
  this.native.compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, srcData, srcOffset);
@@ -128,300 +124,347 @@ var WebGL2RenderingContext = /** @class */ (function (_super) {
128
124
  this.native.compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, this.toNativeArray(srcData, 'byte'), srcOffset, srcLengthOverride);
129
125
  }
130
126
  }
131
- };
127
+ }
132
128
  /* Transform feedback */
133
129
  /* Framebuffers and renderbuffers */
134
- WebGL2RenderingContext.prototype.copyBufferSubData = function (readTarget, writeTarget, readOffset, writeOffset, size) {
130
+ copyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size) {
135
131
  this._glCheckError('copyBufferSubData');
136
132
  this.native.copyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
137
- };
138
- WebGL2RenderingContext.prototype.copyTexSubImage3D = function (target, level, xoffset, yoffset, zoffset, x, y, width, height) {
133
+ }
134
+ copyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height) {
139
135
  this._glCheckError('copyTexSubImage3D');
140
136
  this.native.copyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
141
- };
142
- WebGL2RenderingContext.prototype.createQuery = function () {
137
+ }
138
+ createQuery() {
143
139
  this._glCheckError('createQuery');
144
- return new WebGLQuery_1.WebGLQuery(this.native.createQuery());
145
- };
146
- WebGL2RenderingContext.prototype.createSampler = function () {
140
+ return new WebGLQuery(this.native.createQuery());
141
+ }
142
+ createSampler() {
147
143
  this._glCheckError('createSampler');
148
- return new WebGLSampler_1.WebGLSampler(this.native.createSampler());
149
- };
150
- WebGL2RenderingContext.prototype.createTransformFeedback = function () {
144
+ return new WebGLSampler(this.native.createSampler());
145
+ }
146
+ createTransformFeedback() {
151
147
  this._glCheckError('createTransformFeedback');
152
- return new WebGLTransformFeedback_1.WebGLTransformFeedback(this.native.createTransformFeedback());
153
- };
154
- WebGL2RenderingContext.prototype.createVertexArray = function () {
148
+ return new WebGLTransformFeedback(this.native.createTransformFeedback());
149
+ }
150
+ createVertexArray() {
155
151
  this._glCheckError('createVertexArray');
156
- return new WebGLVertexArrayObject_1.WebGLVertexArrayObject(this.native.createVertexArray());
157
- };
158
- WebGL2RenderingContext.prototype.deleteQueryWithQuery = function (query) {
152
+ return new WebGLVertexArrayObject(this.native.createVertexArray());
153
+ }
154
+ deleteQueryWithQuery(query) {
159
155
  this._glCheckError('deleteQueryWithQuery');
160
- var value = query ? query.native : 0;
156
+ const value = query ? query.native : 0;
161
157
  this.native.deleteQuery(value);
162
- };
163
- WebGL2RenderingContext.prototype.deleteSamplerWithSampler = function (sampler) {
158
+ }
159
+ deleteSamplerWithSampler(sampler) {
164
160
  this._glCheckError('deleteSamplerWithSampler');
165
- var value = sampler ? sampler.native : 0;
161
+ const value = sampler ? sampler.native : 0;
166
162
  this.native.deleteSampler(value);
167
- };
168
- WebGL2RenderingContext.prototype.deleteSyncWithSync = function (sync) {
163
+ }
164
+ deleteSyncWithSync(sync) {
169
165
  this._glCheckError('deleteSyncWithSync');
170
- var value = sync ? sync.native : 0;
166
+ const value = sync ? sync.native : 0;
171
167
  this.native.deleteSync(value);
172
- };
173
- WebGL2RenderingContext.prototype.deleteTransformFeedback = function (transformFeedback) {
168
+ }
169
+ deleteTransformFeedback(transformFeedback) {
174
170
  this._glCheckError('deleteTransformFeedback');
175
- var value = transformFeedback ? transformFeedback.native : 0;
171
+ const value = transformFeedback ? transformFeedback.native : 0;
176
172
  this.native.deleteTransformFeedback(value);
177
- };
178
- WebGL2RenderingContext.prototype.deleteVertexArray = function (vertexArray) {
173
+ }
174
+ deleteVertexArray(vertexArray) {
179
175
  this._glCheckError('deleteVertexArray');
180
- var value = vertexArray ? vertexArray.native : 0;
176
+ const value = vertexArray ? vertexArray.native : 0;
181
177
  this.native.deleteVertexArray(value);
182
- };
183
- WebGL2RenderingContext.prototype.drawArraysInstanced = function (mode, first, count, instanceCount) {
178
+ }
179
+ drawArraysInstanced(mode, first, count, instanceCount) {
184
180
  this._glCheckError('drawArraysInstanced');
185
181
  this.native.drawArraysInstanced(mode, first, count, instanceCount);
186
- };
187
- WebGL2RenderingContext.prototype.drawBuffers = function (buffers) {
182
+ }
183
+ drawBuffers(buffers) {
188
184
  this._glCheckError('drawBuffers');
189
185
  this.native.drawBuffers(buffers);
190
- };
191
- WebGL2RenderingContext.prototype.drawElementsInstanced = function (mode, count, type, offset, instanceCount) {
186
+ }
187
+ drawElementsInstanced(mode, count, type, offset, instanceCount) {
192
188
  this._glCheckError('drawElementsInstanced');
193
189
  this.native.drawElementsInstanced(mode, count, type, offset, instanceCount);
194
- };
195
- WebGL2RenderingContext.prototype.drawRangeElements = function (mode, start, end, count, type, offset) {
190
+ }
191
+ drawRangeElements(mode, start, end, count, type, offset) {
196
192
  this._glCheckError('drawRangeElements');
197
193
  this.native.drawRangeElements(mode, start, end, count, type, offset);
198
- };
199
- WebGL2RenderingContext.prototype.endQuery = function (target) {
194
+ }
195
+ endQuery(target) {
200
196
  this._glCheckError('endQuery');
201
197
  this.native.endQuery(target);
202
- };
203
- WebGL2RenderingContext.prototype.endTransformFeedback = function () {
198
+ }
199
+ endTransformFeedback() {
204
200
  this._glCheckError('endTransformFeedback');
205
201
  this.native.endTransformFeedback();
206
- };
207
- WebGL2RenderingContext.prototype.fenceSync = function (condition, flags) {
202
+ }
203
+ fenceSync(condition, flags) {
208
204
  this._glCheckError('fenceSync');
209
205
  this.native.fenceSync(condition, flags);
210
- };
211
- WebGL2RenderingContext.prototype.framebufferTextureLayer = function (target, attachment, texture, level, layer) {
206
+ }
207
+ framebufferTextureLayer(target, attachment, texture, level, layer) {
212
208
  this._glCheckError('framebufferTextureLayer');
213
- var value = texture ? texture.native : 0;
209
+ const value = texture ? texture.native : 0;
214
210
  this.native.framebufferTextureLayer(target, attachment, value, level, layer);
215
- };
211
+ }
216
212
  /* Framebuffers and renderbuffers */
217
213
  /* Uniforms */
218
- WebGL2RenderingContext.prototype.getActiveUniformBlockName = function (program, uniformBlockIndex) {
214
+ getActiveUniformBlockName(program, uniformBlockIndex) {
219
215
  this._glCheckError('getActiveUniformBlockName');
220
- var value = program ? program.native : 0;
216
+ const value = program ? program.native : 0;
221
217
  return this.native.getActiveUniformBlockName(value, uniformBlockIndex);
222
- };
223
- WebGL2RenderingContext.prototype.getActiveUniformBlockParameter = function (program, uniformBlockIndex, pname) {
218
+ }
219
+ getActiveUniformBlockParameter(program, uniformBlockIndex, pname) {
224
220
  this._glCheckError('getActiveUniformBlockParameter');
225
- var value = program ? program.native : 0;
226
- var param = this.native.getActiveUniformBlockParameter(value, uniformBlockIndex, pname);
221
+ const value = program ? program.native : 0;
222
+ const param = this.native.getActiveUniformBlockParameter(value, uniformBlockIndex, pname);
227
223
  if (pname === this.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES) {
228
224
  return new Uint32Array(this.getJSArray(param));
229
225
  }
230
226
  return WebGL2RenderingContext.toPrimitive(param);
231
- };
232
- WebGL2RenderingContext.prototype.getActiveUniforms = function (program, uniformIndices, pname) {
227
+ }
228
+ getActiveUniforms(program, uniformIndices, pname) {
233
229
  this._glCheckError('getActiveUniforms');
234
- var value = program ? program.native : 0;
230
+ const value = program ? program.native : 0;
235
231
  return this.getJSArray(this.native.getActiveUniforms(value, uniformIndices, pname));
236
- };
237
- WebGL2RenderingContext.prototype.getBufferSubData = function (target, srcByteOffset, dstData, dstOffset, length) {
238
- if (dstOffset === void 0) { dstOffset = 0; }
239
- if (length === void 0) { length = 0; }
232
+ }
233
+ getBufferSubData(target, srcByteOffset, dstData, dstOffset = 0, length = 0) {
240
234
  this._glCheckError('getBufferSubData');
241
235
  this.native.getBufferSubData(target, srcByteOffset, new Uint8Array(dstData.slice(0)), dstOffset, length);
242
- };
243
- WebGL2RenderingContext.prototype.getFragDataLocation = function (program, name) {
236
+ }
237
+ getFragDataLocation(program, name) {
244
238
  this._glCheckError('getFragDataLocation');
245
- var value = program ? program.native : 0;
246
- var result = this.native.getFragDataLocation(value, name);
239
+ const value = program ? program.native : 0;
240
+ const result = this.native.getFragDataLocation(value, name);
247
241
  return result !== -1 ? result : null;
248
- };
249
- WebGL2RenderingContext.prototype.getIndexedParameter = function (target, index) {
242
+ }
243
+ getIndexedParameter(target, index) {
250
244
  this._glCheckError('getIndexedParameter');
251
- var param = this.native.getIndexedParameter(target, index);
245
+ const param = this.native.getIndexedParameter(target, index);
252
246
  if (target === this.TRANSFORM_FEEDBACK_BUFFER_BINDING ||
253
247
  target === this.UNIFORM_BUFFER_BINDING) {
254
- return new WebGLBuffer_1.WebGLBuffer(param);
248
+ return new WebGLBuffer(param);
255
249
  }
256
250
  return WebGL2RenderingContext.toPrimitive(param);
257
- };
258
- WebGL2RenderingContext.prototype.getInternalformatParameter = function (target, internalformat, pname) {
251
+ }
252
+ getInternalformatParameter(target, internalformat, pname) {
259
253
  this._glCheckError('getInternalformatParameter');
260
- var param = this.native.getInternalformatParameter(target, internalformat, pname);
254
+ const param = this.native.getInternalformatParameter(target, internalformat, pname);
261
255
  if (pname === this.SAMPLES) {
262
256
  return new Int32Array(this.getJSArray(param));
263
257
  }
264
258
  return WebGL2RenderingContext.toPrimitive(param);
265
- };
266
- WebGL2RenderingContext.prototype.getQueryParameter = function (query, pname) {
259
+ }
260
+ getQueryParameter(query, pname) {
267
261
  this._glCheckError('getQueryParameter');
268
- var value = query ? query.native : 0;
269
- var result = this.native.getQueryParameter(value, pname);
262
+ const value = query ? query.native : 0;
263
+ const result = this.native.getQueryParameter(value, pname);
270
264
  if (result === 0) {
271
265
  return null;
272
266
  }
273
267
  return WebGL2RenderingContext.toPrimitive(result);
274
- };
275
- WebGL2RenderingContext.prototype.getQuery = function (target, pname) {
268
+ }
269
+ //@ts-ignore
270
+ getParameter(pname) {
271
+ this._glCheckError('getParameter');
272
+ this._checkArgs('activeTexture', arguments);
273
+ const value = this.native.getParameter(pname);
274
+ switch (pname) {
275
+ case this.COPY_READ_BUFFER_BINDING:
276
+ case this.COPY_WRITE_BUFFER_BINDING:
277
+ if (value) {
278
+ new WebGLBuffer(WebGL2RenderingContext.toPrimitive(value));
279
+ }
280
+ return null;
281
+ case this.DRAW_FRAMEBUFFER_BINDING:
282
+ if (value) {
283
+ return new WebGLFramebuffer(WebGL2RenderingContext.toPrimitive(value));
284
+ }
285
+ return null;
286
+ default:
287
+ return super.getParameter(pname);
288
+ }
289
+ }
290
+ getQuery(target, pname) {
276
291
  this._glCheckError('getQuery');
277
- var query = this.native.getQuery(target, pname);
292
+ const query = this.native.getQuery(target, pname);
278
293
  if (query) {
279
- return new WebGLQuery_1.WebGLQuery(query);
294
+ return new WebGLQuery(query);
280
295
  }
281
296
  return null;
282
- };
283
- WebGL2RenderingContext.prototype.getSamplerParameter = function (sampler, pname) {
297
+ }
298
+ getSamplerParameter(sampler, pname) {
284
299
  this._glCheckError('getSamplerParameter');
285
- var value = sampler ? sampler.native : 0;
300
+ const value = sampler ? sampler.native : 0;
286
301
  return WebGL2RenderingContext.toPrimitive(this.native.getSamplerParameter(value, pname));
287
- };
288
- WebGL2RenderingContext.prototype.getSyncParameter = function (sync, pname) {
302
+ }
303
+ getSyncParameter(sync, pname) {
289
304
  this._glCheckError('getSyncParameter');
290
- var value = sync ? sync.native : 0;
305
+ const value = sync ? sync.native : 0;
291
306
  return WebGL2RenderingContext.toPrimitive(this.native.getSyncParameter(value, pname));
292
- };
293
- WebGL2RenderingContext.prototype.getTransformFeedbackVarying = function (program, index) {
307
+ }
308
+ getTransformFeedbackVarying(program, index) {
294
309
  this._glCheckError('getTransformFeedbackVarying');
295
- var value = program ? program.native : 0;
296
- var info = this.native.getTransformFeedbackVarying(value, index);
310
+ const value = program ? program.native : 0;
311
+ const info = this.native.getTransformFeedbackVarying(value, index);
297
312
  if (info) {
298
- return new WebGLActiveInfo_1.WebGLActiveInfo(info.name, info.size, info.size);
313
+ return new WebGLActiveInfo(info.name, info.size, info.size);
299
314
  }
300
315
  return null;
301
- };
302
- WebGL2RenderingContext.prototype.getUniformBlockIndex = function (program, uniformBlockName) {
316
+ }
317
+ getUniformBlockIndex(program, uniformBlockName) {
303
318
  this._glCheckError('getUniformBlockIndex');
304
- var value = program ? program.native : 0;
319
+ const value = program ? program.native : 0;
305
320
  return this.native.getUniformBlockIndex(value, uniformBlockName);
306
- };
307
- WebGL2RenderingContext.prototype.getUniformIndices = function (program, uniformNames) {
321
+ }
322
+ getUniformIndices(program, uniformNames) {
308
323
  this._glCheckError('getUniformIndices');
309
- var value = program ? program.native : 0;
324
+ const value = program ? program.native : 0;
310
325
  return this.getJSArray(this.native.getUniformIndices(value, uniformNames));
311
- };
312
- WebGL2RenderingContext.prototype.invalidateFramebuffer = function (target, attachments) {
326
+ }
327
+ invalidateFramebuffer(target, attachments) {
313
328
  this._glCheckError('invalidateFramebuffer');
314
329
  this.native.invalidateFramebuffer(target, attachments);
315
- };
316
- WebGL2RenderingContext.prototype.invalidateSubFramebuffer = function (target, attachments, x, y, width, height) {
330
+ }
331
+ invalidateSubFramebuffer(target, attachments, x, y, width, height) {
317
332
  this._glCheckError('invalidateSubFramebuffer');
318
333
  this.native.invalidateSubFramebuffer(target, attachments, x, y, width, height);
319
- };
320
- WebGL2RenderingContext.prototype.isQuery = function (query) {
334
+ }
335
+ isQuery(query) {
321
336
  this._glCheckError('isQuery');
322
- var value = query ? query.native : 0;
337
+ const value = query ? query.native : 0;
323
338
  return this.native.isQuery(value);
324
- };
325
- WebGL2RenderingContext.prototype.isSampler = function (sampler) {
339
+ }
340
+ isSampler(sampler) {
326
341
  this._glCheckError('isSampler');
327
- var value = sampler ? sampler.native : 0;
342
+ const value = sampler ? sampler.native : 0;
328
343
  return this.native.isSampler(value);
329
- };
330
- WebGL2RenderingContext.prototype.isSync = function (sync) {
344
+ }
345
+ isSync(sync) {
331
346
  this._glCheckError('isSync');
332
- var value = sync ? sync.native : 0;
347
+ const value = sync ? sync.native : 0;
333
348
  return this.native.isSync(value);
334
- };
335
- WebGL2RenderingContext.prototype.isTransformFeedback = function (transformFeedback) {
349
+ }
350
+ isTransformFeedback(transformFeedback) {
336
351
  this._glCheckError('isTransformFeedback');
337
- var value = transformFeedback ? transformFeedback.native : 0;
352
+ const value = transformFeedback ? transformFeedback.native : 0;
338
353
  return this.native.isTransformFeedback(value);
339
- };
340
- WebGL2RenderingContext.prototype.isVertexArray = function (vertexArray) {
354
+ }
355
+ isVertexArray(vertexArray) {
341
356
  this._glCheckError('isVertexArray');
342
- var value = vertexArray ? vertexArray.native : 0;
357
+ const value = vertexArray ? vertexArray.native : 0;
343
358
  return this.native.isVertexArray(value);
344
- };
345
- WebGL2RenderingContext.prototype.pauseTransformFeedback = function () {
359
+ }
360
+ pauseTransformFeedback() {
346
361
  this._glCheckError('pauseTransformFeedback');
347
362
  this.native.pauseTransformFeedback();
348
- };
349
- WebGL2RenderingContext.prototype.readBuffer = function (src) {
363
+ }
364
+ readBuffer(src) {
350
365
  this._glCheckError('readBuffer');
351
366
  this.native.readBuffer(src);
352
- };
353
- WebGL2RenderingContext.prototype.renderbufferStorageMultisample = function (target, samples, internalFormat, width, height) {
367
+ }
368
+ renderbufferStorageMultisample(target, samples, internalFormat, width, height) {
354
369
  this._glCheckError('renderbufferStorageMultisample');
355
370
  this.native.renderbufferStorageMultisample(target, samples, internalFormat, width, height);
356
- };
357
- WebGL2RenderingContext.prototype.resumeTransformFeedback = function () {
371
+ }
372
+ resumeTransformFeedback() {
358
373
  this._glCheckError('resumeTransformFeedback');
359
374
  this.native.resumeTransformFeedback();
360
- };
361
- WebGL2RenderingContext.prototype.samplerParameterf = function (sampler, pname, param) {
375
+ }
376
+ samplerParameterf(sampler, pname, param) {
362
377
  this._glCheckError('samplerParameterf');
363
- var value = sampler ? sampler.native : 0;
378
+ const value = sampler ? sampler.native : 0;
364
379
  this.native.samplerParameterf(value, pname, param);
365
- };
380
+ }
366
381
  /* Uniforms */
367
382
  /* Sync objects */
368
- WebGL2RenderingContext.prototype.samplerParameteri = function (sampler, pname, param) {
383
+ samplerParameteri(sampler, pname, param) {
369
384
  this._glCheckError('samplerParameteri');
370
- var value = sampler ? sampler.native : 0;
385
+ const value = sampler ? sampler.native : 0;
371
386
  this.native.samplerParameteri(value, pname, param);
372
- };
373
- WebGL2RenderingContext.prototype.texImage3D = function (target, level, internalformat, width, height, depth, border, format, type, source) {
387
+ }
388
+ texImage3D(target, level, internalformat, width, height, depth, border, format, type, source) {
374
389
  this._glCheckError('texImage3D');
375
390
  if (typeof source === 'number') {
376
391
  this.native.texImage3D(target, level, internalformat, width, height, depth, border, format, type, source);
377
392
  }
378
393
  else if (source && source.buffer) {
379
- if (source instanceof Uint8Array) {
380
- this.native.texImage3D(target, level, internalformat, width, height, depth, border, format, type, this.toNativeArray(source, 'byte'));
394
+ if (source && source.buffer) {
395
+ if (source instanceof Uint8Array || source instanceof Uint8ClampedArray) {
396
+ this.native.texImage3DByte(target, level, internalformat, width, height, depth, border, format, type, Array.from(source));
397
+ }
398
+ else if (source instanceof Uint16Array || source instanceof Int16Array) {
399
+ this.native.texImage3DShort(target, level, internalformat, width, height, depth, border, format, type, Array.from(source));
400
+ }
401
+ else if (source instanceof Uint32Array || source instanceof Int32Array) {
402
+ this.native.texImage3DInt(target, level, internalformat, width, height, depth, border, format, type, Array.from(source));
403
+ }
404
+ else if (source instanceof Float32Array) {
405
+ this.native.texImage3DFloat(target, level, internalformat, width, height, depth, border, format, type, Array.from(source));
406
+ }
407
+ else if (source instanceof Float64Array) {
408
+ this.native.texImage3DDouble(target, level, internalformat, width, height, depth, border, format, type, Array.from(source));
409
+ }
410
+ }
411
+ else if (source instanceof ArrayBuffer) {
412
+ // @ts-ignore
413
+ if (source.nativeObject) {
414
+ // @ts-ignore
415
+ this.native.texImage3D(target, level, internalformat, width, height, depth, border, format, type,
416
+ // @ts-ignore
417
+ source.nativeObject);
418
+ }
419
+ else {
420
+ this.native.texImage3DByte(target, level, internalformat, width, height, depth, border, format, type, Array.from(new Uint8Array(source)));
421
+ }
381
422
  }
382
423
  }
383
424
  else if (source instanceof android.graphics.Bitmap) {
384
425
  this.native.texImage3D(target, level, internalformat, width, height, depth, border, format, type, source);
385
426
  }
386
- else if (source instanceof core_1.ImageSource) {
427
+ else if (source instanceof ImageSource) {
387
428
  this.native.texImage3D(target, level, internalformat, width, height, depth, border, format, type, source.android);
388
429
  }
389
- else if (source instanceof ImageAsset_1.ImageAsset) {
430
+ else if (source instanceof ImageAsset) {
431
+ this.native.texImage3D(target, level, internalformat, width, height, depth, border, format, type, source.native);
432
+ }
433
+ else if (source instanceof ImageBitmap || (source === null || source === void 0 ? void 0 : source.native) instanceof org.nativescript.canvas.TNSImageBitmap) {
390
434
  this.native.texImage3D(target, level, internalformat, width, height, depth, border, format, type, source.native);
391
435
  }
392
436
  else if (source &&
393
437
  typeof source.tagName === 'string' &&
394
438
  (source.tagName === 'IMG' || source.tagName === 'IMAGE')) {
395
- if (source._imageSource instanceof core_1.ImageSource) {
439
+ if (source._imageSource instanceof ImageSource) {
396
440
  this.native.texImage3D(target, level, internalformat, width, height, depth, border, format, type, source._imageSource.android);
397
441
  }
398
442
  else if (source._image instanceof android.graphics.Bitmap) {
399
443
  this.native.texImage3D(target, level, internalformat, width, height, depth, border, format, type, source._image);
400
444
  }
401
- else if (source._asset instanceof ImageAsset_1.ImageAsset) {
445
+ else if (source._asset instanceof ImageAsset) {
402
446
  this.native.texImage3D(target, level, internalformat, width, height, depth, border, format, type, source._asset.native);
403
447
  }
404
448
  else if (typeof source.src === 'string') {
405
- var result = core_1.ImageSource.fromFileSync(source.src);
449
+ const result = ImageSource.fromFileSync(source.src);
406
450
  this.native.texImage3D(target, level, internalformat, width, height, depth, border, format, type, result ? result.android : null);
407
451
  }
408
452
  }
409
453
  else if (source &&
410
454
  typeof source.tagName === 'string' &&
411
- source.tagName === 'CANVAS' && source._canvas instanceof Canvas_1.Canvas) {
455
+ source.tagName === 'CANVAS' && source._canvas instanceof Canvas) {
412
456
  this.native.texImage3D(target, level, internalformat, width, height, depth, border, format, type, source._canvas.android);
413
457
  }
414
- };
415
- WebGL2RenderingContext.prototype.texStorage2D = function (target, levels, internalformat, width, height) {
458
+ }
459
+ texStorage2D(target, levels, internalformat, width, height) {
416
460
  this._glCheckError('texStorage2D');
417
461
  this.native.texStorage2D(target, levels, internalformat, width, height);
418
- };
419
- WebGL2RenderingContext.prototype.texStorage3D = function (target, levels, internalformat, width, height, depth) {
462
+ }
463
+ texStorage3D(target, levels, internalformat, width, height, depth) {
420
464
  this._glCheckError('texStorage3D');
421
465
  this.native.texStorage3D(target, levels, internalformat, width, height, depth);
422
- };
423
- WebGL2RenderingContext.prototype.texSubImage3D = function (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData, srcOffset) {
424
- if (srcOffset === void 0) { srcOffset = 0; }
466
+ }
467
+ texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData, srcOffset = 0) {
425
468
  this._glCheckError('texSubImage3D');
426
469
  if (typeof srcData === 'number') {
427
470
  this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData);
@@ -435,30 +478,61 @@ var WebGL2RenderingContext = /** @class */ (function (_super) {
435
478
  this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, this.toNativeArray(srcData, 'byte'));
436
479
  }
437
480
  }
481
+ if (srcData && srcData.buffer) {
482
+ if (srcData instanceof Uint8Array || srcData instanceof Uint8ClampedArray) {
483
+ this.native.texSubImage3DByte(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, Array.from(srcData), srcOffset);
484
+ }
485
+ else if (srcData instanceof Uint16Array || srcData instanceof Int16Array) {
486
+ this.native.texSubImage3DShort(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, Array.from(srcData), srcOffset);
487
+ }
488
+ else if (srcData instanceof Uint32Array || srcData instanceof Int32Array) {
489
+ this.native.texSubImage3DInt(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, Array.from(srcData), srcOffset);
490
+ }
491
+ else if (srcData instanceof Float32Array) {
492
+ this.native.texSubImage3DFloat(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, Array.from(srcData), srcOffset);
493
+ }
494
+ else if (srcData instanceof Float64Array) {
495
+ this.native.texSubImage3DDouble(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, Array.from(srcData), srcOffset);
496
+ }
497
+ }
498
+ else if (srcData instanceof ArrayBuffer) {
499
+ // @ts-ignore
500
+ if (source.nativeObject) {
501
+ this.native.texSubImage3DByte(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type,
502
+ // @ts-ignore
503
+ source.nativeObject, srcOffset);
504
+ }
505
+ else {
506
+ this.native.texSubImage3DDouble(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, Array.from(new Uint8Array(srcData)), srcOffset);
507
+ }
508
+ }
438
509
  }
439
510
  else if (srcData instanceof android.graphics.Bitmap) {
440
511
  this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData);
441
512
  }
442
- else if (srcData instanceof core_1.ImageSource) {
513
+ else if (srcData instanceof ImageSource) {
443
514
  this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData.android);
444
515
  }
445
- else if (srcData instanceof ImageAsset_1.ImageAsset) {
516
+ else if (srcData instanceof ImageAsset) {
517
+ this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData.native);
518
+ }
519
+ else if (srcData instanceof ImageBitmap || (srcData === null || srcData === void 0 ? void 0 : srcData.native) instanceof org.nativescript.canvas.TNSImageBitmap) {
446
520
  this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData.native);
447
521
  }
448
522
  else if (srcData &&
449
523
  typeof srcData.tagName === 'string' &&
450
524
  (srcData.tagName === 'IMG' || srcData.tagName === 'IMAGE')) {
451
- if (srcData._imageSource instanceof core_1.ImageSource) {
525
+ if (srcData._imageSource instanceof ImageSource) {
452
526
  this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData._imageSource.android);
453
527
  }
454
528
  else if (srcData._image instanceof android.graphics.Bitmap) {
455
529
  this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData._image);
456
530
  }
457
- else if (srcData._asset instanceof ImageAsset_1.ImageAsset) {
531
+ else if (srcData._asset instanceof ImageAsset) {
458
532
  this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData._asset.native);
459
533
  }
460
534
  else if (typeof srcData.src === 'string') {
461
- var result = core_1.ImageSource.fromFileSync(srcData.src);
535
+ const result = ImageSource.fromFileSync(srcData.src);
462
536
  this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, result ? result.android : null);
463
537
  }
464
538
  }
@@ -467,140 +541,132 @@ var WebGL2RenderingContext = /** @class */ (function (_super) {
467
541
  srcData.tagName === 'CANVAS' && srcData._canvas instanceof TNSCanvas) {
468
542
  this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData._canvas.android);
469
543
  }
470
- };
471
- WebGL2RenderingContext.prototype.transformFeedbackVaryings = function (program, varyings, bufferMode) {
544
+ }
545
+ transformFeedbackVaryings(program, varyings, bufferMode) {
472
546
  this._glCheckError('transformFeedbackVaryings');
473
- var value = program ? program.native : 0;
547
+ const value = program ? program.native : 0;
474
548
  this.native.transformFeedbackVaryings(value, varyings, bufferMode);
475
- };
476
- WebGL2RenderingContext.prototype.uniform1ui = function (location, v0) {
549
+ }
550
+ uniform1ui(location, v0) {
477
551
  this._glCheckError('uniform1ui');
478
- var value = location ? location.native : 0;
552
+ const value = location ? location.native : 0;
479
553
  this.native.uniform1ui(value, v0);
480
- };
481
- WebGL2RenderingContext.prototype.uniform1uiv = function (location, data) {
554
+ }
555
+ uniform1uiv(location, data) {
482
556
  this._glCheckError('uniform1uiv');
483
- var value = location ? location.native : 0;
484
- this.native.uniform1uiv(value, data);
485
- };
486
- WebGL2RenderingContext.prototype.uniform2ui = function (location, v0, v1) {
557
+ const value = location ? location.native : 0;
558
+ this.native.uniform1uiv(value, Array.from(data));
559
+ }
560
+ uniform2ui(location, v0, v1) {
487
561
  this._glCheckError('uniform2ui');
488
- var value = location ? location.native : 0;
562
+ const value = location ? location.native : 0;
489
563
  this.native.uniform2ui(value, v0, v1);
490
- };
491
- WebGL2RenderingContext.prototype.uniform2uiv = function (location, data) {
564
+ }
565
+ uniform2uiv(location, data) {
492
566
  this._glCheckError('uniform2uiv');
493
- var value = location ? location.native : 0;
494
- this.native.uniform2uiv(value, data);
495
- };
567
+ const value = location ? location.native : 0;
568
+ this.native.uniform2uiv(value, Array.from(data));
569
+ }
496
570
  /* Sync objects */
497
571
  /* Miscellaneous constants */
498
- WebGL2RenderingContext.prototype.uniform3ui = function (location, v0, v1, v2) {
572
+ uniform3ui(location, v0, v1, v2) {
499
573
  this._glCheckError('uniform3ui');
500
- var value = location ? location.native : 0;
574
+ const value = location ? location.native : 0;
501
575
  this.native.uniform3ui(value, v0, v1, v2);
502
- };
503
- WebGL2RenderingContext.prototype.uniform3uiv = function (location, data) {
576
+ }
577
+ uniform3uiv(location, data) {
504
578
  this._glCheckError('uniform3uiv');
505
- var value = location ? location.native : 0;
506
- this.native.uniform3uiv(value, data);
507
- };
508
- WebGL2RenderingContext.prototype.uniform4ui = function (location, v0, v1, v2, v3) {
579
+ const value = location ? location.native : 0;
580
+ this.native.uniform3uiv(value, Array.from(data));
581
+ }
582
+ uniform4ui(location, v0, v1, v2, v3) {
509
583
  this._glCheckError('uniform4ui');
510
- var value = location ? location.native : 0;
584
+ const value = location ? location.native : 0;
511
585
  this.native.uniform4ui(value, v0, v1, v2, v3);
512
- };
513
- WebGL2RenderingContext.prototype.uniform4uiv = function (location, data) {
586
+ }
587
+ uniform4uiv(location, data) {
514
588
  this._glCheckError('uniform4uiv');
515
- var value = location ? location.native : 0;
516
- this.native.uniform4uiv(value, data);
517
- };
518
- WebGL2RenderingContext.prototype.uniformBlockBinding = function (program, uniformBlockIndex, uniformBlockBinding) {
589
+ const value = location ? location.native : 0;
590
+ this.native.uniform4uiv(value, Array.from(data));
591
+ }
592
+ uniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding) {
519
593
  this._glCheckError('uniformBlockBinding');
520
- var value = program ? program.native : 0;
594
+ const value = program ? program.native : 0;
521
595
  this.native.uniformBlockBinding(value, uniformBlockIndex, uniformBlockBinding);
522
- };
523
- WebGL2RenderingContext.prototype.uniformMatrix2x3fv = function (location, transpose, data) {
596
+ }
597
+ uniformMatrix2x3fv(location, transpose, data) {
524
598
  if (data instanceof Float32Array) {
525
- data = this.toNativeArray(data, 'float');
599
+ data = Array.from(data); //this.toNativeArray(data as any, 'float');
526
600
  }
527
601
  this._glCheckError('uniformMatrix2x3fv');
528
- var value = location ? location.native : 0;
602
+ const value = location ? location.native : 0;
529
603
  this.native.uniformMatrix2x3fv(value, transpose, data);
530
- };
531
- WebGL2RenderingContext.prototype.uniformMatrix2x4fv = function (location, transpose, data) {
604
+ }
605
+ uniformMatrix2x4fv(location, transpose, data) {
532
606
  if (data instanceof Float32Array) {
533
- data = this.toNativeArray(data, 'float');
607
+ data = Array.from(data); //this.toNativeArray(data as any, 'float');
534
608
  }
535
609
  this._glCheckError('uniformMatrix2x4fv');
536
- var value = location ? location.native : 0;
610
+ const value = location ? location.native : 0;
537
611
  this.native.uniformMatrix2x4fv(value, transpose, data);
538
- };
539
- WebGL2RenderingContext.prototype.uniformMatrix3x2fv = function (location, transpose, data) {
612
+ }
613
+ uniformMatrix3x2fv(location, transpose, data) {
540
614
  if (data instanceof Float32Array) {
541
- data = this.toNativeArray(data, 'float');
615
+ data = Array.from(data); //this.toNativeArray(data as any, 'float');
542
616
  }
543
617
  this._glCheckError('uniformMatrix3x2fv');
544
- var value = location ? location.native : 0;
618
+ const value = location ? location.native : 0;
545
619
  this.native.uniformMatrix3x2fv(value, transpose, data);
546
- };
547
- WebGL2RenderingContext.prototype.uniformMatrix3x4fv = function (location, transpose, data) {
620
+ }
621
+ uniformMatrix3x4fv(location, transpose, data) {
548
622
  if (data instanceof Float32Array) {
549
- data = this.toNativeArray(data, 'float');
623
+ data = Array.from(data); //this.toNativeArray(data as any, 'float');
550
624
  }
551
625
  this._glCheckError('uniformMatrix3x4fv');
552
- var value = location ? location.native : 0;
626
+ const value = location ? location.native : 0;
553
627
  this.native.uniformMatrix3x4fv(value, transpose, data);
554
- };
555
- WebGL2RenderingContext.prototype.uniformMatrix4x2fv = function (location, transpose, data) {
628
+ }
629
+ uniformMatrix4x2fv(location, transpose, data) {
556
630
  if (data instanceof Float32Array) {
557
- data = this.toNativeArray(data, 'float');
631
+ data = Array.from(data); //this.toNativeArray(data as any, 'float');
558
632
  }
559
633
  this._glCheckError('uniformMatrix4x2fv');
560
- var value = location ? location.native : 0;
634
+ const value = location ? location.native : 0;
561
635
  this.native.uniformMatrix4x2fv(value, transpose, data);
562
- };
563
- WebGL2RenderingContext.prototype.uniformMatrix4x3fv = function (location, transpose, data) {
636
+ }
637
+ uniformMatrix4x3fv(location, transpose, data) {
564
638
  if (data instanceof Float32Array) {
565
- data = this.toNativeArray(data, 'float');
639
+ data = Array.from(data); //this.toNativeArray(data as any, 'float');
566
640
  }
567
641
  this._glCheckError('uniformMatrix4x3fv');
568
- var value = location ? location.native : 0;
642
+ const value = location ? location.native : 0;
569
643
  this.native.uniformMatrix4x3fv(value, transpose, data);
570
- };
571
- WebGL2RenderingContext.prototype.vertexAttribDivisor = function (index, divisor) {
644
+ }
645
+ vertexAttribDivisor(index, divisor) {
572
646
  this._glCheckError('vertexAttribDivisor');
573
647
  this.native.vertexAttribDivisor(index, divisor);
574
- };
575
- WebGL2RenderingContext.prototype.vertexAttribI4i = function (index, v0, v1, v2, v3) {
648
+ }
649
+ vertexAttribI4i(index, v0, v1, v2, v3) {
576
650
  this._glCheckError('vertexAttribI4i');
577
651
  this.native.vertexAttribI4i(index, v0, v1, v2, v3);
578
- };
579
- WebGL2RenderingContext.prototype.vertexAttribI4iv = function (index, value) {
652
+ }
653
+ vertexAttribI4iv(index, value) {
580
654
  if (value instanceof Int32Array) {
581
- value = this.toNativeArray(value, 'int');
655
+ value = Array.from(value); //this.toNativeArray(value as any, 'int');
582
656
  }
583
657
  this._glCheckError('vertexAttribI4iv');
584
658
  this.native.vertexAttribI4uiv(index, value);
585
- };
586
- WebGL2RenderingContext.prototype.vertexAttribI4ui = function (index, v0, v1, v2, v3) {
659
+ }
660
+ vertexAttribI4ui(index, v0, v1, v2, v3) {
587
661
  this._glCheckError('vertexAttribI4ui');
588
662
  this.native.vertexAttribI4ui(index, v0, v1, v2, v3);
589
- };
590
- WebGL2RenderingContext.prototype.vertexAttribI4uiv = function (index, value) {
663
+ }
664
+ vertexAttribI4uiv(index, value) {
591
665
  if (value instanceof Uint32Array) {
592
- value = this.toNativeArray(value, 'int');
666
+ value = Array.from(value); //this.toNativeArray(value as any, 'int');
593
667
  }
594
668
  this._glCheckError('vertexAttribI4uiv');
595
669
  this.native.vertexAttribI4uiv(index, value);
596
- };
597
- WebGL2RenderingContext.prototype._glCheckError = function (message) {
598
- if (!WebGL2RenderingContext.isDebug) {
599
- return;
600
- }
601
- console.log(message, this.getError());
602
- };
603
- return WebGL2RenderingContext;
604
- }(common_1.WebGL2RenderingContextBase));
605
- exports.WebGL2RenderingContext = WebGL2RenderingContext;
670
+ }
671
+ }
606
672
  //# sourceMappingURL=index.android.js.map