@nativescript/canvas 2.0.0-alpha.20 → 2.0.0-alpha.22

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 (234) hide show
  1. package/Canvas/common.d.ts +2 -0
  2. package/Canvas/common.js +6 -0
  3. package/Canvas/common.js.map +1 -1
  4. package/Canvas/index.android.d.ts +0 -2
  5. package/Canvas/index.android.js +8 -24
  6. package/Canvas/index.android.js.map +1 -1
  7. package/Canvas/index.d.ts +7 -0
  8. package/Canvas/index.ios.d.ts +0 -2
  9. package/Canvas/index.ios.js +7 -26
  10. package/Canvas/index.ios.js.map +1 -1
  11. package/Canvas2D/CanvasGradient/index.d.ts +1 -3
  12. package/Canvas2D/CanvasGradient/index.js +1 -10
  13. package/Canvas2D/CanvasGradient/index.js.map +1 -1
  14. package/Canvas2D/CanvasPattern/index.d.ts +1 -3
  15. package/Canvas2D/CanvasPattern/index.js +1 -10
  16. package/Canvas2D/CanvasPattern/index.js.map +1 -1
  17. package/Canvas2D/CanvasRenderingContext2D/index.d.ts +0 -2
  18. package/Canvas2D/CanvasRenderingContext2D/index.js +120 -138
  19. package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
  20. package/Canvas2D/DOMMatrix/index.js +3 -3
  21. package/Canvas2D/DOMMatrix/index.js.map +1 -1
  22. package/Canvas2D/ImageData/index.js +5 -5
  23. package/Canvas2D/ImageData/index.js.map +1 -1
  24. package/Canvas2D/Path2D/index.d.ts +0 -2
  25. package/Canvas2D/Path2D/index.js +34 -39
  26. package/Canvas2D/Path2D/index.js.map +1 -1
  27. package/ImageAsset/index.d.ts +2 -2
  28. package/ImageAsset/index.js +33 -37
  29. package/ImageAsset/index.js.map +1 -1
  30. package/ImageBitmap/index.d.ts +0 -2
  31. package/ImageBitmap/index.js +23 -29
  32. package/ImageBitmap/index.js.map +1 -1
  33. package/SVG/SVG.js +1 -1
  34. package/TextDecoder/index.d.ts +0 -2
  35. package/TextDecoder/index.js +3 -12
  36. package/TextDecoder/index.js.map +1 -1
  37. package/TextEncoder/index.d.ts +0 -2
  38. package/TextEncoder/index.js +4 -13
  39. package/TextEncoder/index.js.map +1 -1
  40. package/WebGL/WebGLExtensions/index.d.ts +0 -9
  41. package/WebGL/WebGLExtensions/index.js +17 -74
  42. package/WebGL/WebGLExtensions/index.js.map +1 -1
  43. package/WebGL/WebGLRenderingContext/common.d.ts +0 -2
  44. package/WebGL/WebGLRenderingContext/common.js +0 -10
  45. package/WebGL/WebGLRenderingContext/common.js.map +1 -1
  46. package/WebGL/WebGLRenderingContext/index.js +159 -298
  47. package/WebGL/WebGLRenderingContext/index.js.map +1 -1
  48. package/WebGL2/WebGL2RenderingContext/index.js +107 -195
  49. package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
  50. package/angular/esm2020/index.mjs +5 -5
  51. package/angular/fesm2015/nativescript-canvas-angular.mjs +4 -4
  52. package/angular/fesm2015/nativescript-canvas-angular.mjs.map +1 -1
  53. package/angular/fesm2020/nativescript-canvas-angular.mjs +4 -4
  54. package/angular/fesm2020/nativescript-canvas-angular.mjs.map +1 -1
  55. package/index.js.map +1 -1
  56. package/package.json +1 -1
  57. package/platforms/android/canvas-release.aar +0 -0
  58. package/platforms/android/include.gradle +15 -0
  59. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
  60. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +87 -57
  61. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h +10 -0
  62. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +142 -0
  63. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +2589 -110
  64. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist +0 -0
  65. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  66. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +1174 -89
  67. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +2 -2
  68. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  69. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +2 -2
  70. package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  71. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
  72. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +174 -114
  73. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h +10 -0
  74. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +142 -0
  75. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +2589 -110
  76. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist +0 -0
  77. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  78. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  79. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +1174 -89
  80. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +2 -2
  81. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  82. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +2 -2
  83. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +1174 -89
  84. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +2 -2
  85. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  86. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +2 -2
  87. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +42 -31
  88. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  89. package/platforms/ios/Podfile +3 -0
  90. package/platforms/ios/build.xcconfig +3 -3
  91. package/platforms/ios/src/CanvasModule.h +0 -2
  92. package/platforms/ios/src/CanvasModule.mm +4 -4
  93. package/platforms/ios/src/NSOperationQueueWrapper.h +11 -0
  94. package/platforms/ios/src/NSOperationQueueWrapper.mm +74 -0
  95. package/platforms/ios/src/cpp/Caches.cpp +35 -0
  96. package/platforms/ios/src/cpp/Caches.h +186 -0
  97. package/platforms/ios/src/cpp/CanvasJSIModule.cpp +1582 -0
  98. package/platforms/ios/src/cpp/CanvasJSIModule.h +7 -34
  99. package/platforms/ios/src/cpp/Common.h +30 -0
  100. package/platforms/ios/src/cpp/ConcurrentMap.h +54 -0
  101. package/platforms/ios/src/cpp/Helpers.h +304 -38
  102. package/platforms/ios/src/cpp/ImageAssetImpl.cpp +802 -0
  103. package/platforms/ios/src/cpp/ImageAssetImpl.h +44 -12
  104. package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +189 -0
  105. package/platforms/ios/src/cpp/ImageBitmapImpl.h +22 -16
  106. package/platforms/ios/src/cpp/JSICallback.h +61 -5
  107. package/platforms/ios/src/cpp/JSIReadFileCallback.h +86 -6
  108. package/platforms/ios/src/cpp/JSIRuntime.cpp +21 -0
  109. package/platforms/ios/src/cpp/JSIRuntime.h +7 -0
  110. package/platforms/ios/src/cpp/OneByteStringResource.cpp +25 -0
  111. package/platforms/ios/src/cpp/OneByteStringResource.h +21 -0
  112. package/platforms/ios/src/cpp/RafImpl.cpp +8 -0
  113. package/platforms/ios/src/cpp/RafImpl.h +11 -8
  114. package/platforms/ios/src/cpp/TextDecoderImpl.cpp +188 -0
  115. package/platforms/ios/src/cpp/TextDecoderImpl.h +20 -14
  116. package/platforms/ios/src/cpp/TextEncoderImpl.cpp +139 -0
  117. package/platforms/ios/src/cpp/TextEncoderImpl.h +20 -11
  118. package/platforms/ios/src/cpp/canvas2d/CanvasGradient.cpp +71 -0
  119. package/platforms/ios/src/cpp/canvas2d/CanvasGradient.h +27 -13
  120. package/platforms/ios/src/cpp/canvas2d/CanvasPattern.cpp +89 -0
  121. package/platforms/ios/src/cpp/canvas2d/CanvasPattern.h +26 -13
  122. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +2391 -0
  123. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +264 -21
  124. package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.cpp +203 -0
  125. package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.h +26 -12
  126. package/platforms/ios/src/cpp/canvas2d/MatrixImpl.cpp +800 -0
  127. package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +172 -13
  128. package/platforms/ios/src/cpp/canvas2d/Path2D.cpp +449 -0
  129. package/platforms/ios/src/cpp/canvas2d/Path2D.h +41 -12
  130. package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.cpp +253 -0
  131. package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.h +50 -12
  132. package/platforms/ios/src/cpp/gl.h +57 -7
  133. package/platforms/ios/src/cpp/gl3stub.c +425 -0
  134. package/platforms/ios/src/cpp/gl3stub.h +665 -0
  135. package/platforms/ios/src/cpp/gles3jni.h +37 -0
  136. package/platforms/ios/src/cpp/include/robin_hood.h +2544 -0
  137. package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.cpp +93 -0
  138. package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.h +33 -13
  139. package/platforms/ios/src/cpp/webgl/WebGLBuffer.h +41 -6
  140. package/platforms/ios/src/cpp/webgl/WebGLFramebuffer.h +46 -10
  141. package/platforms/ios/src/cpp/webgl/WebGLProgram.h +40 -5
  142. package/platforms/ios/src/cpp/webgl/WebGLRenderbuffer.h +40 -6
  143. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +6457 -0
  144. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.h +261 -390
  145. package/platforms/ios/src/cpp/webgl/{WebGLRenderingContextBase.mm → WebGLRenderingContextBase.cpp} +17 -16
  146. package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.h +15 -36
  147. package/platforms/ios/src/cpp/webgl/WebGLShader.h +40 -6
  148. package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.cpp +50 -0
  149. package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.h +66 -11
  150. package/platforms/ios/src/cpp/webgl/WebGLTexture.h +40 -6
  151. package/platforms/ios/src/cpp/webgl/WebGLUniformLocation.h +44 -8
  152. package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.cpp +126 -0
  153. package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.h +25 -12
  154. package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.cpp +35 -0
  155. package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.h +25 -5
  156. package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.cpp +41 -0
  157. package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.h +25 -5
  158. package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.cpp +323 -0
  159. package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.h +47 -13
  160. package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.h +49 -6
  161. package/platforms/ios/src/cpp/webgl/extensions/EXT_shader_texture_lodImpl.h +37 -15
  162. package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.h +47 -6
  163. package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.h +49 -6
  164. package/platforms/ios/src/cpp/webgl/extensions/OES_fbo_render_mipmap.h +36 -15
  165. package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.h +44 -6
  166. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_floatImpl.h +38 -15
  167. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_float_linearImpl.h +37 -16
  168. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.h +41 -6
  169. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_float_linearImpl.h +40 -16
  170. package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.cpp +102 -0
  171. package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.h +69 -14
  172. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.h +51 -8
  173. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.h +49 -6
  174. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.h +49 -8
  175. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.h +76 -6
  176. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.h +57 -6
  177. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.h +53 -6
  178. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.h +59 -6
  179. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.h +46 -6
  180. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.cpp +43 -0
  181. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.h +126 -14
  182. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.cpp +32 -0
  183. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.h +61 -12
  184. package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +4380 -0
  185. package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.h +139 -343
  186. package/platforms/ios/src/cpp/webgl2/WebGLQuery.h +40 -4
  187. package/platforms/ios/src/cpp/webgl2/WebGLSampler.h +42 -3
  188. package/platforms/ios/src/cpp/webgl2/WebGLSyncImpl.h +44 -11
  189. package/platforms/ios/src/cpp/webgl2/WebGLTransformFeedback.h +42 -4
  190. package/platforms/ios/src/cpp/webgl2/WebGLVertexArrayObject.h +43 -4
  191. package/platforms/ios/src/module.modulemap +1 -0
  192. package/platforms/ios/src/cpp/CanvasJSIModule.mm +0 -1105
  193. package/platforms/ios/src/cpp/ImageAssetImpl.mm +0 -417
  194. package/platforms/ios/src/cpp/ImageBitmapImpl.mm +0 -126
  195. package/platforms/ios/src/cpp/RafImpl.mm +0 -10
  196. package/platforms/ios/src/cpp/TextDecoderImpl.mm +0 -97
  197. package/platforms/ios/src/cpp/TextEncoderImpl.mm +0 -60
  198. package/platforms/ios/src/cpp/VecMutableBuffer.h +0 -46
  199. package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.cc +0 -6156
  200. package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.h +0 -2867
  201. package/platforms/ios/src/cpp/canvas2d/CanvasGradient.mm +0 -42
  202. package/platforms/ios/src/cpp/canvas2d/CanvasPattern.mm +0 -49
  203. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.mm +0 -1972
  204. package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.mm +0 -68
  205. package/platforms/ios/src/cpp/canvas2d/MatrixImpl.mm +0 -149
  206. package/platforms/ios/src/cpp/canvas2d/Path2D.mm +0 -335
  207. package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.mm +0 -68
  208. package/platforms/ios/src/cpp/rust/cxx.cc +0 -793
  209. package/platforms/ios/src/cpp/rust/cxx.h +0 -1111
  210. package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.mm +0 -39
  211. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.mm +0 -5958
  212. package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.mm +0 -40
  213. package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.mm +0 -108
  214. package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.mm +0 -28
  215. package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.mm +0 -42
  216. package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.mm +0 -295
  217. package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.mm +0 -40
  218. package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.mm +0 -37
  219. package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.mm +0 -28
  220. package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.mm +0 -31
  221. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.mm +0 -28
  222. package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.mm +0 -127
  223. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.mm +0 -45
  224. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.mm +0 -45
  225. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.mm +0 -31
  226. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.mm +0 -70
  227. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.mm +0 -47
  228. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.mm +0 -46
  229. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.mm +0 -49
  230. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.mm +0 -30
  231. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.mm +0 -177
  232. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.mm +0 -64
  233. package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.mm +0 -4551
  234. /package/platforms/ios/src/cpp/{OnRafCallback.mm → OnRafCallback.cpp} +0 -0
