ris-framework 0.2.0-dev.14 → 0.2.0-dev.16

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 (160) hide show
  1. package/CHANGELOG.md +39 -2
  2. package/README.md +8 -6
  3. package/dist/api/IFramework.d.ts +1 -1
  4. package/dist/api/IFramework.d.ts.map +1 -1
  5. package/dist/api/_export.d.ts +3 -0
  6. package/dist/api/_export.d.ts.map +1 -1
  7. package/dist/api/camera/CameraTransformUtilities.d.ts +65 -0
  8. package/dist/api/camera/CameraTransformUtilities.d.ts.map +1 -0
  9. package/dist/api/camera/ICamera.d.ts +36 -2
  10. package/dist/api/camera/ICamera.d.ts.map +1 -1
  11. package/dist/api/camera/OrbitCamera.d.ts +22 -14
  12. package/dist/api/camera/OrbitCamera.d.ts.map +1 -1
  13. package/dist/api/camera/OrthographicCamera.d.ts +33 -11
  14. package/dist/api/camera/OrthographicCamera.d.ts.map +1 -1
  15. package/dist/api/camera/PerspectiveCamera.d.ts +32 -18
  16. package/dist/api/camera/PerspectiveCamera.d.ts.map +1 -1
  17. package/dist/api/content/ContentManager.d.ts.map +1 -1
  18. package/dist/api/lights/AmbientLight.d.ts +7 -2
  19. package/dist/api/lights/AmbientLight.d.ts.map +1 -1
  20. package/dist/api/lights/DirectionalLight.d.ts +18 -4
  21. package/dist/api/lights/DirectionalLight.d.ts.map +1 -1
  22. package/dist/api/lights/ILight.d.ts +18 -0
  23. package/dist/api/lights/ILight.d.ts.map +1 -0
  24. package/dist/api/lights/PointLight.d.ts +17 -4
  25. package/dist/api/lights/PointLight.d.ts.map +1 -1
  26. package/dist/api/lights/_export.d.ts +1 -0
  27. package/dist/api/lights/_export.d.ts.map +1 -1
  28. package/dist/api/material/ForwardBlinnPhongMaterial.d.ts +2 -2
  29. package/dist/api/material/ForwardBlinnPhongMaterial.d.ts.map +1 -1
  30. package/dist/api/material/IMaterial.d.ts +7 -0
  31. package/dist/api/material/IMaterial.d.ts.map +1 -1
  32. package/dist/api/material/IMaterialFactory.d.ts +3 -2
  33. package/dist/api/material/IMaterialFactory.d.ts.map +1 -1
  34. package/dist/api/material/IUnlitMaterialDescriptor.d.ts +16 -0
  35. package/dist/api/material/IUnlitMaterialDescriptor.d.ts.map +1 -0
  36. package/dist/api/material/MaterialFactory.d.ts +3 -2
  37. package/dist/api/material/MaterialFactory.d.ts.map +1 -1
  38. package/dist/api/material/SpriteMaterial.d.ts +3 -0
  39. package/dist/api/material/SpriteMaterial.d.ts.map +1 -1
  40. package/dist/api/material/UnlitMaterial.d.ts +5 -12
  41. package/dist/api/material/UnlitMaterial.d.ts.map +1 -1
  42. package/dist/api/material/_export.d.ts +1 -1
  43. package/dist/api/material/_export.d.ts.map +1 -1
  44. package/dist/api/meshes/IRenderableMesh.d.ts +3 -14
  45. package/dist/api/meshes/IRenderableMesh.d.ts.map +1 -1
  46. package/dist/api/meshes/RenderableMesh.d.ts +5 -20
  47. package/dist/api/meshes/RenderableMesh.d.ts.map +1 -1
  48. package/dist/api/rendering/IGraphicsDevice.d.ts +2 -2
  49. package/dist/api/rendering/IGraphicsDevice.d.ts.map +1 -1
  50. package/dist/api/rendering/IRenderer.d.ts +6 -4
  51. package/dist/api/rendering/IRenderer.d.ts.map +1 -1
  52. package/dist/api/rendering/_export-rendering.d.ts +1 -0
  53. package/dist/api/rendering/_export-rendering.d.ts.map +1 -1
  54. package/dist/api/rendering/primitive/IPrimitiveStateDescriptor.d.ts +24 -0
  55. package/dist/api/rendering/primitive/IPrimitiveStateDescriptor.d.ts.map +1 -0
  56. package/dist/api/rendering/primitive/_export.d.ts +1 -1
  57. package/dist/api/rendering/primitive/_export.d.ts.map +1 -1
  58. package/dist/api/rendering/render-pipelines/IMainRenderTargetRenderPipeline.d.ts +5 -0
  59. package/dist/api/rendering/render-pipelines/IMainRenderTargetRenderPipeline.d.ts.map +1 -1
  60. package/dist/api/rendering/texture/ITextureDescriptor.d.ts +5 -1
  61. package/dist/api/rendering/texture/ITextureDescriptor.d.ts.map +1 -1
  62. package/dist/api/rendering/texture/ITextureFactory.d.ts +3 -1
  63. package/dist/api/rendering/texture/ITextureFactory.d.ts.map +1 -1
  64. package/dist/api/rendering/texture/TextureUtilities.d.ts +7 -0
  65. package/dist/api/rendering/texture/TextureUtilities.d.ts.map +1 -1
  66. package/dist/api/scene/ISceneObject.d.ts +12 -0
  67. package/dist/api/scene/ISceneObject.d.ts.map +1 -0
  68. package/dist/api/scene/Scene.d.ts +17 -6
  69. package/dist/api/scene/Scene.d.ts.map +1 -1
  70. package/dist/api/scene/node/Node.d.ts +26 -0
  71. package/dist/api/scene/node/Node.d.ts.map +1 -0
  72. package/dist/api/scene/node/TransformNode.d.ts +46 -0
  73. package/dist/api/scene/node/TransformNode.d.ts.map +1 -0
  74. package/dist/core/material/UnlitMaterialDescriptorUtilities.d.ts +17 -0
  75. package/dist/core/material/UnlitMaterialDescriptorUtilities.d.ts.map +1 -0
  76. package/dist/core/rendering/AGraphicsDevice.d.ts +2 -2
  77. package/dist/core/rendering/AGraphicsDevice.d.ts.map +1 -1
  78. package/dist/core/rendering/ARenderer.d.ts +5 -2
  79. package/dist/core/rendering/ARenderer.d.ts.map +1 -1
  80. package/dist/core/rendering/primitive/PrimitiveStateDescriptorUtilities.d.ts +15 -0
  81. package/dist/core/rendering/primitive/PrimitiveStateDescriptorUtilities.d.ts.map +1 -0
  82. package/dist/core/rendering/texture/TextureDescriptorUtilities.d.ts +2 -2
  83. package/dist/core/rendering/texture/TextureDescriptorUtilities.d.ts.map +1 -1
  84. package/dist/index.js +704 -272
  85. package/dist/webgl/WebGlGraphicsDevice.d.ts +2 -2
  86. package/dist/webgl/WebGlGraphicsDevice.d.ts.map +1 -1
  87. package/dist/webgl/lights/WebGlLightsBuffer.d.ts.map +1 -1
  88. package/dist/webgl/primitive/WebGlPrimitiveState.d.ts +3 -3
  89. package/dist/webgl/primitive/WebGlPrimitiveState.d.ts.map +1 -1
  90. package/dist/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.d.ts +8 -0
  91. package/dist/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.d.ts.map +1 -1
  92. package/dist/webgl/texture/WebGlTextureFactory.d.ts +1 -1
  93. package/dist/webgl/texture/WebGlTextureFactory.d.ts.map +1 -1
  94. package/dist/webgl/utilities/WebGlTextureUtilities.d.ts.map +1 -1
  95. package/dist/webgpu/WebGpuGraphicsDevice.d.ts +2 -2
  96. package/dist/webgpu/WebGpuGraphicsDevice.d.ts.map +1 -1
  97. package/dist/webgpu/primitive/WebGpuPrimitiveState.d.ts +2 -2
  98. package/dist/webgpu/primitive/WebGpuPrimitiveState.d.ts.map +1 -1
  99. package/dist/webgpu/render-pipelines/WebGpuMainRenderTargetRenderPipeline.d.ts +5 -0
  100. package/dist/webgpu/render-pipelines/WebGpuMainRenderTargetRenderPipeline.d.ts.map +1 -1
  101. package/dist/webgpu/texture/WebGpuTextureFactory.d.ts.map +1 -1
  102. package/package.json +2 -2
  103. package/src/Framework.ts +1 -1
  104. package/src/api/IFramework.ts +1 -1
  105. package/src/api/_export.ts +3 -0
  106. package/src/api/camera/CameraTransformUtilities.ts +182 -0
  107. package/src/api/camera/ICamera.ts +42 -2
  108. package/src/api/camera/OrbitCamera.ts +71 -38
  109. package/src/api/camera/OrthographicCamera.ts +71 -28
  110. package/src/api/camera/PerspectiveCamera.ts +69 -33
  111. package/src/api/content/ContentManager.ts +9 -5
  112. package/src/api/lights/AmbientLight.ts +8 -2
  113. package/src/api/lights/DirectionalLight.ts +30 -5
  114. package/src/api/lights/ILight.ts +22 -0
  115. package/src/api/lights/PointLight.ts +26 -5
  116. package/src/api/lights/_export.ts +1 -0
  117. package/src/api/material/ForwardBlinnPhongMaterial.ts +2 -2
  118. package/src/api/material/IMaterial.ts +8 -0
  119. package/src/api/material/IMaterialFactory.ts +3 -2
  120. package/src/api/material/IUnlitMaterialDescriptor.ts +18 -0
  121. package/src/api/material/MaterialFactory.ts +4 -3
  122. package/src/api/material/SpriteMaterial.ts +4 -0
  123. package/src/api/material/UnlitMaterial.ts +11 -18
  124. package/src/api/material/_export.ts +1 -1
  125. package/src/api/meshes/IRenderableMesh.ts +3 -18
  126. package/src/api/meshes/RenderableMesh.ts +15 -45
  127. package/src/api/rendering/IGraphicsDevice.ts +2 -2
  128. package/src/api/rendering/IRenderer.ts +6 -4
  129. package/src/api/rendering/_export-rendering.ts +2 -1
  130. package/src/api/rendering/primitive/IPrimitiveStateDescriptor.ts +27 -0
  131. package/src/api/rendering/primitive/_export.ts +1 -1
  132. package/src/api/rendering/render-pipelines/IMainRenderTargetRenderPipeline.ts +6 -0
  133. package/src/api/rendering/texture/ITextureDescriptor.ts +6 -1
  134. package/src/api/rendering/texture/ITextureFactory.ts +3 -1
  135. package/src/api/rendering/texture/TextureUtilities.ts +16 -0
  136. package/src/api/scene/ISceneObject.ts +13 -0
  137. package/src/api/scene/Scene.ts +52 -11
  138. package/src/api/scene/node/Node.ts +54 -0
  139. package/src/api/scene/node/TransformNode.ts +88 -0
  140. package/src/core/material/UnlitMaterialDescriptorUtilities.ts +21 -0
  141. package/src/core/rendering/AGraphicsDevice.ts +2 -2
  142. package/src/core/rendering/ARenderer.ts +23 -5
  143. package/src/core/rendering/primitive/PrimitiveStateDescriptorUtilities.ts +22 -0
  144. package/src/core/rendering/texture/TextureDescriptorUtilities.ts +3 -2
  145. package/src/webgl/WebGlGraphicsDevice.ts +2 -3
  146. package/src/webgl/lights/WebGlLightsBuffer.ts +21 -8
  147. package/src/webgl/primitive/WebGlPrimitiveState.ts +8 -6
  148. package/src/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.ts +14 -0
  149. package/src/webgl/texture/WebGlTextureFactory.ts +27 -16
  150. package/src/webgl/utilities/WebGlTextureUtilities.ts +10 -4
  151. package/src/webgpu/WebGpuGraphicsDevice.ts +3 -3
  152. package/src/webgpu/primitive/WebGpuPrimitiveState.ts +7 -5
  153. package/src/webgpu/render-pipelines/WebGpuMainRenderTargetRenderPipeline.ts +6 -0
  154. package/src/webgpu/texture/WebGpuTextureFactory.ts +1 -1
  155. package/dist/api/material/ICameraMaterial.d.ts +0 -18
  156. package/dist/api/material/ICameraMaterial.d.ts.map +0 -1
  157. package/dist/api/rendering/primitive/PrimitiveStateDescriptor.d.ts +0 -24
  158. package/dist/api/rendering/primitive/PrimitiveStateDescriptor.d.ts.map +0 -1
  159. package/src/api/material/ICameraMaterial.ts +0 -22
  160. package/src/api/rendering/primitive/PrimitiveStateDescriptor.ts +0 -27
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IPrimitiveStateDescriptor.d.ts","sourceRoot":"","sources":["../../../../src/api/rendering/primitive/IPrimitiveStateDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,yBAAyB;IAEtC;;;OAGG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAE7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACzB"}
@@ -2,5 +2,5 @@ export * from "./CullMode.js";
2
2
  export * from "./FrontFace.js";
