@lightningjs/renderer 2.13.4 → 2.14.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 (293) hide show
  1. package/LICENSE +202 -202
  2. package/NOTICE +3 -3
  3. package/README.md +147 -147
  4. package/dist/src/core/CoreTextureManager.d.ts +3 -8
  5. package/dist/src/core/CoreTextureManager.js +34 -63
  6. package/dist/src/core/CoreTextureManager.js.map +1 -1
  7. package/dist/src/core/TextureMemoryManager.d.ts +6 -0
  8. package/dist/src/core/TextureMemoryManager.js +15 -8
  9. package/dist/src/core/TextureMemoryManager.js.map +1 -1
  10. package/dist/src/core/renderers/webgl/WebGlCoreShader.destroy.js +2 -0
  11. package/dist/src/core/renderers/webgl/WebGlCoreShader.destroy.js.map +1 -0
  12. package/dist/src/core/renderers/webgl/shaders/DefaultShader.js +45 -45
  13. package/dist/src/core/renderers/webgl/shaders/DefaultShaderBatched.js +61 -61
  14. package/dist/src/core/renderers/webgl/shaders/DynamicShader.js +93 -93
  15. package/dist/src/core/renderers/webgl/shaders/RoundedRectangle.js +63 -63
  16. package/dist/src/core/renderers/webgl/shaders/SdfShader.js +62 -62
  17. package/dist/src/core/renderers/webgl/shaders/effects/BorderBottomEffect.js +15 -15
  18. package/dist/src/core/renderers/webgl/shaders/effects/BorderEffect.js +6 -6
  19. package/dist/src/core/renderers/webgl/shaders/effects/BorderLeftEffect.js +15 -15
  20. package/dist/src/core/renderers/webgl/shaders/effects/BorderRightEffect.js +15 -15
  21. package/dist/src/core/renderers/webgl/shaders/effects/BorderTopEffect.js +15 -15
  22. package/dist/src/core/renderers/webgl/shaders/effects/FadeOutEffect.js +42 -42
  23. package/dist/src/core/renderers/webgl/shaders/effects/GlitchEffect.js +44 -44
  24. package/dist/src/core/renderers/webgl/shaders/effects/GrayscaleEffect.js +3 -3
  25. package/dist/src/core/renderers/webgl/shaders/effects/HolePunchEffect.js +22 -22
  26. package/dist/src/core/renderers/webgl/shaders/effects/LinearGradientEffect.js +28 -28
  27. package/dist/src/core/renderers/webgl/shaders/effects/RadialGradientEffect.js +10 -10
  28. package/dist/src/core/renderers/webgl/shaders/effects/RadialProgressEffect.js +37 -37
  29. package/dist/src/core/renderers/webgl/shaders/effects/RadiusEffect.js +19 -19
  30. package/dist/src/core/textures/Texture.d.ts +8 -0
  31. package/dist/src/core/textures/Texture.js +13 -0
  32. package/dist/src/core/textures/Texture.js.map +1 -1
  33. package/dist/tsconfig.dist.tsbuildinfo +1 -1
  34. package/exports/canvas.ts +39 -39
  35. package/exports/index.ts +89 -89
  36. package/exports/inspector.ts +24 -24
  37. package/exports/utils.ts +44 -44
  38. package/exports/webgl.ts +38 -38
  39. package/package.json +1 -1
  40. package/scripts/please-use-pnpm.js +13 -13
  41. package/src/common/CommonTypes.ts +146 -146
  42. package/src/common/EventEmitter.ts +77 -77
  43. package/src/common/IAnimationController.ts +92 -92
  44. package/src/common/IEventEmitter.ts +28 -28
  45. package/src/core/CoreNode.test.ts +202 -202
  46. package/src/core/CoreNode.ts +2462 -2462
  47. package/src/core/CoreShaderManager.ts +292 -292
  48. package/src/core/CoreTextNode.ts +455 -455
  49. package/src/core/CoreTextureManager.ts +558 -604
  50. package/src/core/Stage.ts +743 -743
  51. package/src/core/TextureMemoryManager.ts +404 -395
  52. package/src/core/animations/AnimationManager.ts +38 -38
  53. package/src/core/animations/CoreAnimation.ts +347 -347
  54. package/src/core/animations/CoreAnimationController.ts +164 -164
  55. package/src/core/lib/ContextSpy.ts +41 -41
  56. package/src/core/lib/ImageWorker.ts +280 -280
  57. package/src/core/lib/Matrix3d.ts +244 -244
  58. package/src/core/lib/RenderCoords.ts +86 -86
  59. package/src/core/lib/WebGlContextWrapper.ts +1332 -1332
  60. package/src/core/lib/textureCompression.ts +152 -152
  61. package/src/core/lib/textureSvg.ts +78 -78
  62. package/src/core/lib/utils.ts +384 -384
  63. package/src/core/lib/validateImageBitmap.ts +76 -76
  64. package/src/core/platform.ts +63 -63
  65. package/src/core/renderers/CoreContextTexture.ts +43 -43
  66. package/src/core/renderers/CoreRenderOp.ts +22 -22
  67. package/src/core/renderers/CoreRenderer.ts +115 -115
  68. package/src/core/renderers/CoreShader.ts +41 -41
  69. package/src/core/renderers/canvas/CanvasCoreRenderer.ts +375 -375
  70. package/src/core/renderers/canvas/CanvasCoreTexture.ts +153 -153
  71. package/src/core/renderers/canvas/internal/C2DShaderUtils.ts +231 -231
  72. package/src/core/renderers/canvas/internal/ColorUtils.ts +69 -69
  73. package/src/core/renderers/canvas/shaders/UnsupportedShader.ts +48 -48
  74. package/src/core/renderers/webgl/WebGlCoreCtxRenderTexture.ts +86 -86
  75. package/src/core/renderers/webgl/WebGlCoreCtxSubTexture.ts +50 -50
  76. package/src/core/renderers/webgl/WebGlCoreCtxTexture.ts +301 -301
  77. package/src/core/renderers/webgl/WebGlCoreRenderOp.ts +125 -125
  78. package/src/core/renderers/webgl/WebGlCoreRenderer.ts +815 -815
  79. package/src/core/renderers/webgl/WebGlCoreShader.ts +362 -362
  80. package/src/core/renderers/webgl/internal/BufferCollection.ts +54 -54
  81. package/src/core/renderers/webgl/internal/RendererUtils.ts +155 -155
  82. package/src/core/renderers/webgl/internal/ShaderUtils.ts +143 -143
  83. package/src/core/renderers/webgl/internal/WebGlUtils.ts +35 -35
  84. package/src/core/renderers/webgl/shaders/DefaultShader.ts +93 -93
  85. package/src/core/renderers/webgl/shaders/DefaultShaderBatched.ts +132 -132
  86. package/src/core/renderers/webgl/shaders/DynamicShader.ts +580 -580
  87. package/src/core/renderers/webgl/shaders/RoundedRectangle.ts +167 -167
  88. package/src/core/renderers/webgl/shaders/SdfShader.ts +204 -204
  89. package/src/core/renderers/webgl/shaders/effects/BorderBottomEffect.ts +101 -101
  90. package/src/core/renderers/webgl/shaders/effects/BorderEffect.ts +87 -87
  91. package/src/core/renderers/webgl/shaders/effects/BorderLeftEffect.ts +101 -101
  92. package/src/core/renderers/webgl/shaders/effects/BorderRightEffect.ts +101 -101
  93. package/src/core/renderers/webgl/shaders/effects/BorderTopEffect.ts +101 -101
  94. package/src/core/renderers/webgl/shaders/effects/EffectUtils.ts +159 -159
  95. package/src/core/renderers/webgl/shaders/effects/FadeOutEffect.ts +127 -127
  96. package/src/core/renderers/webgl/shaders/effects/GlitchEffect.ts +148 -148
  97. package/src/core/renderers/webgl/shaders/effects/GrayscaleEffect.ts +67 -67
  98. package/src/core/renderers/webgl/shaders/effects/HolePunchEffect.ts +157 -157
  99. package/src/core/renderers/webgl/shaders/effects/LinearGradientEffect.ts +171 -171
  100. package/src/core/renderers/webgl/shaders/effects/RadialGradientEffect.ts +168 -168
  101. package/src/core/renderers/webgl/shaders/effects/RadialProgressEffect.ts +187 -187
  102. package/src/core/renderers/webgl/shaders/effects/RadiusEffect.ts +110 -110
  103. package/src/core/renderers/webgl/shaders/effects/ShaderEffect.ts +196 -196
  104. package/src/core/text-rendering/TextRenderingUtils.ts +36 -36
  105. package/src/core/text-rendering/TextTextureRendererUtils.ts +263 -263
  106. package/src/core/text-rendering/TrFontManager.ts +183 -183
  107. package/src/core/text-rendering/font-face-types/SdfTrFontFace/SdfTrFontFace.ts +176 -176
  108. package/src/core/text-rendering/font-face-types/SdfTrFontFace/internal/FontShaper.ts +139 -139
  109. package/src/core/text-rendering/font-face-types/SdfTrFontFace/internal/SdfFontShaper.test.ts +173 -173
  110. package/src/core/text-rendering/font-face-types/SdfTrFontFace/internal/SdfFontShaper.ts +171 -171
  111. package/src/core/text-rendering/font-face-types/TrFontFace.ts +187 -187
  112. package/src/core/text-rendering/font-face-types/WebTrFontFace.ts +94 -94
  113. package/src/core/text-rendering/font-face-types/utils.ts +39 -39
  114. package/src/core/text-rendering/renderers/CanvasTextRenderer.ts +509 -509
  115. package/src/core/text-rendering/renderers/LightningTextTextureRenderer.ts +808 -808
  116. package/src/core/text-rendering/renderers/SdfTextRenderer/SdfTextRenderer.ts +853 -853
  117. package/src/core/text-rendering/renderers/SdfTextRenderer/internal/PeekableGenerator.test.ts +48 -48
  118. package/src/core/text-rendering/renderers/SdfTextRenderer/internal/PeekableGenerator.ts +66 -66
  119. package/src/core/text-rendering/renderers/SdfTextRenderer/internal/SpecialCodepoints.ts +52 -52
  120. package/src/core/text-rendering/renderers/SdfTextRenderer/internal/constants.ts +32 -32
  121. package/src/core/text-rendering/renderers/SdfTextRenderer/internal/getStartConditions.ts +117 -117
  122. package/src/core/text-rendering/renderers/SdfTextRenderer/internal/getUnicodeCodepoints.test.ts +133 -133
  123. package/src/core/text-rendering/renderers/SdfTextRenderer/internal/getUnicodeCodepoints.ts +38 -38
  124. package/src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText.ts +408 -408
  125. package/src/core/text-rendering/renderers/SdfTextRenderer/internal/measureText.test.ts +49 -49
  126. package/src/core/text-rendering/renderers/SdfTextRenderer/internal/measureText.ts +52 -52
  127. package/src/core/text-rendering/renderers/SdfTextRenderer/internal/setRenderWindow.test.ts +205 -205
  128. package/src/core/text-rendering/renderers/SdfTextRenderer/internal/setRenderWindow.ts +93 -93
  129. package/src/core/text-rendering/renderers/SdfTextRenderer/internal/util.ts +40 -40
  130. package/src/core/text-rendering/renderers/TextRenderer.ts +557 -557
  131. package/src/core/textures/ColorTexture.ts +102 -102
  132. package/src/core/textures/ImageTexture.ts +399 -399
  133. package/src/core/textures/NoiseTexture.ts +104 -104
  134. package/src/core/textures/RenderTexture.ts +85 -85
  135. package/src/core/textures/SubTexture.ts +205 -205
  136. package/src/core/textures/Texture.ts +367 -353
  137. package/src/core/utils.ts +227 -227
  138. package/src/env.d.ts +7 -7
  139. package/src/main-api/DynamicShaderController.ts +104 -104
  140. package/src/main-api/INode.ts +101 -101
  141. package/src/main-api/Inspector.ts +522 -522
  142. package/src/main-api/Renderer.ts +751 -751
  143. package/src/main-api/ShaderController.ts +80 -80
  144. package/src/main-api/utils.ts +45 -45
  145. package/src/utils.ts +248 -248
  146. package/COPYING +0 -1
  147. package/dist/exports/canvas-shaders.d.ts +0 -10
  148. package/dist/exports/canvas-shaders.js +0 -27
  149. package/dist/exports/canvas-shaders.js.map +0 -1
  150. package/dist/exports/webgl-shaders.d.ts +0 -11
  151. package/dist/exports/webgl-shaders.js +0 -28
  152. package/dist/exports/webgl-shaders.js.map +0 -1
  153. package/dist/src/core/platforms/Platform.d.ts +0 -37
  154. package/dist/src/core/platforms/Platform.js +0 -22
  155. package/dist/src/core/platforms/Platform.js.map +0 -1
  156. package/dist/src/core/platforms/web/WebPlatform.d.ts +0 -9
  157. package/dist/src/core/platforms/web/WebPlatform.js +0 -58
  158. package/dist/src/core/platforms/web/WebPlatform.js.map +0 -1
  159. package/dist/src/core/renderers/CoreShaderNode.d.ts +0 -58
  160. package/dist/src/core/renderers/CoreShaderNode.js +0 -104
  161. package/dist/src/core/renderers/CoreShaderNode.js.map +0 -1
  162. package/dist/src/core/renderers/CoreShaderProgram.d.ts +0 -4
  163. package/dist/src/core/renderers/CoreShaderProgram.js +0 -20
  164. package/dist/src/core/renderers/CoreShaderProgram.js.map +0 -1
  165. package/dist/src/core/renderers/canvas/CanvasRenderer.d.ts +0 -36
  166. package/dist/src/core/renderers/canvas/CanvasRenderer.js +0 -212
  167. package/dist/src/core/renderers/canvas/CanvasRenderer.js.map +0 -1
  168. package/dist/src/core/renderers/canvas/CanvasShaderNode.d.ts +0 -21
  169. package/dist/src/core/renderers/canvas/CanvasShaderNode.js +0 -60
  170. package/dist/src/core/renderers/canvas/CanvasShaderNode.js.map +0 -1
  171. package/dist/src/core/renderers/canvas/CanvasTexture.d.ts +0 -16
  172. package/dist/src/core/renderers/canvas/CanvasTexture.js +0 -124
  173. package/dist/src/core/renderers/canvas/CanvasTexture.js.map +0 -1
  174. package/dist/src/core/renderers/webgl/WebGlCtxRenderTexture.d.ts +0 -12
  175. package/dist/src/core/renderers/webgl/WebGlCtxRenderTexture.js +0 -55
  176. package/dist/src/core/renderers/webgl/WebGlCtxRenderTexture.js.map +0 -1
  177. package/dist/src/core/renderers/webgl/WebGlCtxSubTexture.d.ts +0 -9
  178. package/dist/src/core/renderers/webgl/WebGlCtxSubTexture.js +0 -38
  179. package/dist/src/core/renderers/webgl/WebGlCtxSubTexture.js.map +0 -1
  180. package/dist/src/core/renderers/webgl/WebGlCtxTexture.d.ts +0 -57
  181. package/dist/src/core/renderers/webgl/WebGlCtxTexture.js +0 -227
  182. package/dist/src/core/renderers/webgl/WebGlCtxTexture.js.map +0 -1
  183. package/dist/src/core/renderers/webgl/WebGlRenderOp.d.ts +0 -44
  184. package/dist/src/core/renderers/webgl/WebGlRenderOp.js +0 -118
  185. package/dist/src/core/renderers/webgl/WebGlRenderOp.js.map +0 -1
  186. package/dist/src/core/renderers/webgl/WebGlRenderer.d.ts +0 -135
  187. package/dist/src/core/renderers/webgl/WebGlRenderer.js +0 -571
  188. package/dist/src/core/renderers/webgl/WebGlRenderer.js.map +0 -1
  189. package/dist/src/core/renderers/webgl/WebGlShaderNode.d.ts +0 -222
  190. package/dist/src/core/renderers/webgl/WebGlShaderNode.js +0 -334
  191. package/dist/src/core/renderers/webgl/WebGlShaderNode.js.map +0 -1
  192. package/dist/src/core/renderers/webgl/WebGlShaderProgram.d.ts +0 -35
  193. package/dist/src/core/renderers/webgl/WebGlShaderProgram.js +0 -201
  194. package/dist/src/core/renderers/webgl/WebGlShaderProgram.js.map +0 -1
  195. package/dist/src/core/shaders/canvas/Border.d.ts +0 -9
  196. package/dist/src/core/shaders/canvas/Border.js +0 -57
  197. package/dist/src/core/shaders/canvas/Border.js.map +0 -1
  198. package/dist/src/core/shaders/canvas/HolePunch.d.ts +0 -7
  199. package/dist/src/core/shaders/canvas/HolePunch.js +0 -38
  200. package/dist/src/core/shaders/canvas/HolePunch.js.map +0 -1
  201. package/dist/src/core/shaders/canvas/LinearGradient.d.ts +0 -10
  202. package/dist/src/core/shaders/canvas/LinearGradient.js +0 -46
  203. package/dist/src/core/shaders/canvas/LinearGradient.js.map +0 -1
  204. package/dist/src/core/shaders/canvas/RadialGradient.d.ts +0 -11
  205. package/dist/src/core/shaders/canvas/RadialGradient.js +0 -68
  206. package/dist/src/core/shaders/canvas/RadialGradient.js.map +0 -1
  207. package/dist/src/core/shaders/canvas/Rounded.d.ts +0 -7
  208. package/dist/src/core/shaders/canvas/Rounded.js +0 -33
  209. package/dist/src/core/shaders/canvas/Rounded.js.map +0 -1
  210. package/dist/src/core/shaders/canvas/RoundedWithBorder.d.ts +0 -7
  211. package/dist/src/core/shaders/canvas/RoundedWithBorder.js +0 -41
  212. package/dist/src/core/shaders/canvas/RoundedWithBorder.js.map +0 -1
  213. package/dist/src/core/shaders/canvas/RoundedWithBorderAndShadow.d.ts +0 -8
  214. package/dist/src/core/shaders/canvas/RoundedWithBorderAndShadow.js +0 -39
  215. package/dist/src/core/shaders/canvas/RoundedWithBorderAndShadow.js.map +0 -1
  216. package/dist/src/core/shaders/canvas/RoundedWithShadow.d.ts +0 -7
  217. package/dist/src/core/shaders/canvas/RoundedWithShadow.js +0 -38
  218. package/dist/src/core/shaders/canvas/RoundedWithShadow.js.map +0 -1
  219. package/dist/src/core/shaders/canvas/Shadow.d.ts +0 -8
  220. package/dist/src/core/shaders/canvas/Shadow.js +0 -31
  221. package/dist/src/core/shaders/canvas/Shadow.js.map +0 -1
  222. package/dist/src/core/shaders/canvas/utils/render.d.ts +0 -5
  223. package/dist/src/core/shaders/canvas/utils/render.js +0 -84
  224. package/dist/src/core/shaders/canvas/utils/render.js.map +0 -1
  225. package/dist/src/core/shaders/templates/BorderTemplate.d.ts +0 -37
  226. package/dist/src/core/shaders/templates/BorderTemplate.js +0 -73
  227. package/dist/src/core/shaders/templates/BorderTemplate.js.map +0 -1
  228. package/dist/src/core/shaders/templates/HolePunchTemplate.d.ts +0 -46
  229. package/dist/src/core/shaders/templates/HolePunchTemplate.js +0 -35
  230. package/dist/src/core/shaders/templates/HolePunchTemplate.js.map +0 -1
  231. package/dist/src/core/shaders/templates/LinearGradientTemplate.d.ts +0 -23
  232. package/dist/src/core/shaders/templates/LinearGradientTemplate.js +0 -47
  233. package/dist/src/core/shaders/templates/LinearGradientTemplate.js.map +0 -1
  234. package/dist/src/core/shaders/templates/RadialGradientTemplate.d.ts +0 -31
  235. package/dist/src/core/shaders/templates/RadialGradientTemplate.js +0 -49
  236. package/dist/src/core/shaders/templates/RadialGradientTemplate.js.map +0 -1
  237. package/dist/src/core/shaders/templates/RoundedTemplate.d.ts +0 -29
  238. package/dist/src/core/shaders/templates/RoundedTemplate.js +0 -67
  239. package/dist/src/core/shaders/templates/RoundedTemplate.js.map +0 -1
  240. package/dist/src/core/shaders/templates/RoundedWithBorderAndShadowTemplate.d.ts +0 -7
  241. package/dist/src/core/shaders/templates/RoundedWithBorderAndShadowTemplate.js +0 -24
  242. package/dist/src/core/shaders/templates/RoundedWithBorderAndShadowTemplate.js.map +0 -1
  243. package/dist/src/core/shaders/templates/RoundedWithBorderTemplate.d.ts +0 -6
  244. package/dist/src/core/shaders/templates/RoundedWithBorderTemplate.js +0 -23
  245. package/dist/src/core/shaders/templates/RoundedWithBorderTemplate.js.map +0 -1
  246. package/dist/src/core/shaders/templates/RoundedWithShadowTemplate.d.ts +0 -6
  247. package/dist/src/core/shaders/templates/RoundedWithShadowTemplate.js +0 -23
  248. package/dist/src/core/shaders/templates/RoundedWithShadowTemplate.js.map +0 -1
  249. package/dist/src/core/shaders/templates/ShadowTemplate.d.ts +0 -34
  250. package/dist/src/core/shaders/templates/ShadowTemplate.js +0 -66
  251. package/dist/src/core/shaders/templates/ShadowTemplate.js.map +0 -1
  252. package/dist/src/core/shaders/templates/shaderUtils.d.ts +0 -5
  253. package/dist/src/core/shaders/templates/shaderUtils.js +0 -41
  254. package/dist/src/core/shaders/templates/shaderUtils.js.map +0 -1
  255. package/dist/src/core/shaders/webgl/Border.d.ts +0 -3
  256. package/dist/src/core/shaders/webgl/Border.js +0 -110
  257. package/dist/src/core/shaders/webgl/Border.js.map +0 -1
  258. package/dist/src/core/shaders/webgl/Default.d.ts +0 -2
  259. package/dist/src/core/shaders/webgl/Default.js +0 -86
  260. package/dist/src/core/shaders/webgl/Default.js.map +0 -1
  261. package/dist/src/core/shaders/webgl/DefaultBatched.d.ts +0 -2
  262. package/dist/src/core/shaders/webgl/DefaultBatched.js +0 -104
  263. package/dist/src/core/shaders/webgl/DefaultBatched.js.map +0 -1
  264. package/dist/src/core/shaders/webgl/HolePunch.d.ts +0 -3
  265. package/dist/src/core/shaders/webgl/HolePunch.js +0 -64
  266. package/dist/src/core/shaders/webgl/HolePunch.js.map +0 -1
  267. package/dist/src/core/shaders/webgl/LinearGradient.d.ts +0 -3
  268. package/dist/src/core/shaders/webgl/LinearGradient.js +0 -75
  269. package/dist/src/core/shaders/webgl/LinearGradient.js.map +0 -1
  270. package/dist/src/core/shaders/webgl/RadialGradient.d.ts +0 -3
  271. package/dist/src/core/shaders/webgl/RadialGradient.js +0 -73
  272. package/dist/src/core/shaders/webgl/RadialGradient.js.map +0 -1
  273. package/dist/src/core/shaders/webgl/Rounded.d.ts +0 -7
  274. package/dist/src/core/shaders/webgl/Rounded.js +0 -86
  275. package/dist/src/core/shaders/webgl/Rounded.js.map +0 -1
  276. package/dist/src/core/shaders/webgl/RoundedWithBorder.d.ts +0 -3
  277. package/dist/src/core/shaders/webgl/RoundedWithBorder.js +0 -129
  278. package/dist/src/core/shaders/webgl/RoundedWithBorder.js.map +0 -1
  279. package/dist/src/core/shaders/webgl/RoundedWithBorderAndShadow.d.ts +0 -3
  280. package/dist/src/core/shaders/webgl/RoundedWithBorderAndShadow.js +0 -149
  281. package/dist/src/core/shaders/webgl/RoundedWithBorderAndShadow.js.map +0 -1
  282. package/dist/src/core/shaders/webgl/RoundedWithShadow.d.ts +0 -3
  283. package/dist/src/core/shaders/webgl/RoundedWithShadow.js +0 -84
  284. package/dist/src/core/shaders/webgl/RoundedWithShadow.js.map +0 -1
  285. package/dist/src/core/shaders/webgl/SdfShader.d.ts +0 -32
  286. package/dist/src/core/shaders/webgl/SdfShader.js +0 -116
  287. package/dist/src/core/shaders/webgl/SdfShader.js.map +0 -1
  288. package/dist/src/core/shaders/webgl/Shadow.d.ts +0 -3
  289. package/dist/src/core/shaders/webgl/Shadow.js +0 -110
  290. package/dist/src/core/shaders/webgl/Shadow.js.map +0 -1
  291. package/dist/src/core/temp.js +0 -77
  292. package/dist/src/core/temp.js.map +0 -1
  293. /package/dist/src/core/{temp.d.ts → renderers/webgl/WebGlCoreShader.destroy.d.ts} +0 -0
