ris-framework 0.1.0-dev.6 → 0.1.0-dev.7

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 (177) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/LICENSES/Apache-2.0.txt +202 -0
  3. package/README.md +28 -11
  4. package/THIRD_PARTY_NOTICES.md +27 -0
  5. package/dist/TextureFormat.d.ts +2 -0
  6. package/dist/TextureFormat.d.ts.map +1 -0
  7. package/dist/VertexFormat.d.ts +14 -0
  8. package/dist/VertexFormat.d.ts.map +1 -0
  9. package/dist/_ris-ktx2-node-module-stub-nzBRmiO_.js +10 -0
  10. package/dist/common/sampler-enums.d.ts +16 -0
  11. package/dist/common/sampler-enums.d.ts.map +1 -0
  12. package/dist/common/vertex-step-mode.d.ts +11 -0
  13. package/dist/common/vertex-step-mode.d.ts.map +1 -0
  14. package/dist/content/ShaderModuleContent.d.ts +14 -0
  15. package/dist/content/ShaderModuleContent.d.ts.map +1 -0
  16. package/dist/core/Framework.d.ts +79 -0
  17. package/dist/core/Framework.d.ts.map +1 -0
  18. package/dist/core/FrameworkConfig.d.ts +26 -0
  19. package/dist/core/FrameworkConfig.d.ts.map +1 -0
  20. package/dist/core/buffers/buffers-factory-interface.d.ts +2 -0
  21. package/dist/core/buffers/buffers-factory-interface.d.ts.map +1 -0
  22. package/dist/core/buffers/vertex-buffer-interface.d.ts +2 -0
  23. package/dist/core/buffers/vertex-buffer-interface.d.ts.map +1 -0
  24. package/dist/core/content/ContentManager.d.ts +26 -0
  25. package/dist/core/content/ContentManager.d.ts.map +1 -0
  26. package/dist/core/dependency-injection/register-services-interface.d.ts +13 -0
  27. package/dist/core/dependency-injection/register-services-interface.d.ts.map +1 -0
  28. package/dist/core/framework-interface.d.ts +2 -0
  29. package/dist/core/framework-interface.d.ts.map +1 -0
  30. package/dist/core/input/InputManager.d.ts +27 -0
  31. package/dist/core/input/InputManager.d.ts.map +1 -0
  32. package/dist/core/renderer/enums.d.ts +18 -0
  33. package/dist/core/renderer/enums.d.ts.map +1 -0
  34. package/dist/core/renderer/renderer-interface.d.ts +77 -0
  35. package/dist/core/renderer/renderer-interface.d.ts.map +1 -0
  36. package/dist/core/renderer/rendering-limits.d.ts +16 -0
  37. package/dist/core/renderer/rendering-limits.d.ts.map +1 -0
  38. package/dist/core/rendering/AGraphicsDevice.d.ts +69 -0
  39. package/dist/core/rendering/AGraphicsDevice.d.ts.map +1 -0
  40. package/dist/core/rendering/ARenderer.d.ts +75 -0
  41. package/dist/core/rendering/ARenderer.d.ts.map +1 -0
  42. package/dist/core/rendering/blending/blend-component-descriptor.d.ts +25 -0
  43. package/dist/core/rendering/blending/blend-component-descriptor.d.ts.map +1 -0
  44. package/dist/core/rendering/blending/blend-state-descriptor.d.ts +29 -0
  45. package/dist/core/rendering/blending/blend-state-descriptor.d.ts.map +1 -0
  46. package/dist/core/rendering/blending/enums.d.ts +40 -0
  47. package/dist/core/rendering/blending/enums.d.ts.map +1 -0
  48. package/dist/core/rendering/enums.d.ts +20 -0
  49. package/dist/core/rendering/enums.d.ts.map +1 -0
  50. package/dist/core/rendering/primitive/PrimitiveStateDescriptor.d.ts +26 -0
  51. package/dist/core/rendering/primitive/PrimitiveStateDescriptor.d.ts.map +1 -0
  52. package/dist/core/rendering/primitive/enums.d.ts +56 -0
  53. package/dist/core/rendering/primitive/enums.d.ts.map +1 -0
  54. package/dist/core/rendering/render-pass/render-pass-descriptor.d.ts +2 -0
  55. package/dist/core/rendering/render-pass/render-pass-descriptor.d.ts.map +1 -0
  56. package/dist/core/rendering/render-pass/render-pass-interface.d.ts +15 -0
  57. package/dist/core/rendering/render-pass/render-pass-interface.d.ts.map +1 -0
  58. package/dist/core/rendering/sampler/sampler-descriptor.d.ts +28 -0
  59. package/dist/core/rendering/sampler/sampler-descriptor.d.ts.map +1 -0
  60. package/dist/core/rendering/texture/texture.d.ts +69 -0
  61. package/dist/core/rendering/texture/texture.d.ts.map +1 -0
  62. package/dist/core/rendering/vertex-attribute.d.ts +17 -0
  63. package/dist/core/rendering/vertex-attribute.d.ts.map +1 -0
  64. package/dist/core/rendering/vertex-buffer-layout.d.ts +23 -0
  65. package/dist/core/rendering/vertex-buffer-layout.d.ts.map +1 -0
  66. package/dist/core/shader/shader-loader.d.ts +12 -0
  67. package/dist/core/shader/shader-loader.d.ts.map +1 -0
  68. package/dist/core/shader/shader-module-interface.d.ts +2 -0
  69. package/dist/core/shader/shader-module-interface.d.ts.map +1 -0
  70. package/dist/core/sprite-batch/SpriteBatch.d.ts +50 -0
  71. package/dist/core/sprite-batch/SpriteBatch.d.ts.map +1 -0
  72. package/dist/core/sprite-batch/SpriteBatchDrawable.d.ts +57 -0
  73. package/dist/core/sprite-batch/SpriteBatchDrawable.d.ts.map +1 -0
  74. package/dist/core/sprite-batch/SpriteBatchMesh.d.ts +32 -0
  75. package/dist/core/sprite-batch/SpriteBatchMesh.d.ts.map +1 -0
  76. package/dist/core/window/window-manager.d.ts +32 -0
  77. package/dist/core/window/window-manager.d.ts.map +1 -0
  78. package/dist/geometry/BaseGeometry.d.ts +41 -0
  79. package/dist/geometry/BaseGeometry.d.ts.map +1 -0
  80. package/dist/geometry/GeometryBuilder.d.ts +11 -0
  81. package/dist/geometry/GeometryBuilder.d.ts.map +1 -0
  82. package/dist/geometry/GeometryFormat.d.ts +34 -0
  83. package/dist/geometry/GeometryFormat.d.ts.map +1 -0
  84. package/dist/index.d.ts +4 -0
  85. package/dist/index.d.ts.map +1 -0
  86. package/dist/index.js +4598 -0
  87. package/dist/libktx-Cjh8w7XG-DhnH9lxr.js +4 -0
  88. package/dist/webgl/WebGLGraphicsDeviceFeatures.d.ts +31 -0
  89. package/dist/webgl/WebGLGraphicsDeviceFeatures.d.ts.map +1 -0
  90. package/dist/webgl/WebGlGpuInfo.d.ts +25 -0
  91. package/dist/webgl/WebGlGpuInfo.d.ts.map +1 -0
  92. package/dist/webgl/WebGlGraphicsDevice.d.ts +45 -0
  93. package/dist/webgl/WebGlGraphicsDevice.d.ts.map +1 -0
  94. package/dist/webgl/WebGlRenderer.d.ts +18 -0
  95. package/dist/webgl/WebGlRenderer.d.ts.map +1 -0
  96. package/dist/webgl/blending/webgl-blend-state.d.ts +33 -0
  97. package/dist/webgl/blending/webgl-blend-state.d.ts.map +1 -0
  98. package/dist/webgl/buffers/WebGlBuffersFactory.d.ts +16 -0
  99. package/dist/webgl/buffers/WebGlBuffersFactory.d.ts.map +1 -0
  100. package/dist/webgl/buffers/WebGlUniformBuffer.d.ts +34 -0
  101. package/dist/webgl/buffers/WebGlUniformBuffer.d.ts.map +1 -0
  102. package/dist/webgl/buffers/WebGlVertexBuffer.d.ts +48 -0
  103. package/dist/webgl/buffers/WebGlVertexBuffer.d.ts.map +1 -0
  104. package/dist/webgl/buffers/webgl-index-buffer.d.ts +43 -0
  105. package/dist/webgl/buffers/webgl-index-buffer.d.ts.map +1 -0
  106. package/dist/webgl/cast/cast.d.ts +52 -0
  107. package/dist/webgl/cast/cast.d.ts.map +1 -0
  108. package/dist/webgl/primitive/WebGlPrimitiveState.d.ts +31 -0
  109. package/dist/webgl/primitive/WebGlPrimitiveState.d.ts.map +1 -0
  110. package/dist/webgl/render-pass/WebGlRenderPass.d.ts +34 -0
  111. package/dist/webgl/render-pass/WebGlRenderPass.d.ts.map +1 -0
  112. package/dist/webgl/render-pipelines/AWebGlRenderPipeline.d.ts +53 -0
  113. package/dist/webgl/render-pipelines/AWebGlRenderPipeline.d.ts.map +1 -0
  114. package/dist/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.d.ts +28 -0
  115. package/dist/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.d.ts.map +1 -0
  116. package/dist/webgl/render-pipelines/WebGlRenderPipelineFactory.d.ts +24 -0
  117. package/dist/webgl/render-pipelines/WebGlRenderPipelineFactory.d.ts.map +1 -0
  118. package/dist/webgl/render-pipelines/inspect/WebGlInspectTextureMipsRenderPipeline.d.ts +57 -0
  119. package/dist/webgl/render-pipelines/inspect/WebGlInspectTextureMipsRenderPipeline.d.ts.map +1 -0
  120. package/dist/webgl/render-pipelines/material/WebGlUnlitRenderPipeline.d.ts +57 -0
  121. package/dist/webgl/render-pipelines/material/WebGlUnlitRenderPipeline.d.ts.map +1 -0
  122. package/dist/webgl/render-pipelines/sprite/WebGlSpriteRenderPipeline.d.ts +40 -0
  123. package/dist/webgl/render-pipelines/sprite/WebGlSpriteRenderPipeline.d.ts.map +1 -0
  124. package/dist/webgl/rendering/webgl-vertex-attribute.d.ts +10 -0
  125. package/dist/webgl/rendering/webgl-vertex-attribute.d.ts.map +1 -0
  126. package/dist/webgl/rendering/webgl-vertex-buffer-layout.d.ts +27 -0
  127. package/dist/webgl/rendering/webgl-vertex-buffer-layout.d.ts.map +1 -0
  128. package/dist/webgl/sampler/webgl-sampler.d.ts +48 -0
  129. package/dist/webgl/sampler/webgl-sampler.d.ts.map +1 -0
  130. package/dist/webgl/shader/WebGlShaderModule.d.ts +34 -0
  131. package/dist/webgl/shader/WebGlShaderModule.d.ts.map +1 -0
  132. package/dist/webgl/shader/WebGlShaderModuleLoader.d.ts +19 -0
  133. package/dist/webgl/shader/WebGlShaderModuleLoader.d.ts.map +1 -0
  134. package/dist/webgl/swap-chain/WebGlSwapChain.d.ts +27 -0
  135. package/dist/webgl/swap-chain/WebGlSwapChain.d.ts.map +1 -0
  136. package/dist/webgl/texture/WebGlTexture2D.d.ts +37 -0
  137. package/dist/webgl/texture/WebGlTexture2D.d.ts.map +1 -0
  138. package/dist/webgl/texture/WebGlTextureFactory.d.ts +17 -0
  139. package/dist/webgl/texture/WebGlTextureFactory.d.ts.map +1 -0
  140. package/dist/webgl/utilities/WebGlBufferUtilities.d.ts +45 -0
  141. package/dist/webgl/utilities/WebGlBufferUtilities.d.ts.map +1 -0
  142. package/dist/webgl/utilities/WebGlConverter.d.ts +124 -0
  143. package/dist/webgl/utilities/WebGlConverter.d.ts.map +1 -0
  144. package/dist/webgl/utilities/WebGlFrameBufferUtilities.d.ts +54 -0
  145. package/dist/webgl/utilities/WebGlFrameBufferUtilities.d.ts.map +1 -0
  146. package/dist/webgl/utilities/WebGlSamplerUtilities.d.ts +23 -0
  147. package/dist/webgl/utilities/WebGlSamplerUtilities.d.ts.map +1 -0
  148. package/dist/webgl/utilities/WebGlShaderUtilities.d.ts +28 -0
  149. package/dist/webgl/utilities/WebGlShaderUtilities.d.ts.map +1 -0
  150. package/dist/webgl/utilities/WebGlTextureUtilities.d.ts +33 -0
  151. package/dist/webgl/utilities/WebGlTextureUtilities.d.ts.map +1 -0
  152. package/dist/webgl/utilities/WebGlUtilities.d.ts +60 -0
  153. package/dist/webgl/utilities/WebGlUtilities.d.ts.map +1 -0
  154. package/dist/webgl/utilities/spector-js-utilities.d.ts +9 -0
  155. package/dist/webgl/utilities/spector-js-utilities.d.ts.map +1 -0
  156. package/dist/webgl/utilities/webgl-blending-utilities.d.ts +17 -0
  157. package/dist/webgl/utilities/webgl-blending-utilities.d.ts.map +1 -0
  158. package/dist/webgl/utilities/webgl-culling-utilities.d.ts +13 -0
  159. package/dist/webgl/utilities/webgl-culling-utilities.d.ts.map +1 -0
  160. package/dist/webgl/utilities/webgl-filter-anisotropic-utilities.d.ts +24 -0
  161. package/dist/webgl/utilities/webgl-filter-anisotropic-utilities.d.ts.map +1 -0
  162. package/dist/webgl/utilities/webgl-program-utilities.d.ts +14 -0
  163. package/dist/webgl/utilities/webgl-program-utilities.d.ts.map +1 -0
  164. package/dist/webgl/utilities/webgl-render-buffer-utilities.d.ts +5 -0
  165. package/dist/webgl/utilities/webgl-render-buffer-utilities.d.ts.map +1 -0
  166. package/dist/webgl/utilities/webgl-renderbuffer-utilities.d.ts +17 -0
  167. package/dist/webgl/utilities/webgl-renderbuffer-utilities.d.ts.map +1 -0
  168. package/package.json +15 -9
  169. package/src/glsl-raw.d.ts +4 -0
  170. package/dist/assets/_ris-ktx2-node-module-stub-DwDS30PT.js +0 -1
  171. package/dist/assets/cat.jpg +0 -0
  172. package/dist/assets/index-BmeGit54.css +0 -1
  173. package/dist/assets/index-qyn4pzGw.js +0 -151
  174. package/dist/assets/libktx-Cjh8w7XG-Ci1Fm_MH.js +0 -1
  175. package/dist/assets/test.png +0 -0
  176. package/dist/index.html +0 -16
  177. package/dist/vite.svg +0 -1