3
3
  export * from "./IPrimitiveState.js";
4
4
  export * from "./PrimitiveTopology.js";
5
- export * from "./PrimitiveStateDescriptor.js";
5
+ export * from "./IPrimitiveStateDescriptor.js";
6
6
  //# sourceMappingURL=_export.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_export.d.ts","sourceRoot":"","sources":["../../../../src/api/rendering/primitive/_export.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA"}
1
+ {"version":3,"file":"_export.d.ts","sourceRoot":"","sources":["../../../../src/api/rendering/primitive/_export.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import type { IRenderPipeline } from "./IRenderPipeline.js";
2
2
  import type { ITexture2D } from "../texture/ITexture2D.js";
3
+ import type { ColorSpace } from "../enums.js";
3
4
  /**
4
5
  * Pipeline that is used in renderer as
5
6
  * a pass that renders from the main frame buffer to the screen.
@@ -10,6 +11,10 @@ export interface IMainRenderTargetRenderPipeline extends IRenderPipeline {
10
11
  * The pipeline will render this texture to the screen.
11
12
  */
12
13
  readonly mainRenderTarget: ITexture2D;
14
+ /**
15
+ * Gets or sets the preferred color space. Only relevant for WebGL2 renderer.
16
+ */
17
+ colorSpace: ColorSpace;
13
18
  /**
14
19
  * Render to the screen.
15
20
  */
@@ -1 +1 @@
1
- {"version":3,"file":"IMainRenderTargetRenderPipeline.d.ts","sourceRoot":"","sources":["../../../../src/api/rendering/render-pipelines/IMainRenderTargetRenderPipeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D;;;GAGG;AACH,MAAM,WAAW,+BAAgC,SAAQ,eAAe;IAEpE;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,EAAE,UAAU,CAAC;IAEtC;;OAEG;IACH,MAAM,IAAI,IAAI,CAAC;CAElB"}
1
+ {"version":3,"file":"IMainRenderTargetRenderPipeline.d.ts","sourceRoot":"","sources":["../../../../src/api/rendering/render-pipelines/IMainRenderTargetRenderPipeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAE5C;;;GAGG;AACH,MAAM,WAAW,+BAAgC,SAAQ,eAAe;IAEpE;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,EAAE,UAAU,CAAC;IAEtC;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC;IAEvB;;OAEG;IACH,MAAM,IAAI,IAAI,CAAC;CAElB"}
@@ -1,6 +1,7 @@
1
1
  import type { TextureFormat } from "./TextureFormat.js";
2
2
  import type { TextureUsage } from "./TextureUsage.js";
3
3
  import type { vec2 } from "gl-matrix";
4
+ import type { ColorSpace } from "../enums.js";
4
5
  /**
5
6
  * The texture descriptor. Every field is optional; factories fill in the defaults for missing fields.
6
7
  */
@@ -16,10 +17,13 @@ export interface ITextureDescriptor {
16
17
  */
17
18
  height?: number;
18
19
  /**
19
- * The texture format.
20
+ * The texture format. When loading texture preferred format can be set.
21
+ * This overrides framework preferred color space when loading or ktx2 transcoding.
20
22
  * By default, it is UNDEFINED.
21
23
  */
22
24
  textureFormat?: TextureFormat;
25
+ /** The preferred color space. If not defined, it is specified by framework. */
26
+ preferredColorSpace?: ColorSpace;
23
27
  /**
24
28
  * The texture usage.
25
29
  * By default, it is TEXTURE_BINDING | COPY_DST.
@@ -1 +1 @@
1
- {"version":3,"file":"ITextureDescriptor.d.ts","sourceRoot":"","sources":["../../../../src/api/rendering/texture/ITextureDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAE/B;;;OAGG;IACH,KAAK,CAAC,E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CACpB"}
@@ -26,7 +26,9 @@ export interface ITextureFactory {
26
26
  * @param channels - The number of channels.
27
27
  * @param label - The label.
28
28
  * @param usage - Texture usage. By default, it is COPY_DST | TEXTURE_BINDING.
29
- * @param textureFormat - The texture format. By default, it is undefined. If so, the preferred texture format is used.
29
+ * @param textureFormat - The texture format. By default (or when UNDEFINED), the renderer's current
30
+ * {@link IRenderer.preferredTextureFormat} is used, so it follows {@link IRenderer.colorSpace}.
31
+ * Pass {@link TextureFormat.RGBA_8_UNORM} explicitly for raw data that must stay linear.
30
32
  * @param generateMipMaps - Indicates if texture should generate mipmap levels.
31
33
  * @returns The texture.
32
34
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ITextureFactory.d.ts","sourceRoot":"","sources":["../../../../src/api/rendering/texture/ITextureFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,eAAe;IAE5B;;;;;;;;OAQG;IACH,WAAW,CACP,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAC7B,YAAY,CAAC,EAAE,KAAK,EACpB,YAAY,CAAC,EAAE,YAAY,EAC3B,aAAa,CAAC,EAAE,aAAa,EAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAEhC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAC7B,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,gBAAgB,GA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aAAa,EAC7B,eAAe,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAE9C;;;;;OAKG;IACH,cAAc,CAAC,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,kBAAkB,GAAG,UAAU,CAAC;CACzF"}
@@ -74,5 +74,12 @@ export declare class TextureUtilities {
74
74
  * @return True if srgb texture format.
75
75
  */
76
76
  static isSrgbFormat(textureFormat: TextureFormat): boolean;
77
+ /**
78
+ * Returns the requested format if it is the file's format or its sRGB/linear variant.
79
+ * @param fileFormat The format the data is stored in.
80
+ * @param requested The explicitly requested format.
81
+ * @throws If the requested format cannot reinterpret the data.
82
+ */
83
+ static resolveExplicitFormat(fileFormat: TextureFormat, requested: TextureFormat): TextureFormat;
77
84
  }
78
85
  //# sourceMappingURL=TextureUtilities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextureUtilities.d.ts","sourceRoot":"","sources":["../../../../src/api/rendering/texture/TextureUtilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAC,kBAAkB,EAAqB,QAAQ,EAAC,MAAM,UAAU,CAAC;AAGzE;;GAEG;AACH,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,yBAAyB,CAkD/C;IAEF,mDAAmD;IACnD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAqBlC;IACF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAgD7C;IAED,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAsD5C;IAEF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mCAAmC,CAazD;IAEF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,8BAA8B,CAmBpD;IAEF,wCAAwC;IACxC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAEpC;IAEF,yBAAyB;IACzB,OAAO,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OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mCAAmC,CAczD;IAEF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,8BAA8B,CAmBpD;IAEF,wCAAwC;IACxC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAEpC;IAEF,yBAAyB;IACzB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAiE;IAErG;;;;OAIG;WACW,yBAAyB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO;IAIvE;;;;;;OAMG;WACW,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAI9D;;;;;;;OAOG;WACW,WAAW,CAAC,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAkB9F;;;;OAIG;WACW,8BAA8B,CAAC,QAAQ,EAAE,QAAQ,GAAG,aAAa;IAQ/E;;;;OAIG;WACW,wCAAwC,CAAC,aAAa,EAAE,aAAa,GAAG,kBAAkB;IAQxG;;;;OAIG;WACW,mCAAmC,CAAC,eAAe,EAAE,kBAAkB,GAAG,QAAQ;IAQhG;;;;OAIG;WACW,oBAAoB,CAAC,aAAa,EAAE,aAAa,GAAI,aAAa;IAIhF;;;;OAIG;WACW,sBAAsB,CAAC,aAAa,EAAE,aAAa,GAAI,aAAa;IAIlF;;;;OAIG;WACW,YAAY,CAAC,aAAa,EAAE,aAAa,GAAI,OAAO;IAIlE;;;;;OAKG;WACW,qBAAqB,CAAC,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,GAAG,aAAa;CAQ1G"}
@@ -0,0 +1,12 @@
1
+ import type { TransformNode } from "./node/TransformNode.js";
2
+ /**
3
+ * An object that can be placed in a scene: it has a transform.
4
+ * @public
5
+ */
6
+ export interface ISceneObject {
7
+ /**
8
+ * The transform node.
9
+ */
10
+ transform: TransformNode;
11
+ }
12
+ //# sourceMappingURL=ISceneObject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISceneObject.d.ts","sourceRoot":"","sources":["../../../src/api/scene/ISceneObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAE3D;;;GAGG;AACH,MAAM,WAAW,YAAY;IAEzB;;OAEG;IACH,SAAS,EAAE,aAAa,CAAC;CAC5B"}
@@ -7,8 +7,9 @@ import type { IRenderableMesh } from "../meshes/IRenderableMesh.js";
7
7
  import { SceneMesh } from "./SceneMesh.js";
8
8
  import type { GameTime } from "../time/GameTime.js";
9
9
  import type { ICamera } from "../camera/ICamera.js";
10
- /** Anything a scene can hold: a mesh, a light (ambient, directional, point) or a camera. */
11
- export type SceneItem = IRenderableMesh | SceneMesh | AmbientLight | DirectionalLight | PointLight | ICamera;
10
+ import type { ISceneObject } from "./ISceneObject.js";
11
+ /** Anything a scene can hold: a mesh, a scene object, a light (ambient, directional, point) or a camera. */
12
+ export type SceneItem = IRenderableMesh | SceneMesh | ISceneObject | AmbientLight | DirectionalLight | PointLight | ICamera;
12
13
  /**
13
14
  * The scene. Lights and cameras given a scene in their constructor add themselves through {@link add};
14
15
  * meshes are added with `scene.add(mesh)` (wrapped in a {@link SceneMesh}, which owns the mesh's materials).
@@ -17,6 +18,7 @@ export type SceneItem = IRenderableMesh | SceneMesh | AmbientLight | Directional
17
18
  */
18
19
  export declare class Scene implements IDisposable {
19
20
  private readonly _sceneMeshes;
21
+ private readonly _nodes;
20
22
  private readonly _directionalLights;
21
23
  private readonly _pointLights;
22
24
  /** The directional light slots (matches the Blinn-Phong material). */
@@ -42,6 +44,8 @@ export declare class Scene implements IDisposable {
42
44
  constructor(framework: IFramework);
43
45
  /** The scene meshes, in the order they were added. */
44
46
  get sceneMeshes(): readonly SceneMesh[];
47
+ /** The scene objects (anything with a transform, including root meshes), in the order they were added. */
48
+ get nodes(): readonly ISceneObject[];
45
49
  /** The root meshes in this scene, in the order they were added. */
46
50
  get meshes(): readonly IRenderableMesh[];
47
51
  /** The directional lights in this scene. */
@@ -58,9 +62,13 @@ export declare class Scene implements IDisposable {
58
62
  * Adds a mesh, a light or a camera. Adding an item that is already in the scene does nothing.
59
63
  * - Renderable mesh or {@link SceneMesh}: drawn by {@link render}; its materials get the scene camera and lights.
60
64
  * A mesh is wrapped in a `SceneMesh`, so {@link dispose} also disposes its materials.
61
- * - Ambient light: added to {@link ambientLights} (use {@link activeAmbientLight} to make it the lit one).
65
+ * The mesh is also added to {@link nodes}.
66
+ * - {@link ISceneObject} (anything with a `transform`): added to {@link nodes}; {@link update} updates its transform.
67
+ * - Lights are also added to {@link nodes} (they are scene objects).
68
+ * - Ambient light: added to {@link ambientLights} (use {@link activeAmbientLight} to make it the lit one).
62
69
  * - Directional / point light: added to {@link directionalLights} / {@link pointLights}.
63
- * - Camera: becomes the scene {@link camera}.
70
+ * - Camera: becomes the scene {@link camera} and is added to {@link nodes} (cameras are scene objects).
71
+ * Checked before the generic scene object case.
64
72
  * Constructors given a scene (lights, the perspective camera) call this themselves.
65
73
  * @param item The item to add.
66
74
  * @throws Error when all slots for a light kind are in use (3 directional, 5 point), or for an unsupported item.
@@ -70,7 +78,7 @@ export declare class Scene implements IDisposable {
70
78
  * Removes a mesh (or scene mesh), a light or a camera. The mesh and its materials are not disposed.
71
79
  * Removing the active camera clears {@link camera}.
72
80
  * @param item The item to remove.
73
- * @returns True when the item was in the scene (for a camera: was the active camera).
81
+ * @returns True when the item was in the scene.
74
82
  * @throws Error when removing the active ambient light (set another {@link activeAmbientLight} first), or for an unsupported item.
75
83
  */
76
84
  remove(item: SceneItem): boolean;
@@ -91,10 +99,13 @@ export declare class Scene implements IDisposable {
91
99
  private static _removeFrom;
92
100
  /** Cameras have the camera buffers and updateBuffers(); meshes and lights do not. */
93
101
  private static _isCamera;
102
+ /** Scene objects have a TransformNode as transform. */
103
+ private static _isSceneObject;
104
+ private _addNode;
94
105
  /** Renderable meshes have render() and sub meshes. */
95
106
  private static _isMesh;
96
107
  /**
97
- * Updates the scene: assigns {@link camera}, the active ambient light and the light lists to the mesh materials.
108
+ * Updates the scene: updates the transforms of {@link nodes}, assigns {@link camera}, the active ambient light and the light lists to the mesh materials.
98
109
  * Each lights material uploads its lights buffer when drawn, only if the lights changed.
99
110
  * @param _time The game time.
100
111
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"Scene.d.ts","sourceRoot":"","sources":["../../../src/api/scene/Scene.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,yBAAyB,CAAC;AACnD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAGzC,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAElD,4FAA4F;AAC5F,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,SAAS,GAAG,YAAY,GAAG,gBAAgB,GAAG,UAAU,GAAG,OAAO,CAAC;AAE7G;;;;;GAKG;AACH,qBAAa,KAAM,YAAW,WAAW;IAErC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAmB;IAChD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA0B;IAC7D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoB;IAEjD,sEAAsE;IACtE,gBAAuB,sBAAsB,KAAK;IAElD,gEAAgE;IAChE,gBAAuB,gBAAgB,KAAK;IAC5C,OAAO,CAAC,mBAAmB,CAAe;IAC1C,OAA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AC,cAAc;IAI7B,OAAO,CAAC,QAAQ;IAMhB,sDAAsD;IACtD,OAAO,CAAC,MAAM,CAAC,OAAO;IAKtB;;;;;OAKG;IACH,MAAM,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAS7B,kFAAkF;IAClF,OAAO,CAAC,KAAK;IAmBb,OAAO,CAAC,MAAM,CAAC,aAAa;IAc5B;;OAEG;IACH,MAAM,IAAI,IAAI;IAQd,+GAA+G;IACxG,OAAO,IAAI,IAAI;CAWzB"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * A node in a hierarchy. A node has at most one parent; use {@link addChild} and {@link removeChild}
3
+ * to change the hierarchy (they keep `parent` and `children` in sync).
4
+ * @public
5
+ */
6
+ export declare class Node {
7
+ private readonly _children;
8
+ private _parent?;
9
+ /** The child nodes of this node. */
10
+ get children(): readonly Node[];
11
+ /** The parent node of this node, if any. */
12
+ get parent(): Node | undefined;
13
+ /**
14
+ * Adds a child. It is removed from its previous parent first. Adding an existing child does nothing.
15
+ * @param child The child to add.
16
+ * @throws Error when adding the node to itself or to one of its descendants.
17
+ */
18
+ addChild(child: Node): void;
19
+ /**
20
+ * Removes a child.
21
+ * @param child The child to remove.
22
+ * @returns True when it was a child of this node.
23
+ */
24
+ removeChild(child: Node): boolean;
25
+ }
26
+ //# sourceMappingURL=Node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../../../src/api/scene/node/Node.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,IAAI;IAEb,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAc;IACxC,OAAO,CAAC,OAAO,CAAC,CAAO;IAEvB,oCAAoC;IACpC,IAAW,QAAQ,IAAI,SAAS,IAAI,EAAE,CAErC;IAED,4CAA4C;IAC5C,IAAW,MAAM,IAAI,IAAI,GAAG,SAAS,CAEpC;IAED;;;;OAIG;IACI,QAAQ,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI;IAclC;;;;OAIG;IACI,WAAW,CAAC,KAAK,EAAE,IAAI,GAAG,OAAO;CAS3C"}
@@ -0,0 +1,46 @@
1
+ import { mat4, vec3 } from "gl-matrix";
2
+ import type { GameTime } from "../../time/GameTime.js";
3
+ import { Node } from "./Node.js";
4
+ /**
5
+ * The node responsible for transformations in the world.
6
+ *
7
+ * The matrices are computed lazily: reading {@link modelMatrix} recomputes them when position, rotation or scale
8
+ * changed (also through in-place edits), so {@link update} does not have to be called before the first render.
9
+ * When the parent is a `TransformNode`, {@link modelMatrix} is the world matrix `parent.modelMatrix * localMatrix`.
10
+ * @public
11
+ */
12
+ export declare class TransformNode extends Node {
13
+ private readonly _rotationQuat;
14
+ private readonly _localMatrix;
15
+ private readonly _worldMatrix;
16
+ private readonly _lastPosition;
17
+ private readonly _lastRotation;
18
+ private readonly _lastScale;
19
+ /**
20
+ * The constructor.
21
+ */
22
+ constructor();
23
+ /** Position relative to the parent (the world, without one). Defaults to the origin. In-place edits are detected. */
24
+ position: vec3;
25
+ /**
26
+ * Euler rotation in radians, applied in Y, X, Z order (yaw, pitch, roll): `R = Ry * Rx * Rz`.
27
+ * Defaults to (0, 0, 0). In-place edits are detected.
28
+ */
29
+ rotation: vec3;
30
+ /** Scale. Defaults to (1, 1, 1). In-place edits are detected. */
31
+ scale: vec3;
32
+ /** The local matrix `T * R * S`, recomputed only when position, rotation or scale changed. */
33
+ get localMatrix(): mat4;
34
+ /**
35
+ * The model (world) matrix: {@link localMatrix}, or `parent.modelMatrix * localMatrix` when the parent is a
36
+ * `TransformNode`. Always the same matrix object for a node without a parent transform.
37
+ */
38
+ get modelMatrix(): mat4;
39
+ /**
40
+ * Updates the node and its transform children, recomputing the matrices if needed.
41
+ * Called by `Scene.update` for scene nodes; optional otherwise.
42
+ * @param gameTime The {@link GameTime}
43
+ */
44
+ update(gameTime: GameTime): void;
45
+ }
46
+ //# sourceMappingURL=TransformNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransformNode.d.ts","sourceRoot":"","sources":["../../../../src/api/scene/node/TransformNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAQ,IAAI,EAAC,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAE/B;;;;;;;GAOG;AACH,qBAAa,aAAc,SAAQ,IAAI;IAEnC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiB;IAC/C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAiB;IAC9C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAiB;IAE9C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAkC;IAChE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiB;IAC/C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAiB;IAE5C;;OAEG;;IASH,qHAAqH;IAC9G,QAAQ,EAAE,IAAI,CAAC;IAEtB;;;OAGG;IACI,QAAQ,EAAE,IAAI,CAAC;IAEtB,iEAAiE;IAC1D,KAAK,EAAE,IAAI,CAAC;IAEnB,8FAA8F;IAC9F,IAAW,WAAW,IAAI,IAAI,CAc7B;IAED;;;OAGG;IACH,IAAW,WAAW,IAAI,IAAI,CAM7B;IAED;;;;OAIG;IACI,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAQ1C"}
@@ -0,0 +1,17 @@
1
+ import type { IUnlitMaterialDescriptor } from "../../api/material/IUnlitMaterialDescriptor.js";
2
+ /**
3
+ * An unlit material descriptor with every field present. `undefined` means "use the default":
4
+ * the pipeline's default primitive state, and no camera (a placeholder projection view buffer).
5
+ * @internal
6
+ */
7
+ export type ResolvedUnlitMaterialDescriptor = {
8
+ [K in keyof Required<IUnlitMaterialDescriptor>]: IUnlitMaterialDescriptor[K];
9
+ };
10
+ /**
11
+ * Fills in the defaults for every missing field of an unlit material descriptor.
12
+ * @param desc The descriptor, possibly partial or missing.
13
+ * @returns A new descriptor with the defaults applied.
14
+ * @internal
15
+ */
16
+ export declare function resolveUnlitMaterialDescriptor(desc?: IUnlitMaterialDescriptor): ResolvedUnlitMaterialDescriptor;
17
+ //# sourceMappingURL=UnlitMaterialDescriptorUtilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnlitMaterialDescriptorUtilities.d.ts","sourceRoot":"","sources":["../../../src/core/material/UnlitMaterialDescriptorUtilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,gDAAgD,CAAC;AAE7F;;;;GAIG;AACH,MAAM,MAAM,+BAA+B,GAAG;KAAG,CAAC,IAAI,MAAM,QAAQ,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC;CAAE,CAAC;AAE/H;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,CAAC,EAAE,wBAAwB,GAAG,+BAA+B,CAK/G"}
@@ -1,7 +1,7 @@
1
1
  import { BlendStateDescriptor } from "./blending/blend-state-descriptor";
2
2
  import { TextureSamplerFilteringPreset } from "./enums";
3
3
  import { SamplerDescriptor } from "./sampler/sampler-descriptor";
4
- import { type IGPUInfo, type IGraphicsDeviceFeatures, type ISampler, type IBlendState, type IPrimitiveState, type IGraphicsDevice, SwapChainDescriptor, type RenderPassDescriptor, type ISwapChain, type IRenderPass, type PrimitiveStateDescriptor } from "../../api/index.js";
4
+ import { type IGPUInfo, type IGraphicsDeviceFeatures, type ISampler, type IBlendState, type IPrimitiveState, type IGraphicsDevice, SwapChainDescriptor, type RenderPassDescriptor, type ISwapChain, type IRenderPass, type IPrimitiveStateDescriptor } from "../../api/index.js";
5
5
  import { PowerPreferenceType } from "../../api/rendering/PowerPreference.js";
6
6
  /**
7
7
  * The descriptor for the graphics device. This is used to configure the graphics device during initialization.
@@ -58,7 +58,7 @@ export declare abstract class AGraphicsDevice implements IGraphicsDevice {
58
58
  /** @inheritdoc */
59
59
  abstract createBlendState(descriptor: BlendStateDescriptor): IBlendState;
60
60
  /** @inheritdoc */
61
- abstract createPrimitiveState(descriptor?: PrimitiveStateDescriptor): IPrimitiveState;
61
+ abstract createPrimitiveState(descriptor?: IPrimitiveStateDescriptor): IPrimitiveState;
62
62
  /** @inheritDoc */
63
63
  abstract setupDebugCallback(): void;
64
64
  /** @inheritDoc */
@@ -1 +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,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,EAAE,KAAK,WAAW,EAAE,KAAK,wBAAwB,EACnE,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,mBAAmB,EAAC,MAAM,wCAAwC,CAAC;AAE3E;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IAEtC,oCAAoC;IACpC,KAAK,EAAE,OAAO,CAAC;IAEf,0GAA0G;IAC1G,eAAe,EAAE,mBAAmB,CAAC;IAErC;;;;OAIG;IACH,sBAAsB,EAAE,6BAA6B,CAAC;CACzD;AAED;;GAEG;AACH,8BAAsB,eAAgB,YAAW,eAAe;IAE5D,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,yBAAyB,CAAC;IAC1D,SAAS,CAAC,sBAAsB,EAAE,QAAQ,CAAS;IACnD,SAAS,CAAC,kBAAkB,EAAE,WAAW,CAAS;IAClD,SAAS,CAAC,sBAAsB,EAAE,eAAe,CAAS;IAE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AU,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,yBAAyB,GAAG,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"}
@@ -16,6 +16,7 @@ export declare abstract class ARenderer implements ITempRenderer {
16
16
  private _swapChainRequiresResize;
17
17
  private _mainRenderPassDirty;
18
18
  private _clearColor;
19
+ private _colorSpace;
19
20
  protected _mainRenderTargetRequiresResize: boolean;
20
21
  protected _swapChain: ISwapChain;
21
22
  protected _mainRenderTarget: ITexture2D;
@@ -32,9 +33,11 @@ export declare abstract class ARenderer implements ITempRenderer {
32
33
  set clearColor(color: Color);
33
34
  get limits(): RenderingLimits | null;
34
35
  /** @inheritdoc */
35
- readonly preferredTextureFormat: TextureFormat;
36
+ get preferredTextureFormat(): TextureFormat;
36
37
  /** @inheritDoc */
37
- readonly preferredColorSpace: ColorSpace;
38
+ get colorSpace(): ColorSpace;
39
+ /** @inheritDoc */
40
+ set colorSpace(colorSpace: ColorSpace);
38
41
  /** @inheritdoc */
39
42
  get preferredDepthStencilFormat(): TextureFormat;
40
43
  /** @inheritdoc */
@@ -1 +1 @@
1
- {"version":3,"file":"ARenderer.d.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B,IAAI,IAAI;IAGxB,cAAc,IAAI,IAAI;IAItB;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,oBAAoB,IAAI,eAAe;IAE1D,kBAAkB;IACX,UAAU,IAAI,IAAI;IAUzB,kBAAkB;IACX,eAAe,IAAI,IAAI;IAY9B,OAAO,CAAC,oBAAoB;IA8B5B,OAAO,CAAC,qBAAqB;IAa7B,OAAO,CAAC,eAAe;IAwBvB,kBAAkB;IACX,eAAe,IAAI,IAAI;IAI9B,kBAAkB;IACX,aAAa,IAAI,IAAI;CAiB/B"}
@@ -0,0 +1,15 @@
1
+ import { type IPrimitiveStateDescriptor } from "../../../api/index.js";
2
+ /**
3
+ * A primitive state descriptor with all defaults applied.
4
+ * @internal
5
+ */
6
+ export type ResolvedPrimitiveStateDescriptor = Required<IPrimitiveStateDescriptor>;
7
+ /**
8
+ * Fills in the defaults for every missing field of a primitive state descriptor:
9
+ * TRIANGLE_LIST topology, BACK culling and CCW front face.
10
+ * @param desc The descriptor, possibly partial or missing.
11
+ * @returns A new descriptor with the defaults applied.
12
+ * @internal
13
+ */
14
+ export declare function resolvePrimitiveStateDescriptor(desc?: IPrimitiveStateDescriptor): ResolvedPrimitiveStateDescriptor;
15
+ //# sourceMappingURL=PrimitiveStateDescriptorUtilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrimitiveStateDescriptorUtilities.d.ts","sourceRoot":"","sources":["../../../../src/core/rendering/primitive/PrimitiveStateDescriptorUtilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,yBAAyB,EAAoB,MAAM,uBAAuB,CAAC;AAE7G;;;GAGG;AACH,MAAM,MAAM,gCAAgC,GAAG,QAAQ,CAAC,yBAAyB,CAAC,CAAC;AAEnF;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,IAAI,CAAC,EAAE,yBAAyB,GAAG,gCAAgC,CAMlH"}
@@ -1,9 +1,9 @@
1
1
  import { type ITextureDescriptor } from "../../../api/index.js";
2
2
  /**
3
- * A texture descriptor with all defaults applied. Only `data` and `blockSize` stay optional.
3
+ * A texture descriptor with all defaults applied. Only `data`, `blockSize` and `preferredColorSpace` stay optional.
4
4
  * @internal
5
5
  */
6
- export type ResolvedTextureDescriptor = Required<Omit<ITextureDescriptor, "data" | "blockSize">> & Pick<ITextureDescriptor, "data" | "blockSize">;
6
+ export type ResolvedTextureDescriptor = Required<Omit<ITextureDescriptor, "data" | "blockSize" | "preferredColorSpace">> & Pick<ITextureDescriptor, "data" | "blockSize" | "preferredColorSpace">;
7
7
  /**
8
8
  * Fills in the defaults for every missing field of a texture descriptor.
9
9
  * @param desc The descriptor, possibly partial or missing.
@@ -1 +1 @@
1
- {"version":3,"file":"TextureDescriptorUtilities.d.ts","sourceRoot":"","sources":["../../../../src/core/rendering/texture/TextureDescriptorUtilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,kBAAkB,EAA8B,MAAM,uBAAuB,CAAC;AAE3F;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GACjC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,WAAW,CAAC,CAAC,GAAG,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,WAAW,CAAC,CAAC;AAE9G;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,CAAC,EAAE,kBAAkB,GAAG,yBAAyB,CAW7F"}
1
+ {"version":3,"file":"TextureDescriptorUtilities.d.ts","sourceRoot":"","sources":["../../../../src/core/rendering/texture/TextureDescriptorUtilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,kBAAkB,EAA8B,MAAM,uBAAuB,CAAC;AAE3F;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GACjC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,WAAW,GAAG,qBAAqB,CAAC,CAAC,GAAG,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,WAAW,GAAG,qBAAqB,CAAC,CAAC;AAE9J;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,CAAC,EAAE,kBAAkB,GAAG,yBAAyB,CAY7F"}