@@ -1,222 +0,0 @@
1
- import type { CoreNode } from '../../CoreNode.js';
2
- import type { WebGlContextWrapper } from '../../lib/WebGlContextWrapper.js';
3
- import type { Stage } from '../../Stage.js';
4
- import type { QuadOptions } from '../CoreRenderer.js';
5
- import { CoreShaderNode, type CoreShaderType } from '../CoreShaderNode.js';
6
- import type { UniformCollection, Vec2, Vec3, Vec4 } from './internal/ShaderUtils.js';
7
- import type { WebGlRenderer } from './WebGlRenderer.js';
8
- import type { WebGlRenderOp } from './WebGlRenderOp.js';
9
- import type { WebGlShaderProgram } from './WebGlShaderProgram.js';
10
- export type ShaderSource<T> = string | ((renderer: WebGlRenderer, props: T) => string);
11
- /**
12
- * This is the WebGL specific ShaderType @mixes CoreShaderType
13
- */
14
- export type WebGlShaderType<T extends object = Record<string, unknown>> = CoreShaderType<T> & {
15
- /**
16
- * fragment shader source for WebGl or WebGl2
17
- */
18
- fragment: ShaderSource<T>;
19
- /**
20
- * vertex shader source for WebGl or WebGl2
21
- */
22
- vertex?: ShaderSource<T>;
23
- /**
24
- * This function is called when one of the props is changed, here you can update the uniforms you use in the fragment / vertex shader.
25
- * @param node WebGlContextWrapper with utilities to update uniforms, and other actions.
26
- */
27
- update?: (this: WebGlShaderNode<T>, node: CoreNode) => void;
28
- /**
29
- * only used for SDF shader, will be removed in the future.
30
- *
31
- * @warning don't use this in your shader type
32
- */
33
- onSdfBind?: (this: WebGlContextWrapper, props: T) => void;
34
- /**
35
- * This function is used to check if the shader can be reused based on quad info
36
- * @param props
37
- */
38
- canBatch?: (incomingQuad: QuadOptions, currentRenderOp: WebGlRenderOp) => boolean;
39
- /**
40
- * extensions required for specific shader?
41
- */
42
- webgl1Extensions?: string[];
43
- webgl2Extensions?: string[];
44
- supportsIndexedTextures?: boolean;
45
- };
46
- export declare class WebGlShaderNode<Props extends object = Record<string, unknown>> extends CoreShaderNode<Props> {
47
- readonly program: WebGlShaderProgram;
48
- private updater;
49
- private valueKey;
50
- uniforms: UniformCollection;
51
- constructor(shaderKey: string, config: WebGlShaderType<Props>, program: WebGlShaderProgram, stage: Stage, props?: Props);
52
- /**
53
- * Sets the value of a RGBA variable
54
- * @param location
55
- * @param value
56
- */
57
- uniformRGBA(location: string, value: number): void;
58
- /**
59
- * Sets the value of a single float uniform variable.
60
- *
61
- * @param location - The location of the uniform variable.
62
- * @param v0 - The value to set.
63
- */
64
- uniform1f(location: string, value: number): void;
65
- /**
66
- * Sets the value of a float array uniform variable.
67
- *
68
- * @param location - The location of the uniform variable.
69
- * @param value - The array of values to set.
70
- */
71
- uniform1fv(location: string, value: Float32Array): void;
72
- /**
73
- * Sets the value of a single integer uniform variable.
74
- *
75
- * @param location - The location of the uniform variable.
76
- * @param v0 - The value to set.
77
- */
78
- uniform1i(location: string, value: number): void;
79
- /**
80
- * Sets the value of an integer array uniform variable.
81
- *
82
- * @param location - The location of the uniform variable.
83
- * @param value - The array of values to set.
84
- */
85
- uniform1iv(location: string, value: Int32Array): void;
86
- /**
87
- * Sets the value of a vec2 uniform variable.
88
- *
89
- * @param location - The location of the uniform variable.
90
- * @param v0 - The first component of the vector.
91
- * @param v1 - The second component of the vector.
92
- */
93
- uniform2f(location: string, v0: number, v1: number): void;
94
- /**
95
- * Sets the value of a vec2 array uniform variable.
96
- *
97
- * @param location - The location of the uniform variable.
98
- * @param value - The array of vec2 values to set as FloatArray.
99
- */
100
- uniform2fv(location: string, value: Float32Array): void;
101
- /**
102
- * Sets the value of a vec2 array uniform variable.
103
- *
104
- * @param location - The location of the uniform variable.
105
- * @param value - The array of vec2 values to set.
106
- */
107
- uniform2fa(location: string, value: Vec2): void;
108
- /**
109
- * Sets the value of a ivec2 uniform variable.
110
- *
111
- * @param location - The location of the uniform variable.
112
- * @param v0 - The first component of the vector.
113
- * @param v1 - The second component of the vector.
114
- */
115
- uniform2i(location: string, v0: number, v1: number): void;
116
- /**
117
- * Sets the value of an ivec2 array uniform variable.
118
- *
119
- * @param location - The location of the uniform variable.
120
- * @param value - The array of ivec2 values to set.
121
- */
122
- uniform2iv(location: string, value: Int32Array): void;
123
- /**
124
- * Sets the value of a vec3 uniform variable.
125
- *
126
- * @param location - The location of the uniform variable.
127
- * @param v0 - The first component of the vector.
128
- * @param v1 - The second component of the vector.
129
- * @param v2 - The third component of the vector.
130
- */
131
- uniform3f(location: string, v0: number, v1: number, v2: number): void;
132
- /**
133
- * Sets the value of a vec3 uniform variable.
134
- *
135
- * @param location - The location of the uniform variable.
136
- * @param
137
- */
138
- uniform3fa(location: string, value: Vec3): void;
139
- /**
140
- * Sets the value of a vec3 array uniform variable.
141
- *
142
- * @param location - The location of the uniform variable.
143
- * @param value - The array of vec3 values to set.
144
- */
145
- uniform3fv(location: string, value: Float32Array): void;
146
- /**
147
- * Sets the value of a ivec3 uniform variable.
148
- *
149
- * @param location - The location of the uniform variable.
150
- * @param v0 - The first component of the vector.
151
- * @param v1 - The second component of the vector.
152
- * @param v2 - The third component of the vector.
153
- */
154
- uniform3i(location: string, v0: number, v1: number, v2: number): void;
155
- /**
156
- * Sets the value of an ivec3 array uniform variable.
157
- *
158
- * @param location - The location of the uniform variable.
159
- * @param value - The array of ivec3 values to set.
160
- */
161
- uniform3iv(location: string, value: Int32Array): void;
162
- /**
163
- * Sets the value of a vec4 uniform variable.
164
- *
165
- * @param location - The location of the uniform variable.
166
- * @param v0 - The first component of the vector.
167
- * @param v1 - The second component of the vector.
168
- * @param v2 - The third component of the vector.
169
- * @param v3 - The fourth component of the vector.
170
- */
171
- uniform4f(location: string, v0: number, v1: number, v2: number, v3: number): void;
172
- /**
173
- * Sets an array of numbers
174
- * @param location The location of the uniform variable.
175
- * @param value
176
- */
177
- uniform4fa(location: string, value: Vec4): void;
178
- /**
179
- * Sets the value of a vec4 array uniform variable.
180
- *
181
- * @param location - The location of the uniform variable.
182
- * @param value - The array of vec4 values to set.
183
- */
184
- uniform4fv(location: string, value: Float32Array): void;
185
- /**
186
- * Sets the value of a ivec4 uniform variable.
187
- *
188
- * @param location - The location of the uniform variable.
189
- * @param v0 - The first component of the vector.
190
- * @param v1 - The second component of the vector.
191
- * @param v2 - The third component of the vector.
192
- * @param v3 - The fourth component of the vector.
193
- */
194
- uniform4i(location: string, v0: number, v1: number, v2: number, v3: number): void;
195
- /**
196
- * Sets the value of an ivec4 array uniform variable.
197
- *
198
- * @param location - The location of the uniform variable.
199
- * @param value - The array of ivec4 values to set.
200
- */
201
- uniform4iv(location: string, value: Int32Array): void;
202
- /**
203
- * Sets the value of a mat2 uniform variable.
204
- *
205
- * @param location - The location of the uniform variable.
206
- * @param transpose - Whether to transpose the matrix.
207
- * @param value - The array of mat2 values to set.
208
- */
209
- uniformMatrix2fv(location: string, value: Float32Array): void;
210
- /**
211
- * Sets the value of a mat2 uniform variable.
212
- * @param location - The location of the uniform variable.
213
- * @param value - The array of mat2 values to set.
214
- */
215
- uniformMatrix3fv(location: string, value: Float32Array): void;
216
- /**
217
- * Sets the value of a mat4 uniform variable.
218
- * @param location - The location of the uniform variable.
219
- * @param value - The array of mat4 values to set.
220
- */
221
- uniformMatrix4fv(location: string, value: Float32Array): void;
222
- }
@@ -1,334 +0,0 @@
1
- import { getNormalizedRgbaComponents } from '../../lib/utils.js';
2
- import { CoreShaderNode } from '../CoreShaderNode.js';
3
- export class WebGlShaderNode extends CoreShaderNode {
4
- program;
5
- updater = undefined;
6
- valueKey = '';
7
- uniforms = {
8
- single: {},
9
- vec2: {},
10
- vec3: {},
11
- vec4: {},
12
- };
13
- constructor(shaderKey, config, program, stage, props) {
14
- super(shaderKey, config, stage, props);
15
- this.program = program;
16
- if (config.update !== undefined) {
17
- this.updater = config.update;
18
- this.update = () => {
19
- if (this.props === undefined) {
20
- this.updater(this.node, this.props);
21
- return;
22
- }
23
- const prevKey = this.valueKey;
24
- this.valueKey = '';
25
- for (const key in this.resolvedProps) {
26
- this.valueKey += `${key}:${this.resolvedProps[key]};`;
27
- }
28
- if (prevKey === this.valueKey) {
29
- return;
30
- }
31
- if (prevKey.length > 0) {
32
- this.stage.shManager.mutateShaderValueUsage(prevKey, -1);
33
- }
34
- const values = this.stage.shManager.getShaderValues(this.valueKey);
35
- if (values !== undefined) {
36
- this.uniforms = values;
37
- return;
38
- }
39
- //create empty uniform collection when calculating new values
40
- this.uniforms = {
41
- single: {},
42
- vec2: {},
43
- vec3: {},
44
- vec4: {},
45
- };
46
- this.updater(this.node);
47
- this.stage.shManager.setShaderValues(this.valueKey, this.uniforms);
48
- };
49
- }
50
- }
51
- /**
52
- * Sets the value of a RGBA variable
53
- * @param location
54
- * @param value
55
- */
56
- uniformRGBA(location, value) {
57
- this.uniform4fv(location, new Float32Array(getNormalizedRgbaComponents(value)));
58
- }
59
- /**
60
- * Sets the value of a single float uniform variable.
61
- *
62
- * @param location - The location of the uniform variable.
63
- * @param v0 - The value to set.
64
- */
65
- uniform1f(location, value) {
66
- this.uniforms.single[location] = {
67
- method: 'uniform1f',
68
- value,
69
- };
70
- }
71
- /**
72
- * Sets the value of a float array uniform variable.
73
- *
74
- * @param location - The location of the uniform variable.
75
- * @param value - The array of values to set.
76
- */
77
- uniform1fv(location, value) {
78
- this.uniforms.single[location] = {
79
- method: 'uniform1fv',
80
- value,
81
- };
82
- }
83
- /**
84
- * Sets the value of a single integer uniform variable.
85
- *
86
- * @param location - The location of the uniform variable.
87
- * @param v0 - The value to set.
88
- */
89
- uniform1i(location, value) {
90
- this.uniforms.single[location] = {
91
- method: 'uniform1i',
92
- value,
93
- };
94
- }
95
- /**
96
- * Sets the value of an integer array uniform variable.
97
- *
98
- * @param location - The location of the uniform variable.
99
- * @param value - The array of values to set.
100
- */
101
- uniform1iv(location, value) {
102
- this.uniforms.single[location] = {
103
- method: 'uniform1iv',
104
- value,
105
- };
106
- }
107
- /**
108
- * Sets the value of a vec2 uniform variable.
109
- *
110
- * @param location - The location of the uniform variable.
111
- * @param v0 - The first component of the vector.
112
- * @param v1 - The second component of the vector.
113
- */
114
- uniform2f(location, v0, v1) {
115
- this.uniforms.vec2[location] = {
116
- method: 'uniform2f',
117
- value: [v0, v1],
118
- };
119
- }
120
- /**
121
- * Sets the value of a vec2 array uniform variable.
122
- *
123
- * @param location - The location of the uniform variable.
124
- * @param value - The array of vec2 values to set as FloatArray.
125
- */
126
- uniform2fv(location, value) {
127
- this.uniforms.single[location] = {
128
- method: 'uniform2fv',
129
- value,
130
- };
131
- }
132
- /**
133
- * Sets the value of a vec2 array uniform variable.
134
- *
135
- * @param location - The location of the uniform variable.
136
- * @param value - The array of vec2 values to set.
137
- */
138
- uniform2fa(location, value) {
139
- this.uniforms.vec2[location] = {
140
- method: 'uniform2f',
141
- value,
142
- };
143
- }
144
- /**
145
- * Sets the value of a ivec2 uniform variable.
146
- *
147
- * @param location - The location of the uniform variable.
148
- * @param v0 - The first component of the vector.
149
- * @param v1 - The second component of the vector.
150
- */
151
- uniform2i(location, v0, v1) {
152
- this.uniforms.vec2[location] = {
153
- method: 'uniform2i',
154
- value: [v0, v1],
155
- };
156
- }
157
- /**
158
- * Sets the value of an ivec2 array uniform variable.
159
- *
160
- * @param location - The location of the uniform variable.
161
- * @param value - The array of ivec2 values to set.
162
- */
163
- uniform2iv(location, value) {
164
- this.uniforms.single[location] = {
165
- method: 'uniform2iv',
166
- value,
167
- };
168
- }
169
- /**
170
- * Sets the value of a vec3 uniform variable.
171
- *
172
- * @param location - The location of the uniform variable.
173
- * @param v0 - The first component of the vector.
174
- * @param v1 - The second component of the vector.
175
- * @param v2 - The third component of the vector.
176
- */
177
- uniform3f(location, v0, v1, v2) {
178
- this.uniforms.vec3[location] = {
179
- method: 'uniform3f',
180
- value: [v0, v1, v2],
181
- };
182
- }
183
- /**
184
- * Sets the value of a vec3 uniform variable.
185
- *
186
- * @param location - The location of the uniform variable.
187
- * @param
188
- */
189
- uniform3fa(location, value) {
190
- this.uniforms.vec3[location] = {
191
- method: 'uniform3f',
192
- value,
193
- };
194
- }
195
- /**
196
- * Sets the value of a vec3 array uniform variable.
197
- *
198
- * @param location - The location of the uniform variable.
199
- * @param value - The array of vec3 values to set.
200
- */
201
- uniform3fv(location, value) {
202
- this.uniforms.single[location] = {
203
- method: 'uniform3fv',
204
- value,
205
- };
206
- }
207
- /**
208
- * Sets the value of a ivec3 uniform variable.
209
- *
210
- * @param location - The location of the uniform variable.
211
- * @param v0 - The first component of the vector.
212
- * @param v1 - The second component of the vector.
213
- * @param v2 - The third component of the vector.
214
- */
215
- uniform3i(location, v0, v1, v2) {
216
- this.uniforms.vec3[location] = {
217
- method: 'uniform3i',
218
- value: [v0, v1, v2],
219
- };
220
- }
221
- /**
222
- * Sets the value of an ivec3 array uniform variable.
223
- *
224
- * @param location - The location of the uniform variable.
225
- * @param value - The array of ivec3 values to set.
226
- */
227
- uniform3iv(location, value) {
228
- this.uniforms.single[location] = {
229
- method: 'uniform3iv',
230
- value,
231
- };
232
- }
233
- /**
234
- * Sets the value of a vec4 uniform variable.
235
- *
236
- * @param location - The location of the uniform variable.
237
- * @param v0 - The first component of the vector.
238
- * @param v1 - The second component of the vector.
239
- * @param v2 - The third component of the vector.
240
- * @param v3 - The fourth component of the vector.
241
- */
242
- uniform4f(location, v0, v1, v2, v3) {
243
- this.uniforms.vec4[location] = {
244
- method: 'uniform4f',
245
- value: [v0, v1, v2, v3],
246
- };
247
- }
248
- /**
249
- * Sets an array of numbers
250
- * @param location The location of the uniform variable.
251
- * @param value
252
- */
253
- uniform4fa(location, value) {
254
- this.uniforms.vec4[location] = {
255
- method: 'uniform4f',
256
- value,
257
- };
258
- }
259
- /**
260
- * Sets the value of a vec4 array uniform variable.
261
- *
262
- * @param location - The location of the uniform variable.
263
- * @param value - The array of vec4 values to set.
264
- */
265
- uniform4fv(location, value) {
266
- this.uniforms.single[location] = {
267
- method: 'uniform4fv',
268
- value,
269
- };
270
- }
271
- /**
272
- * Sets the value of a ivec4 uniform variable.
273
- *
274
- * @param location - The location of the uniform variable.
275
- * @param v0 - The first component of the vector.
276
- * @param v1 - The second component of the vector.
277
- * @param v2 - The third component of the vector.
278
- * @param v3 - The fourth component of the vector.
279
- */
280
- uniform4i(location, v0, v1, v2, v3) {
281
- this.uniforms.vec4[location] = {
282
- method: 'uniform4i',
283
- value: [v0, v1, v2, v3],
284
- };
285
- }
286
- /**
287
- * Sets the value of an ivec4 array uniform variable.
288
- *
289
- * @param location - The location of the uniform variable.
290
- * @param value - The array of ivec4 values to set.
291
- */
292
- uniform4iv(location, value) {
293
- this.uniforms.single[location] = {
294
- method: 'uniform4iv',
295
- value,
296
- };
297
- }
298
- /**
299
- * Sets the value of a mat2 uniform variable.
300
- *
301
- * @param location - The location of the uniform variable.
302
- * @param transpose - Whether to transpose the matrix.
303
- * @param value - The array of mat2 values to set.
304
- */
305
- uniformMatrix2fv(location, value) {
306
- this.uniforms.single[location] = {
307
- method: 'uniformMatrix2fv',
308
- value,
309
- };
310
- }
311
- /**
312
- * Sets the value of a mat2 uniform variable.
313
- * @param location - The location of the uniform variable.
314
- * @param value - The array of mat2 values to set.
315
- */
316
- uniformMatrix3fv(location, value) {
317
- this.uniforms.single[location] = {
318
- method: 'uniformMatrix3fv',
319
- value,
320
- };
321
- }
322
- /**
323
- * Sets the value of a mat4 uniform variable.
324
- * @param location - The location of the uniform variable.
325
- * @param value - The array of mat4 values to set.
326
- */
327
- uniformMatrix4fv(location, value) {
328
- this.uniforms.single[location] = {
329
- method: 'uniformMatrix4fv',
330
- value,
331
- };
332
- }
333
- }
334
- //# sourceMappingURL=WebGlShaderNode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WebGlShaderNode.js","sourceRoot":"","sources":["../../../../../src/core/renderers/webgl/WebGlShaderNode.ts"],"names":[],"mappings":"AACA,OAAO,E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AQ,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG;YAC/B,MAAM,EAAE,kBAAkB;YAC1B,KAAK;SACN,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,gBAAgB,CAAC,QAAgB,EAAE,KAAmB;QACpD,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG;YAC/B,MAAM,EAAE,kBAAkB;YAC1B,KAAK;SACN,CAAC;IACJ,CAAC;CACF"}
@@ -1,35 +0,0 @@
1
- import type { WebGlContextWrapper } from '../../lib/WebGlContextWrapper.js';
2
- import type { QuadOptions } from '../CoreRenderer.js';
3
- import type { CoreShaderProgram } from '../CoreShaderProgram.js';
4
- import type { WebGlCtxTexture } from './WebGlCtxTexture.js';
5
- import type { WebGlRenderOp } from './WebGlRenderOp.js';
6
- import type { WebGlRenderer } from './WebGlRenderer.js';
7
- import type { WebGlShaderType } from './WebGlShaderNode.js';
8
- import type { BufferCollection } from './internal/BufferCollection.js';
9
- export declare class WebGlShaderProgram implements CoreShaderProgram {
10
- protected boundBufferCollection: BufferCollection | null;
11
- protected program: WebGLProgram;
12
- /**
13
- * Vertex Array Object
14
- *
15
- * @remarks
16
- * Used by WebGL2 Only
17
- */
18
- protected vao: WebGLVertexArrayObject | undefined;
19
- protected renderer: WebGlRenderer;
20
- protected glw: WebGlContextWrapper;
21
- protected attributeLocations: Record<string, number>;
22
- protected lifecycle: Pick<WebGlShaderType, 'update' | 'canBatch'>;
23
- protected useSystemAlpha: boolean;
24
- protected useSystemDimensions: boolean;
25
- supportsIndexedTextures: boolean;
26
- constructor(renderer: WebGlRenderer, config: WebGlShaderType, resolvedProps: Record<string, any>);
27
- disableAttribute(location: number): void;
28
- disableAttributes(): void;
29
- reuseRenderOp(incomingQuad: QuadOptions, currentRenderOp: WebGlRenderOp): boolean;
30
- bindRenderOp(renderOp: WebGlRenderOp): void;
31
- bindBufferCollection(buffer: BufferCollection): void;
32
- bindTextures(textures: WebGlCtxTexture[]): void;
33
- attach(): void;
34
- detach(): void;
35
- }