@@ -47,7 +47,7 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
47
47
  // todo
48
48
  //direction = 1;
49
49
  }
50
- this._context = ctor(contextOptions, ctx, Screen.mainScreen.scale, -16777216, Screen.mainScreen.scale * 160, direction);
50
+ this._context = global.CanvasModule.createWebGLContext(contextOptions, ctx, Screen.mainScreen.scale, -16777216, Screen.mainScreen.scale * 160, direction);
51
51
  }
52
52
  else {
53
53
  this._context = context;
@@ -69,397 +69,334 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
69
69
  return this.native.drawingBufferWidth;
70
70
  }
71
71
  __toDataURL() {
72
- const __toDataURL = this._getMethod('__toDataURL');
73
- return __toDataURL(arguments[0], arguments[1]);
72
+ return this.native.__toDataURL(arguments[0], arguments[1]);
74
73
  }
75
74
  activeTexture(texture) {
76
75
  this._glCheckError('activeTexture');
77
76
  this._checkArgs('activeTexture', arguments);
78
- const activeTexture = this._getMethod('activeTexture');
79
- activeTexture(texture);
77
+ this.native.activeTexture(texture);
80
78
  }
81
79
  attachShader(program, shader) {
82
80
  this._glCheckError('attachShader');
83
81
  this._checkArgs('attachShader', arguments);
84
82
  const value = program.native;
85
83
  const value2 = shader.native;
86
- const attachShader = this._getMethod('attachShader');
87
- attachShader(value, value2);
84
+ this.native.attachShader(value, value2);
88
85
  }
89
86
  bindAttribLocation(program, index, name) {
90
87
  this._glCheckError('bindAttribLocation');
91
88
  this._checkArgs('bindAttribLocation', arguments);
92
- const bindAttribLocation = this._getMethod('bindAttribLocation');
93
89
  const value = program.native;
94
- bindAttribLocation(value, index, name);
90
+ this.native.bindAttribLocation(value, index, name);
95
91
  }
96
92
  bindBuffer(target, buffer) {
97
93
  this._glCheckError('bindBuffer');
98
94
  this._checkArgs('bindBuffer', arguments);
99
95
  const value = buffer ? buffer.native : null;
100
- const bindBuffer = this._getMethod('bindBuffer');
101
- bindBuffer(target, value);
96
+ this.native.bindBuffer(target, value);
102
97
  }
103
98
  bindFramebuffer(target, framebuffer) {
104
99
  this._glCheckError('bindFramebuffer');
105
100
  this._checkArgs('bindFramebuffer', arguments);
106
101
  const value = framebuffer ? framebuffer.native : null;
107
- const bindFramebuffer = this._getMethod('bindFramebuffer');
108
- bindFramebuffer(target, value);
102
+ this.native.bindFramebuffer(target, value);
109
103
  }
110
104
  bindRenderbuffer(target, renderbuffer) {
111
105
  this._glCheckError('bindRenderbuffer');
112
106
  this._checkArgs('bindRenderbuffer', arguments);
113
107
  const value = renderbuffer ? renderbuffer.native : null;
114
- const bindRenderbuffer = this._getMethod('bindRenderbuffer');
115
- bindRenderbuffer(target, value);
108
+ this.native.bindRenderbuffer(target, value);
116
109
  }
117
110
  bindTexture(target, texture) {
118
111
  this._glCheckError('bindTexture');
119
112
  this._checkArgs('bindTexture', arguments);
120
113
  const value = texture ? texture.native : null;
121
- const bindTexture = this._getMethod('bindTexture');
122
- bindTexture(target, value);
114
+ this.native.bindTexture(target, value);
123
115
  }
124
116
  blendColor(red, green, blue, alpha) {
125
117
  this._glCheckError('blendColor');
126
118
  this._checkArgs('blendColor', arguments);
127
- const blendColor = this._getMethod('blendColor');
128
- blendColor(red, green, blue, alpha);
119
+ this.native.blendColor(red, green, blue, alpha);
129
120
  }
130
121
  blendEquationSeparate(modeRGB, modeAlpha) {
131
122
  this._glCheckError('blendEquationSeparate');
132
123
  this._checkArgs('blendEquationSeparate', arguments);
133
- const blendEquationSeparate = this._getMethod('blendEquationSeparate');
134
- blendEquationSeparate(modeRGB, modeAlpha);
124
+ this.native.blendEquationSeparate(modeRGB, modeAlpha);
135
125
  }
136
126
  blendEquation(mode) {
137
127
  this._glCheckError('blendEquation');
138
128
  this._checkArgs('blendEquation', arguments);
139
- const blendEquation = this._getMethod('blendEquation');
140
- blendEquation(mode);
129
+ this.native.blendEquation(mode);
141
130
  }