@@ -0,0 +1,33 @@
1
+ import { TextureFormat } from "ris-framework-api";
2
+ import { vec2 } from "gl-matrix";
3
+ /**
4
+ * The utilities for working with WebGL textures.
5
+ */
6
+ export declare class WebGlTextureUtilities {
7
+ /**
8
+ * Creates a 2D texture.
9
+ * @param gl The WebGL rendering context.
10
+ * @param width The width of the texture.
11
+ * @param height The height of the texture.
12
+ * @param data The texture data. If null, an uninitialized texture will be created.
13
+ * @param textureFormat The format of the texture. If not specified, BGRA_8_UNORM will be used.
14
+ * @param useMipMaps True to generate mipmaps for the texture, false otherwise. By default, it is false.
15
+ * @param anisotropy The level of anisotropic filtering to use when sampling the texture. A value of 1 means no anisotropic filtering, while higher values (e.g., 4, 8, 16) indicate increasing levels of anisotropic filtering. By default, it is 1 (no anisotropic filtering).
16
+ * @param label The label for the texture. This can be used for debugging purposes to identify the texture in graphics debuggers.
17
+ * @returns The created WebGL texture.
18
+ */
19
+ createTexture2D(gl: WebGL2RenderingContext, width: number, height: number, data?: Uint8Array[] | HTMLImageElement[] | null, textureFormat?: TextureFormat, useMipMaps?: boolean, anisotropy?: number, label?: string | null): WebGLTexture;
20
+ /**
21
+ * Creates a compressed 2D texture.
22
+ * @param gl The WebGL rendering context.
23
+ * @param dimension The dimensions of the texture.
24
+ * @param blockSize The block size of a compressed format.
25
+ * @param data The texture data. If null, an uninitialized texture will be created.
26
+ * @param textureFormat The format of the texture. If not specified, BGRA_8_UNORM will be used.
27
+ * @param anisotropy The level of anisotropic filtering to use when sampling the texture. A value of 1 means no anisotropic filtering, while higher values (e.g., 4, 8, 16) indicate increasing levels of anisotropic filtering. By default, it is 1 (no anisotropic filtering).
28
+ * @param label The label for the texture. This can be used for debugging purposes to identify the texture in graphics debuggers.
29
+ * @returns The created WebGL texture.
30
+ */
31
+ createCompressedTexture2D(gl: WebGL2RenderingContext, dimension: vec2, _blockSize: vec2, data?: Uint8Array[] | null, label?: string | null, textureFormat?: TextureFormat, anisotropy?: number): WebGLTexture;
32
+ }
33
+ //# sourceMappingURL=WebGlTextureUtilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebGlTextureUtilities.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/WebGlTextureUtilities.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAE/B;;GAEG;AACH,qBAAa,qBAAqB;IAE9B;;;;;;;;;;;OAWG;IACI,eAAe,CAClB,EAAE,EAAE,sBAAsB,EAC1B,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAC7B,IAAI,GAAE,UAAU,EAAE,GAAG,gBAAgB,EAAE,GAAG,IAAW,EACrD,aAAa,gBAA6B,EAC1C,UAAU,UAAQ,EAClB,UAAU,SAAM,EAChB,KAAK,GAAE,MAAM,GAAG,IAAW,GAC5B,YAAY;IA6Df;;;;;;;;;;OAUG;IACI,yBAAyB,CAC5B,EAAE,EAAE,sBAAsB,EAC1B,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EACjC,IAAI,GAAE,UAAU,EAAE,GAAG,IAAW,EAChC,KAAK,GAAE,MAAM,GAAG,IAAW,EAC3B,aAAa,gBAA6B,EAC1C,UAAU,SAAM,GACjB,YAAY;CAqDlB"}
@@ -0,0 +1,60 @@
1
+ import { WebGLBlendingUtilities } from "./webgl-blending-utilities";
2
+ import { WebGlBufferUtilities } from "./WebGlBufferUtilities.js";
3
+ import { WebGLCullingUtilities } from "./webgl-culling-utilities";
4
+ import { WebGLFilterAnisotropicUtilities } from "./webgl-filter-anisotropic-utilities";
5
+ import { WebGlFrameBufferUtilities } from "./WebGlFrameBufferUtilities.js";
6
+ import { WebGLProgramUtilities } from "./webgl-program-utilities";
7
+ import { WebGLRenderbufferUtilities } from "./webgl-renderbuffer-utilities";
8
+ import { WebGlSamplerUtilities } from "./WebGlSamplerUtilities.js";
9
+ import { WebGlShaderUtilities } from "./WebGlShaderUtilities.js";
10
+ import { WebGlTextureUtilities } from "./WebGlTextureUtilities.js";
11
+ /**
12
+ * The utility class for WebGL operations.
13
+ */
14
+ export declare class WebGlUtilities {
15
+ /**
16
+ * The WebGL blending utilities.
17
+ */
18
+ static readonly blending: WebGLBlendingUtilities;
19
+ /**
20
+ * The WebGL anisotropic filtering utilities.
21
+ */
22
+ static readonly anisotropy: WebGLFilterAnisotropicUtilities;
23
+ /**
24
+ * The WebGL culling utilities.
25
+ */
26
+ static readonly culling: WebGLCullingUtilities;
27
+ /**
28
+ * The WebGL texture utilities.
29
+ */
30
+ static readonly texture: WebGlTextureUtilities;
31
+ /**
32
+ * The WebGL framebuffer utilities.
33
+ */
34
+ static readonly framebuffer: WebGlFrameBufferUtilities;
35
+ /**
36
+ * The WebGL render buffer utilities.
37
+ */
38
+ static readonly renderbuffer: WebGLRenderbufferUtilities;
39
+ /**
40
+ * The WebGL buffer utilities.
41
+ */
42
+ static readonly buffer: WebGlBufferUtilities;
43
+ /**
44
+ * The WebGL render buffer utilities.
45
+ */
46
+ static readonly renderBuffer: WebGLRenderbufferUtilities;
47
+ /**
48
+ * The WebGL sampler utilities.
49
+ */
50
+ static readonly sampler: WebGlSamplerUtilities;
51
+ /**
52
+ * The WebGL shader utilities.
53
+ */
54
+ static readonly shader: WebGlShaderUtilities;
55
+ /**
56
+ * The WebGL program utilities.
57
+ */
58
+ static readonly program: WebGLProgramUtilities;
59
+ }
60
+ //# sourceMappingURL=WebGlUtilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebGlUtilities.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/WebGlUtilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;GAEG;AACH,qBAAa,cAAc;IAEvB;;OAEG;IACH,gBAAuB,QAAQ,yBAAgC;IAE/D;;OAEG;IACH,gBAAuB,UAAU,kCAAyC;IAE1E;;OAEG;IACH,gBAAuB,OAAO,wBAA+B;IAE7D;;OAEG;IACH,gBAAuB,OAAO,wBAA+B;IAE7D;;OAEG;IACH,gBAAuB,WAAW,4BAAmC;IAErE;;OAEG;IACH,gBAAuB,YAAY,6BAAoC;IAEvE;;OAEG;IACH,gBAAuB,MAAM,uBAA8B;IAE3D;;OAEG;IACH,gBAAuB,YAAY,6BAAoC;IAEvE;;OAEG;IACH,gBAAuB,OAAO,wBAA+B;IAE7D;;OAEG;IACH,gBAAuB,MAAM,uBAA8B;IAE3D;;OAEG;IACH,gBAAuB,OAAO,wBAA+B;CAChE"}
@@ -0,0 +1,9 @@
1
+ export declare class SpectorJSUtilities {
2
+ /**
3
+ * Sets the label for a WebGL object to be used by Spector.js.
4
+ * @param target The WebGL object to set the label for (e.g., WebGLBuffer, WebGLTexture, WebGLFramebuffer, etc.).
5
+ * @param label The label to set for the WebGL object. This will be displayed in Spector.js for easier identification.
6
+ */
7
+ static setLabel(target: any, label: string): void;
8
+ }
9
+ //# sourceMappingURL=spector-js-utilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spector-js-utilities.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/spector-js-utilities.ts"],"names":[],"mappings":"AAAA,qBAAa,kBAAkB;IAE3B;;;;OAIG;WACW,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;CAK3D"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The utility class for WebGL blending operations.
3
+ */
4
+ export declare class WebGLBlendingUtilities {
5
+ /**
6
+ * Enables blending with the specified parameters.
7
+ * @param gl The WebGL2RenderingContext context.
8
+ * @param colorFunc The color function. By default, it is FUNC_ADD.
9
+ * @param srcColorFactor The source color factor. By default, it is SRC_ALPHA.
10
+ * @param dstColorFactor The destination color factor. By default, it is ONE_MINUS_SRC_ALPHA.
11
+ * @param alphaFunc The alpha function. By default, it is FUNC_ADD.
12
+ * @param srcAlphaFactor The source alpha factor. By default, it is SRC_ALPHA.
13
+ * @param dstAlphaFactor The destination alpha factor. By default, it is ONE_MINUS_SRC_ALPHA.
14
+ */
15
+ enableBlend(gl: WebGL2RenderingContext, colorFunc?: number | null, srcColorFactor?: number | null, dstColorFactor?: number | null, alphaFunc?: number | null, srcAlphaFactor?: number | null, dstAlphaFactor?: number | null): void;
16
+ }
17
+ //# sourceMappingURL=webgl-blending-utilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webgl-blending-utilities.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/webgl-blending-utilities.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,sBAAsB;IAC/B;;;;;;;;;OASG;IACI,WAAW,CACd,EAAE,EAAE,sBAAsB,EAC1B,SAAS,GAAE,MAAM,GAAG,IAAW,EAC/B,cAAc,GAAE,MAAM,GAAG,IAAW,EACpC,cAAc,GAAE,MAAM,GAAG,IAAW,EACpC,SAAS,GAAE,MAAM,GAAG,IAAW,EAC/B,cAAc,GAAE,MAAM,GAAG,IAAW,EACpC,cAAc,GAAE,MAAM,GAAG,IAAW,GACrC,IAAI;CA8DV"}
@@ -0,0 +1,13 @@
1
+ import { Culling } from "../../core/renderer/enums";
2
+ /**
3
+ * The WebGL culling utilities.
4
+ */
5
+ export declare class WebGLCullingUtilities {
6
+ /**
7
+ * Sets the culling mode.
8
+ * @param gl The WebGL2RenderingContext.
9
+ * @param culling The culling mode.
10
+ */
11
+ setCulling(gl: WebGL2RenderingContext, culling: Culling): void;
12
+ }
13
+ //# sourceMappingURL=webgl-culling-utilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webgl-culling-utilities.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/webgl-culling-utilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAGpD;;GAEG;AACH,qBAAa,qBAAqB;IAE9B;;;;OAIG;IACI,UAAU,CAAC,EAAE,EAAE,sBAAsB,EAAE,OAAO,EAAE,OAAO;CASjE"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * The utility class for WebGL anisotropic filtering operations.
3
+ */
4
+ export declare class WebGLFilterAnisotropicUtilities {
5
+ /**
6
+ * The max anisotropy extension string.
7
+ */
8
+ private MAX_ANISOTROPY_EXT;
9
+ private _extension;
10
+ /**
11
+ * Gets the max anisotropy.
12
+ * @param gl The WebGL2 rendering context.
13
+ * @returns The maximum supported level of anisotropic filtering. <c>0</c> if not supported.
14
+ */
15
+ getMaxAnisotropy(gl: WebGL2RenderingContext): number;
16
+ /**
17
+ * Sets the anisotropy filtering level for texture.
18
+ * @param gl The WebGL2 rendering context.
19
+ * @param texture The WebGL texture.
20
+ * @param anisotropy The level of anisotropic filtering
21
+ */
22
+ setAnisotropy(gl: WebGL2RenderingContext, texture: WebGLTexture, anisotropy: number): void;
23
+ }
24
+ //# sourceMappingURL=webgl-filter-anisotropic-utilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webgl-filter-anisotropic-utilities.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/webgl-filter-anisotropic-utilities.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,+BAA+B;IACxC;;OAEG;IACH,OAAO,CAAC,kBAAkB,CAA4C;IAEtE,OAAO,CAAC,UAAU,CAAM;IAExB;;;;OAIG;IACI,gBAAgB,CAAC,EAAE,EAAE,sBAAsB,GAAG,MAAM;IAU3D;;;;;OAKG;IACI,aAAa,CAAC,EAAE,EAAE,sBAAsB,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM;CAI7F"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This module provides utility functions for working with WebGL programs, such as creating and linking shader programs.
3
+ */
4
+ export declare class WebGLProgramUtilities {
5
+ /**
6
+ * Creates a WebGL program with the given vertex shader and fragment shader.
7
+ * @param gl The WebGL2 rendering context.
8
+ * @param vertexShader The vertex shader to be attached to the program.
9
+ * @param fragmentShader The fragment shader to be attached to the program.
10
+ * @returns The linked WebGLProgram object.
11
+ */
12
+ create(gl: WebGL2RenderingContext, vertexShader: WebGLShader, fragmentShader: WebGLShader): WebGLProgram;
13
+ }
14
+ //# sourceMappingURL=webgl-program-utilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webgl-program-utilities.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/webgl-program-utilities.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,qBAAqB;IAE9B;;;;;;OAMG;IACI,MAAM,CAAC,EAAE,EAAE,sBAAsB,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,GAAG,YAAY;CAgBlH"}
@@ -0,0 +1,5 @@
1
+ import type { TextureFormat } from "ris-framework-api";
2
+ export declare class WebGLRenderBufferUtilities {
3
+ create(gl: WebGL2RenderingContext, internalFormat: TextureFormat, width: number, height: number, label?: string | null): WebGLRenderbuffer;
4
+ }
5
+ //# sourceMappingURL=webgl-render-buffer-utilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webgl-render-buffer-utilities.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/webgl-render-buffer-utilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvD,qBAAa,0BAA0B;IAG5B,MAAM,CAAC,EAAE,EAAE,sBAAsB,EAAE,cAAc,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,GAAE,MAAM,GAAG,IAAW,GAAG,iBAAiB;CAgB1J"}
@@ -0,0 +1,17 @@
1
+ import type { TextureFormat } from "ris-framework-api";
2
+ /**
3
+ * The utility class for WebGL render buffer operations. It provides methods for creating render buffers with specified formats, dimensions, and labels. Render buffers are used in WebGL for off-screen rendering, particularly for depth and stencil attachments in framebuffers. This class abstracts the details of creating and configuring render buffers, making it easier to manage them in a WebGL application.
4
+ */
5
+ export declare class WebGLRenderbufferUtilities {
6
+ /**
7
+ * Creates a render buffer with the specified internal format, width, height, and label.
8
+ * @param gl The WebGL2 rendering context.
9
+ * @param internalFormat The internal format of the render buffer, which determines the type of data stored in the buffer (e.g., depth, stencil, or depth-stencil).
10
+ * @param width The width of the render buffer in pixels.
11
+ * @param height The height of the render buffer in pixels.
12
+ * @param label The label of the render buffer, which can be used for debugging purposes. It is optional and can be null or undefined.
13
+ * @returns The created WebGLRenderbuffer object.
14
+ */
15
+ create(gl: WebGL2RenderingContext, internalFormat: TextureFormat, width: number, height: number, label: string | null | undefined): WebGLRenderbuffer;
16
+ }
17
+ //# sourceMappingURL=webgl-renderbuffer-utilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webgl-renderbuffer-utilities.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/webgl-renderbuffer-utilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIvD;;GAEG;AACH,qBAAa,0BAA0B;IACnC;;;;;;;;OAQG;IACI,MAAM,CAAC,EAAE,EAAE,sBAAsB,EAAE,cAAc,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,iBAAiB;CAiB/J"}
package/package.json CHANGED
@@ -1,27 +1,31 @@
1
1
  {
2
2
  "name": "ris-framework",
3
- "version": "0.1.0-dev.6",
3
+ "version": "0.1.0-dev.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/luka712/ris-framework-ts"
7
7
  },
