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,27 @@
1
+ import { GamePadState, type IFramework, type IInputManager, KeyboardState, MouseState } from "ris-framework-api";
2
+ export declare class InputManager implements IInputManager {
3
+ private readonly _framework;
4
+ private readonly _mouseButtonMap;
5
+ private readonly _mouseState;
6
+ private readonly _mousePosition;
7
+ private readonly _previousMousePosition;
8
+ private readonly _mouseDelta;
9
+ private readonly _scrollWheelPosition;
10
+ private readonly _mouseButtonDown;
11
+ private readonly _mouseButtonReleased;
12
+ /** TODO */
13
+ constructor(_framework: IFramework);
14
+ thumbstickDeadZone: number;
15
+ getGamePadState(_gamePadIndex: number): GamePadState;
16
+ getKeyboardState(): KeyboardState;
17
+ /** @inheritDoc */
18
+ getMouseState(): MouseState;
19
+ /** @inheritDoc */
20
+ initialize(): void;
21
+ private _handleMouseEvents;
22
+ /** @inheritDoc */
23
+ update(): void;
24
+ /** @inheritDoc */
25
+ afterUpdate(): void;
26
+ }
27
+ //# sourceMappingURL=InputManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputManager.d.ts","sourceRoot":"","sources":["../../../src/core/input/InputManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EACZ,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,aAAa,EAEb,UAAU,EACb,MAAM,mBAAmB,CAAC;AAG3B,qBAAa,YAAa,YAAW,aAAa;IAiB3B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAf9C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAI/B;IAED,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IACzC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAiB;IACxD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAiB;IAC7C,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAiB;IACtD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAkC;IACnE,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAkC;IAEvE,WAAW;gBACyB,UAAU,EAAE,UAAU;IAS1D,kBAAkB,SAAO;IAGzB,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,YAAY;IAIpD,gBAAgB,IAAI,aAAa;IAIjC,kBAAkB;IACX,aAAa,IAAI,UAAU;IAIlC,kBAAkB;IACX,UAAU,IAAI,IAAI;IAMzB,OAAO,CAAC,kBAAkB;IA0C1B,kBAAkB;IACX,MAAM,IAAI,IAAI;IAKrB,kBAAkB;IACX,WAAW,IAAI,IAAI;CAM7B"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The culling mode.
3
+ */
4
+ export declare enum Culling {
5
+ /**
6
+ * The culling is disabled. Both front and back faces will be rendered.
7
+ */
8
+ None = 0,
9
+ /**
10
+ * The back faces will be culled. Only front faces will be rendered.
11
+ */
12
+ Back = 1,
13
+ /**
14
+ * The front faces will be culled. Only back faces will be rendered.
15
+ */
16
+ Front = 2
17
+ }
18
+ //# sourceMappingURL=enums.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/core/renderer/enums.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,oBAAY,OAAO;IACf;;OAEG;IACH,IAAI,IAAA;IAEJ;;OAEG;IACH,IAAI,IAAA;IAEJ;;OAEG;IACH,KAAK,IAAA;CACR"}
@@ -0,0 +1,77 @@
1
+ import { vec2 } from "gl-matrix";
2
+ import { TextureSamplerFilteringPreset } from "../rendering/enums";
3
+ import type { RenderingLimits } from "./rendering-limits.js";
4
+ import type { Color, IGraphicsDevice, IRenderer } from "ris-framework-api";
5
+ import type { TextureFormat } from "ris-framework-api";
6
+ export declare const RenderConfigurationSymbol: unique symbol;
7
+ /**
8
+ * The configuration for the renderer. This is used to initialize the renderer.
9
+ */
10
+ export declare class RenderConfiguration {
11
+ /**
12
+ * The size of the main frame buffer. This is used to initialize the main render target.
13
+ */
14
+ backBufferSize: vec2;
15
+ /**
16
+ * The preset for texture sampler filtering.
17
+ * This is used to configure the default texture sampler in the graphics device.
18
+ * The default texture sampler is used when a texture is sampled without a specific sampler being bound.
19
+ */
20
+ textureFiltering: TextureSamplerFilteringPreset;
21
+ }
22
+ /**
23
+ * The interface for renderers.
24
+ */
25
+ export interface ITempRenderer extends IRenderer {
26
+ /**
27
+ * The clear color used by the renderer.
28
+ */
29
+ clearColor: Color;
30
+ /**
31
+ * The rendering limits of the renderer.
32
+ */
33
+ limits: RenderingLimits | null;
34
+ /**
35
+ * The graphics device used by the renderer.
36
+ * This is used to create resources and manage the rendering context.
37
+ */
38
+ readonly graphicsDevice: IGraphicsDevice;
39
+ /**
40
+ * The preferred texture format for the renderer.
41
+ * @returns The preferred texture format for the renderer.
42
+ */
43
+ get preferredTextureFormat(): TextureFormat;
44
+ /**
45
+ * The preferred depth stencil format for the renderer.
46
+ * @returns The preferred depth stencil format for the renderer.
47
+ */
48
+ get preferredDepthStencilFormat(): TextureFormat;
49
+ /**
50
+ * The size of the back buffer.
51
+ */
52
+ backBufferSize: vec2;
53
+ /**
54
+ * Whether the back buffer size matches the swap chain size.
55
+ * If <code>true</code>, the renderer will assume that the back buffer size matches the swap chain size,
56
+ * overriding the <code>backBufferSize</code> property.
57
+ */
58
+ backBufferMatchesSwapChain: boolean;
59
+ /**
60
+ * Initializes the renderer.
61
+ */
62
+ initialize(): void;
63
+ /**
64
+ * Performs any additional initialization steps after the main initialization is complete.
65
+ * This can be used to set up resources that depend on the graphics device or swap chain being initialized.
66
+ */
67
+ afterInitialize(): void;
68
+ /**
69
+ * Begins a new render pass.
70
+ */
71
+ beginRenderPass(): void;
72
+ /**
73
+ * Ends the current render pass.
74
+ */
75
+ endRenderPass(): void;
76
+ }
77
+ //# sourceMappingURL=renderer-interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer-interface.d.ts","sourceRoot":"","sources":["../../../src/core/renderer/renderer-interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAC,KAAK,EAAE,eAAe,EAAE,SAAS,EAAC,MAAM,mBAAmB,CAAC;AACzE,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,yBAAyB,eAAgC,CAAC;AAEvE;;GAEG;AACH,qBAAa,mBAAmB;IAE5B;;OAEG;IACH,cAAc,EAAE,IAAI,CAA6B;IAEjD;;;;OAIG;IACH,gBAAgB,gCAA0C;CAC7D;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,SAAS;IAE5C;;OAEG;IACH,UAAU,EAAE,KAAK,CAAA;IAEjB;;OAEG;IACH,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IAE/B;;;OAGG;IACH,QAAQ,CAAC,cAAc,EAAE,eAAe,CAAC;IAEzC;;;OAGG;IACH,IAAI,sBAAsB,IAAI,aAAa,CAAC;IAE5C;;;OAGG;IACH,IAAI,2BAA2B,IAAI,aAAa,CAAC;IAEjD;;OAEG;IACH,cAAc,EAAE,IAAI,CAAC;IAErB;;;;OAIG;IACH,0BAA0B,EAAE,OAAO,CAAC;IAEpC;;OAEG;IACH,UAAU,IAAI,IAAI,CAAC;IAEnB;;;OAGG;IACH,eAAe,IAAI,IAAI,CAAC;IAExB;;OAEG;IACH,eAAe,IAAI,IAAI,CAAC;IAExB;;OAEG;IACH,aAAa,IAAI,IAAI,CAAC;CACzB"}
@@ -0,0 +1,16 @@
1
+ export declare class RenderingLimits {
2
+ private _maximumAnisotropyLevel;
3
+ /**
4
+ * The constructor.
5
+ * @param _maximumAnisotropyLevel The maximum anisotropic filtering level.
6
+ */
7
+ constructor(_maximumAnisotropyLevel: number);
8
+ /**
9
+ * The maximum anisotropy level supported by the renderer.
10
+ * This value is typically determined by the graphics hardware and driver capabilities.
11
+ * It indicates the highest level of anisotropic filtering that can be applied to textures,
12
+ * which can improve the visual quality of textures when viewed at oblique angles.
13
+ */
14
+ get maximumAnisotropyLevel(): number;
15
+ }
16
+ //# sourceMappingURL=rendering-limits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rendering-limits.d.ts","sourceRoot":"","sources":["../../../src/core/renderer/rendering-limits.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAe;IAMZ,OAAO,CAAC,uBAAuB;IAJ3C;;;OAGG;gBACiB,uBAAuB,EAAE,MAAM;IAInD;;;;;OAKG;IACH,IAAW,sBAAsB,IAAK,MAAM,CAE3C;CACJ"}
@@ -0,0 +1,69 @@
1
+ import { BlendStateDescriptor } from "./blending/blend-state-descriptor";
2
+ import { TextureSamplerFilteringPreset } from "./enums";
3
+ import type { PrimitiveStateDescriptor } from "./primitive/PrimitiveStateDescriptor.js";
4
+ import type { IRenderPass } from "./render-pass/render-pass-interface";
5
+ import { SamplerDescriptor } from "./sampler/sampler-descriptor";
6
+ import { type IGPUInfo, type IGraphicsDeviceFeatures, type ISampler, type IBlendState, type IPrimitiveState, type IGraphicsDevice, SwapChainDescriptor, type RenderPassDescriptor, type ISwapChain } from "ris-framework-api";
7
+ /**
8
+ * The descriptor for the graphics device. This is used to configure the graphics device during initialization.
9
+ */
10
+ export declare class GraphicsDeviceDescriptor {
11
+ /**
12
+ * Defines the preset for texture sampler filtering.
13
+ * This is used to configure the default texture sampler in the graphics device.
14
+ * The default texture sampler is used when a texture is sampled without a specific sampler being bound.
15
+ */
16
+ samplerFilteringPreset: TextureSamplerFilteringPreset;
17
+ }
18
+ /**
19
+ * The abstract base class for graphics devices.
20
+ */
21
+ export declare abstract class AGraphicsDevice implements IGraphicsDevice {
22
+ protected readonly _descriptor: GraphicsDeviceDescriptor;
23
+ protected _defaultTextureSampler: ISampler;
24
+ protected _defaultBlendState: IBlendState;
25
+ protected _defaultPrimitiveState: IPrimitiveState;
26
+ /**
27
+ * The constructor.
28
+ * @param descriptor The descriptor for the graphics device. This is used to configure the graphics device during initialization.
29
+ */
30
+ protected constructor(descriptor: GraphicsDeviceDescriptor);
31
+ /** @inheritdoc */
32
+ abstract readonly features: IGraphicsDeviceFeatures;
33
+ /** @inheritdoc */
34
+ abstract readonly gpuInfo: IGPUInfo;
35
+ /** @inheritdoc */
36
+ get defaultTextureSampler(): ISampler;
37
+ /** @inheritdoc */
38
+ get defaultBlendState(): IBlendState;
39
+ /** @inheritdoc */
40
+ get defaultPrimitiveState(): IPrimitiveState;
41
+ /**
42
+ * Configures and creates the default texture sampler based on the sampler filtering preset specified in the graphics device descriptor. The method creates a new sampler descriptor, sets its properties according to the selected filtering preset, and then creates and returns a new sampler using the configured descriptor.
43
+ * @returns The default texture sampler configured according to the sampler filtering preset specified in the graphics device descriptor.
44
+ */
45
+ protected configureAndCreateDefaultSampler(): ISampler;
46
+ /** @inheritdoc */
47
+ initialize(): void;
48
+ /** @inheritdoc */
49
+ abstract createSwapChain(canvas: HTMLCanvasElement, swapChainDescriptor: SwapChainDescriptor): ISwapChain;
50
+ /** @inheritdoc */
51
+ abstract createSampler(descriptor?: SamplerDescriptor): ISampler;
52
+ /** @inheritdoc */
53
+ abstract createRenderPass(descriptor: RenderPassDescriptor): IRenderPass;
54
+ /** @inheritdoc */
55
+ abstract createBlendState(descriptor: BlendStateDescriptor): IBlendState;
56
+ /** @inheritdoc */
57
+ abstract createPrimitiveState(descriptor?: PrimitiveStateDescriptor): IPrimitiveState;
58
+ /** @inheritDoc */
59
+ abstract setupDebugCallback(): void;
60
+ /** @inheritDoc */
61
+ abstract frameEnd(): void;
62
+ /** @inheritDoc */
63
+ abstract pushDebugGroup(groupName: string): void;
64
+ /** @inheritDoc */
65
+ abstract popDebugGroup(): void;
66
+ /** @inheritDoc */
67
+ dispose(): void;
68
+ }
69
+ //# sourceMappingURL=AGraphicsDevice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AGraphicsDevice.d.ts","sourceRoot":"","sources":["../../../src/core/rendering/AGraphicsDevice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAC,6BAA6B,EAAC,MAAM,SAAS,CAAC;AACtD,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,yCAAyC,CAAC;AACtF,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAC,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,uBAAuB,EAC5B,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,eAAe,EAAE,mBAAmB,EAAE,KAAK,oBAAoB,EACpE,KAAK,UAAU,EAClB,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,qBAAa,wBAAwB;IAEjC;;;;OAIG;IACI,sBAAsB,gCAA0C;CAC1E;AAED;;GAEG;AACH,8BAAsB,eAAgB,YAAW,eAAe;IAE5D,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,wBAAwB,CAAC;IACzD,SAAS,CAAC,sBAAsB,EAAE,QAAQ,CAAS;IACnD,SAAS,CAAC,kBAAkB,EAAE,WAAW,CAAS;IAClD,SAAS,CAAC,sBAAsB,EAAE,eAAe,CAAS;IAE1D;;;OAGG;IACH,SAAS,aAAa,UAAU,EAAE,wBAAwB;IAI1D,kBAAkB;IAClB,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAG,uBAAuB,CAAC;IAErD,kBAAkB;IAClB,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAEpC,kBAAkB;IAClB,IAAW,qBAAqB,IAAI,QAAQ,CAE3C;IAED,kBAAkB;IAClB,IAAW,iBAAiB,IAAI,WAAW,CAE1C;IAED,kBAAkB;IAClB,IAAW,qBAAqB,IAAI,eAAe,CAElD;IAED;;;OAGG;IACH,SAAS,CAAC,gCAAgC,IAAI,QAAQ;IAQtD,kBAAkB;IACX,UAAU,IAAI,IAAI;IAMzB,kBAAkB;aACF,eAAe,CAAC,MAAM,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,mBAAmB,GAAG,UAAU;IAEhH,kBAAkB;aACF,aAAa,CAAC,UAAU,CAAC,EAAE,iBAAiB,GAAG,QAAQ;IAEvE,kBAAkB;aACF,gBAAgB,CAAC,UAAU,EAAE,oBAAoB,GAAG,WAAW;IAE/E,kBAAkB;aACF,gBAAgB,CAAC,UAAU,EAAE,oBAAoB,GAAG,WAAW;IAE/E,kBAAkB;aACF,oBAAoB,CAAC,UAAU,CAAC,EAAE,wBAAwB,GAAI,eAAe;IAE7F,kBAAkB;aACF,kBAAkB,IAAI,IAAI;IAE1C,kBAAkB;aACF,QAAQ,IAAI,IAAI;IAEhC,kBAAkB;aACF,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAEvD,kBAAkB;aACF,aAAa,IAAI,IAAI;IAErC,kBAAkB;IACX,OAAO,IAAI,IAAI;CAIzB"}
@@ -0,0 +1,75 @@
1
+ import type { ITempRenderer } from "../renderer/renderer-interface.js";
2
+ import type { IRenderPass } from "./render-pass/render-pass-interface.js";
3
+ import type { vec2 } from "gl-matrix";
4
+ import type { RenderingLimits } from "../renderer/rendering-limits.js";
5
+ import { type IFramework, type IGraphicsDevice, type IMainRenderTargetRenderPipeline, type ISwapChain, type ITexture2D, RenderingBackend } from "ris-framework-api";
6
+ import { TextureFormat, Color } from "ris-framework-api";
7
+ export declare abstract class ARenderer implements ITempRenderer {
8
+ protected readonly _framework: IFramework;
9
+ /**
10
+ * The resize listeners.
11
+ */
12
+ protected _resizeListeners: ((sender: any, size: vec2) => void)[];
13
+ private readonly _windowManager;
14
+ private _graphicsDevice;
15
+ private _preferredTextureFormat;
16
+ private _preferredDepthStencilFormat;
17
+ private readonly _currentBackBufferSize;
18
+ private _swapChainRequiresResize;
19
+ private _mainRenderPassDirty;
20
+ private _clearColor;
21
+ protected _mainRenderTargetRequiresResize: boolean;
22
+ protected _swapChain: ISwapChain;
23
+ protected _mainRenderTarget: ITexture2D;
24
+ protected _depthStencilBuffer: ITexture2D;
25
+ protected _swapChainRenderPass: IRenderPass;
26
+ protected _mainRenderTargetRenderPass?: IRenderPass;
27
+ protected _mainRenderTargetPipeline?: IMainRenderTargetRenderPipeline;
28
+ /** @inheritdoc */
29
+ get graphicsDevice(): IGraphicsDevice;
30
+ /** @inheritdoc */
31
+ get clearColor(): Color;
32
+ /** @inheritdoc */
33
+ set clearColor(color: Color);
34
+ get limits(): RenderingLimits | null;
35
+ /** @inheritdoc */
36
+ get preferredTextureFormat(): TextureFormat;
37
+ /** @inheritdoc */
38
+ get preferredDepthStencilFormat(): TextureFormat;
39
+ /** @inheritdoc */
40
+ get backBufferSize(): vec2;
41
+ /** @inheritdoc */
42
+ set backBufferSize(size: vec2);
43
+ /** @inheritdoc */
44
+ backBufferMatchesSwapChain: boolean;
45
+ /**
46
+ * The constructor.
47
+ * @param framework The framework.
48
+ */
49
+ constructor(framework: IFramework);
50
+ backend: RenderingBackend;
51
+ /** @inheritDoc */
52
+ addOnResizedListener(event: (sender: any, e: vec2) => void): void;
53
+ /** @inheritDoc */
54
+ removeOnResizedListener(event: (sender: any, e: vec2) => void): void;
55
+ beginComputePass(): void;
56
+ endComputePass(): void;
57
+ /**
58
+ * Creates the graphics device for the renderer.
59
+ * This is an abstract method that must be implemented by subclasses to provide the specific graphics device implementation for the renderer.
60
+ * @returns The graphics device for the renderer.
61
+ */
62
+ protected abstract createGraphicsDevice(): IGraphicsDevice;
63
+ /** @inheritdoc */
64
+ initialize(): void;
65
+ /** @inheritdoc */
66
+ afterInitialize(): void;
67
+ private _setupMainRenderPass;
68
+ private _createMainRenderPass;
69
+ private _handleResizing;
70
+ /** @inheritdoc */
71
+ beginRenderPass(): void;
72
+ /** @inheritdoc */
73
+ endRenderPass(): void;
74
+ }
75
+ //# sourceMappingURL=ARenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ARenderer.d.ts","sourceRoot":"","sources":["../../../src/core/rendering/ARenderer.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,25 @@
1
+ import { BlendFactor, BlendOperation } from "./enums";
2
+ /**
3
+ * Descriptor for a blend component, which defines how source and destination colors are blended together.
4
+ */
5
+ export declare class BlendComponentDescriptor {
6
+ /**
7
+ * Multiplier for the source color/alpha which is the output of the fragment shader.
8
+ */
9
+ srcFactor: BlendFactor;
10
+ /**
11
+ * Multiplier for the destination color/alpha which is the color/alpha already in the framebuffer.
12
+ */
13
+ dstFactor: BlendFactor;
14
+ /**
15
+ * The operation to perform on the source and destination colors, multiplied by their respective factors.
16
+ */
17
+ operation: BlendOperation;
18
+ /**
19
+ * Compares this blend component descriptor with another for equality.
20
+ * @param other The other blend component descriptor to compare with.
21
+ * @returns True if the two descriptors are equal, false otherwise.
22
+ */
23
+ equal(other: BlendComponentDescriptor): boolean;
24
+ }
25
+ //# sourceMappingURL=blend-component-descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blend-component-descriptor.d.ts","sourceRoot":"","sources":["../../../../src/core/rendering/blending/blend-component-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEtD;;GAEG;AACH,qBAAa,wBAAwB;IAEjC;;OAEG;IACI,SAAS,EAAE,WAAW,CAAmB;IAEhD;;OAEG;IACI,SAAS,EAAE,WAAW,CAAmC;IAEhE;;OAEG;IACI,SAAS,EAAE,cAAc,CAAsB;IAEtD;;;;OAIG;IACI,KAAK,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO;CAKzD"}
@@ -0,0 +1,29 @@
1
+ import { BlendComponentDescriptor } from "./blend-component-descriptor";
2
+ /**
3
+ * Describes the blend state of a render pipeline.
4
+ */
5
+ export declare class BlendStateDescriptor {
6
+ /**
7
+ * The constructor.
8
+ */
9
+ constructor();
10
+ /**
11
+ * Whether blending is enabled. If false, the source color is written to the render target without blending.
12
+ */
13
+ blendingEnabled: boolean;
14
+ /**
15
+ * Color equation.
16
+ */
17
+ color: BlendComponentDescriptor;
18
+ /**
19
+ * Alpha equation.
20
+ */
21
+ alpha: BlendComponentDescriptor;
22
+ /**
23
+ * Compares this blend state descriptor with another for equality.
24
+ * @param other The other blend state descriptor to compare with.
25
+ * @returns True if the two descriptors are equal, false otherwise.
26
+ */
27
+ equal(other: BlendStateDescriptor): boolean;
28
+ }
29
+ //# sourceMappingURL=blend-state-descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blend-state-descriptor.d.ts","sourceRoot":"","sources":["../../../../src/core/rendering/blending/blend-state-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAGxE;;GAEG;AACH,qBAAa,oBAAoB;IAE7B;;OAEG;;IAeH;;OAEG;IACI,eAAe,EAAE,OAAO,CAAQ;IAEvC;;OAEG;IACI,KAAK,EAAE,wBAAwB,CAAC;IAEvC;;OAEG;IACI,KAAK,EAAE,wBAAwB,CAAC;IAEvC;;;;OAIG;IACI,KAAK,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO;CAKrD"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * The blend operation.
3
+ */
4
+ export declare enum BlendOperation {
5
+ /**
6
+ * Add the source and destination colors together, multiplied by their respective factors.
7
+ */
8
+ ADD = 0,
9
+ /**
10
+ * Subtract the destination color from the source color, multiplied by their respective factors.
11
+ */
12
+ SUBTRACT = 1,
13
+ /**
14
+ * Reverse subtract the source color from the destination color, multiplied by their respective factors.
15
+ */
16
+ REVERSE_SUBTRACT = 2,
17
+ /**
18
+ * Select the minimum of the source and destination colors, multiplied by their respective factors.
19
+ */
20
+ MIN = 3,
21
+ /**
22
+ * Select the maximum of the source and destination colors, multiplied by their respective factors.
23
+ */
24
+ MAX = 4
25
+ }
26
+ export declare enum BlendFactor {
27
+ /**
28
+ * <c>1.0</c>
29
+ */
30
+ ONE = 0,
31
+ /**
32
+ * Source.Alpha, where Source is the color being drawn.
33
+ */
34
+ SRC_ALPHA = 1,
35
+ /**
36
+ * <c>1.0 - Source.Alpha</c>, where Source is the color being drawn.
37
+ */
38
+ ONE_MINUS_SRC_ALPHA = 2
39
+ }
40
+ //# sourceMappingURL=enums.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../../src/core/rendering/blending/enums.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,cAAc;IACtB;;OAEG;IACH,GAAG,IAAA;IAEH;;OAEG;IACH,QAAQ,IAAA;IAER;;OAEG;IACH,gBAAgB,IAAA;IAEhB;;OAEG;IACH,GAAG,IAAA;IAEH;;OAEG;IACH,GAAG,IAAA;CACN;AAKD,oBAAY,WAAW;IAEnB;;OAEG;IACH,GAAG,IAAA;IAEH;;OAEG;IACH,SAAS,IAAA;IAET;;MAEE;IACF,mBAAmB,IAAA;CACtB"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The preset for texture sampler filtering.
3
+ * This is used to configure the default texture sampler in the graphics device.
4
+ * The default texture sampler is used when a texture is sampled without a specific sampler being bound.
5
+ */
6
+ export declare enum TextureSamplerFilteringPreset {
7
+ /**
8
+ * Point filtering preset. This will configure the texture sampler to use point filtering for minification and magnification, and no mipmapping.
9
+ */
10
+ POINT = 0,
11
+ /**
12
+ * Bilinear filtering preset. This will configure the texture sampler to use bilinear filtering for minification and magnification, and no mipmapping.
13
+ */
14
+ BILINEAR = 1,
15
+ /**
16
+ * Trilinear filtering preset. This will configure the texture sampler to use bilinear filtering for minification and magnification, and linear mipmapping.
17
+ */
18
+ TRILINEAR = 2
19
+ }
20
+ //# sourceMappingURL=enums.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/core/rendering/enums.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,oBAAY,6BAA6B;IACrC;;OAEG;IACH,KAAK,IAAA;IAEL;;OAEG;IACH,QAAQ,IAAA;IAER;;OAEG;IACH,SAAS,IAAA;CACZ"}
@@ -0,0 +1,26 @@
1
+ import { CullMode, FrontFace, PrimitiveTopology } from "./enums";
2
+ /**
3
+ * Describes the state of a primitive.
4
+ */
5
+ export declare class PrimitiveStateDescriptor {
6
+ /**
7
+ * The constructor.
8
+ */
9
+ constructor();
10
+ /**
11
+ * The topology of the primitive.
12
+ * By default, it is set to <see cref="PrimitiveTopology.TRIANGLE_LIST"/>.
13
+ */
14
+ topology: PrimitiveTopology;
15
+ /**
16
+ * The culling mode.
17
+ * By default, it is set to <see cref="CullMode.BACK"/>.
18
+ */
19
+ cullFace: CullMode;
20
+ /**
21
+ * The front face.
22
+ * By default, it is set to <see cref="FrontFace.CCW"/>.
23
+ */
24
+ frontFace: FrontFace;
25
+ }
26
+ //# sourceMappingURL=PrimitiveStateDescriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrimitiveStateDescriptor.d.ts","sourceRoot":"","sources":["../../../../src/core/rendering/primitive/PrimitiveStateDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjE;;EAEE;AACF,qBAAa,wBAAwB;IACjC;;MAEE;;IAOF;;;MAGE;IACK,QAAQ,EAAE,iBAAiB,CAAC;IAEnC;;;MAGE;IACK,QAAQ,EAAE,QAAQ,CAAC;IAC1B;;;MAGE;IACK,SAAS,EAAE,SAAS,CAAC;CAC/B"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * The culling mode.
3
+ */
4
+ export declare enum CullMode {
5
+ /**
6
+ * The culling is disabled. Both front and back faces will be rendered.
7
+ */
8
+ NONE = 0,
9
+ /**
10
+ * The back faces will be culled. Only front faces will be rendered.
11
+ */
12
+ BACK = 1,
13
+ /**
14
+ * The front faces will be culled. Only back faces will be rendered.
15
+ */
16
+ FRONT = 2
17
+ }
18
+ /**
19
+ * The front face winding order.
20
+ */
21
+ export declare enum FrontFace {
22
+ /**
23
+ * The clockwise winding order.
24
+ */
25
+ CW = 0,
26
+ /**
27
+ * The counter-clockwise winding order.
28
+ */
29
+ CCW = 1
30
+ }
31
+ /**
32
+ * The primitive topology.
33
+ */
34
+ export declare enum PrimitiveTopology {
35
+ /**
36
+ * Each consecutive pair of two vertices defines a line primitive.
37
+ */
38
+ LINE_LIST = 0,
39
+ /**
40
+ * Each vertex after the first defines a line primitive between it and the previous vertex.
41
+ */
42
+ LINE_STRIP = 1,
43
+ /**
44
+ * Each vertex defines a point primitive.
45
+ */
46
+ POINT_LIST = 2,
47
+ /**
48
+ * Each consecutive triplet of three vertices defines a triangle primitive.
49
+ */
50
+ TRIANGLE_LIST = 3,
51
+ /**
52
+ * Each vertex after the first two defines a triangle primitive between it and the previous two vertices.
53
+ */
54
+ TRIANGLE_STRIP = 4
55
+ }
56
+ //# sourceMappingURL=enums.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../../src/core/rendering/primitive/enums.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,QAAQ;IAEhB;;MAEE;IACF,IAAI,IAAA;IAEJ;;MAEE;IACF,IAAI,IAAA;IAEJ;;MAEE;IACF,KAAK,IAAA;CACR;AAED;;EAEE;AACF,oBAAY,SAAS;IAEjB;;MAEE;IACF,EAAE,IAAA;IAEF;;MAEE;IACF,GAAG,IAAA;CACN;AAGD;;EAEE;AACF,oBAAY,iBAAiB;IAEzB;;MAEE;IACF,SAAS,IAAA;IAET;;MAEE;IACF,UAAU,IAAA;IAEV;;MAEE;IACF,UAAU,IAAA;IAEV;;MAEE;IACF,aAAa,IAAA;IAEb;;MAEE;IACF,cAAc,IAAA;CACjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=render-pass-descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-pass-descriptor.d.ts","sourceRoot":"","sources":["../../../../src/core/rendering/render-pass/render-pass-descriptor.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import type { IDisposable } from "ris-framework-api";
2
+ /**
3
+ * Defines the interface for a render pass, which encapsulates the operations and state management required to execute a rendering sequence.
4
+ */
5
+ export interface IRenderPass extends IDisposable {
6
+ /**
7
+ * Begins the render pass, setting up necessary state and resources for rendering.
8
+ */
9
+ beginPass(): void;
10
+ /**
11
+ * Ends the render pass, finalizing any rendering operations and cleaning up resources as needed.
12
+ */
13
+ endPass(): void;
14
+ }
15
+ //# sourceMappingURL=render-pass-interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-pass-interface.d.ts","sourceRoot":"","sources":["../../../../src/core/rendering/render-pass/render-pass-interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,WAAW;IAE5C;;OAEG;IACH,SAAS,IAAI,IAAI,CAAC;IAElB;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACnB"}
@@ -0,0 +1,28 @@
1
+ import { MipMapSamplerFilter, SamplerAddressMode, SamplerFilter } from "ris-framework-api";
2
+ export declare class SamplerDescriptor {
3
+ /**
4
+ * The minification filter.
5
+ */
6
+ minFilter: SamplerFilter;
7
+ /**
8
+ * The magnification filter.
9
+ */
10
+ magFilter: SamplerFilter;
11
+ /**
12
+ * The mipmap filter.
13
+ */
14
+ mipMapFilter: MipMapSamplerFilter;
15
+ /**
16
+ * The address mode for the U coordinate.
17
+ */
18
+ addressModeU: SamplerAddressMode;
19
+ /**
20
+ * The address mode for the V coordinate.
21
+ */
22
+ addressModeV: SamplerAddressMode;
23
+ /**
24
+ * The address mode for the W coordinate.
25
+ */
26
+ addressModeW: SamplerAddressMode;
27
+ }
28
+ //# sourceMappingURL=sampler-descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sampler-descriptor.d.ts","sourceRoot":"","sources":["../../../../src/core/rendering/sampler/sampler-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAE,kBAAkB,EAAE,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAEzF,qBAAa,iBAAiB;IAC1B;;OAEG;IACI,SAAS,EAAE,aAAa,CAAyB;IAExD;;OAEG;IACI,SAAS,EAAE,aAAa,CAAyB;IAExD;;OAEG;IACI,YAAY,EAAE,mBAAmB,CAA4B;IAEpE;;OAEG;IACI,YAAY,EAAE,kBAAkB,CAAoC;IAE3E;;OAEG;IACI,YAAY,EAAE,kBAAkB,CAAoC;IAE3E;;OAEG;IACI,YAAY,EAAE,kBAAkB,CAAoC;CAC9E"}