142
131
  blendFuncSeparate(srcRGB = this.ONE, dstRGB = this.ZERO, srcAlpha = this.ONE, dstAlpha = this.ZERO) {
143
132
  this._glCheckError('blendFuncSeparate');
144
133
  this._checkArgs('blendFuncSeparate', arguments);
145
- const blendFuncSeparate = this._getMethod('blendFuncSeparate');
146
- blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
134
+ this.native.blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
147
135
  }
148
136
  blendFunc(sfactor = this.ONE, dfactor = this.ZERO) {
149
137
  this._glCheckError('blendFunc');
150
138
  this._checkArgs('blendFunc', arguments);
151
- const blendFunc = this._getMethod('blendFunc');
152
- blendFunc(sfactor, dfactor);
139
+ this.native.blendFunc(sfactor, dfactor);
153
140
  }
154
141
  bufferData(target, srcData, usage) {
155
142
  this._glCheckError('bufferData');
156
143
  this._checkArgs('bufferData', arguments);
157
- const bufferData = this._getMethod('bufferData');
158
- bufferData(target, srcData, usage);
144
+ this.native.bufferData(target, srcData, usage);
159
145
  }
160
146
  bufferSubData(target, offset, srcData) {
161
147
  this._glCheckError('bufferSubData');
162
148
  this._checkArgs('bufferSubData', arguments);
163
- const bufferSubData = this._getMethod('bufferSubData');
164
- bufferSubData(target, offset, srcData);
149
+ this.native.bufferSubData(target, offset, srcData);
165
150
  }
166
151
  checkFramebufferStatus(target) {
167
152
  this._glCheckError('checkFramebufferStatus');
168
153
  this._checkArgs('checkFramebufferStatus', arguments);
169
- const checkFramebufferStatus = this._getMethod('checkFramebufferStatus');
170
- return checkFramebufferStatus(target);
154
+ return this.native.checkFramebufferStatus(target);
171
155
  }
172
156
  clearColor(red, green, blue, alpha) {
173
157
  this._glCheckError('clearColor');
174
158
  this._checkArgs('clearColor', arguments);
175
- const clearColor = this._getMethod('clearColor');
176
- clearColor(red, green, blue, alpha);
159
+ this.native.clearColor(red, green, blue, alpha);
177
160
  }
178
161
  clearDepth(depth) {
179
162
  this._glCheckError('clearDepth');
180
163
  this._checkArgs('clearDepth', arguments);
181
- const clearDepth = this._getMethod('clearDepth');
182
- clearDepth(depth);
164
+ this.native.clearDepth(depth);
183
165
  }
184
166
  clearStencil(stencil) {
185
167
  this._glCheckError('clearStencil');
186
168
  this._checkArgs('clearStencil', arguments);
187
- const clearStencil = this._getMethod('clearStencil');
188
- clearStencil(stencil);
169
+ this.native.clearStencil(stencil);
189
170
  }
190
171
  clear(mask) {
191
172
  this._glCheckError('clear');
192
173
  this._checkArgs('clear', arguments);
193
- const clear = this._getMethod('clear');
194
- clear(mask);
174
+ this.native.clear(mask);
195
175
  }
196
176
  colorMask(red, green, blue, alpha) {
197
177
  this._glCheckError('colorMask');
198
178
  this._checkArgs('colorMask', arguments);
199
- const colorMask = this._getMethod('colorMask');
200
- colorMask(red, green, blue, alpha);
179
+ this.native.colorMask(red, green, blue, alpha);
201
180
  }
202
181
  commit() {
203
182
  // NOOP
204
- const commit = this._getMethod('commit');
205
- commit();
183
+ this.native.commit();
206
184
  }
207
185
  compileShader(shader) {
208
186
  this._glCheckError('compileShader');
209
187
  this._checkArgs('compileShader', arguments);
210
- const compileShader = this._getMethod('compileShader');
211
188
  const value = shader.native;
212
- compileShader(value);
189
+ this.native.compileShader(value);
213
190
  }
214
191
  compressedTexImage2D(target, level, internalformat, width, height, border, pixels) {
215
192
  this._glCheckError('compressedTexImage2D');
216
193
  this._checkArgs('compressedTexImage2D', arguments);
217
- const compressedTexImage2D = this._getMethod('compressedTexImage2D');
218
- compressedTexImage2D(target, level, internalformat, width, height, border, pixels);
194
+ this.native.compressedTexImage2D(target, level, internalformat, width, height, border, pixels);
219
195
  }
220
196
  compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, pixels) {
221
197
  this._glCheckError('compressedTexSubImage2D');
222
198
  this._checkArgs('compressedTexSubImage2D', arguments);
223
- const compressedTexSubImage2D = this._getMethod('compressedTexSubImage2D');
224
- compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, pixels);
199
+ this.native.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, pixels);
225
200
  }
226
201
  copyTexImage2D(target, level, internalformat, x, y, width, height, border) {
227
202
  this._glCheckError('copyTexImage2D');
228
203
  this._checkArgs('copyTexImage2D', arguments);
229
- const copyTexImage2D = this._getMethod('copyTexImage2D');
230
- copyTexImage2D(target, level, internalformat, x, y, width, height, border);
204
+ this.native.copyTexImage2D(target, level, internalformat, x, y, width, height, border);
231
205
  }
232
206
  copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height) {
233
207
  this._glCheckError('copyTexSubImage2D');
234
208
  this._checkArgs('copyTexSubImage2D', arguments);
235
- const copyTexSubImage2D = this._getMethod('copyTexSubImage2D');
236
- copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
209
+ this.native.copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
237
210
  }
238
211
  createBuffer() {
239
212
  this._glCheckError('createBuffer');
240
213
  this._checkArgs('createBuffer', arguments);
241
- const createBuffer = this._getMethod('createBuffer');
242
- const id = createBuffer();
214
+ const id = this.native.createBuffer();
243
215
  return new WebGLBuffer(id);
244
216
  }
245
217
  createFramebuffer() {
246
218
  this._glCheckError('createFramebuffer');
247
219
  this._checkArgs('createFramebuffer', arguments);
248
- const createFramebuffer = this._getMethod('createFramebuffer');
249
- return new WebGLFramebuffer(createFramebuffer());
220
+ return new WebGLFramebuffer(this.native.createFramebuffer());
250
221
  }
251
222
  createProgram() {
252
223
  this._glCheckError('createProgram');
253
224
  this._checkArgs('createProgram', arguments);
254
- const createProgram = this._getMethod('createProgram');
255
- return new WebGLProgram(createProgram());
225
+ return new WebGLProgram(this.native.createProgram());
256
226
  }
257
227
  createRenderbuffer() {
258
228
  this._glCheckError('createRenderbuffer');
259
229
  this._checkArgs('createRenderbuffer', arguments);
260
- const createRenderbuffer = this._getMethod('createRenderbuffer');
261
- return new WebGLRenderbuffer(createRenderbuffer());
230
+ return new WebGLRenderbuffer(this.native.createRenderbuffer());
262
231
  }
263
232
  createShader(type) {
264
233
  this._glCheckError('createShader');
265
234
  this._checkArgs('createShader', arguments);
266
- const createShader = this._getMethod('createShader');
267
- return new WebGLShader(createShader(type));
235
+ return new WebGLShader(this.native.createShader(type));
268
236
  }
269
237
  createTexture() {
270
238
  this._glCheckError('createTexture');
271
239
  this._checkArgs('createTexture', arguments);
272
- const createTexture = this._getMethod('createTexture');
273
- return new WebGLTexture(createTexture());
240
+ return new WebGLTexture(this.native.createTexture());
274
241
  }
275
242
  cullFace(mode) {
276
243
  this._glCheckError('cullFace');
277
244
  this._checkArgs('cullFace', arguments);
278
- const cullFace = this._getMethod('cullFace');
279
- cullFace(mode);
245
+ this.native.cullFace(mode);
280
246
  }
281
247
  deleteBuffer(buffer) {
282
248
  this._glCheckError('deleteBuffer');
283
249
  this._checkArgs('deleteBuffer', arguments);
284
250
  const value = buffer.native;
285
- const deleteBuffer = this._getMethod('deleteBuffer');
286
- deleteBuffer(value);
251
+ this.native.deleteBuffer(value);
287
252
  }
288
253
  deleteFramebuffer(frameBuffer) {
289
254
  this._glCheckError('deleteFramebuffer');
290
255
  this._checkArgs('deleteFramebuffer', arguments);
291
256
  const value = frameBuffer.native;
292
- const deleteFramebuffer = this._getMethod('deleteFramebuffer');
293
- deleteFramebuffer(value);
257
+ this.native.deleteFramebuffer(value);
294
258
  }
295
259
  deleteProgram(program) {
296
260
  this._glCheckError('deleteProgram');
297
261
  this._checkArgs('deleteProgram', arguments);
298
262
  const value = program.native;
299
- const deleteProgram = this._getMethod('deleteProgram');
300
- deleteProgram(value);
263
+ this.native.deleteProgram(value);
301
264
  }
