safex-webgl 1.0.0

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 (910) hide show
  1. package/.prettierrc +6 -0
  2. package/@types/index.d.ts +36 -0
  3. package/README.md +152 -0
  4. package/bun.lock +353 -0
  5. package/dist/actions/Action.d.ts +27 -0
  6. package/dist/actions/Action.d.ts.map +1 -0
  7. package/dist/actions/Action.js +62 -0
  8. package/dist/actions/Action.js.map +1 -0
  9. package/dist/actions/ActionBezier.d.ts +121 -0
  10. package/dist/actions/ActionBezier.d.ts.map +1 -0
  11. package/dist/actions/ActionBezier.js +221 -0
  12. package/dist/actions/ActionBezier.js.map +1 -0
  13. package/dist/actions/ActionBlink.d.ts +62 -0
  14. package/dist/actions/ActionBlink.d.ts.map +1 -0
  15. package/dist/actions/ActionBlink.js +96 -0
  16. package/dist/actions/ActionBlink.js.map +1 -0
  17. package/dist/actions/ActionCatmullRom.d.ts +242 -0
  18. package/dist/actions/ActionCatmullRom.d.ts.map +1 -0
  19. package/dist/actions/ActionCatmullRom.js +436 -0
  20. package/dist/actions/ActionCatmullRom.js.map +1 -0
  21. package/dist/actions/ActionFade.d.ts +126 -0
  22. package/dist/actions/ActionFade.d.ts.map +1 -0
  23. package/dist/actions/ActionFade.js +190 -0
  24. package/dist/actions/ActionFade.js.map +1 -0
  25. package/dist/actions/ActionInstant.d.ts +237 -0
  26. package/dist/actions/ActionInstant.d.ts.map +1 -0
  27. package/dist/actions/ActionInstant.js +386 -0
  28. package/dist/actions/ActionInstant.js.map +1 -0
  29. package/dist/actions/ActionInterval.d.ts +132 -0
  30. package/dist/actions/ActionInterval.d.ts.map +1 -0
  31. package/dist/actions/ActionInterval.js +254 -0
  32. package/dist/actions/ActionInterval.js.map +1 -0
  33. package/dist/actions/ActionJump.d.ts +146 -0
  34. package/dist/actions/ActionJump.d.ts.map +1 -0
  35. package/dist/actions/ActionJump.js +239 -0
  36. package/dist/actions/ActionJump.js.map +1 -0
  37. package/dist/actions/ActionMove.d.ts +73 -0
  38. package/dist/actions/ActionMove.d.ts.map +1 -0
  39. package/dist/actions/ActionMove.js +164 -0
  40. package/dist/actions/ActionMove.js.map +1 -0
  41. package/dist/actions/ActionRotate.d.ts +137 -0
  42. package/dist/actions/ActionRotate.d.ts.map +1 -0
  43. package/dist/actions/ActionRotate.js +214 -0
  44. package/dist/actions/ActionRotate.js.map +1 -0
  45. package/dist/actions/ActionScale.d.ts +110 -0
  46. package/dist/actions/ActionScale.d.ts.map +1 -0
  47. package/dist/actions/ActionScale.js +157 -0
  48. package/dist/actions/ActionScale.js.map +1 -0
  49. package/dist/actions/ActionSkew.d.ts +120 -0
  50. package/dist/actions/ActionSkew.d.ts.map +1 -0
  51. package/dist/actions/ActionSkew.js +185 -0
  52. package/dist/actions/ActionSkew.js.map +1 -0
  53. package/dist/actions/ActionTint.d.ts +132 -0
  54. package/dist/actions/ActionTint.d.ts.map +1 -0
  55. package/dist/actions/ActionTint.js +193 -0
  56. package/dist/actions/ActionTint.js.map +1 -0
  57. package/dist/actions/Animate.d.ts +77 -0
  58. package/dist/actions/Animate.d.ts.map +1 -0
  59. package/dist/actions/Animate.js +177 -0
  60. package/dist/actions/Animate.js.map +1 -0
  61. package/dist/actions/DelayTime.d.ts +95 -0
  62. package/dist/actions/DelayTime.d.ts.map +1 -0
  63. package/dist/actions/DelayTime.js +145 -0
  64. package/dist/actions/DelayTime.js.map +1 -0
  65. package/dist/actions/FiniteTimeAction.d.ts +11 -0
  66. package/dist/actions/FiniteTimeAction.d.ts.map +1 -0
  67. package/dist/actions/FiniteTimeAction.js +24 -0
  68. package/dist/actions/FiniteTimeAction.js.map +1 -0
  69. package/dist/actions/Follow.d.ts +23 -0
  70. package/dist/actions/Follow.d.ts.map +1 -0
  71. package/dist/actions/Follow.js +98 -0
  72. package/dist/actions/Follow.js.map +1 -0
  73. package/dist/actions/Repeat.d.ts +151 -0
  74. package/dist/actions/Repeat.d.ts.map +1 -0
  75. package/dist/actions/Repeat.js +276 -0
  76. package/dist/actions/Repeat.js.map +1 -0
  77. package/dist/actions/Sequence.d.ts +77 -0
  78. package/dist/actions/Sequence.d.ts.map +1 -0
  79. package/dist/actions/Sequence.js +190 -0
  80. package/dist/actions/Sequence.js.map +1 -0
  81. package/dist/actions/Spawn.d.ts +63 -0
  82. package/dist/actions/Spawn.d.ts.map +1 -0
  83. package/dist/actions/Spawn.js +146 -0
  84. package/dist/actions/Spawn.js.map +1 -0
  85. package/dist/actions/Speed.d.ts +19 -0
  86. package/dist/actions/Speed.d.ts.map +1 -0
  87. package/dist/actions/Speed.js +57 -0
  88. package/dist/actions/Speed.js.map +1 -0
  89. package/dist/actions/TargetedAction.d.ts +67 -0
  90. package/dist/actions/TargetedAction.d.ts.map +1 -0
  91. package/dist/actions/TargetedAction.js +99 -0
  92. package/dist/actions/TargetedAction.js.map +1 -0
  93. package/dist/actions/easing/ActionEase.d.ts +133 -0
  94. package/dist/actions/easing/ActionEase.d.ts.map +1 -0
  95. package/dist/actions/easing/ActionEase.js +184 -0
  96. package/dist/actions/easing/ActionEase.js.map +1 -0
  97. package/dist/actions/easing/Back.d.ts +174 -0
  98. package/dist/actions/easing/Back.d.ts.map +1 -0
  99. package/dist/actions/easing/Back.js +227 -0
  100. package/dist/actions/easing/Back.js.map +1 -0
  101. package/dist/actions/easing/Bezier.d.ts +94 -0
  102. package/dist/actions/easing/Bezier.d.ts.map +1 -0
  103. package/dist/actions/easing/Bezier.js +124 -0
  104. package/dist/actions/easing/Bezier.js.map +1 -0
  105. package/dist/actions/easing/Bounce.d.ts +203 -0
  106. package/dist/actions/easing/Bounce.d.ts.map +1 -0
  107. package/dist/actions/easing/Bounce.js +288 -0
  108. package/dist/actions/easing/Bounce.js.map +1 -0
  109. package/dist/actions/easing/Circle.d.ts +177 -0
  110. package/dist/actions/easing/Circle.d.ts.map +1 -0
  111. package/dist/actions/easing/Circle.js +220 -0
  112. package/dist/actions/easing/Circle.js.map +1 -0
  113. package/dist/actions/easing/Cubic.d.ts +165 -0
  114. package/dist/actions/easing/Cubic.d.ts.map +1 -0
  115. package/dist/actions/easing/Cubic.js +209 -0
  116. package/dist/actions/easing/Cubic.js.map +1 -0
  117. package/dist/actions/easing/Elastic.d.ts +269 -0
  118. package/dist/actions/easing/Elastic.d.ts.map +1 -0
  119. package/dist/actions/easing/Elastic.js +358 -0
  120. package/dist/actions/easing/Elastic.js.map +1 -0
  121. package/dist/actions/easing/Exponential.d.ts +181 -0
  122. package/dist/actions/easing/Exponential.d.ts.map +1 -0
  123. package/dist/actions/easing/Exponential.js +214 -0
  124. package/dist/actions/easing/Exponential.js.map +1 -0
  125. package/dist/actions/easing/InOut.d.ts +191 -0
  126. package/dist/actions/easing/InOut.d.ts.map +1 -0
  127. package/dist/actions/easing/InOut.js +254 -0
  128. package/dist/actions/easing/InOut.js.map +1 -0
  129. package/dist/actions/easing/Quartic.d.ts +232 -0
  130. package/dist/actions/easing/Quartic.d.ts.map +1 -0
  131. package/dist/actions/easing/Quartic.js +313 -0
  132. package/dist/actions/easing/Quartic.js.map +1 -0
  133. package/dist/actions/easing/Quintic.d.ts +168 -0
  134. package/dist/actions/easing/Quintic.d.ts.map +1 -0
  135. package/dist/actions/easing/Quintic.js +212 -0
  136. package/dist/actions/easing/Quintic.js.map +1 -0
  137. package/dist/actions/easing/Sine.d.ts +176 -0
  138. package/dist/actions/easing/Sine.d.ts.map +1 -0
  139. package/dist/actions/easing/Sine.js +206 -0
  140. package/dist/actions/easing/Sine.js.map +1 -0
  141. package/dist/actions/index.d.ts +16 -0
  142. package/dist/actions/index.d.ts.map +1 -0
  143. package/dist/actions/index.js +16 -0
  144. package/dist/actions/index.js.map +1 -0
  145. package/dist/audio/Audio.d.ts +47 -0
  146. package/dist/audio/Audio.d.ts.map +1 -0
  147. package/dist/audio/Audio.js +255 -0
  148. package/dist/audio/Audio.js.map +1 -0
  149. package/dist/audio/engine.d.ts +171 -0
  150. package/dist/audio/engine.d.ts.map +1 -0
  151. package/dist/audio/engine.js +556 -0
  152. package/dist/audio/engine.js.map +1 -0
  153. package/dist/audio/index.d.ts +3 -0
  154. package/dist/audio/index.d.ts.map +1 -0
  155. package/dist/audio/index.js +3 -0
  156. package/dist/audio/index.js.map +1 -0
  157. package/dist/boot.d.ts +80 -0
  158. package/dist/boot.d.ts.map +1 -0
  159. package/dist/boot.js +468 -0
  160. package/dist/boot.js.map +1 -0
  161. package/dist/clipping-nodes/ClippingNode.d.ts +114 -0
  162. package/dist/clipping-nodes/ClippingNode.d.ts.map +1 -0
  163. package/dist/clipping-nodes/ClippingNode.js +177 -0
  164. package/dist/clipping-nodes/ClippingNode.js.map +1 -0
  165. package/dist/clipping-nodes/ClippingNodeWebGLRenderCmd.d.ts +25 -0
  166. package/dist/clipping-nodes/ClippingNodeWebGLRenderCmd.d.ts.map +1 -0
  167. package/dist/clipping-nodes/ClippingNodeWebGLRenderCmd.js +157 -0
  168. package/dist/clipping-nodes/ClippingNodeWebGLRenderCmd.js.map +1 -0
  169. package/dist/core/ActionManager.d.ts +56 -0
  170. package/dist/core/ActionManager.d.ts.map +1 -0
  171. package/dist/core/ActionManager.js +253 -0
  172. package/dist/core/ActionManager.js.map +1 -0
  173. package/dist/core/Configuration.d.ts +108 -0
  174. package/dist/core/Configuration.d.ts.map +1 -0
  175. package/dist/core/Configuration.js +232 -0
  176. package/dist/core/Configuration.js.map +1 -0
  177. package/dist/core/Director.d.ts +130 -0
  178. package/dist/core/Director.d.ts.map +1 -0
  179. package/dist/core/Director.js +580 -0
  180. package/dist/core/Director.js.map +1 -0
  181. package/dist/core/DrawingPrimitivesWebGL.d.ts +32 -0
  182. package/dist/core/DrawingPrimitivesWebGL.d.ts.map +1 -0
  183. package/dist/core/DrawingPrimitivesWebGL.js +273 -0
  184. package/dist/core/DrawingPrimitivesWebGL.js.map +1 -0
  185. package/dist/core/Scheduler.d.ts +110 -0
  186. package/dist/core/Scheduler.d.ts.map +1 -0
  187. package/dist/core/Scheduler.js +687 -0
  188. package/dist/core/Scheduler.js.map +1 -0
  189. package/dist/core/base-nodes/BaseNodesPropertyDefine.d.ts +2 -0
  190. package/dist/core/base-nodes/BaseNodesPropertyDefine.d.ts.map +1 -0
  191. package/dist/core/base-nodes/BaseNodesPropertyDefine.js +37 -0
  192. package/dist/core/base-nodes/BaseNodesPropertyDefine.js.map +1 -0
  193. package/dist/core/base-nodes/CustomRenderCmd.d.ts +9 -0
  194. package/dist/core/base-nodes/CustomRenderCmd.d.ts.map +1 -0
  195. package/dist/core/base-nodes/CustomRenderCmd.js +16 -0
  196. package/dist/core/base-nodes/CustomRenderCmd.js.map +1 -0
  197. package/dist/core/base-nodes/Node.d.ts +285 -0
  198. package/dist/core/base-nodes/Node.d.ts.map +1 -0
  199. package/dist/core/base-nodes/Node.js +1112 -0
  200. package/dist/core/base-nodes/Node.js.map +1 -0
  201. package/dist/core/base-nodes/NodeRenderCmd.d.ts +65 -0
  202. package/dist/core/base-nodes/NodeRenderCmd.d.ts.map +1 -0
  203. package/dist/core/base-nodes/NodeRenderCmd.js +460 -0
  204. package/dist/core/base-nodes/NodeRenderCmd.js.map +1 -0
  205. package/dist/core/base-nodes/NodeWebGLRenderCmd.d.ts +17 -0
  206. package/dist/core/base-nodes/NodeWebGLRenderCmd.d.ts.map +1 -0
  207. package/dist/core/base-nodes/NodeWebGLRenderCmd.js +29 -0
  208. package/dist/core/base-nodes/NodeWebGLRenderCmd.js.map +1 -0
  209. package/dist/core/cocoa/AffineTransform.d.ts +201 -0
  210. package/dist/core/cocoa/AffineTransform.d.ts.map +1 -0
  211. package/dist/core/cocoa/AffineTransform.js +260 -0
  212. package/dist/core/cocoa/AffineTransform.js.map +1 -0
  213. package/dist/core/cocoa/Geometry.d.ts +176 -0
  214. package/dist/core/cocoa/Geometry.d.ts.map +1 -0
  215. package/dist/core/cocoa/Geometry.js +237 -0
  216. package/dist/core/cocoa/Geometry.js.map +1 -0
  217. package/dist/core/event-manager/Event.d.ts +57 -0
  218. package/dist/core/event-manager/Event.d.ts.map +1 -0
  219. package/dist/core/event-manager/Event.js +69 -0
  220. package/dist/core/event-manager/Event.js.map +1 -0
  221. package/dist/core/event-manager/EventCustom.d.ts +22 -0
  222. package/dist/core/event-manager/EventCustom.d.ts.map +1 -0
  223. package/dist/core/event-manager/EventCustom.js +31 -0
  224. package/dist/core/event-manager/EventCustom.js.map +1 -0
  225. package/dist/core/event-manager/EventExtension.d.ts +33 -0
  226. package/dist/core/event-manager/EventExtension.d.ts.map +1 -0
  227. package/dist/core/event-manager/EventExtension.js +80 -0
  228. package/dist/core/event-manager/EventExtension.js.map +1 -0
  229. package/dist/core/event-manager/EventFocus.d.ts +17 -0
  230. package/dist/core/event-manager/EventFocus.d.ts.map +1 -0
  231. package/dist/core/event-manager/EventFocus.js +21 -0
  232. package/dist/core/event-manager/EventFocus.js.map +1 -0
  233. package/dist/core/event-manager/EventHelper.d.ts +8 -0
  234. package/dist/core/event-manager/EventHelper.d.ts.map +1 -0
  235. package/dist/core/event-manager/EventHelper.js +92 -0
  236. package/dist/core/event-manager/EventHelper.js.map +1 -0
  237. package/dist/core/event-manager/EventListener.d.ts +53 -0
  238. package/dist/core/event-manager/EventListener.d.ts.map +1 -0
  239. package/dist/core/event-manager/EventListener.js +95 -0
  240. package/dist/core/event-manager/EventListener.js.map +1 -0
  241. package/dist/core/event-manager/EventListenerCustom.d.ts +11 -0
  242. package/dist/core/event-manager/EventListenerCustom.d.ts.map +1 -0
  243. package/dist/core/event-manager/EventListenerCustom.js +37 -0
  244. package/dist/core/event-manager/EventListenerCustom.js.map +1 -0
  245. package/dist/core/event-manager/EventListenerFocus.d.ts +10 -0
  246. package/dist/core/event-manager/EventListenerFocus.d.ts.map +1 -0
  247. package/dist/core/event-manager/EventListenerFocus.js +28 -0
  248. package/dist/core/event-manager/EventListenerFocus.js.map +1 -0
  249. package/dist/core/event-manager/EventListenerMouse.d.ts +13 -0
  250. package/dist/core/event-manager/EventListenerMouse.d.ts.map +1 -0
  251. package/dist/core/event-manager/EventListenerMouse.js +49 -0
  252. package/dist/core/event-manager/EventListenerMouse.js.map +1 -0
  253. package/dist/core/event-manager/EventListenerTouchAllAtOnce.d.ts +12 -0
  254. package/dist/core/event-manager/EventListenerTouchAllAtOnce.d.ts.map +1 -0
  255. package/dist/core/event-manager/EventListenerTouchAllAtOnce.js +28 -0
  256. package/dist/core/event-manager/EventListenerTouchAllAtOnce.js.map +1 -0
  257. package/dist/core/event-manager/EventListenerTouchOneByOne.d.ts +16 -0
  258. package/dist/core/event-manager/EventListenerTouchOneByOne.d.ts.map +1 -0
  259. package/dist/core/event-manager/EventListenerTouchOneByOne.js +38 -0
  260. package/dist/core/event-manager/EventListenerTouchOneByOne.js.map +1 -0
  261. package/dist/core/event-manager/EventListenerVector.d.ts +15 -0
  262. package/dist/core/event-manager/EventListenerVector.d.ts.map +1 -0
  263. package/dist/core/event-manager/EventListenerVector.js +38 -0
  264. package/dist/core/event-manager/EventListenerVector.js.map +1 -0
  265. package/dist/core/event-manager/EventManager.d.ts +140 -0
  266. package/dist/core/event-manager/EventManager.d.ts.map +1 -0
  267. package/dist/core/event-manager/EventManager.js +907 -0
  268. package/dist/core/event-manager/EventManager.js.map +1 -0
  269. package/dist/core/event-manager/EventMouse.d.ts +173 -0
  270. package/dist/core/event-manager/EventMouse.d.ts.map +1 -0
  271. package/dist/core/event-manager/EventMouse.js +200 -0
  272. package/dist/core/event-manager/EventMouse.js.map +1 -0
  273. package/dist/core/event-manager/EventTouch.d.ts +24 -0
  274. package/dist/core/event-manager/EventTouch.d.ts.map +1 -0
  275. package/dist/core/event-manager/EventTouch.js +33 -0
  276. package/dist/core/event-manager/EventTouch.js.map +1 -0
  277. package/dist/core/event-manager/Touch.d.ts +60 -0
  278. package/dist/core/event-manager/Touch.d.ts.map +1 -0
  279. package/dist/core/event-manager/Touch.js +94 -0
  280. package/dist/core/event-manager/Touch.js.map +1 -0
  281. package/dist/core/event-manager/index.d.ts +6 -0
  282. package/dist/core/event-manager/index.d.ts.map +1 -0
  283. package/dist/core/event-manager/index.js +6 -0
  284. package/dist/core/event-manager/index.js.map +1 -0
  285. package/dist/core/index.d.ts +16 -0
  286. package/dist/core/index.d.ts.map +1 -0
  287. package/dist/core/index.js +16 -0
  288. package/dist/core/index.js.map +1 -0
  289. package/dist/core/kazmath/gl/mat4stack.d.ts +5 -0
  290. package/dist/core/kazmath/gl/mat4stack.d.ts.map +1 -0
  291. package/dist/core/kazmath/gl/mat4stack.js +53 -0
  292. package/dist/core/kazmath/gl/mat4stack.js.map +1 -0
  293. package/dist/core/kazmath/gl/matrix.d.ts +21 -0
  294. package/dist/core/kazmath/gl/matrix.d.ts.map +1 -0
  295. package/dist/core/kazmath/gl/matrix.js +121 -0
  296. package/dist/core/kazmath/gl/matrix.js.map +1 -0
  297. package/dist/core/kazmath/index.d.ts +7 -0
  298. package/dist/core/kazmath/index.d.ts.map +1 -0
  299. package/dist/core/kazmath/index.js +7 -0
  300. package/dist/core/kazmath/index.js.map +1 -0
  301. package/dist/core/kazmath/mat3.d.ts +45 -0
  302. package/dist/core/kazmath/mat3.d.ts.map +1 -0
  303. package/dist/core/kazmath/mat3.js +297 -0
  304. package/dist/core/kazmath/mat3.js.map +1 -0
  305. package/dist/core/kazmath/mat4.d.ts +175 -0
  306. package/dist/core/kazmath/mat4.d.ts.map +1 -0
  307. package/dist/core/kazmath/mat4.func.d.ts +44 -0
  308. package/dist/core/kazmath/mat4.func.d.ts.map +1 -0
  309. package/dist/core/kazmath/mat4.func.js +210 -0
  310. package/dist/core/kazmath/mat4.func.js.map +1 -0
  311. package/dist/core/kazmath/mat4.js +671 -0
  312. package/dist/core/kazmath/mat4.js.map +1 -0
  313. package/dist/core/kazmath/plane.d.ts +24 -0
  314. package/dist/core/kazmath/plane.d.ts.map +1 -0
  315. package/dist/core/kazmath/plane.js +96 -0
  316. package/dist/core/kazmath/plane.js.map +1 -0
  317. package/dist/core/kazmath/quaternion.d.ts +135 -0
  318. package/dist/core/kazmath/quaternion.d.ts.map +1 -0
  319. package/dist/core/kazmath/quaternion.js +407 -0
  320. package/dist/core/kazmath/quaternion.js.map +1 -0
  321. package/dist/core/kazmath/utility.d.ts +8 -0
  322. package/dist/core/kazmath/utility.d.ts.map +1 -0
  323. package/dist/core/kazmath/utility.js +14 -0
  324. package/dist/core/kazmath/utility.js.map +1 -0
  325. package/dist/core/kazmath/vec3.d.ts +26 -0
  326. package/dist/core/kazmath/vec3.d.ts.map +1 -0
  327. package/dist/core/kazmath/vec3.js +170 -0
  328. package/dist/core/kazmath/vec3.js.map +1 -0
  329. package/dist/core/kazmath/vec4.d.ts +22 -0
  330. package/dist/core/kazmath/vec4.d.ts.map +1 -0
  331. package/dist/core/kazmath/vec4.js +136 -0
  332. package/dist/core/kazmath/vec4.js.map +1 -0
  333. package/dist/core/labelttf/LabelTTF.d.ts +310 -0
  334. package/dist/core/labelttf/LabelTTF.d.ts.map +1 -0
  335. package/dist/core/labelttf/LabelTTF.js +818 -0
  336. package/dist/core/labelttf/LabelTTF.js.map +1 -0
  337. package/dist/core/labelttf/LabelTTFPropertyDefine.d.ts +2 -0
  338. package/dist/core/labelttf/LabelTTFPropertyDefine.d.ts.map +1 -0
  339. package/dist/core/labelttf/LabelTTFPropertyDefine.js +27 -0
  340. package/dist/core/labelttf/LabelTTFPropertyDefine.js.map +1 -0
  341. package/dist/core/labelttf/LabelTTFWebGLRenderCmd.d.ts +37 -0
  342. package/dist/core/labelttf/LabelTTFWebGLRenderCmd.d.ts.map +1 -0
  343. package/dist/core/labelttf/LabelTTFWebGLRenderCmd.js +367 -0
  344. package/dist/core/labelttf/LabelTTFWebGLRenderCmd.js.map +1 -0
  345. package/dist/core/layers/Layer.d.ts +35 -0
  346. package/dist/core/layers/Layer.d.ts.map +1 -0
  347. package/dist/core/layers/Layer.js +93 -0
  348. package/dist/core/layers/Layer.js.map +1 -0
  349. package/dist/core/layers/LayerColor.d.ts +61 -0
  350. package/dist/core/layers/LayerColor.d.ts.map +1 -0
  351. package/dist/core/layers/LayerColor.js +144 -0
  352. package/dist/core/layers/LayerColor.js.map +1 -0
  353. package/dist/core/layers/LayerGradient.d.ts +196 -0
  354. package/dist/core/layers/LayerGradient.d.ts.map +1 -0
  355. package/dist/core/layers/LayerGradient.js +482 -0
  356. package/dist/core/layers/LayerGradient.js.map +1 -0
  357. package/dist/core/layers/LayerMultiplex.d.ts +47 -0
  358. package/dist/core/layers/LayerMultiplex.d.ts.map +1 -0
  359. package/dist/core/layers/LayerMultiplex.js +87 -0
  360. package/dist/core/layers/LayerMultiplex.js.map +1 -0
  361. package/dist/core/layers/LayerWebGLRenderCmd.d.ts +26 -0
  362. package/dist/core/layers/LayerWebGLRenderCmd.d.ts.map +1 -0
  363. package/dist/core/layers/LayerWebGLRenderCmd.js +100 -0
  364. package/dist/core/layers/LayerWebGLRenderCmd.js.map +1 -0
  365. package/dist/core/layers/index.d.ts +5 -0
  366. package/dist/core/layers/index.d.ts.map +1 -0
  367. package/dist/core/layers/index.js +5 -0
  368. package/dist/core/layers/index.js.map +1 -0
  369. package/dist/core/platform/BlendFunc.d.ts +30 -0
  370. package/dist/core/platform/BlendFunc.d.ts.map +1 -0
  371. package/dist/core/platform/BlendFunc.js +50 -0
  372. package/dist/core/platform/BlendFunc.js.map +1 -0
  373. package/dist/core/platform/Color.d.ts +31 -0
  374. package/dist/core/platform/Color.d.ts.map +1 -0
  375. package/dist/core/platform/Color.js +71 -0
  376. package/dist/core/platform/Color.js.map +1 -0
  377. package/dist/core/platform/Common.d.ts +157 -0
  378. package/dist/core/platform/Common.d.ts.map +1 -0
  379. package/dist/core/platform/Common.js +180 -0
  380. package/dist/core/platform/Common.js.map +1 -0
  381. package/dist/core/platform/Config.d.ts +230 -0
  382. package/dist/core/platform/Config.d.ts.map +1 -0
  383. package/dist/core/platform/Config.js +231 -0
  384. package/dist/core/platform/Config.js.map +1 -0
  385. package/dist/core/platform/Dictionary.d.ts +16 -0
  386. package/dist/core/platform/Dictionary.d.ts.map +1 -0
  387. package/dist/core/platform/Dictionary.js +65 -0
  388. package/dist/core/platform/Dictionary.js.map +1 -0
  389. package/dist/core/platform/EGLView/ContainerStrategy.d.ts +30 -0
  390. package/dist/core/platform/EGLView/ContainerStrategy.d.ts.map +1 -0
  391. package/dist/core/platform/EGLView/ContainerStrategy.js +121 -0
  392. package/dist/core/platform/EGLView/ContainerStrategy.js.map +1 -0
  393. package/dist/core/platform/EGLView/ContentStrategy.d.ts +56 -0
  394. package/dist/core/platform/EGLView/ContentStrategy.d.ts.map +1 -0
  395. package/dist/core/platform/EGLView/ContentStrategy.js +117 -0
  396. package/dist/core/platform/EGLView/ContentStrategy.js.map +1 -0
  397. package/dist/core/platform/EGLView/EGLInstance.d.ts +8 -0
  398. package/dist/core/platform/EGLView/EGLInstance.d.ts.map +1 -0
  399. package/dist/core/platform/EGLView/EGLInstance.js +16 -0
  400. package/dist/core/platform/EGLView/EGLInstance.js.map +1 -0
  401. package/dist/core/platform/EGLView/ResolutionPolicy.d.ts +99 -0
  402. package/dist/core/platform/EGLView/ResolutionPolicy.d.ts.map +1 -0
  403. package/dist/core/platform/EGLView/ResolutionPolicy.js +116 -0
  404. package/dist/core/platform/EGLView/ResolutionPolicy.js.map +1 -0
  405. package/dist/core/platform/EGLView.d.ts +204 -0
  406. package/dist/core/platform/EGLView.d.ts.map +1 -0
  407. package/dist/core/platform/EGLView.js +669 -0
  408. package/dist/core/platform/EGLView.js.map +1 -0
  409. package/dist/core/platform/FontDefinition.d.ts +47 -0
  410. package/dist/core/platform/FontDefinition.d.ts.map +1 -0
  411. package/dist/core/platform/FontDefinition.js +59 -0
  412. package/dist/core/platform/FontDefinition.js.map +1 -0
  413. package/dist/core/platform/InputManager.d.ts +149 -0
  414. package/dist/core/platform/InputManager.d.ts.map +1 -0
  415. package/dist/core/platform/InputManager.js +558 -0
  416. package/dist/core/platform/InputManager.js.map +1 -0
  417. package/dist/core/platform/Loaders.d.ts +4 -0
  418. package/dist/core/platform/Loaders.d.ts.map +1 -0
  419. package/dist/core/platform/Loaders.js +141 -0
  420. package/dist/core/platform/Loaders.js.map +1 -0
  421. package/dist/core/platform/Macro.d.ts +634 -0
  422. package/dist/core/platform/Macro.d.ts.map +1 -0
  423. package/dist/core/platform/Macro.js +763 -0
  424. package/dist/core/platform/Macro.js.map +1 -0
  425. package/dist/core/platform/SAXParser.d.ts +44 -0
  426. package/dist/core/platform/SAXParser.d.ts.map +1 -0
  427. package/dist/core/platform/SAXParser.js +122 -0
  428. package/dist/core/platform/SAXParser.js.map +1 -0
  429. package/dist/core/platform/Types.d.ts +188 -0
  430. package/dist/core/platform/Types.d.ts.map +1 -0
  431. package/dist/core/platform/Types.js +425 -0
  432. package/dist/core/platform/Types.js.map +1 -0
  433. package/dist/core/platform/VisibleRect.d.ts +38 -0
  434. package/dist/core/platform/VisibleRect.d.ts.map +1 -0
  435. package/dist/core/platform/VisibleRect.js +66 -0
  436. package/dist/core/platform/VisibleRect.js.map +1 -0
  437. package/dist/core/platform/index.d.ts +7 -0
  438. package/dist/core/platform/index.d.ts.map +1 -0
  439. package/dist/core/platform/index.js +7 -0
  440. package/dist/core/platform/index.js.map +1 -0
  441. package/dist/core/platform/miniFramework.d.ts +28 -0
  442. package/dist/core/platform/miniFramework.d.ts.map +1 -0
  443. package/dist/core/platform/miniFramework.js +245 -0
  444. package/dist/core/platform/miniFramework.js.map +1 -0
  445. package/dist/core/platform/types/Quad2.d.ts +30 -0
  446. package/dist/core/platform/types/Quad2.d.ts.map +1 -0
  447. package/dist/core/platform/types/Quad2.js +62 -0
  448. package/dist/core/platform/types/Quad2.js.map +1 -0
  449. package/dist/core/platform/types/Quad3.d.ts +18 -0
  450. package/dist/core/platform/types/Quad3.d.ts.map +1 -0
  451. package/dist/core/platform/types/Quad3.js +30 -0
  452. package/dist/core/platform/types/Quad3.js.map +1 -0
  453. package/dist/core/platform/types/Tex2F.d.ts +20 -0
  454. package/dist/core/platform/types/Tex2F.d.ts.map +1 -0
  455. package/dist/core/platform/types/Tex2F.js +33 -0
  456. package/dist/core/platform/types/Tex2F.js.map +1 -0
  457. package/dist/core/platform/types/Vertex2F.d.ts +12 -0
  458. package/dist/core/platform/types/Vertex2F.d.ts.map +1 -0
  459. package/dist/core/platform/types/Vertex2F.js +25 -0
  460. package/dist/core/platform/types/Vertex2F.js.map +1 -0
  461. package/dist/core/platform/types/Vertex3F.d.ts +14 -0
  462. package/dist/core/platform/types/Vertex3F.d.ts.map +1 -0
  463. package/dist/core/platform/types/Vertex3F.js +31 -0
  464. package/dist/core/platform/types/Vertex3F.js.map +1 -0
  465. package/dist/core/platform/types/WebGLColor.d.ts +17 -0
  466. package/dist/core/platform/types/WebGLColor.d.ts.map +1 -0
  467. package/dist/core/platform/types/WebGLColor.js +40 -0
  468. package/dist/core/platform/types/WebGLColor.js.map +1 -0
  469. package/dist/core/renderer/GlobalVertexBuffer.d.ts +19 -0
  470. package/dist/core/renderer/GlobalVertexBuffer.d.ts.map +1 -0
  471. package/dist/core/renderer/GlobalVertexBuffer.js +99 -0
  472. package/dist/core/renderer/GlobalVertexBuffer.js.map +1 -0
  473. package/dist/core/renderer/RendererWebGL.d.ts +47 -0
  474. package/dist/core/renderer/RendererWebGL.d.ts.map +1 -0
  475. package/dist/core/renderer/RendererWebGL.js +389 -0
  476. package/dist/core/renderer/RendererWebGL.js.map +1 -0
  477. package/dist/core/scenes/Scene.d.ts +6 -0
  478. package/dist/core/scenes/Scene.d.ts.map +1 -0
  479. package/dist/core/scenes/Scene.js +12 -0
  480. package/dist/core/scenes/Scene.js.map +1 -0
  481. package/dist/core/sprites/Animation.d.ts +147 -0
  482. package/dist/core/sprites/Animation.d.ts.map +1 -0
  483. package/dist/core/sprites/Animation.js +277 -0
  484. package/dist/core/sprites/Animation.js.map +1 -0
  485. package/dist/core/sprites/AnimationCache.d.ts +37 -0
  486. package/dist/core/sprites/AnimationCache.d.ts.map +1 -0
  487. package/dist/core/sprites/AnimationCache.js +159 -0
  488. package/dist/core/sprites/AnimationCache.js.map +1 -0
  489. package/dist/core/sprites/Sprite.d.ts +104 -0
  490. package/dist/core/sprites/Sprite.d.ts.map +1 -0
  491. package/dist/core/sprites/Sprite.js +388 -0
  492. package/dist/core/sprites/Sprite.js.map +1 -0
  493. package/dist/core/sprites/SpriteBatchNode.d.ts +194 -0
  494. package/dist/core/sprites/SpriteBatchNode.d.ts.map +1 -0
  495. package/dist/core/sprites/SpriteBatchNode.js +332 -0
  496. package/dist/core/sprites/SpriteBatchNode.js.map +1 -0
  497. package/dist/core/sprites/SpriteFrame.d.ts +47 -0
  498. package/dist/core/sprites/SpriteFrame.d.ts.map +1 -0
  499. package/dist/core/sprites/SpriteFrame.js +223 -0
  500. package/dist/core/sprites/SpriteFrame.js.map +1 -0
  501. package/dist/core/sprites/SpriteFrameCache.d.ts +102 -0
  502. package/dist/core/sprites/SpriteFrameCache.d.ts.map +1 -0
  503. package/dist/core/sprites/SpriteFrameCache.js +333 -0
  504. package/dist/core/sprites/SpriteFrameCache.js.map +1 -0
  505. package/dist/core/sprites/SpriteLoadManager.d.ts +8 -0
  506. package/dist/core/sprites/SpriteLoadManager.d.ts.map +1 -0
  507. package/dist/core/sprites/SpriteLoadManager.js +37 -0
  508. package/dist/core/sprites/SpriteLoadManager.js.map +1 -0
  509. package/dist/core/sprites/SpriteWebGLRenderCmd.d.ts +35 -0
  510. package/dist/core/sprites/SpriteWebGLRenderCmd.d.ts.map +1 -0
  511. package/dist/core/sprites/SpriteWebGLRenderCmd.js +286 -0
  512. package/dist/core/sprites/SpriteWebGLRenderCmd.js.map +1 -0
  513. package/dist/core/sprites/SpritesPropertyDefine.d.ts +2 -0
  514. package/dist/core/sprites/SpritesPropertyDefine.d.ts.map +1 -0
  515. package/dist/core/sprites/SpritesPropertyDefine.js +19 -0
  516. package/dist/core/sprites/SpritesPropertyDefine.js.map +1 -0
  517. package/dist/core/support/PointExtension.d.ts +296 -0
  518. package/dist/core/support/PointExtension.d.ts.map +1 -0
  519. package/dist/core/support/PointExtension.js +443 -0
  520. package/dist/core/support/PointExtension.js.map +1 -0
  521. package/dist/core/support/Vertex.d.ts +24 -0
  522. package/dist/core/support/Vertex.d.ts.map +1 -0
  523. package/dist/core/support/Vertex.js +120 -0
  524. package/dist/core/support/Vertex.js.map +1 -0
  525. package/dist/core/utils/BinaryLoader.d.ts +9 -0
  526. package/dist/core/utils/BinaryLoader.d.ts.map +1 -0
  527. package/dist/core/utils/BinaryLoader.js +116 -0
  528. package/dist/core/utils/BinaryLoader.js.map +1 -0
  529. package/dist/core/utils/Profiler.d.ts +13 -0
  530. package/dist/core/utils/Profiler.d.ts.map +1 -0
  531. package/dist/core/utils/Profiler.js +140 -0
  532. package/dist/core/utils/Profiler.js.map +1 -0
  533. package/dist/helper/AsyncPool.d.ts +22 -0
  534. package/dist/helper/AsyncPool.d.ts.map +1 -0
  535. package/dist/helper/AsyncPool.js +101 -0
  536. package/dist/helper/AsyncPool.js.map +1 -0
  537. package/dist/helper/Base64.d.ts +29 -0
  538. package/dist/helper/Base64.d.ts.map +1 -0
  539. package/dist/helper/Base64.js +71 -0
  540. package/dist/helper/Base64.js.map +1 -0
  541. package/dist/helper/Debugger.d.ts +179 -0
  542. package/dist/helper/Debugger.d.ts.map +1 -0
  543. package/dist/helper/Debugger.js +250 -0
  544. package/dist/helper/Debugger.js.map +1 -0
  545. package/dist/helper/ZipUtils.d.ts +2 -0
  546. package/dist/helper/ZipUtils.d.ts.map +1 -0
  547. package/dist/helper/ZipUtils.js +20 -0
  548. package/dist/helper/ZipUtils.js.map +1 -0
  549. package/dist/helper/async.d.ts +49 -0
  550. package/dist/helper/async.d.ts.map +1 -0
  551. package/dist/helper/async.js +95 -0
  552. package/dist/helper/async.js.map +1 -0
  553. package/dist/helper/checkType.d.ts +8 -0
  554. package/dist/helper/checkType.d.ts.map +1 -0
  555. package/dist/helper/checkType.js +31 -0
  556. package/dist/helper/checkType.js.map +1 -0
  557. package/dist/helper/engine.d.ts +6 -0
  558. package/dist/helper/engine.d.ts.map +1 -0
  559. package/dist/helper/engine.js +115 -0
  560. package/dist/helper/engine.js.map +1 -0
  561. package/dist/helper/getset.d.ts +2 -0
  562. package/dist/helper/getset.d.ts.map +1 -0
  563. package/dist/helper/getset.js +51 -0
  564. package/dist/helper/getset.js.map +1 -0
  565. package/dist/helper/global.d.ts +6 -0
  566. package/dist/helper/global.d.ts.map +1 -0
  567. package/dist/helper/global.js +6 -0
  568. package/dist/helper/global.js.map +1 -0
  569. package/dist/helper/index.d.ts +3 -0
  570. package/dist/helper/index.d.ts.map +1 -0
  571. package/dist/helper/index.js +3 -0
  572. package/dist/helper/index.js.map +1 -0
  573. package/dist/helper/loader.d.ts +102 -0
  574. package/dist/helper/loader.d.ts.map +1 -0
  575. package/dist/helper/loader.js +447 -0
  576. package/dist/helper/loader.js.map +1 -0
  577. package/dist/helper/path.d.ts +12 -0
  578. package/dist/helper/path.d.ts.map +1 -0
  579. package/dist/helper/path.js +75 -0
  580. package/dist/helper/path.js.map +1 -0
  581. package/dist/helper/string.d.ts +2 -0
  582. package/dist/helper/string.d.ts.map +1 -0
  583. package/dist/helper/string.js +32 -0
  584. package/dist/helper/string.js.map +1 -0
  585. package/dist/helper/sys.d.ts +446 -0
  586. package/dist/helper/sys.d.ts.map +1 -0
  587. package/dist/helper/sys.js +691 -0
  588. package/dist/helper/sys.js.map +1 -0
  589. package/dist/index.d.ts +11 -0
  590. package/dist/index.d.ts.map +1 -0
  591. package/dist/index.js +11 -0
  592. package/dist/index.js.map +1 -0
  593. package/dist/motion-streak/MotionStreak.d.ts +56 -0
  594. package/dist/motion-streak/MotionStreak.d.ts.map +1 -0
  595. package/dist/motion-streak/MotionStreak.js +301 -0
  596. package/dist/motion-streak/MotionStreak.js.map +1 -0
  597. package/dist/motion-streak/MotionStreakWebGLRenderCmd.d.ts +9 -0
  598. package/dist/motion-streak/MotionStreakWebGLRenderCmd.d.ts.map +1 -0
  599. package/dist/motion-streak/MotionStreakWebGLRenderCmd.js +52 -0
  600. package/dist/motion-streak/MotionStreakWebGLRenderCmd.js.map +1 -0
  601. package/dist/motion-streak/index.d.ts +2 -0
  602. package/dist/motion-streak/index.d.ts.map +1 -0
  603. package/dist/motion-streak/index.js +2 -0
  604. package/dist/motion-streak/index.js.map +1 -0
  605. package/dist/particle/PNGReader.d.ts +30 -0
  606. package/dist/particle/PNGReader.d.ts.map +1 -0
  607. package/dist/particle/PNGReader.js +304 -0
  608. package/dist/particle/PNGReader.js.map +1 -0
  609. package/dist/particle/Particle.d.ts +27 -0
  610. package/dist/particle/Particle.d.ts.map +1 -0
  611. package/dist/particle/Particle.js +50 -0
  612. package/dist/particle/Particle.js.map +1 -0
  613. package/dist/particle/ParticleBatchNode.d.ts +163 -0
  614. package/dist/particle/ParticleBatchNode.d.ts.map +1 -0
  615. package/dist/particle/ParticleBatchNode.js +447 -0
  616. package/dist/particle/ParticleBatchNode.js.map +1 -0
  617. package/dist/particle/ParticleBatchNodeWebGLRenderCmd.d.ts +8 -0
  618. package/dist/particle/ParticleBatchNodeWebGLRenderCmd.d.ts.map +1 -0
  619. package/dist/particle/ParticleBatchNodeWebGLRenderCmd.js +33 -0
  620. package/dist/particle/ParticleBatchNodeWebGLRenderCmd.js.map +1 -0
  621. package/dist/particle/ParticleSystem.d.ts +941 -0
  622. package/dist/particle/ParticleSystem.d.ts.map +1 -0
  623. package/dist/particle/ParticleSystem.js +2017 -0
  624. package/dist/particle/ParticleSystem.js.map +1 -0
  625. package/dist/particle/ParticleSystemWebGLRenderCmd.d.ts +29 -0
  626. package/dist/particle/ParticleSystemWebGLRenderCmd.d.ts.map +1 -0
  627. package/dist/particle/ParticleSystemWebGLRenderCmd.js +346 -0
  628. package/dist/particle/ParticleSystemWebGLRenderCmd.js.map +1 -0
  629. package/dist/particle/TIFFReader.d.ts +138 -0
  630. package/dist/particle/TIFFReader.d.ts.map +1 -0
  631. package/dist/particle/TIFFReader.js +596 -0
  632. package/dist/particle/TIFFReader.js.map +1 -0
  633. package/dist/particle/examples/ParticleFire.d.ts +60 -0
  634. package/dist/particle/examples/ParticleFire.d.ts.map +1 -0
  635. package/dist/particle/examples/ParticleFire.js +188 -0
  636. package/dist/particle/examples/ParticleFire.js.map +1 -0
  637. package/dist/particle/examples/ParticleGalaxy.d.ts +60 -0
  638. package/dist/particle/examples/ParticleGalaxy.d.ts.map +1 -0
  639. package/dist/particle/examples/ParticleGalaxy.js +199 -0
  640. package/dist/particle/examples/ParticleGalaxy.js.map +1 -0
  641. package/dist/particle/examples/ParticleSmoke.d.ts +60 -0
  642. package/dist/particle/examples/ParticleSmoke.d.ts.map +1 -0
  643. package/dist/particle/examples/ParticleSmoke.js +195 -0
  644. package/dist/particle/examples/ParticleSmoke.js.map +1 -0
  645. package/dist/particle/examples/ParticleSpiral.d.ts +38 -0
  646. package/dist/particle/examples/ParticleSpiral.d.ts.map +1 -0
  647. package/dist/particle/examples/ParticleSpiral.js +130 -0
  648. package/dist/particle/examples/ParticleSpiral.js.map +1 -0
  649. package/dist/particle/examples/index.d.ts +5 -0
  650. package/dist/particle/examples/index.d.ts.map +1 -0
  651. package/dist/particle/examples/index.js +5 -0
  652. package/dist/particle/examples/index.js.map +1 -0
  653. package/dist/particle/index.d.ts +2 -0
  654. package/dist/particle/index.d.ts.map +1 -0
  655. package/dist/particle/index.js +2 -0
  656. package/dist/particle/index.js.map +1 -0
  657. package/dist/polyfills.d.ts +34 -0
  658. package/dist/polyfills.d.ts.map +1 -0
  659. package/dist/polyfills.js +102 -0
  660. package/dist/polyfills.js.map +1 -0
  661. package/dist/progress-timer/ActionProgressTimer.d.ts +118 -0
  662. package/dist/progress-timer/ActionProgressTimer.d.ts.map +1 -0
  663. package/dist/progress-timer/ActionProgressTimer.js +173 -0
  664. package/dist/progress-timer/ActionProgressTimer.js.map +1 -0
  665. package/dist/progress-timer/ProgressTimer.d.ts +143 -0
  666. package/dist/progress-timer/ProgressTimer.d.ts.map +1 -0
  667. package/dist/progress-timer/ProgressTimer.js +228 -0
  668. package/dist/progress-timer/ProgressTimer.js.map +1 -0
  669. package/dist/progress-timer/ProgressTimerWebGLRenderCmd.d.ts +56 -0
  670. package/dist/progress-timer/ProgressTimerWebGLRenderCmd.d.ts.map +1 -0
  671. package/dist/progress-timer/ProgressTimerWebGLRenderCmd.js +445 -0
  672. package/dist/progress-timer/ProgressTimerWebGLRenderCmd.js.map +1 -0
  673. package/dist/progress-timer/index.d.ts +3 -0
  674. package/dist/progress-timer/index.d.ts.map +1 -0
  675. package/dist/progress-timer/index.js +3 -0
  676. package/dist/progress-timer/index.js.map +1 -0
  677. package/dist/render-texture/RenderTexture.d.ts +226 -0
  678. package/dist/render-texture/RenderTexture.d.ts.map +1 -0
  679. package/dist/render-texture/RenderTexture.js +332 -0
  680. package/dist/render-texture/RenderTexture.js.map +1 -0
  681. package/dist/render-texture/RenderTextureWebGLRenderCmd.d.ts +28 -0
  682. package/dist/render-texture/RenderTextureWebGLRenderCmd.d.ts.map +1 -0
  683. package/dist/render-texture/RenderTextureWebGLRenderCmd.js +276 -0
  684. package/dist/render-texture/RenderTextureWebGLRenderCmd.js.map +1 -0
  685. package/dist/render-texture/index.d.ts +2 -0
  686. package/dist/render-texture/index.d.ts.map +1 -0
  687. package/dist/render-texture/index.js +2 -0
  688. package/dist/render-texture/index.js.map +1 -0
  689. package/dist/shaders/GLProgram.d.ts +288 -0
  690. package/dist/shaders/GLProgram.d.ts.map +1 -0
  691. package/dist/shaders/GLProgram.js +794 -0
  692. package/dist/shaders/GLProgram.js.map +1 -0
  693. package/dist/shaders/GLProgramState.d.ts +58 -0
  694. package/dist/shaders/GLProgramState.d.ts.map +1 -0
  695. package/dist/shaders/GLProgramState.js +255 -0
  696. package/dist/shaders/GLProgramState.js.map +1 -0
  697. package/dist/shaders/GLStateCache.d.ts +97 -0
  698. package/dist/shaders/GLStateCache.d.ts.map +1 -0
  699. package/dist/shaders/GLStateCache.js +255 -0
  700. package/dist/shaders/GLStateCache.js.map +1 -0
  701. package/dist/shaders/ShaderCache.d.ts +111 -0
  702. package/dist/shaders/ShaderCache.d.ts.map +1 -0
  703. package/dist/shaders/ShaderCache.js +273 -0
  704. package/dist/shaders/ShaderCache.js.map +1 -0
  705. package/dist/shaders/Shaders.d.ts +84 -0
  706. package/dist/shaders/Shaders.d.ts.map +1 -0
  707. package/dist/shaders/Shaders.js +250 -0
  708. package/dist/shaders/Shaders.js.map +1 -0
  709. package/dist/shaders/index.d.ts +5 -0
  710. package/dist/shaders/index.d.ts.map +1 -0
  711. package/dist/shaders/index.js +5 -0
  712. package/dist/shaders/index.js.map +1 -0
  713. package/dist/shape-nodes/DrawNode.d.ts +61 -0
  714. package/dist/shape-nodes/DrawNode.d.ts.map +1 -0
  715. package/dist/shape-nodes/DrawNode.js +597 -0
  716. package/dist/shape-nodes/DrawNode.js.map +1 -0
  717. package/dist/shape-nodes/DrawNodeWebGLRenderCmd.d.ts +11 -0
  718. package/dist/shape-nodes/DrawNodeWebGLRenderCmd.d.ts.map +1 -0
  719. package/dist/shape-nodes/DrawNodeWebGLRenderCmd.js +27 -0
  720. package/dist/shape-nodes/DrawNodeWebGLRenderCmd.js.map +1 -0
  721. package/dist/text-input/IMEDispatcher.d.ts +180 -0
  722. package/dist/text-input/IMEDispatcher.d.ts.map +1 -0
  723. package/dist/text-input/IMEDispatcher.js +454 -0
  724. package/dist/text-input/IMEDispatcher.js.map +1 -0
  725. package/dist/text-input/TextFieldTTF.d.ts +219 -0
  726. package/dist/text-input/TextFieldTTF.d.ts.map +1 -0
  727. package/dist/text-input/TextFieldTTF.js +381 -0
  728. package/dist/text-input/TextFieldTTF.js.map +1 -0
  729. package/dist/textures/Texture2D.d.ts +10 -0
  730. package/dist/textures/Texture2D.d.ts.map +1 -0
  731. package/dist/textures/Texture2D.js +10 -0
  732. package/dist/textures/Texture2D.js.map +1 -0
  733. package/dist/textures/TextureAtlas.d.ts +204 -0
  734. package/dist/textures/TextureAtlas.d.ts.map +1 -0
  735. package/dist/textures/TextureAtlas.js +602 -0
  736. package/dist/textures/TextureAtlas.js.map +1 -0
  737. package/dist/textures/TextureCache.d.ts +147 -0
  738. package/dist/textures/TextureCache.d.ts.map +1 -0
  739. package/dist/textures/TextureCache.js +327 -0
  740. package/dist/textures/TextureCache.js.map +1 -0
  741. package/dist/textures/TexturesPropertyDefine.d.ts +2 -0
  742. package/dist/textures/TexturesPropertyDefine.d.ts.map +1 -0
  743. package/dist/textures/TexturesPropertyDefine.js +39 -0
  744. package/dist/textures/TexturesPropertyDefine.js.map +1 -0
  745. package/dist/textures/TexturesWebGL.d.ts +349 -0
  746. package/dist/textures/TexturesWebGL.d.ts.map +1 -0
  747. package/dist/textures/TexturesWebGL.js +765 -0
  748. package/dist/textures/TexturesWebGL.js.map +1 -0
  749. package/dist/textures/WebGLTextureCache.d.ts +2 -0
  750. package/dist/textures/WebGLTextureCache.d.ts.map +1 -0
  751. package/dist/textures/WebGLTextureCache.js +79 -0
  752. package/dist/textures/WebGLTextureCache.js.map +1 -0
  753. package/dist/textures/index.d.ts +3 -0
  754. package/dist/textures/index.d.ts.map +1 -0
  755. package/dist/textures/index.js +3 -0
  756. package/dist/textures/index.js.map +1 -0
  757. package/dist/tilemap/TGAlib.d.ts +103 -0
  758. package/dist/tilemap/TGAlib.d.ts.map +1 -0
  759. package/dist/tilemap/TGAlib.js +338 -0
  760. package/dist/tilemap/TGAlib.js.map +1 -0
  761. package/dist/tilemap/TMXLayer.d.ts +225 -0
  762. package/dist/tilemap/TMXLayer.d.ts.map +1 -0
  763. package/dist/tilemap/TMXLayer.js +694 -0
  764. package/dist/tilemap/TMXLayer.js.map +1 -0
  765. package/dist/tilemap/TMXLayerInfo.d.ts +42 -0
  766. package/dist/tilemap/TMXLayerInfo.d.ts.map +1 -0
  767. package/dist/tilemap/TMXLayerInfo.js +57 -0
  768. package/dist/tilemap/TMXLayerInfo.js.map +1 -0
  769. package/dist/tilemap/TMXLayerWebGLRenderCmd.d.ts +17 -0
  770. package/dist/tilemap/TMXLayerWebGLRenderCmd.d.ts.map +1 -0
  771. package/dist/tilemap/TMXLayerWebGLRenderCmd.js +209 -0
  772. package/dist/tilemap/TMXLayerWebGLRenderCmd.js.map +1 -0
  773. package/dist/tilemap/TMXMapInfo.d.ts +210 -0
  774. package/dist/tilemap/TMXMapInfo.d.ts.map +1 -0
  775. package/dist/tilemap/TMXMapInfo.js +614 -0
  776. package/dist/tilemap/TMXMapInfo.js.map +1 -0
  777. package/dist/tilemap/TMXObjectGroup.d.ts +70 -0
  778. package/dist/tilemap/TMXObjectGroup.d.ts.map +1 -0
  779. package/dist/tilemap/TMXObjectGroup.js +106 -0
  780. package/dist/tilemap/TMXObjectGroup.js.map +1 -0
  781. package/dist/tilemap/TMXTiledMap.d.ts +163 -0
  782. package/dist/tilemap/TMXTiledMap.d.ts.map +1 -0
  783. package/dist/tilemap/TMXTiledMap.js +347 -0
  784. package/dist/tilemap/TMXTiledMap.js.map +1 -0
  785. package/dist/tilemap/TMXTilesetInfo.d.ts +38 -0
  786. package/dist/tilemap/TMXTilesetInfo.d.ts.map +1 -0
  787. package/dist/tilemap/TMXTilesetInfo.js +59 -0
  788. package/dist/tilemap/TMXTilesetInfo.js.map +1 -0
  789. package/dist/tilemap/TMXXMLParser.d.ts +52 -0
  790. package/dist/tilemap/TMXXMLParser.d.ts.map +1 -0
  791. package/dist/tilemap/TMXXMLParser.js +52 -0
  792. package/dist/tilemap/TMXXMLParser.js.map +1 -0
  793. package/dist/tilemap/index.d.ts +4 -0
  794. package/dist/tilemap/index.d.ts.map +1 -0
  795. package/dist/tilemap/index.js +4 -0
  796. package/dist/tilemap/index.js.map +1 -0
  797. package/dist/ui/base/FocusNavigationController.d.ts +12 -0
  798. package/dist/ui/base/FocusNavigationController.d.ts.map +1 -0
  799. package/dist/ui/base/FocusNavigationController.js +54 -0
  800. package/dist/ui/base/FocusNavigationController.js.map +1 -0
  801. package/dist/ui/base/ProtectedNode.d.ts +66 -0
  802. package/dist/ui/base/ProtectedNode.d.ts.map +1 -0
  803. package/dist/ui/base/ProtectedNode.js +248 -0
  804. package/dist/ui/base/ProtectedNode.js.map +1 -0
  805. package/dist/ui/base/ProtectedNodeWebGLRenderCmd.d.ts +13 -0
  806. package/dist/ui/base/ProtectedNodeWebGLRenderCmd.d.ts.map +1 -0
  807. package/dist/ui/base/ProtectedNodeWebGLRenderCmd.js +136 -0
  808. package/dist/ui/base/ProtectedNodeWebGLRenderCmd.js.map +1 -0
  809. package/dist/ui/base/UIHelper.d.ts +48 -0
  810. package/dist/ui/base/UIHelper.d.ts.map +1 -0
  811. package/dist/ui/base/UIHelper.js +128 -0
  812. package/dist/ui/base/UIHelper.js.map +1 -0
  813. package/dist/ui/base/UIScale9Sprite.d.ts +224 -0
  814. package/dist/ui/base/UIScale9Sprite.d.ts.map +1 -0
  815. package/dist/ui/base/UIScale9Sprite.js +825 -0
  816. package/dist/ui/base/UIScale9Sprite.js.map +1 -0
  817. package/dist/ui/base/UIScale9SpriteWebGLRenderCmd.d.ts +15 -0
  818. package/dist/ui/base/UIScale9SpriteWebGLRenderCmd.d.ts.map +1 -0
  819. package/dist/ui/base/UIScale9SpriteWebGLRenderCmd.js +119 -0
  820. package/dist/ui/base/UIScale9SpriteWebGLRenderCmd.js.map +1 -0
  821. package/dist/ui/base/UIWidget.d.ts +794 -0
  822. package/dist/ui/base/UIWidget.d.ts.map +1 -0
  823. package/dist/ui/base/UIWidget.js +1634 -0
  824. package/dist/ui/base/UIWidget.js.map +1 -0
  825. package/dist/ui/base/UIWidgetRenderCmd.d.ts +9 -0
  826. package/dist/ui/base/UIWidgetRenderCmd.d.ts.map +1 -0
  827. package/dist/ui/base/UIWidgetRenderCmd.js +41 -0
  828. package/dist/ui/base/UIWidgetRenderCmd.js.map +1 -0
  829. package/dist/ui/index.d.ts +9 -0
  830. package/dist/ui/index.d.ts.map +1 -0
  831. package/dist/ui/index.js +9 -0
  832. package/dist/ui/index.js.map +1 -0
  833. package/dist/ui/layout/UILayout.d.ts +486 -0
  834. package/dist/ui/layout/UILayout.d.ts.map +1 -0
  835. package/dist/ui/layout/UILayout.js +1430 -0
  836. package/dist/ui/layout/UILayout.js.map +1 -0
  837. package/dist/ui/layout/UILayoutParameter.d.ts +344 -0
  838. package/dist/ui/layout/UILayoutParameter.d.ts.map +1 -0
  839. package/dist/ui/layout/UILayoutParameter.js +444 -0
  840. package/dist/ui/layout/UILayoutParameter.js.map +1 -0
  841. package/dist/ui/layout/UILayoutWebGLRenderCmd.d.ts +30 -0
  842. package/dist/ui/layout/UILayoutWebGLRenderCmd.d.ts.map +1 -0
  843. package/dist/ui/layout/UILayoutWebGLRenderCmd.js +136 -0
  844. package/dist/ui/layout/UILayoutWebGLRenderCmd.js.map +1 -0
  845. package/dist/ui/layout/constant.d.ts +30 -0
  846. package/dist/ui/layout/constant.d.ts.map +1 -0
  847. package/dist/ui/layout/constant.js +31 -0
  848. package/dist/ui/layout/constant.js.map +1 -0
  849. package/dist/ui/widget/UIButton.d.ts +248 -0
  850. package/dist/ui/widget/UIButton.d.ts.map +1 -0
  851. package/dist/ui/widget/UIButton.js +727 -0
  852. package/dist/ui/widget/UIButton.js.map +1 -0
  853. package/dist/ui/widget/UIRichText.d.ts +216 -0
  854. package/dist/ui/widget/UIRichText.d.ts.map +1 -0
  855. package/dist/ui/widget/UIRichText.js +549 -0
  856. package/dist/ui/widget/UIRichText.js.map +1 -0
  857. package/dist/ui/widget/UIScrollView.d.ts +547 -0
  858. package/dist/ui/widget/UIScrollView.d.ts.map +1 -0
  859. package/dist/ui/widget/UIScrollView.js +1544 -0
  860. package/dist/ui/widget/UIScrollView.js.map +1 -0
  861. package/dist/ui/widget/UIScrollViewBar.d.ts +101 -0
  862. package/dist/ui/widget/UIScrollViewBar.d.ts.map +1 -0
  863. package/dist/ui/widget/UIScrollViewBar.js +277 -0
  864. package/dist/ui/widget/UIScrollViewBar.js.map +1 -0
  865. package/dist/ui/widget/UIScrollViewWebGLRenderCmd.d.ts +10 -0
  866. package/dist/ui/widget/UIScrollViewWebGLRenderCmd.d.ts.map +1 -0
  867. package/dist/ui/widget/UIScrollViewWebGLRenderCmd.js +42 -0
  868. package/dist/ui/widget/UIScrollViewWebGLRenderCmd.js.map +1 -0
  869. package/dist/ui/widget/UISlider.d.ts +229 -0
  870. package/dist/ui/widget/UISlider.d.ts.map +1 -0
  871. package/dist/ui/widget/UISlider.js +667 -0
  872. package/dist/ui/widget/UISlider.js.map +1 -0
  873. package/dist/ui/widget/UIText.d.ts +90 -0
  874. package/dist/ui/widget/UIText.d.ts.map +1 -0
  875. package/dist/ui/widget/UIText.js +325 -0
  876. package/dist/ui/widget/UIText.js.map +1 -0
  877. package/dist/ui/widget/UITextField.d.ts +282 -0
  878. package/dist/ui/widget/UITextField.d.ts.map +1 -0
  879. package/dist/ui/widget/UITextField.js +549 -0
  880. package/dist/ui/widget/UITextField.js.map +1 -0
  881. package/dist/ui/widget/UITextFieldRenderer.d.ts +41 -0
  882. package/dist/ui/widget/UITextFieldRenderer.d.ts.map +1 -0
  883. package/dist/ui/widget/UITextFieldRenderer.js +150 -0
  884. package/dist/ui/widget/UITextFieldRenderer.js.map +1 -0
  885. package/eslint.config.ts +59 -0
  886. package/index.html +22 -0
  887. package/package.json +38 -0
  888. package/res/Button.mp3 +0 -0
  889. package/res/SmallSun.plist +108 -0
  890. package/res/Spiral.plist +102 -0
  891. package/res/base.png +0 -0
  892. package/res/button.png +0 -0
  893. package/res/button_plus.png +0 -0
  894. package/res/ortho-test1.png +0 -0
  895. package/res/orthogonal-test1.tmx +9 -0
  896. package/res/orthogonal-test1.tsx +4 -0
  897. package/res/particle.png +0 -0
  898. package/res/sliderThumb.png +0 -0
  899. package/res/sliderTrack.png +0 -0
  900. package/res/streak.png +0 -0
  901. package/res/ui.plist +578 -0
  902. package/res/ui.png +0 -0
  903. package/res/vite.svg +1 -0
  904. package/test/ActionScene.ts +15 -0
  905. package/test/DemoScene.ts +108 -0
  906. package/test/GraphicsTest.ts +17 -0
  907. package/test/ParticleScene.ts +24 -0
  908. package/test/TiledMapScene.ts +14 -0
  909. package/test/index.ts +28 -0
  910. package/vite.config.ts +13 -0