8
8
  "type": "module",
9
- "main": "./src/index.ts",
10
- "types": "./src/index.ts",
9
+ "main": "./dist/index.js",
10
+ "module": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
11
12
  "exports": {
12
13
  ".": {
13
- "types": "./src/index.ts",
14
- "import": "./src/index.ts",
15
- "default": "./src/index.ts"
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js",
16
+ "default": "./dist/index.js"
16
17
  }
17
18
  },
18
19
  "scripts": {
19
20
  "dev": "vite",
20
- "build": "tsc && vite build",
21
+ "build": "tsc --noEmit && npm run build:lib && npm run build:app",
22
+ "build:lib": "rm -rf dist && vite build --config vite.lib.config.ts && tsc -p tsconfig.lib.json && node scripts/rewrite-declaration-extensions.mjs",
23
+ "build:app": "vite build",
21
24
  "preview": "vite preview",
22
25
  "test": "tsc --noEmit"
23
26
  },
24
27
  "devDependencies": {
28
+ "ris-ktx2": "^0.1.0-dev.2",
25
29
  "typescript": "~5.9.3",
26
30
  "vite": "^7.2.4"
27
31
  },
@@ -29,16 +33,18 @@
29
33
  "gl-matrix": "^3.4.4",
30
34
  "reflect-metadata": "^0.2.2",