302
265
  deleteRenderbuffer(renderBuffer) {
303
266
  this._glCheckError('deleteRenderbuffer');
304
267
  this._checkArgs('deleteRenderbuffer', arguments);
305
268
  const value = renderBuffer.native;
306
- const deleteRenderbuffer = this._getMethod('deleteRenderbuffer');
307
- deleteRenderbuffer(value);
269
+ this.native.deleteRenderbuffer(value);
308
270
  }
309
271
  deleteShader(shader) {
310
272
  this._glCheckError('deleteShader');
311
273
  this._checkArgs('deleteShader', arguments);
312
- const deleteShader = this._getMethod('deleteShader');
313
- deleteShader(shader.native);
274
+ this.native.deleteShader(shader.native);
314
275
  }
315
276
  deleteTexture(texture) {
316
277
  this._glCheckError('deleteTexture');
317
278
  this._checkArgs('deleteTexture', arguments);
318
279
  const value = texture.native;
319
- const deleteTexture = this._getMethod('deleteTexture');
320
- deleteTexture(value);
280
+ this.native.deleteTexture(value);
321
281
  }
322
282
  depthFunc(func) {
323
283
  this._glCheckError('depthFunc');
324
284
  this._checkArgs('depthFunc', arguments);
325
- const depthFunc = this._getMethod('depthFunc');
326
- depthFunc(func);
285
+ this.native.depthFunc(func);
327
286
  }
328
287
  depthMask(flag) {
329
288
  this._glCheckError('depthMask');
330
289
  this._checkArgs('depthMask', arguments);
331
- const depthMask = this._getMethod('depthMask');
332
- depthMask(flag);
290
+ this.native.depthMask(flag);
333
291
  }
334
292
  depthRange(zNear, zFar) {
335
293
  this._glCheckError('depthRange');
336
294
  this._checkArgs('depthRange', arguments);
337
- const depthRange = this._getMethod('depthRange');
338
- depthRange(zNear, zFar);
295
+ this.native.depthRange(zNear, zFar);
339
296
  }
340
297
  detachShader(program, shader) {
341
298
  this._glCheckError('detachShader');
342
299
  this._checkArgs('detachShader', arguments);
343
300
  const value = program.native;
344
301
  const value2 = shader.native;
345
- const detachShader = this._getMethod('detachShader');
346
- detachShader(value, value2);
302
+ this.native.detachShader(value, value2);
347
303
  }
348
304
  disableVertexAttribArray(index) {
349
305
  this._glCheckError('disableVertexAttribArray');
350
306
  this._checkArgs('disableVertexAttribArray', arguments);
351
- const disableVertexAttribArray = this._getMethod('disableVertexAttribArray');
352
- disableVertexAttribArray(index);
307
+ this.native.disableVertexAttribArray(index);
353
308
  }
354
309
  disable(cap) {
355
310
  this._glCheckError('disable');
356
311
  this._checkArgs('disable', arguments);
357
- const disable = this._getMethod('disable');
358
- disable(cap);
312
+ this.native.disable(cap);
359
313
  }
360
314
  drawArrays(mode, first, count) {
361
315
  this._glCheckError('drawArrays');
362
316
  this._checkArgs('drawArrays', arguments);
363
- const drawArrays = this._getMethod('drawArrays');
364
- drawArrays(mode, first, count);
317
+ this.native.drawArrays(mode, first, count);
365
318
  }
366
319
  drawElements(mode, count, type, offset) {
367
320
  this._glCheckError('drawElements');
368
321
  this._checkArgs('drawElements', arguments);
369
- const drawElements = this._getMethod('drawElements');
370
- drawElements(mode, count, type, offset);
322
+ this.native.drawElements(mode, count, type, offset);
371
323
  }
372
324
  enableVertexAttribArray(index) {
373
325
  this._glCheckError('enableVertexAttribArray');
374
326
  this._checkArgs('enableVertexAttribArray', arguments);
375
- const enableVertexAttribArray = this._getMethod('enableVertexAttribArray');
376
- enableVertexAttribArray(index);
327
+ this.native.enableVertexAttribArray(index);
377
328
  }
378
329
  enable(cap) {
379
330
  this._glCheckError('enable');
380
331
  this._checkArgs('enable', arguments);
381
- const enable = this._getMethod('enable');
382
- enable(cap);
332
+ this.native.enable(cap);
383
333
  }
384
334
  finish() {
385
335
  this._glCheckError('finish');
386
- const finish = this._getMethod('finish');
387
- finish();
336
+ this.native.finish();
388
337
  }
389
338
  flush() {
390
339
  this._glCheckError('flush');
391
- const flush = this._getMethod('flush');
392
- flush();
340
+ this.native.flush();
393
341
  }
394
342
  framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer) {
395
343
  this._glCheckError('framebufferRenderbuffer');
396
344
  this._checkArgs('framebufferRenderbuffer', arguments);
397
345
  const value = renderbuffer.native;
398
- const framebufferRenderbuffer = this._getMethod('framebufferRenderbuffer');
399
- framebufferRenderbuffer(target, attachment, renderbuffertarget, value);
346
+ this.native.framebufferRenderbuffer(target, attachment, renderbuffertarget, value);
400
347
  }
401
348
  framebufferTexture2D(target, attachment, textarget, texture, level) {
402
349
  this._glCheckError('framebufferTexture2D');
403
350
  this._checkArgs('framebufferTexture2D', arguments);
404
351
  const value = texture.native;
405
- const framebufferTexture2D = this._getMethod('framebufferTexture2D');
406
- framebufferTexture2D(target, attachment, textarget, value, level);
352
+ this.native.framebufferTexture2D(target, attachment, textarget, value, level);
407
353
  }
408
354
  frontFace(mode) {
409
355
  this._checkArgs('frontFace', arguments);
410
356
  this._glCheckError('frontFace');
411
- const frontFace = this._getMethod('frontFace');
412
- frontFace(mode);
357
+ this.native.frontFace(mode);
413
358
  }
414
359
  generateMipmap(target) {
415
360
  this._checkArgs('generateMipmap', arguments);
416
361
  this._glCheckError('generateMipmap');
417
- const generateMipmap = this._getMethod('generateMipmap');
418
- generateMipmap(target);
362
+ this.native.generateMipmap(target);
419
363
  }
420
364
  getActiveAttrib(program, index) {
421
365
  this._glCheckError('getActiveAttrib');
422
366
  this._checkArgs('getActiveAttrib', arguments);
423
367
  const value = program.native;
424
- const getActiveAttrib = this._getMethod('getActiveAttrib');
425
- const attrib = getActiveAttrib(value, index);
368
+ const attrib = this.native.getActiveAttrib(value, index);
426
369
  return new WebGLActiveInfo(attrib);
427
370
  }
428
371
  getActiveUniform(program, index) {
429
372
  this._glCheckError('getActiveUniform');
430
373
  this._checkArgs('getActiveUniform', arguments);
431
374
  const value = program.native;
432
- const getActiveUniform = this._getMethod('getActiveUniform');
433
- const uniform = getActiveUniform(value, index);
375
+ const uniform = this.native.getActiveUniform(value, index);
434
376
  return new WebGLActiveInfo(uniform);
435
377
  }
436
378
  getAttachedShaders(program) {
437
379
  this._glCheckError('getAttachedShaders');
438
380
  this._checkArgs('getAttachedShaders', arguments);
439
- const getAttachedShaders = this._getMethod('getAttachedShaders');
440
381
  const value = program.native;
441
- return getAttachedShaders(value).map((shader) => new WebGLShader(shader));
382
+ return this.native.getAttachedShaders(value).map((shader) => new WebGLShader(shader));
442
383
  }
443
384
  getAttribLocation(program, name) {
444
385
  this._glCheckError('getAttribLocation');
445
386
  this._checkArgs('getAttribLocation', arguments);
446
- const getAttribLocation = this._getMethod('getAttribLocation');
447
387
  const value = program.native;
448
- return getAttribLocation(value, name);
388
+ return this.native.getAttribLocation(value, name);
449
389
  }
450
390
  getBufferParameter(target, pname) {
451
391
  this._glCheckError('getBufferParameter');
452
392
  this._checkArgs('getBufferParameter', arguments);
453
- const getBufferParameter = this._getMethod('getBufferParameter');
454
- return getBufferParameter(target, pname);
393
+ return this.native.getBufferParameter(target, pname);
455
394
  }
456
395
  getContextAttributes() {
457
- const getContextAttributes = this._getMethod('getContextAttributes');
458
- return getContextAttributes();
396
+ return this.native.getContextAttributes();
459
397
  }
460
398
  getError() {
461
- const getError = this._getMethod('getError');
462
- return getError();
399
+ return this.native.getError();
463
400
  }