@@ -0,0 +1,794 @@
1
+ import { _renderContext, director, Game, game, Node } from '..';
2
+ import { getMat4MultiplyValue, KM_GL_MODELVIEW, KM_GL_PROJECTION, kmGLGetMatrix, kmMat4Multiply, Matrix4, modelview_matrix_stack, projection_matrix_stack, } from '../core/kazmath';
3
+ import { checkGLErrorDebug, UNIFORM_COSTIME_S, UNIFORM_MVMATRIX_S, UNIFORM_MVPMATRIX_S, UNIFORM_PMATRIX_S, UNIFORM_RANDOM01_S, UNIFORM_SAMPLER_S, UNIFORM_SINTIME_S, UNIFORM_TIME_S, } from '../core/platform/Macro';
4
+ import { log } from '../helper/Debugger';
5
+ import { loader } from '../helper/loader';
6
+ import { glDeleteProgram, glUseProgram } from './GLStateCache';
7
+ export class GLProgram {
8
+ _usesTime = false;
9
+ _projectionUpdated = -1;
10
+ static _highpSupported = null;
11
+ constructor(vShaderFileName, fShaderFileName, glContext) {
12
+ this._uniforms = {};
13
+ this._hashForUniforms = {};
14
+ this._glContext = glContext || _renderContext;
15
+ vShaderFileName && fShaderFileName && this.init(vShaderFileName, fShaderFileName);
16
+ }
17
+ // Uniform cache
18
+ _updateUniform(name, matrix, ...rest) {
19
+ if (!name)
20
+ return false;
21
+ let updated = false;
22
+ const element = this._hashForUniforms[name];
23
+ let args;
24
+ if (Array.isArray(matrix)) {
25
+ args = matrix;
26
+ }
27
+ else {
28
+ args = [matrix, ...rest];
29
+ }
30
+ if (!element || element.length !== args.length) {
31
+ this._hashForUniforms[name] = [].concat(args);
32
+ updated = true;
33
+ }
34
+ else {
35
+ for (let i = 0; i < args.length; i += 1) {
36
+ // Array and Typed Array inner values could be changed, so we must update them
37
+ if (args[i] !== element[i] || typeof args[i] === 'object') {
38
+ element[i] = args[i];
39
+ updated = true;
40
+ }
41
+ }
42
+ }
43
+ return updated;
44
+ }
45
+ _description() {
46
+ return `<CCGLProgram = ${this.toString()} | Program = ${this._programObj.toString()}, VertexShader = ${this._vertShader.toString()}, FragmentShader = ${this._fragShader.toString()}>`;
47
+ }
48
+ _compileShader(shader, type, source) {
49
+ if (!source || !shader)
50
+ return false;
51
+ const preStr = GLProgram._isHighpSupported() ? 'precision highp float;\n' : 'precision mediump float;\n';
52
+ source =
53
+ `${preStr}uniform mat4 CC_PMatrix; \n` +
54
+ 'uniform mat4 CC_MVMatrix; \n' +
55
+ 'uniform mat4 CC_MVPMatrix; \n' +
56
+ 'uniform vec4 CC_Time; \n' +
57
+ 'uniform vec4 CC_SinTime; \n' +
58
+ 'uniform vec4 CC_CosTime; \n' +
59
+ 'uniform vec4 CC_Random01; \n' +
60
+ 'uniform sampler2D CC_Texture0; \n' +
61
+ `//CC INCLUDES END \n${source}`;
62
+ this._glContext.shaderSource(shader, source);
63
+ this._glContext.compileShader(shader);
64
+ const status = this._glContext.getShaderParameter(shader, this._glContext.COMPILE_STATUS);
65
+ if (!status) {
66
+ log(`cocos2d: ERROR: Failed to compile shader:\n${this._glContext.getShaderSource(shader)}`);
67
+ if (type === this._glContext.VERTEX_SHADER)
68
+ log(`cocos2d: \n${this.vertexShaderLog()}`);
69
+ else
70
+ log(`cocos2d: \n${this.fragmentShaderLog()}`);
71
+ }
72
+ return status === true;
73
+ }
74
+ /**
75
+ * destroy program
76
+ */
77
+ destroyProgram() {
78
+ this._vertShader = null;
79
+ this._fragShader = null;
80
+ this._uniforms = null;
81
+ this._hashForUniforms = null;
82
+ this._glContext.deleteProgram(this._programObj);
83
+ }
84
+ /**
85
+ * Initializes the GLProgram with a vertex and fragment with string
86
+ * @param {String} vertShaderStr
87
+ * @param {String} fragShaderStr
88
+ * @return {Boolean}
89
+ */
90
+ initWithVertexShaderByteArray(vertShaderStr, fragShaderStr) {
91
+ const locGL = this._glContext;
92
+ this._programObj = locGL.createProgram();
93
+ //checkGLErrorDebug();
94
+ this._vertShader = null;
95
+ this._fragShader = null;
96
+ if (vertShaderStr) {
97
+ this._vertShader = locGL.createShader(locGL.VERTEX_SHADER);
98
+ if (!this._compileShader(this._vertShader, locGL.VERTEX_SHADER, vertShaderStr)) {
99
+ log('cocos2d: ERROR: Failed to compile vertex shader');
100
+ }
101
+ }
102
+ // Create and compile fragment shader
103
+ if (fragShaderStr) {
104
+ this._fragShader = locGL.createShader(locGL.FRAGMENT_SHADER);
105
+ if (!this._compileShader(this._fragShader, locGL.FRAGMENT_SHADER, fragShaderStr)) {
106
+ log('cocos2d: ERROR: Failed to compile fragment shader');
107
+ }
108
+ }
109
+ if (this._vertShader)
110
+ locGL.attachShader(this._programObj, this._vertShader);
111
+ checkGLErrorDebug();
112
+ if (this._fragShader)
113
+ locGL.attachShader(this._programObj, this._fragShader);
114
+ if (Object.keys(this._hashForUniforms).length > 0)
115
+ this._hashForUniforms = {};
116
+ checkGLErrorDebug();
117
+ return true;
118
+ }
119
+ /**
120
+ * Initializes the GLProgram with a vertex and fragment with string
121
+ * @param {String} vertShaderStr
122
+ * @param {String} fragShaderStr
123
+ * @return {Boolean}
124
+ */
125
+ initWithString(vertShaderStr, fragShaderStr) {
126
+ return this.initWithVertexShaderByteArray(vertShaderStr, fragShaderStr);
127
+ }
128
+ /**
129
+ * Initializes the CCGLProgram with a vertex and fragment with contents of filenames
130
+ * @param {String} vShaderFilename
131
+ * @param {String} fShaderFileName
132
+ * @return {Boolean}
133
+ */
134
+ initWithVertexShaderFilename(vShaderFilename, fShaderFileName) {
135
+ const vertexSource = loader.getRes(vShaderFilename);
136
+ if (!vertexSource)
137
+ throw new Error(`Please load the resource firset : ${vShaderFilename}`);
138
+ const fragmentSource = loader.getRes(fShaderFileName);
139
+ if (!fragmentSource)
140
+ throw new Error(`Please load the resource firset : ${fShaderFileName}`);
141
+ return this.initWithVertexShaderByteArray(vertexSource, fragmentSource);
142
+ }
143
+ /**
144
+ * Initializes the CCGLProgram with a vertex and fragment with contents of filenames
145
+ * @param {String} vShaderFilename
146
+ * @param {String} fShaderFileName
147
+ * @return {Boolean}
148
+ */
149
+ init(vShaderFilename, fShaderFileName) {
150
+ return this.initWithVertexShaderFilename(vShaderFilename, fShaderFileName);
151
+ }
152
+ /**
153
+ * It will add a new attribute to the shader
154
+ * @param {String} attributeName
155
+ * @param {Number} index
156
+ */
157
+ addAttribute(attributeName, index) {
158
+ this._glContext.bindAttribLocation(this._programObj, index, attributeName);
159
+ }
160
+ /**
161
+ * links the glProgram
162
+ * @return {Boolean}
163
+ */
164
+ link() {
165
+ if (!this._programObj) {
166
+ log('GLProgram.link(): Cannot link invalid program');
167
+ return false;
168
+ }
169
+ this._glContext.linkProgram(this._programObj);
170
+ if (this._vertShader)
171
+ this._glContext.deleteShader(this._vertShader);
172
+ if (this._fragShader)
173
+ this._glContext.deleteShader(this._fragShader);
174
+ this._vertShader = null;
175
+ this._fragShader = null;
176
+ if (game.config[Game.CONFIG_KEY.debugMode]) {
177
+ const status = this._glContext.getProgramParameter(this._programObj, this._glContext.LINK_STATUS);
178
+ if (!status) {
179
+ log(`cocos2d: ERROR: Failed to link program: ${this._glContext.getProgramInfoLog(this._programObj)}`);
180
+ glDeleteProgram(this._programObj);
181
+ this._programObj = null;
182
+ return false;
183
+ }
184
+ }
185
+ return true;
186
+ }
187
+ /**
188
+ * it will call glUseProgram()
189
+ */
190
+ use() {
191
+ glUseProgram(this._programObj);
192
+ }
193
+ /**
194
+ * It will create 4 uniforms:
195
+ * UNIFORM_PMATRIX
196
+ * UNIFORM_MVMATRIX
197
+ * UNIFORM_MVPMATRIX
198
+ * UNIFORM_SAMPLER
199
+ */
200
+ updateUniforms() {
201
+ this._addUniformLocation(UNIFORM_PMATRIX_S);
202
+ this._addUniformLocation(UNIFORM_MVMATRIX_S);
203
+ this._addUniformLocation(UNIFORM_MVPMATRIX_S);
204
+ this._addUniformLocation(UNIFORM_TIME_S);
205
+ this._addUniformLocation(UNIFORM_SINTIME_S);
206
+ this._addUniformLocation(UNIFORM_COSTIME_S);
207
+ this._addUniformLocation(UNIFORM_RANDOM01_S);
208
+ this._addUniformLocation(UNIFORM_SAMPLER_S);
209
+ this._usesTime =
210
+ this._uniforms[UNIFORM_TIME_S] != null || this._uniforms[UNIFORM_SINTIME_S] != null || this._uniforms[UNIFORM_COSTIME_S] != null;
211
+ this.use();
212
+ // Since sample most probably won't change, set it to 0 now.
213
+ this.setUniformLocationWith1i(this._uniforms[UNIFORM_SAMPLER_S], 0);
214
+ }
215
+ _addUniformLocation(name) {
216
+ const location = this._glContext.getUniformLocation(this._programObj, name);
217
+ if (location)
218
+ location._name = name;
219
+ this._uniforms[name] = location;
220
+ return location;
221
+ }
222
+ /**
223
+ * calls retrieves the named uniform location for this shader program.
224
+ * @param {String} name
225
+ * @returns {Number}
226
+ */
227
+ getUniformLocationForName(name) {
228
+ if (!name)
229
+ throw new Error('GLProgram.getUniformLocationForName(): uniform name should be non-null');
230
+ if (!this._programObj)
231
+ throw new Error('GLProgram.getUniformLocationForName(): Invalid operation. Cannot get uniform location when program is not initialized');
232
+ const location = this._uniforms[name] || this._addUniformLocation(name);
233
+ return location;
234
+ }
235
+ /**
236
+ * get uniform MVP matrix
237
+ * @returns {WebGLUniformLocation}
238
+ */
239
+ getUniformMVPMatrix() {
240
+ return this._uniforms[UNIFORM_MVPMATRIX_S];
241
+ }
242
+ /**
243
+ * get uniform sampler
244
+ * @returns {WebGLUniformLocation}
245
+ */
246
+ getUniformSampler() {
247
+ return this._uniforms[UNIFORM_SAMPLER_S];
248
+ }
249
+ /**
250
+ * calls glUniform1i only if the values are different than the previous call for this same shader program.
251
+ * @param {WebGLUniformLocation|String} location
252
+ * @param {Number} i1
253
+ */
254
+ setUniformLocationWith1i(location, i1) {
255
+ const isString = typeof location === 'string';
256
+ const name = isString ? location : location?._name;
257
+ if (name) {
258
+ if (this._updateUniform(name, i1)) {
259
+ if (isString)
260
+ location = this.getUniformLocationForName(name);
261
+ this._glContext.uniform1i(location, i1);
262
+ }
263
+ }
264
+ else {
265
+ this._glContext.uniform1i(location, i1);
266
+ }
267
+ }
268
+ /**
269
+ * calls glUniform2i only if the values are different than the previous call for this same shader program.
270
+ * @param {WebGLUniformLocation|String} location
271
+ * @param {Number} i1
272
+ * @param {Number} i2
273
+ */
274
+ setUniformLocationWith2i(location, i1, i2) {
275
+ const isString = typeof location === 'string';
276
+ const name = isString ? location : location && location._name;
277
+ if (name) {
278
+ if (this._updateUniform(name, i1, i2)) {
279
+ if (isString)
280
+ location = this.getUniformLocationForName(name);
281
+ this._glContext.uniform2i(location, i1, i2);
282
+ }
283
+ }
284
+ else {
285
+ this._glContext.uniform2i(location, i1, i2);
286
+ }
287
+ }
288
+ /**
289
+ * calls glUniform3i only if the values are different than the previous call for this same shader program.
290
+ * @param {WebGLUniformLocation|String} location
291
+ * @param {Number} i1
292
+ * @param {Number} i2
293
+ * @param {Number} i3
294
+ */
295
+ setUniformLocationWith3i(location, i1, i2, i3) {
296
+ const isString = typeof location === 'string';
297
+ const name = isString ? location : location && location._name;
298
+ if (name) {
299
+ if (this._updateUniform(name, i1, i2, i3)) {
300
+ if (isString)
301
+ location = this.getUniformLocationForName(name);
302
+ this._glContext.uniform3i(location, i1, i2, i3);
303
+ }
304
+ }
305
+ else {
306
+ this._glContext.uniform3i(location, i1, i2, i3);
307
+ }
308
+ }
309
+ /**
310
+ * calls glUniform4i only if the values are different than the previous call for this same shader program.
311
+ * @param {WebGLUniformLocation|String} location
312
+ * @param {Number} i1
313
+ * @param {Number} i2
314
+ * @param {Number} i3
315
+ * @param {Number} i4
316
+ */
317
+ setUniformLocationWith4i(location, i1, i2, i3, i4) {
318
+ const isString = typeof location === 'string';
319
+ const name = isString ? location : location && location._name;
320
+ if (name) {
321
+ if (this._updateUniform(name, i1, i2, i3, i4)) {
322
+ if (isString)
323
+ location = this.getUniformLocationForName(name);
324
+ this._glContext.uniform4i(location, i1, i2, i3, i4);
325
+ }
326
+ }
327
+ else {
328
+ this._glContext.uniform4i(location, i1, i2, i3, i4);
329
+ }
330
+ }
331
+ /**
332
+ * calls glUniform2iv
333
+ * @param {WebGLUniformLocation|String} location
334
+ * @param {Int32Array} intArray
335
+ * @param {Number} numberOfArrays
336
+ */
337
+ setUniformLocationWith2iv(location, intArray) {
338
+ const isString = typeof location === 'string';
339
+ const name = isString ? location : location && location._name;
340
+ if (name) {
341
+ if (this._updateUniform(name, intArray)) {
342
+ if (isString)
343
+ location = this.getUniformLocationForName(name);
344
+ this._glContext.uniform2iv(location, intArray);
345
+ }
346
+ }
347
+ else {
348
+ this._glContext.uniform2iv(location, intArray);
349
+ }
350
+ }
351
+ /**
352
+ * calls glUniform3iv
353
+ * @param {WebGLUniformLocation|String} location
354
+ * @param {Int32Array} intArray
355
+ */
356
+ setUniformLocationWith3iv(location, intArray) {
357
+ const isString = typeof location === 'string';
358
+ const name = isString ? location : location && location._name;
359
+ if (name) {
360
+ if (this._updateUniform(name, intArray)) {
361
+ if (isString)
362
+ location = this.getUniformLocationForName(name);
363
+ this._glContext.uniform3iv(location, intArray);
364
+ }
365
+ }
366
+ else {
367
+ this._glContext.uniform3iv(location, intArray);
368
+ }
369
+ }
370
+ /**
371
+ * calls glUniform4iv
372
+ * @param {WebGLUniformLocation|String} location
373
+ * @param {Int32Array} intArray
374
+ */
375
+ setUniformLocationWith4iv(location, intArray) {
376
+ const isString = typeof location === 'string';
377
+ const name = isString ? location : location && location._name;
378
+ if (name) {
379
+ if (this._updateUniform(name, intArray)) {
380
+ if (isString)
381
+ location = this.getUniformLocationForName(name);
382
+ this._glContext.uniform4iv(location, intArray);
383
+ }
384
+ }
385
+ else {
386
+ this._glContext.uniform4iv(location, intArray);
387
+ }
388
+ }
389
+ /**
390
+ * calls glUniform1i only if the values are different than the previous call for this same shader program.
391
+ * @param {WebGLUniformLocation|String} location
392
+ * @param {Number} i1
393
+ */
394
+ setUniformLocationI32(location, i1) {
395
+ this.setUniformLocationWith1i(location, i1);
396
+ }
397
+ /**
398
+ * calls glUniform1f only if the values are different than the previous call for this same shader program.
399
+ * @param {WebGLUniformLocation|String} location
400
+ * @param {Number} f1
401
+ */
402
+ setUniformLocationWith1f(location, f1) {
403
+ const isString = typeof location === 'string';
404
+ const name = isString ? location : location && location._name;
405
+ if (name) {
406
+ if (this._updateUniform(name, f1)) {
407
+ if (isString)
408
+ location = this.getUniformLocationForName(name);
409
+ this._glContext.uniform1f(location, f1);
410
+ }
411
+ }
412
+ else {
413
+ this._glContext.uniform1f(location, f1);
414
+ }
415
+ }
416
+ /**
417
+ * calls glUniform2f only if the values are different than the previous call for this same shader program.
418
+ * @param {WebGLUniformLocation|String} location
419
+ * @param {Number} f1
420
+ * @param {Number} f2
421
+ */
422
+ setUniformLocationWith2f(location, f1, f2) {
423
+ const isString = typeof location === 'string';
424
+ const name = isString ? location : location && location._name;
425
+ if (name) {
426
+ if (this._updateUniform(name, f1, f2)) {
427
+ if (isString)
428
+ location = this.getUniformLocationForName(name);
429
+ this._glContext.uniform2f(location, f1, f2);
430
+ }
431
+ }
432
+ else {
433
+ this._glContext.uniform2f(location, f1, f2);
434
+ }
435
+ }
436
+ /**
437
+ * calls glUniform3f only if the values are different than the previous call for this same shader program.
438
+ * @param {WebGLUniformLocation|String} location
439
+ * @param {Number} f1
440
+ * @param {Number} f2
441
+ * @param {Number} f3
442
+ */
443
+ setUniformLocationWith3f(location, f1, f2, f3) {
444
+ const isString = typeof location === 'string';
445
+ const name = isString ? location : location && location._name;
446
+ if (name) {
447
+ if (this._updateUniform(name, f1, f2, f3)) {
448
+ if (isString)
449
+ location = this.getUniformLocationForName(name);
450
+ this._glContext.uniform3f(location, f1, f2, f3);
451
+ }
452
+ }
453
+ else {
454
+ this._glContext.uniform3f(location, f1, f2, f3);
455
+ }
456
+ }
457
+ /**
458
+ * calls glUniform4f only if the values are different than the previous call for this same shader program.
459
+ * @param {WebGLUniformLocation|String} location
460
+ * @param {Number} f1
461
+ * @param {Number} f2
462
+ * @param {Number} f3
463
+ * @param {Number} f4
464
+ */
465
+ setUniformLocationWith4f(location, f1, f2, f3, f4) {
466
+ const isString = typeof location === 'string';
467
+ const name = isString ? location : location && location._name;
468
+ if (name) {
469
+ if (this._updateUniform(name, f1, f2, f3, f4)) {
470
+ if (isString)
471
+ location = this.getUniformLocationForName(name);
472
+ this._glContext.uniform4f(location, f1, f2, f3, f4);
473
+ }
474
+ }
475
+ else {
476
+ this._glContext.uniform4f(location, f1, f2, f3, f4);
477
+ log('uniform4f', f1, f2, f3, f4);
478
+ }
479
+ }
480
+ /**
481
+ * calls glUniform2fv
482
+ * @param {WebGLUniformLocation|String} location
483
+ * @param {Float32Array} floatArray
484
+ */
485
+ setUniformLocationWith2fv(location, floatArray) {
486
+ const isString = typeof location === 'string';
487
+ const name = isString ? location : location && location._name;
488
+ if (name) {
489
+ if (this._updateUniform(name, floatArray)) {
490
+ if (isString)
491
+ location = this.getUniformLocationForName(name);
492
+ this._glContext.uniform2fv(location, floatArray);
493
+ }
494
+ }
495
+ else {
496
+ this._glContext.uniform2fv(location, floatArray);
497
+ }
498
+ }
499
+ /**
500
+ * calls glUniform3fv
501
+ * @param {WebGLUniformLocation|String} location
502
+ * @param {Float32Array} floatArray
503
+ */
504
+ setUniformLocationWith3fv(location, floatArray) {
505
+ const isString = typeof location === 'string';
506
+ const name = isString ? location : location && location._name;
507
+ if (name) {
508
+ if (this._updateUniform(name, floatArray)) {
509
+ if (isString)
510
+ location = this.getUniformLocationForName(name);
511
+ this._glContext.uniform3fv(location, floatArray);
512
+ }
513
+ }
514
+ else {
515
+ this._glContext.uniform3fv(location, floatArray);
516
+ }
517
+ }
518
+ /**
519
+ * calls glUniform4fv
520
+ * @param {WebGLUniformLocation|String} location
521
+ * @param {Float32Array} floatArray
522
+ */
523
+ setUniformLocationWith4fv(location, floatArray) {
524
+ const isString = typeof location === 'string';
525
+ const name = isString ? location : location && location._name;
526
+ if (name) {
527
+ if (this._updateUniform(name, floatArray)) {
528
+ if (isString)
529
+ location = this.getUniformLocationForName(name);
530
+ this._glContext.uniform4fv(location, floatArray);
531
+ }
532
+ }
533
+ else {
534
+ this._glContext.uniform4fv(location, floatArray);
535
+ log('uniform4fv', floatArray);
536
+ }
537
+ }
538
+ /**
539
+ * calls glUniformMatrix2fv
540
+ * @param {WebGLUniformLocation|String} location
541
+ * @param {Float32Array} matrixArray
542
+ */
543
+ setUniformLocationWithMatrix2fv(location, matrixArray) {
544
+ const isString = typeof location === 'string';
545
+ const name = isString ? location : location && location._name;
546
+ if (name) {
547
+ if (this._updateUniform(name, matrixArray)) {
548
+ if (isString)
549
+ location = this.getUniformLocationForName(name);
550
+ this._glContext.uniformMatrix2fv(location, false, matrixArray);
551
+ }
552
+ }
553
+ else {
554
+ this._glContext.uniformMatrix2fv(location, false, matrixArray);
555
+ }
556
+ }
557
+ /**
558
+ * calls glUniformMatrix3fv
559
+ * @param {WebGLUniformLocation|String} location
560
+ * @param {Float32Array} matrixArray
561
+ */
562
+ setUniformLocationWithMatrix3fv(location, matrixArray) {
563
+ console.log('setUniformLocationWithMatrix4fv', location, matrixArray);
564
+ const isString = typeof location === 'string';
565
+ const name = isString ? location : location && location._name;
566
+ if (name) {
567
+ if (this._updateUniform(name, matrixArray)) {
568
+ if (isString)
569
+ location = this.getUniformLocationForName(name);
570
+ this._glContext.uniformMatrix3fv(location, false, matrixArray);
571
+ }
572
+ }
573
+ else {
574
+ this._glContext.uniformMatrix3fv(location, false, matrixArray);
575
+ }
576
+ }
577
+ /**
578
+ * calls glUniformMatrix4fv
579
+ * @param {WebGLUniformLocation|String} location
580
+ * @param {Float32Array} matrixArray
581
+ */
582
+ setUniformLocationWithMatrix4fv(location, matrixArray, v1) {
583
+ // console.log('setUniformLocationWithMatrix4fv', location, matrixArray)
584
+ const isString = typeof location === 'string';
585
+ const name = isString ? location : location && location._name;
586
+ if (name) {
587
+ if (this._updateUniform(name, matrixArray)) {
588
+ if (isString)
589
+ location = this.getUniformLocationForName(name);
590
+ this._glContext.uniformMatrix4fv(location, false, matrixArray);
591
+ }
592
+ }
593
+ else {
594
+ this._glContext.uniformMatrix4fv(location, false, matrixArray);
595
+ }
596
+ }
597
+ setUniformLocationF32(...args) {
598
+ if (args.length < 2)
599
+ return;
600
+ switch (args.length) {
601
+ case 2:
602
+ this.setUniformLocationWith1f(args[0], args[1]);
603
+ break;
604
+ case 3:
605
+ this.setUniformLocationWith2f(args[0], args[1], args[2]);
606
+ break;
607
+ case 4:
608
+ this.setUniformLocationWith3f(args[0], args[1], args[2], args[3]);
609
+ break;
610
+ case 5:
611
+ this.setUniformLocationWith4f(args[0], args[1], args[2], args[3], args[4]);
612
+ break;
613
+ }
614
+ }
615
+ /**
616
+ * will update the builtin uniforms if they are different than the previous call for this same shader program.
617
+ */
618
+ setUniformsForBuiltins() {
619
+ const matrixP = new Matrix4();
620
+ const matrixMV = new Matrix4();
621
+ const matrixMVP = new Matrix4();
622
+ kmGLGetMatrix(KM_GL_PROJECTION, matrixP);
623
+ kmGLGetMatrix(KM_GL_MODELVIEW, matrixMV);
624
+ kmMat4Multiply(matrixMVP, matrixP, matrixMV);
625
+ this.setUniformLocationWithMatrix4fv(this._uniforms[UNIFORM_PMATRIX_S], matrixP.mat, 1);
626
+ this.setUniformLocationWithMatrix4fv(this._uniforms[UNIFORM_MVMATRIX_S], matrixMV.mat, 1);
627
+ this.setUniformLocationWithMatrix4fv(this._uniforms[UNIFORM_MVPMATRIX_S], matrixMVP.mat, 1);
628
+ if (this._usesTime) {
629
+ // This doesn't give the most accurate global time value.
630
+ // Cocos2D doesn't store a high precision time value, so this will have to do.
631
+ // Getting Mach time per frame per shader using time could be extremely expensive.
632
+ const time = director.getTotalFrames() * director.getAnimationInterval();
633
+ this.setUniformLocationWith4f(this._uniforms[UNIFORM_TIME_S], time / 10.0, time, time * 2, time * 4);
634
+ this.setUniformLocationWith4f(this._uniforms[UNIFORM_SINTIME_S], time / 8.0, time / 4.0, time / 2.0, Math.sin(time));
635
+ this.setUniformLocationWith4f(this._uniforms[UNIFORM_COSTIME_S], time / 8.0, time / 4.0, time / 2.0, Math.cos(time));
636
+ }
637
+ if (this._uniforms[UNIFORM_RANDOM01_S] !== -1)
638
+ this.setUniformLocationWith4f(this._uniforms[UNIFORM_RANDOM01_S], Math.random(), Math.random(), Math.random(), Math.random());
639
+ }
640
+ _setUniformsForBuiltinsForRenderer(node) {
641
+ if (!node || !node._renderCmd)
642
+ return;
643
+ const matrixP = new Matrix4();
644
+ //var matrixMV = new kmMat4();
645
+ const matrixMVP = new Matrix4();
646
+ kmGLGetMatrix(KM_GL_PROJECTION, matrixP);
647
+ //kmGLGetMatrix(KM_GL_MODELVIEW, node._stackMatrix);
648
+ kmMat4Multiply(matrixMVP, matrixP, node._renderCmd._stackMatrix);
649
+ this.setUniformLocationWithMatrix4fv(this._uniforms[UNIFORM_PMATRIX_S], matrixP.mat, 1);
650
+ this.setUniformLocationWithMatrix4fv(this._uniforms[UNIFORM_MVMATRIX_S], node._renderCmd._stackMatrix.mat, 1);
651
+ this.setUniformLocationWithMatrix4fv(this._uniforms[UNIFORM_MVPMATRIX_S], matrixMVP.mat, 1);
652
+ if (this._usesTime) {
653
+ // This doesn't give the most accurate global time value.
654
+ // Cocos2D doesn't store a high precision time value, so this will have to do.
655
+ // Getting Mach time per frame per shader using time could be extremely expensive.
656
+ const time = director.getTotalFrames() * director.getAnimationInterval();
657
+ this.setUniformLocationWith4f(this._uniforms[UNIFORM_TIME_S], time / 10.0, time, time * 2, time * 4);
658
+ this.setUniformLocationWith4f(this._uniforms[UNIFORM_SINTIME_S], time / 8.0, time / 4.0, time / 2.0, Math.sin(time));
659
+ this.setUniformLocationWith4f(this._uniforms[UNIFORM_COSTIME_S], time / 8.0, time / 4.0, time / 2.0, Math.cos(time));
660
+ }
661
+ if (this._uniforms[UNIFORM_RANDOM01_S] !== -1)
662
+ this.setUniformLocationWith4f(this._uniforms[UNIFORM_RANDOM01_S], Math.random(), Math.random(), Math.random(), Math.random());
663
+ }
664
+ /**
665
+ * will update the MVP matrix on the MVP uniform if it is different than the previous call for this same shader program.
666
+ */
667
+ setUniformForModelViewProjectionMatrix() {
668
+ this.setUniformLocationWithMatrix4fv(this._uniforms[UNIFORM_MVPMATRIX_S], getMat4MultiplyValue(projection_matrix_stack.top, modelview_matrix_stack.top));
669
+ }
670
+ setUniformForModelViewProjectionMatrixWithMat4(swapMat4) {
671
+ kmMat4Multiply(swapMat4, projection_matrix_stack.top, modelview_matrix_stack.top);
672
+ this.setUniformLocationWithMatrix4fv(this._uniforms[UNIFORM_MVPMATRIX_S], swapMat4.mat);
673
+ }
674
+ setUniformForModelViewAndProjectionMatrixWithMat4() {
675
+ this.setUniformLocationWithMatrix4fv(this._uniforms[UNIFORM_MVMATRIX_S], modelview_matrix_stack.top.mat);
676
+ this.setUniformLocationWithMatrix4fv(this._uniforms[UNIFORM_PMATRIX_S], projection_matrix_stack.top.mat);
677
+ }
678
+ _setUniformForMVPMatrixWithMat4(modelViewMatrix) {
679
+ if (!modelViewMatrix)
680
+ throw new Error('modelView matrix is undefined.');
681
+ this.setUniformLocationWithMatrix4fv(this._uniforms[UNIFORM_MVMATRIX_S], modelViewMatrix.mat);
682
+ this.setUniformLocationWithMatrix4fv(this._uniforms[UNIFORM_PMATRIX_S], projection_matrix_stack.top.mat);
683
+ }
684
+ _updateProjectionUniform() {
685
+ const stack = projection_matrix_stack;
686
+ if (stack.lastUpdated !== this._projectionUpdated) {
687
+ this._glContext.uniformMatrix4fv(this._uniforms[UNIFORM_PMATRIX_S], false, stack.top.mat);
688
+ this._projectionUpdated = stack.lastUpdated;
689
+ }
690
+ }
691
+ /**
692
+ * returns the vertexShader error log
693
+ * @return {String}
694
+ */
695
+ vertexShaderLog() {
696
+ return this._glContext.getShaderInfoLog(this._vertShader);
697
+ }
698
+ /**
699
+ * returns the vertexShader error log
700
+ * @return {String}
701
+ */
702
+ getVertexShaderLog() {
703
+ return this._glContext.getShaderInfoLog(this._vertShader);
704
+ }
705
+ /**
706
+ * returns the fragmentShader error log
707
+ * @returns {String}
708
+ */
709
+ getFragmentShaderLog() {
710
+ return this._glContext.getShaderInfoLog(this._vertShader);
711
+ }
712
+ /**
713
+ * returns the fragmentShader error log
714
+ * @return {String}
715
+ */
716
+ fragmentShaderLog() {
717
+ return this._glContext.getShaderInfoLog(this._fragShader);
718
+ }
719
+ /**
720
+ * returns the program error log
721
+ * @return {String}
722
+ */
723
+ programLog() {
724
+ return this._glContext.getProgramInfoLog(this._programObj);
725
+ }
726
+ /**
727
+ * returns the program error log
728
+ * @return {String}
729
+ */
730
+ getProgramLog() {
731
+ return this._glContext.getProgramInfoLog(this._programObj);
732
+ }
733
+ /**
734
+ * reload all shaders, this function is designed for android <br/>
735
+ * when opengl context lost, so don't call it.
736
+ */
737
+ reset() {
738
+ this._vertShader = null;
739
+ this._fragShader = null;
740
+ if (Object.keys(this._uniforms).length > 0)
741
+ this._uniforms = {};
742
+ // it is already deallocated by android
743
+ //ccGLDeleteProgram(m_uProgram);
744
+ this._glContext.deleteProgram(this._programObj);
745
+ this._programObj = null;
746
+ // Purge uniform hash
747
+ if (Object.keys(this._hashForUniforms).length > 0)
748
+ this._hashForUniforms = {};
749
+ }
750
+ /**
751
+ * get WebGLProgram object
752
+ * @return {WebGLProgram}
753
+ */
754
+ getProgram() {
755
+ return this._programObj;
756
+ }
757
+ /**
758
+ * Currently JavaScript Bindings (JSB), in some cases, needs to use retain and release. This is a bug in JSB,
759
+ * and the ugly workaround is to use retain/release. So, these 2 methods were added to be compatible with JSB.
760
+ * This is a hack, and should be removed once JSB fixes the retain/release bug
761
+ */
762
+ retain() { }
763
+ release() { }
764
+ static _isHighpSupported() {
765
+ const ctx = _renderContext;
766
+ if (ctx.getShaderPrecisionFormat && GLProgram._highpSupported == null) {
767
+ const highp = ctx.getShaderPrecisionFormat(ctx.FRAGMENT_SHADER, ctx.HIGH_FLOAT);
768
+ GLProgram._highpSupported = highp.precision !== 0;
769
+ }
770
+ return GLProgram._highpSupported;
771
+ }
772
+ }
773
+ /**
774
+ * <p>
775
+ * Sets the shader program for this node
776
+ *
777
+ * Since v2.0, each rendering node must set its shader program.
778
+ * It should be set in initialize phase.
779
+ * </p>
780
+ * @function
781
+ * @param {Node} node
782
+ * @param {GLProgram} program The shader program which fetches from CCShaderCache.
783
+ * @example
784
+ * setGLProgram(node, shaderCache.programForKey(SHADER_POSITION_TEXTURECOLOR));
785
+ */
786
+ export function setProgram(node, program) {
787
+ node.shaderProgram = program;
788
+ const children = node.children;
789
+ if (!children)
790
+ return;
791
+ for (let i = 0; i < children.length; i++)
792
+ setProgram(children[i], program);
793
+ }
794
+ //# sourceMappingURL=GLProgram.js.map