31
35
  "ris-framework-api": "0.1.0-dev.5",
32
- "ris-ktx2": "^0.1.0-dev.2",
36
+ "ris-ktx2-api": "^0.1.0-dev.2.4",
33
37
  "tsyringe": "^4.10.0"
34
38
  },
35
39
  "files": [
36
40
  "dist",
37
41
  "src",
38
42
  "shaders",
43
+ "LICENSES",
39
44
  "LICENSE",
40
45
  "README.md",
41
- "CHANGELOG.md"
46
+ "CHANGELOG.md",
47
+ "THIRD_PARTY_NOTICES.md"
42
48
  ],
43
49
  "publishConfig": {
44
50
  "access": "public"
@@ -0,0 +1,4 @@
1
+ declare module "*.glsl?raw" {
2
+ const source: string;
3
+ export default source;
4
+ }
@@ -1 +0,0 @@
1
- function e(){throw new Error("ris-ktx2 Node loader is not included in the browser build.")}function r(){throw new Error("ris-ktx2 Node file loader is not included in the browser build.")}export{e as createKtxModuleNode,r as readFileBytes};
Binary file
@@ -1 +0,0 @@
1
- :root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}#app{max-width:1280px;margin:0 auto;padding:2rem;text-align:center}.logo{height:6em;padding:1.5em;will-change:filter;transition:filter .3s}.logo:hover{filter:drop-shadow(0 0 2em #646cffaa)}.logo.vanilla:hover{filter:drop-shadow(0 0 2em #3178c6aa)}.card{padding:2em}.read-the-docs{color:#888}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}