464
401
  getExtension(name) {
465
402
  this._glCheckError('getExtension');
@@ -467,8 +404,7 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
467
404
  if (name === 'EXT_disjoint_timer_query_webgl2') {
468
405
  return null;
469
406
  }
470
- const getExtension = this._getMethod('getExtension');
471
- const ext = getExtension(name);
407
+ const ext = this.native.getExtension(name);
472
408
  if (ext) {
473
409
  const ext_name = ext.ext_name;
474
410
  switch (ext_name) {
@@ -525,8 +461,7 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
525
461
  getFramebufferAttachmentParameter(target, attachment, pname) {
526
462
  this._glCheckError('getFramebufferAttachmentParameter');
527
463
  this._checkArgs('getFramebufferAttachmentParameter', arguments);
528
- const getFramebufferAttachmentParameter = this._getMethod('getFramebufferAttachmentParameter');
529
- const param = getFramebufferAttachmentParameter(target, attachment, pname);
464
+ const param = this.native.getFramebufferAttachmentParameter(target, attachment, pname);
530
465
  if (typeof param === 'object') {
531
466
  if (param.isRenderbuffer) {
532
467
  return new WebGLRenderbuffer(param);
@@ -593,77 +528,66 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
593
528
  getParameter(pname) {
594
529
  this._glCheckError('getParameter');
595
530
  this._checkArgs('getParameter', arguments);
596
- const getParameter = this._getMethod('getParameter');
597
- const value = getParameter(pname);
531
+ const value = this.native.getParameter(pname);
598
532
  return this._handleGetParameter(pname, value);
599
533
  }
600
534
  getProgramInfoLog(program) {
601
535
  this._glCheckError('getProgramInfoLog');
602
536
  this._checkArgs('getProgramInfoLog', arguments);
603
- const getProgramInfoLog = this._getMethod('getProgramInfoLog');
604
537
  const value = program.native;
605
- return getProgramInfoLog(value);
538
+ return this.native.getProgramInfoLog(value);
606
539
  }
607
540
  getProgramParameter(program, pname) {
608
541
  this._glCheckError('getProgramParameter');
609
542
  this._checkArgs('getProgramParameter', arguments);
610
- const getProgramParameter = this._getMethod('getProgramParameter');
611
543
  const value = program.native;
612
- const result = getProgramParameter(value, pname);
544
+ const result = this.native.getProgramParameter(value, pname);
613
545
  return result;
614
546
  }
615
547
  getRenderbufferParameter(target, pname) {
616
548
  this._glCheckError('getRenderbufferParameter');
617
549
  this._checkArgs('getRenderbufferParameter', arguments);
618
- const getRenderbufferParameter = this._getMethod('getRenderbufferParameter');
619
- return getRenderbufferParameter(target, pname);
550
+ return this.native.getRenderbufferParameter(target, pname);
620
551
  }
621
552
  getShaderInfoLog(shader) {
622
553
  this._glCheckError('getShaderInfoLog');
623
554
  this._checkArgs('getShaderInfoLog', arguments);
624
- const getShaderInfoLog = this._getMethod('getShaderInfoLog');
625
555
  const value = shader.native;
626
- return getShaderInfoLog(value);
556
+ return this.native.getShaderInfoLog(value);
627
557
  }
628
558
  getShaderParameter(shader, pname) {
629
559
  this._glCheckError('getShaderParameter');
630
560
  this._checkArgs('getShaderParameter', arguments);
631
- const getShaderParameter = this._getMethod('getShaderParameter');
632
561
  const value = shader.native;
633
- const result = getShaderParameter(value, pname);
562
+ const result = this.native.getShaderParameter(value, pname);
634
563
  return result;
635
564
  }
636
565
  getShaderPrecisionFormat(shaderType, precisionType) {
637
566
  this._glCheckError('getShaderPrecisionFormat');
638
567
  this._checkArgs('getShaderPrecisionFormat', arguments);
639
- const getShaderPrecisionFormat = this._getMethod('getShaderPrecisionFormat');
640
- const precision = getShaderPrecisionFormat(shaderType, precisionType);
568
+ const precision = this.native.getShaderPrecisionFormat(shaderType, precisionType);
641
569
  return new WebGLShaderPrecisionFormat(precision);
642
570
  }
643
571
  getShaderSource(shader) {
644
572
  this._glCheckError('getShaderSource');
645
573
  this._checkArgs('getShaderSource', arguments);
646
- const getShaderSource = this._getMethod('getShaderSource');
647
574
  const value = shader ? shader.native : 0;
648
- return getShaderSource(value);
575
+ return this.native.getShaderSource(value);
649
576
  }
650
577
  getSupportedExtensions() {
651
578
  this._glCheckError('getSupportedExtensions');
652
- const getSupportedExtensions = this._getMethod('getSupportedExtensions');
653
- return getSupportedExtensions();
579
+ return this.native.getSupportedExtensions();
654
580
  }
655
581
  getTexParameter(target, pname) {
656
582
  this._glCheckError('getTexParameter');
657
583
  this._checkArgs('getTexParameter', arguments);
658
- const getTexParameter = this._getMethod('getTexParameter');
659
- return getTexParameter(target, pname);
584
+ return this.native.getTexParameter(target, pname);
660
585
  }
661
586
  getUniformLocation(program, name) {
662
587
  this._glCheckError('getUniformLocation');
663
588
  this._checkArgs('getUniformLocation', arguments);
664
- const getUniformLocation = this._getMethod('getUniformLocation');
665
589
  const value = program.native;
666
- const id = getUniformLocation(value, name);
590
+ const id = this.native.getUniformLocation(value, name);
667
591
  if (id === -1) {
668
592
  return null;
669
593
  }
@@ -672,10 +596,9 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
672
596
  getUniform(program, location) {
673
597
  this._glCheckError('getUniform');
674
598
  this._checkArgs('getUniform', arguments);
675
- const getUniform = this._getMethod('getUniform');
676
599
  const value = program.native;
677
600
  const value2 = location.native;
678
- const uniform = getUniform(value, value2);
601
+ const uniform = this.native.getUniform(value, value2);
679
602
  if (uniform && uniform.length) {
680
603
  return uniform;
681
604
  }
@@ -684,14 +607,12 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
684
607
  getVertexAttribOffset(index, pname) {
685
608
  this._glCheckError('getVertexAttribOffset');
686
609
  this._checkArgs('getVertexAttribOffset', arguments);
687
- const getVertexAttribOffset = this._getMethod('getVertexAttribOffset');
688
- return getVertexAttribOffset(index, pname);
610
+ return this.native.getVertexAttribOffset(index, pname);
689
611
  }
690
612
  getVertexAttrib(index, pname) {
691
613
  this._glCheckError('getVertexAttrib');
692
614
  this._checkArgs('getVertexAttrib', arguments);
693
- const getVertexAttrib = this._getMethod('getVertexAttrib');
694
- const value = getVertexAttrib(index, pname);
615
+ const value = this.native.getVertexAttrib(index, pname);
695
616
  if (pname === this.CURRENT_VERTEX_ATTRIB) {
696
617
  return value;
697
618
  }
@@ -700,84 +621,72 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
700
621
  hint(target, mode) {
701
622
  this._glCheckError('hint');
702
623
  this._checkArgs('hint', arguments);
703
- const hint = this._getMethod('hint');
704
- hint(target, mode);
624
+ this.native.hint(target, mode);
705
625
  }
706
626
  isBuffer(buffer) {
707
627
  this._glCheckError('isBuffer');
708
628
  this._checkArgs('isBuffer', arguments);
709
- const isBuffer = this._getMethod('isBuffer');
710
629
  const value = buffer.native;
711
- return isBuffer(value);
630
+ return this.native.isBuffer(value);
712
631
  }
713
632
  isContextLost() {
714
633
  this._glCheckError('isContextLost');
715
- const isContextLost = this._getMethod('isContextLost');
716
- return isContextLost();
634
+ return this.native.isContextLost();
717
635
  }
718
636
  isEnabled(cap) {
719
637
  this._glCheckError('isEnabled');
720
638
  this._checkArgs('isEnabled', arguments);
721
- const isEnabled = this._getMethod('isEnabled');
722
- return isEnabled(cap);
639
+ return this.native.isEnabled(cap);
723
640
  }
724
641
  isFramebuffer(framebuffer) {
725
642
  this._glCheckError('isFramebuffer');
726
643
  this._checkArgs('isFramebuffer', arguments);
727
- const isFramebuffer = this._getMethod('isFramebuffer');
728
644
  const value = framebuffer ? framebuffer.native : 0;
729
- return isFramebuffer(value);
645
+ return this.native.isFramebuffer(value);
730
646
  }
731
647
  isProgram(program) {
732
648
  this._glCheckError('isProgram');
733
649
  this._checkArgs('isProgram', arguments);
734
- const isProgram = this._getMethod('isProgram');
735
650
  const value = program.native;
736
- return isProgram(value);
651
+ return this.native.isProgram(value);
737
652
  }
738
653
  isRenderbuffer(renderbuffer) {
739
654
  this._glCheckError('isRenderbuffer');
740
655
  this._checkArgs('isRenderbuffer', arguments);
741
- const isRenderbuffer = this._getMethod('isRenderbuffer');
742
656
  const value = renderbuffer.native;
743
- return isRenderbuffer(value);
657
+ return this.native.isRenderbuffer(value);
744
658
  }
745
659
  isShader(shader) {
746
660
  this._glCheckError('isShader');
747
661
  this._checkArgs('isShader', arguments);
748
- const isShader = this._getMethod('isShader');
749
662
  const value = shader.native;
750
- return isShader(value);
663
+ return this.native.isShader(value);
751
664
  }
752
665
  isTexture(texture) {
753
666
  this._glCheckError('isTexture');
754
667
  this._checkArgs('isTexture', arguments);
755
- const isTexture = this._getMethod('isTexture');
756
668
  const value = texture.native;
757
- return isTexture(value);
669
+ return this.native.isTexture(value);
758
670
  }
759
671
  lineWidth(width) {
760
672
  this._glCheckError('lineWidth');
761
673
  this._checkArgs('lineWidth', arguments);
762
- const lineWidth = this._getMethod('lineWidth');
763
- lineWidth(width);
674
+ this.native.lineWidth(width);
764
675
  }
765
676
  linkProgram(program) {
766
677
  this._glCheckError('linkProgram');
767
678
  this._checkArgs('linkProgram', arguments);
768
- const linkProgram = this._getMethod('linkProgram');
769
679
  const value = program ? program.native : 0;
770
- linkProgram(value);
680
+ this.native.linkProgram(value);
771
681
  }
772
682
  pixelStorei(pname, param) {
773
683
  this._glCheckError('pixelStorei');
774
684
  this._checkArgs('pixelStorei', arguments);
775
- const pixelStorei = this._getMethod('pixelStorei');
776
685
  if (pname === this.UNPACK_FLIP_Y_WEBGL || pname === this.UNPACK_PREMULTIPLY_ALPHA_WEBGL) {
777
686
  if (pname === this.UNPACK_FLIP_Y_WEBGL) {
778
687
  this._flipY = param;
779
688
  }
780
- pixelStorei(pname, param);
689
+ this.native.pixelStorei(pname, param);
781
690
  }
782
691
  else if (pname === this.PACK_ALIGNMENT || pname === this.UNPACK_ALIGNMENT || pname === this.UNPACK_COLORSPACE_CONVERSION_WEBGL) {
783
692
  if (pname === this.UNPACK_COLORSPACE_CONVERSION_WEBGL) {
@@ -786,96 +695,83 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
786
695
  else if (pname === this.PACK_ALIGNMENT || pname === this.UNPACK_ALIGNMENT) {
787
696
  //param = 1;
788
697
  }
789
- pixelStorei(pname, param);
698
+ this.native.pixelStorei(pname, param);
790
699
  }
791
700
  else {
792
- pixelStorei(pname, param);
701
+ this.native.pixelStorei(pname, param);
793
702
  }
794
703
  }
795
704
  polygonOffset(factor, units) {
796
705
  this._glCheckError('polygonOffset');
797
706
  this._checkArgs('polygonOffset', arguments);
798
- const polygonOffset = this._getMethod('polygonOffset');
799
- polygonOffset(factor, units);
707
+ this.native.polygonOffset(factor, units);
800
708
  }
801
709
  readPixels(x, y, width, height, format, type, pixels) {
802
710
  this._glCheckError('readPixels');
803
711
  this._checkArgs('readPixels', arguments);
804
- const readPixels = this._getMethod('readPixels');
805
- readPixels(x, y, width, height, format, type, pixels);
712
+ this.native.readPixels(x, y, width, height, format, type, pixels);
806
713
  }
807
714
  renderbufferStorage(target, internalFormat, width, height) {
808
715
  this._glCheckError('renderbufferStorage');
809
716
  this._checkArgs('renderbufferStorage', arguments);
810
- const renderbufferStorage = this._getMethod('renderbufferStorage');
811
717
  if (internalFormat === this.DEPTH_STENCIL) {
812
718
  // DEPTH24_STENCIL8 = 35056
813
719
  // DEPTH24_STENCIL8_OES = 0x88F0
814
720
  internalFormat = 0x88f0;
815
721
  }
816
- renderbufferStorage(target, internalFormat, width, height);
722
+ this.native.renderbufferStorage(target, internalFormat, width, height);
817
723
  }
818
724
  sampleCoverage(value, invert) {
819
725
  this._glCheckError('sampleCoverage');
820
726
  this._checkArgs('sampleCoverage', arguments);
821
- const sampleCoverage = this._getMethod('sampleCoverage');
822
- sampleCoverage(value, invert);
727
+ this.native.sampleCoverage(value, invert);
823
728
  }
824
729
  scissor(x, y, width, height) {
825
730
  this._glCheckError('scissor');
826
731
  this._checkArgs('scissor', arguments);
827
- const scissor = this._getMethod('scissor');
828
- scissor(x, y, width, height);
732
+ this.native.scissor(x, y, width, height);
829
733
  }
830
734
  shaderSource(shader, source) {
831
735
  this._glCheckError('shaderSource');
832
736
  this._checkArgs('shaderSource', arguments);
833
- const shaderSource = this._getMethod('shaderSource');
834
737
  const value = shader ? shader.native : 0;
835
- shaderSource(value, source);
738
+ this.native.shaderSource(value, source);
836
739
  }
837
740
  stencilFuncSeparate(face, func, ref, mask) {
838
741
  this._glCheckError('stencilFuncSeparate');
839
742
  this._checkArgs('stencilFuncSeparate', arguments);
840
- const stencilFuncSeparate = this._getMethod('stencilFuncSeparate');
841
- stencilFuncSeparate(face, func, ref, mask);
743
+ this.native.stencilFuncSeparate(face, func, ref, mask);
842
744
  }
843
745
  stencilFunc(func, ref, mask) {
844
746
  this._glCheckError('stencilFunc');
845
747
  this._checkArgs('stencilFunc', arguments);
846
- const stencilFunc = this._getMethod('stencilFunc');
847
- stencilFunc(func, ref, mask);
748
+ this.native.stencilFunc(func, ref, mask);
848
749
  }
849
750
  stencilMaskSeparate(face, mask) {
850
751
  this._glCheckError('stencilMaskSeparate');
851
752
  this._checkArgs('stencilMaskSeparate', arguments);
852
- const stencilMaskSeparate = this._getMethod('stencilMaskSeparate');
853
- stencilMaskSeparate(face, mask);
753
+ this.native.stencilMaskSeparate(face, mask);
854
754
  }
855
755
  stencilMask(mask) {
856
756
  this._glCheckError('stencilMask');
857
757
  this._checkArgs('stencilMask', arguments);
858
- const stencilMask = this._getMethod('stencilMask');
859
- stencilMask(mask);
758
+ this.native.stencilMask(mask);
860
759
  }
861
760
  stencilOpSeparate(face, fail, zfail, zpass) {
862
761
  this._glCheckError('stencilOpSeparate');
863
762
  this._checkArgs('stencilOpSeparate', arguments);
864
- const stencilOpSeparate = this._getMethod('stencilOpSeparate');
865
- stencilOpSeparate(face, fail, zfail, zpass);
763
+ this.native.stencilOpSeparate(face, fail, zfail, zpass);
866
764
  }
867
765
  stencilOp(fail, zfail, zpass) {
868
766
  this._glCheckError('stencilOp');
869
767
  this._checkArgs('stencilOp', arguments);
870
- const stencilOp = this._getMethod('stencilOp');
871
- stencilOp(fail, zfail, zpass);
768
+ this.native.stencilOp(fail, zfail, zpass);
872
769
  }
873
770
  texImage2D(target, level, internalformat, width, height, border, format, type, pixels) {
874
771
  this._glCheckError('texImage2D');
875
772
  this._checkArgs('texImage2D', arguments);
876
- const texImage2D = this._getMethod('texImage2D');
877
773
  if (arguments.length === 9) {
878
- texImage2D(target, level, internalformat, width, height, border, format, type ?? internalformat, pixels);
774
+ this.native.texImage2D(target, level, internalformat, width, height, border, format, type ?? internalformat, pixels);
879
775
  }
880
776
  else if (arguments.length === 6) {
881
777
  if (border && typeof border.tagName === 'string' && (border.tagName === 'VID' || border.tagName === 'VIDEO') && border._video && typeof border._video.getCurrentFrame === 'function') {
@@ -885,298 +781,264 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
885
781
  border.getCurrentFrame(this.native, this, target, level, internalformat, width, height);
886
782
  }
887
783
  else if (border instanceof ImageAsset) {
888
- texImage2D(target, level, internalformat, width, height, border.native);
784
+ this.native.texImage2D(target, level, internalformat, width, height, border.native);
889
785
  }
890
786
  else if (border instanceof ImageBitmap) {
891
- texImage2D(target, level, internalformat, width, height, border.native);
787
+ this.native.texImage2D(target, level, internalformat, width, height, border.native);
892
788
  }
893
789
  else if (global.isAndroid && border instanceof android.graphics.Bitmap) {
894
790
  // todo ios
895
- texImage2D(target, level, internalformat, width, height, border);
791
+ this.native.texImage2D(target, level, internalformat, width, height, border);
896
792
  }
897
793
  else if (border instanceof ImageSource) {
898
- texImage2D(target, level, internalformat, width, height, border.android);
794
+ this.native.texImage2D(target, level, internalformat, width, height, border.android);
899
795
  }
900
796
  else if (border && typeof border.tagName === 'string' && (border.tagName === 'IMG' || border.tagName === 'IMAGE')) {
901
797
  if (border._asset instanceof ImageAsset) {
902
- texImage2D(target, level, internalformat, width, height, border._asset.native);
798
+ this.native.texImage2D(target, level, internalformat, width, height, border._asset.native);
903
799
  }
904
800
  else if (border._imageSource instanceof ImageSource) {
905
- texImage2D(target, level, internalformat, width, height, border._imageSource.android);
801
+ this.native.texImage2D(target, level, internalformat, width, height, border._imageSource.android);
906
802
  }
907
803
  else if (global.isAndroid && border._image instanceof android.graphics.Bitmap) {
908
804
  //todo ios
909
- texImage2D(target, level, internalformat, width, height, border._image);
805
+ this.native.texImage2D(target, level, internalformat, width, height, border._image);
910
806
  }
911
807
  else if (typeof border.src === 'string') {
912
- texImage2D(target, level, internalformat, width, height, ImageSource.fromFileSync(border.src).android);
808
+ this.native.texImage2D(target, level, internalformat, width, height, ImageSource.fromFileSync(border.src).android);
913
809
  }
914
810
  }
915
811
  else if (border && typeof border.tagName === 'string' && border.tagName === 'CANVAS' && border._canvas instanceof Canvas) {
916
- texImage2D(target, level, internalformat, width, height, border._canvas.native);
812
+ this.native.texImage2D(target, level, internalformat, width, height, border._canvas.native);
917
813
  }
918
814
  }
919
815
  }
920
816
  texParameterf(target, pname, param) {
921
817
  this._glCheckError('texParameterf');
922
818
  this._checkArgs('texParameterf', arguments);
923
- const texParameterf = this._getMethod('texParameterf');
924
- texParameterf(target, pname, param);
819
+ this.native.texParameterf(target, pname, param);
925
820
  }
926
821
  texParameteri(target, pname, param) {
927
822
  this._glCheckError('texParameteri');
928
823
  this._checkArgs('texParameteri', arguments);
929
- const texParameteri = this._getMethod('texParameteri');
930
- texParameteri(target, pname, param);
824
+ this.native.texParameteri(target, pname, param);
931
825
  }
932
826
  texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels) {
933
827
  this._glCheckError('texSubImage2D');
934
828
  this._checkArgs('texSubImage2D', arguments);
935
- const texSubImage2D = this._getMethod('texSubImage2D');
936
829
  if (arguments.length === 9) {
937
- texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
830
+ this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
938
831
  }
939
832
  else if (arguments.length === 7) {
940
833
  if (global.isAndroid && format instanceof android.graphics.Bitmap) {
941
834
  // todo
942
- texSubImage2D(target, level, xoffset, yoffset, width, height, format);
835
+ this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format);
943
836
  }
944
837
  else if (format instanceof ImageSource) {
945
- texSubImage2D(target, level, xoffset, yoffset, width, height, format.android);
838
+ this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format.android);
946
839
  }
947
840
  else if (format instanceof ImageAsset) {
948
- texSubImage2D(target, level, xoffset, yoffset, width, height, format.native);
841
+ this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format.native);
949
842
  }
950
843
  else if (format instanceof ImageBitmap) {
951
- texSubImage2D(target, level, xoffset, yoffset, width, height, format.native);
844
+ this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format.native);
952
845
  }
953
846
  else if (format && typeof format.tagName === 'string' && (format.tagName === 'IMG' || format.tagName === 'IMAGE')) {
954
847
  if (format._imageSource instanceof ImageSource) {
955
- texSubImage2D(target, level, xoffset, yoffset, width, height, format._imageSource.android);
848
+ this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format._imageSource.android);
956
849
  }
957
850
  else if (global.isAndroid && format._image instanceof android.graphics.Bitmap) {
958
851
  // todo
959
- texSubImage2D(target, level, xoffset, yoffset, width, height, format._image);
852
+ this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format._image);
960
853
  }
961
854
  else if (format._asset instanceof ImageAsset) {
962
- texSubImage2D(target, level, xoffset, yoffset, width, height, format._asset.native);
855
+ this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format._asset.native);
963
856
  }
964
857
  else if (typeof format.src === 'string') {
965
858
  const result = ImageSource.fromFileSync(format.src);
966
- texSubImage2D(target, level, xoffset, yoffset, width, height, result ? result.android : null);
859
+ this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, result ? result.android : null);
967
860
  }
968
861
  }
969
862
  else if (format && typeof format.tagName === 'string' && format.tagName === 'CANVAS' && format._canvas instanceof Canvas) {
970
- texSubImage2D(target, level, xoffset, yoffset, width, height, format._canvas.native);
863
+ this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format._canvas.native);
971
864
  }
972
865
  }
973
866
  }
974
867
  uniform1f(location, v0) {
975
868
  this._glCheckError('uniform1f');
976
869
  this._checkArgs('uniform1f', arguments);
977
- const uniform1f = this._getMethod('uniform1f');
978
870
  const loc = location.native;
979
- uniform1f(loc, v0);
871
+ this.native.uniform1f(loc, v0);
980
872
  }
981
873
  uniform1iv(location, value) {
982
874
  this._glCheckError('uniform1iv');
983
875
  this._checkArgs('uniform1iv', arguments);
984
876
  const loc = location.native;
985
- const uniform1iv = this._getMethod('uniform1iv');
986
- uniform1iv(loc, value);
877
+ this.native.uniform1iv(loc, value);
987
878
  }
988
879
  uniform1fv(location, value) {
989
880
  this._glCheckError('uniform1fv');
990
881
  this._checkArgs('uniform1fv', arguments);
991
882
  const loc = location.native;
992
- const uniform1fv = this._getMethod('uniform1fv');
993
- uniform1fv(loc, value);
883
+ this.native.uniform1fv(loc, value);
994
884
  }
995
885
  uniform1i(location, v0) {
996
886
  this._glCheckError('uniform1i');
997
887
  this._checkArgs('uniform1i', arguments);
998
- const uniform1i = this._getMethod('uniform1i');
999
888
  const loc = location.native;
1000
- uniform1i(loc, Number(v0));
889
+ this.native.uniform1i(loc, Number(v0));
1001
890
  }
1002
891
  uniform2f(location, v0, v1) {
1003
892
  this._glCheckError('uniform2f');
1004
893
  this._checkArgs('uniform2f', arguments);
1005
- const uniform2f = this._getMethod('uniform2f');
1006
894
  const loc = location.native;
1007
- uniform2f(loc, v0, v1);
895
+ this.native.uniform2f(loc, v0, v1);
1008
896
  }
1009
897
  uniform2iv(location, value) {
1010
898
  this._glCheckError('uniform2iv');
1011
899
  this._checkArgs('uniform2iv', arguments);
1012
900
  const loc = location.native;
1013
- const uniform2iv = this._getMethod('uniform2iv');
1014
- uniform2iv(loc, value);
901
+ this.native.uniform2iv(loc, value);
1015
902
  }
1016
903
  uniform2fv(location, value) {
1017
904
  this._glCheckError('uniform2fv');
1018
905
  this._checkArgs('uniform2fv', arguments);
1019
906
  const loc = location.native;
1020
- const uniform2fv = this._getMethod('uniform2fv');
1021
- uniform2fv(loc, value);
907
+ this.native.uniform2fv(loc, value);
1022
908
  }
1023
909
  uniform2i(location, v0, v1) {
1024
910
  this._glCheckError('uniform2i');
1025
911
  this._checkArgs('uniform2i', arguments);
1026
- const uniform2i = this._getMethod('uniform2i');
1027
912
  const loc = location.native;
1028
- uniform2i(loc, v0, v1);
913
+ this.native.uniform2i(loc, v0, v1);
1029
914
  }
1030
915
  uniform3f(location, v0, v1, v2) {
1031
916
  this._glCheckError('uniform3f');
1032
917
  this._checkArgs('uniform3f', arguments);
1033
- const uniform3f = this._getMethod('uniform3f');
1034
918
  const loc = location.native;
1035
- uniform3f(loc, v0, v1, v2);
919
+ this.native.uniform3f(loc, v0, v1, v2);
1036
920
  }
1037
921
  uniform3iv(location, value) {
1038
922
  this._glCheckError('uniform3iv');
1039
923
  this._checkArgs('uniform3iv', arguments);
1040
924
  const loc = location.native;
1041
- const uniform3iv = this._getMethod('uniform3iv');
1042
- uniform3iv(loc, value);
925
+ this.native.uniform3iv(loc, value);
1043
926
  }
1044
927
  uniform3fv(location, value) {
1045
928
  this._glCheckError('uniform3fv');
1046
929
  this._checkArgs('uniform3fv', arguments);
1047
930
  const loc = location.native;
1048
- const uniform3fv = this._getMethod('uniform3fv');
1049
- uniform3fv(loc, value);
931
+ this.native.uniform3fv(loc, value);
1050
932
  }
1051
933
  uniform3i(location, v0, v1, v2) {
1052
934
  this._glCheckError('uniform3i');
1053
935
  this._checkArgs('uniform3i', arguments);
1054
- const uniform3i = this._getMethod('uniform3i');
1055
936
  const loc = location.native;
1056
- uniform3i(loc, v0, v1, v2);
937
+ this.native.uniform3i(loc, v0, v1, v2);
1057
938
  }
1058
939
  uniform4f(location, v0, v1, v2, v3) {
1059
940
  this._glCheckError('uniform4f');
1060
941
  this._checkArgs('uniform4f', arguments);
1061
- const uniform4f = this._getMethod('uniform4f');
1062
942
  const loc = location.native;
1063
- uniform4f(loc, v0, v1, v2, v3);
943
+ this.native.uniform4f(loc, v0, v1, v2, v3);
1064
944
  }
1065
945
  uniform4iv(location, value) {
1066
946
  this._glCheckError('uniform4iv');
1067
947
  this._checkArgs('uniform4iv', arguments);
1068
948
  const loc = location.native;
1069
- const uniform4iv = this._getMethod('uniform4iv');
1070
- uniform4iv(loc, value);
949
+ this.native.uniform4iv(loc, value);
1071
950
  }
1072
951
  uniform4fv(location, value) {
1073
952
  this._glCheckError('uniform4fv');
1074
953
  this._checkArgs('uniform4fv', arguments);
1075
954
  const loc = location.native;
1076
- const uniform4fv = this._getMethod('uniform4fv');
1077
- uniform4fv(loc, value);
955
+ this.native.uniform4fv(loc, value);
1078
956
  }
1079
957
  uniform4i(location, v0, v1, v2, v3) {
1080
958
  this._glCheckError('uniform4i');
1081
959
  this._checkArgs('uniform4i', arguments);
1082
- const uniform4i = this._getMethod('uniform4i');
1083
960
  const loc = location.native;
1084
- uniform4i(loc, v0, v1, v2, v3);
961
+ this.native.uniform4i(loc, v0, v1, v2, v3);
1085
962
  }
1086
963
  uniformMatrix2fv(location, transpose, value) {
1087
964
  this._glCheckError('uniformMatrix2fv');
1088
965
  this._checkArgs('uniformMatrix2fv', arguments);
1089
966
  const loc = location.native;
1090
- const uniformMatrix2fv = this._getMethod('uniformMatrix2fv');
1091
- uniformMatrix2fv(loc, transpose, value);
967
+ this.native.uniformMatrix2fv(loc, transpose, value);
1092
968
  }
1093
969
  uniformMatrix3fv(location, transpose, value) {
1094
970
  this._glCheckError('uniformMatrix3fv');
1095
971
  this._checkArgs('uniformMatrix3fv', arguments);
1096
972
  const loc = location.native;
1097
- const uniformMatrix3fv = this._getMethod('uniformMatrix3fv');
1098
- uniformMatrix3fv(loc, transpose, value);
973
+ this.native.uniformMatrix3fv(loc, transpose, value);
1099
974
  }
1100
975
  uniformMatrix4fv(location, transpose, value) {
1101
976
  this._glCheckError('uniformMatrix4fv');
1102
977
  this._checkArgs('uniformMatrix4fv', arguments);
1103
978
  const loc = location.native;
1104
- const uniformMatrix4fv = this._getMethod('uniformMatrix4fv');
1105
- uniformMatrix4fv(loc, transpose, value);
979
+ this.native.uniformMatrix4fv(loc, transpose, value);
1106
980
  }
1107
981
  useProgram(program) {
1108
982
  this._glCheckError('useProgram');
1109
983
  this._checkArgs('useProgram', arguments);
1110
- const useProgram = this._getMethod('useProgram');
1111
984
  const value = program ? program.native : null;
1112
- useProgram(value);
985
+ this.native.useProgram(value);
1113
986
  }
1114
987
  validateProgram(program) {
1115
988
  this._glCheckError('validateProgram');
1116
989
  this._checkArgs('validateProgram', arguments);
1117
- const validateProgram = this._getMethod('validateProgram');
1118
990
  const value = program.native;
1119
- validateProgram(value);
991
+ this.native.validateProgram(value);
1120
992
  }
1121
993
  vertexAttrib1f(index, v0) {
1122
994
  this._glCheckError('vertexAttrib1f');
1123
995
  this._checkArgs('vertexAttrib1f', arguments);
1124
- const vertexAttrib1f = this._getMethod('vertexAttrib1f');
1125
- vertexAttrib1f(index, v0);
996
+ this.native.vertexAttrib1f(index, v0);
1126
997
  }
1127
998
  vertexAttrib1fv(index, value) {
1128
999
  this._glCheckError('vertexAttrib1fv');
1129
1000
  this._checkArgs('vertexAttrib1fv', arguments);
1130
- const vertexAttrib1fv = this._getMethod('vertexAttrib1fv');
1131
- vertexAttrib1fv(index, value);
1001
+ this.native.vertexAttrib1fv(index, value);
1132
1002
  }
1133
1003
  vertexAttrib2f(index, v0, v1) {
1134
1004
  this._glCheckError('vertexAttrib2f');
1135
1005
  this._checkArgs('vertexAttrib2f', arguments);
1136
- const vertexAttrib2f = this._getMethod('vertexAttrib2f');
1137
- vertexAttrib2f(index, v0, v1);
1006
+ this.native.vertexAttrib2f(index, v0, v1);
1138
1007
  }
1139
1008
  vertexAttrib2fv(index, value) {
1140
1009
  this._glCheckError('vertexAttrib2fv');
1141
1010
  this._checkArgs('vertexAttrib2fv', arguments);
1142
- const vertexAttrib2fv = this._getMethod('vertexAttrib2fv');
1143
- vertexAttrib2fv(index, value);
1011
+ this.native.vertexAttrib2fv(index, value);
1144
1012
  }
1145
1013
  vertexAttrib3f(index, v0, v1, v2) {
1146
1014
  this._glCheckError('vertexAttrib3f');
1147
1015
  this._checkArgs('vertexAttrib3f', arguments);
1148
- const vertexAttrib3f = this._getMethod('vertexAttrib3f');
1149
- vertexAttrib3f(index, v0, v1, v2);
1016
+ this.native.vertexAttrib3f(index, v0, v1, v2);
1150
1017
  }
1151
1018
  vertexAttrib3fv(index, value) {
1152
1019
  this._glCheckError('vertexAttrib3fv');
1153
1020
  this._checkArgs('vertexAttrib3fv', arguments);
1154
- const vertexAttrib3fv = this._getMethod('vertexAttrib3fv');
1155
- vertexAttrib3fv(index, value);
1021
+ this.native.vertexAttrib3fv(index, value);
1156
1022
  }
1157
1023
  vertexAttrib4f(index, v0, v1, v2, v3) {
1158
1024
  this._glCheckError('vertexAttrib4f');
1159
1025
  this._checkArgs('vertexAttrib4f', arguments);
1160
- const vertexAttrib4f = this._getMethod('vertexAttrib4f');
1161
- vertexAttrib4f(index, v0, v1, v2, v3);
1026
+ this.native.vertexAttrib4f(index, v0, v1, v2, v3);
1162
1027
  }
1163
1028
  vertexAttrib4fv(index, value) {
1164
1029
  this._glCheckError('vertexAttrib4fv');
1165
1030
  this._checkArgs('vertexAttrib4fv', arguments);
1166
- const vertexAttrib4fv = this._getMethod('vertexAttrib4fv');
1167
- vertexAttrib4fv(index, value);
1031
+ this.native.vertexAttrib4fv(index, value);
1168
1032
  }
1169
1033
  vertexAttribPointer(index, size, type, normalized, stride, offset) {
1170
1034
  this._glCheckError('vertexAttribPointer');
1171
1035
  this._checkArgs('vertexAttribPointer', arguments);
1172
- const vertexAttribPointer = this._getMethod('vertexAttribPointer');
1173
- vertexAttribPointer(index, size, type, !!normalized, stride, offset);
1036
+ this.native.vertexAttribPointer(index, size, type, !!normalized, stride, offset);
1174
1037
  }
1175
1038
  viewport(x, y, width, height) {
1176
1039
  this._glCheckError('viewport');
1177
1040
  this._checkArgs('viewport', arguments);
1178
- const viewport = this._getMethod('viewport');
1179
- viewport(x, y, width, height);
1041
+ this.native.viewport(x, y, width, height);
1180
1042
  }
1181
1043
  _glCheckError(message) {
1182
1044
  if (!WebGLRenderingContext.isDebug) {
@@ -1201,7 +1063,6 @@ WebGLRenderingContext.isDebug = false;
1201
1063
  WebGLRenderingContext.filter = 'both';
1202
1064
  (() => {
1203
1065
  Helpers.initialize();
1204
- ctor = global.CanvasJSIModule.createWebGLContext;
1205
1066
  })();
1206
1067
  __decorate([
1207
1068
  profile,