ris-framework 0.2.0-dev.13 → 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.
- package/CHANGELOG.md +43 -2
- package/README.md +13 -5
- package/dist/api/IFramework.d.ts +3 -3
- package/dist/api/IFramework.d.ts.map +1 -1
- package/dist/api/_export.d.ts +3 -0
- package/dist/api/_export.d.ts.map +1 -1
- package/dist/api/camera/CameraTransformUtilities.d.ts +65 -0
- package/dist/api/camera/CameraTransformUtilities.d.ts.map +1 -0
- package/dist/api/camera/ICamera.d.ts +36 -2
- package/dist/api/camera/ICamera.d.ts.map +1 -1
- package/dist/api/camera/OrbitCamera.d.ts +22 -14
- package/dist/api/camera/OrbitCamera.d.ts.map +1 -1
- package/dist/api/camera/OrthographicCamera.d.ts +33 -11
- package/dist/api/camera/OrthographicCamera.d.ts.map +1 -1
- package/dist/api/camera/PerspectiveCamera.d.ts +32 -18
- package/dist/api/camera/PerspectiveCamera.d.ts.map +1 -1
- package/dist/api/content/ContentManager.d.ts +2 -2
- package/dist/api/content/ContentManager.d.ts.map +1 -1
- package/dist/api/content/IContentManager.d.ts +2 -2
- package/dist/api/content/IContentManager.d.ts.map +1 -1
- package/dist/api/lights/AmbientLight.d.ts +7 -2
- package/dist/api/lights/AmbientLight.d.ts.map +1 -1
- package/dist/api/lights/DirectionalLight.d.ts +18 -4
- package/dist/api/lights/DirectionalLight.d.ts.map +1 -1
- package/dist/api/lights/ILight.d.ts +18 -0
- package/dist/api/lights/ILight.d.ts.map +1 -0
- package/dist/api/lights/PointLight.d.ts +17 -4
- package/dist/api/lights/PointLight.d.ts.map +1 -1
- package/dist/api/lights/_export.d.ts +1 -0
- package/dist/api/lights/_export.d.ts.map +1 -1
- package/dist/api/material/ForwardBlinnPhongMaterial.d.ts +2 -2
- package/dist/api/material/ForwardBlinnPhongMaterial.d.ts.map +1 -1
- package/dist/api/material/IMaterial.d.ts +7 -0
- package/dist/api/material/IMaterial.d.ts.map +1 -1
- package/dist/api/material/IMaterialFactory.d.ts +3 -2
- package/dist/api/material/IMaterialFactory.d.ts.map +1 -1
- package/dist/api/material/IUnlitMaterialDescriptor.d.ts +16 -0
- package/dist/api/material/IUnlitMaterialDescriptor.d.ts.map +1 -0
- package/dist/api/material/MaterialFactory.d.ts +3 -2
- package/dist/api/material/MaterialFactory.d.ts.map +1 -1
- package/dist/api/material/SpriteMaterial.d.ts +3 -0
- package/dist/api/material/SpriteMaterial.d.ts.map +1 -1
- package/dist/api/material/UnlitMaterial.d.ts +5 -12
- package/dist/api/material/UnlitMaterial.d.ts.map +1 -1
- package/dist/api/material/_export.d.ts +1 -1
- package/dist/api/material/_export.d.ts.map +1 -1
- package/dist/api/meshes/IRenderableMesh.d.ts +3 -14
- package/dist/api/meshes/IRenderableMesh.d.ts.map +1 -1
- package/dist/api/meshes/RenderableMesh.d.ts +5 -20
- package/dist/api/meshes/RenderableMesh.d.ts.map +1 -1
- package/dist/api/rendering/IGraphicsDevice.d.ts +2 -2
- package/dist/api/rendering/IGraphicsDevice.d.ts.map +1 -1
- package/dist/api/rendering/IRenderer.d.ts +13 -6
- package/dist/api/rendering/IRenderer.d.ts.map +1 -1
- package/dist/api/rendering/_export-rendering.d.ts +1 -0
- package/dist/api/rendering/_export-rendering.d.ts.map +1 -1
- package/dist/api/rendering/enums.d.ts +5 -5
- package/dist/api/rendering/enums.d.ts.map +1 -1
- package/dist/api/rendering/primitive/IPrimitiveStateDescriptor.d.ts +24 -0
- package/dist/api/rendering/primitive/IPrimitiveStateDescriptor.d.ts.map +1 -0
- package/dist/api/rendering/primitive/_export.d.ts +1 -1
- package/dist/api/rendering/primitive/_export.d.ts.map +1 -1
- package/dist/api/rendering/render-pipelines/IMainRenderTargetRenderPipeline.d.ts +5 -0
- package/dist/api/rendering/render-pipelines/IMainRenderTargetRenderPipeline.d.ts.map +1 -1
- package/dist/api/rendering/texture/ITextureDescriptor.d.ts +53 -0
- package/dist/api/rendering/texture/ITextureDescriptor.d.ts.map +1 -0
- package/dist/api/rendering/texture/ITextureFactory.d.ts +5 -3
- package/dist/api/rendering/texture/ITextureFactory.d.ts.map +1 -1
- package/dist/api/rendering/texture/TextureUtilities.d.ts +29 -21
- package/dist/api/rendering/texture/TextureUtilities.d.ts.map +1 -1
- package/dist/api/rendering/texture/_export-texture.d.ts +1 -1
- package/dist/api/rendering/texture/_export-texture.d.ts.map +1 -1
- package/dist/api/scene/ISceneObject.d.ts +12 -0
- package/dist/api/scene/ISceneObject.d.ts.map +1 -0
- package/dist/api/scene/Scene.d.ts +17 -6
- package/dist/api/scene/Scene.d.ts.map +1 -1
- package/dist/api/scene/node/Node.d.ts +26 -0
- package/dist/api/scene/node/Node.d.ts.map +1 -0
- package/dist/api/scene/node/TransformNode.d.ts +46 -0
- package/dist/api/scene/node/TransformNode.d.ts.map +1 -0
- package/dist/core/material/UnlitMaterialDescriptorUtilities.d.ts +17 -0
- package/dist/core/material/UnlitMaterialDescriptorUtilities.d.ts.map +1 -0
- package/dist/core/rendering/AGraphicsDevice.d.ts +2 -2
- package/dist/core/rendering/AGraphicsDevice.d.ts.map +1 -1
- package/dist/core/rendering/ARenderer.d.ts +7 -1
- package/dist/core/rendering/ARenderer.d.ts.map +1 -1
- package/dist/core/rendering/primitive/PrimitiveStateDescriptorUtilities.d.ts +15 -0
- package/dist/core/rendering/primitive/PrimitiveStateDescriptorUtilities.d.ts.map +1 -0
- package/dist/core/rendering/texture/TextureDescriptorUtilities.d.ts +14 -0
- package/dist/core/rendering/texture/TextureDescriptorUtilities.d.ts.map +1 -0
- package/dist/core/rendering/texture/texture.d.ts +3 -2
- package/dist/core/rendering/texture/texture.d.ts.map +1 -1
- package/dist/index.js +959 -540
- package/dist/webgl/WebGlGraphicsDevice.d.ts +2 -2
- package/dist/webgl/WebGlGraphicsDevice.d.ts.map +1 -1
- package/dist/webgl/lights/WebGlLightsBuffer.d.ts.map +1 -1
- package/dist/webgl/primitive/WebGlPrimitiveState.d.ts +3 -3
- package/dist/webgl/primitive/WebGlPrimitiveState.d.ts.map +1 -1
- package/dist/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.d.ts +8 -0
- package/dist/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.d.ts.map +1 -1
- package/dist/webgl/texture/WebGlTexture2D.d.ts +3 -2
- package/dist/webgl/texture/WebGlTexture2D.d.ts.map +1 -1
- package/dist/webgl/texture/WebGlTextureFactory.d.ts +2 -9
- package/dist/webgl/texture/WebGlTextureFactory.d.ts.map +1 -1
- package/dist/webgl/utilities/WebGlErrorUtilities.d.ts.map +1 -1
- package/dist/webgl/utilities/WebGlTextureUtilities.d.ts.map +1 -1
- package/dist/webgpu/WebGpuGraphicsDevice.d.ts +2 -2
- package/dist/webgpu/WebGpuGraphicsDevice.d.ts.map +1 -1
- package/dist/webgpu/primitive/WebGpuPrimitiveState.d.ts +2 -2
- package/dist/webgpu/primitive/WebGpuPrimitiveState.d.ts.map +1 -1
- package/dist/webgpu/render-pipelines/WebGpuMainRenderTargetRenderPipeline.d.ts +5 -0
- package/dist/webgpu/render-pipelines/WebGpuMainRenderTargetRenderPipeline.d.ts.map +1 -1
- package/dist/webgpu/texture/WebGpuTexture2D.d.ts +3 -2
- package/dist/webgpu/texture/WebGpuTexture2D.d.ts.map +1 -1
- package/dist/webgpu/texture/WebGpuTextureFactory.d.ts +2 -2
- package/dist/webgpu/texture/WebGpuTextureFactory.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/Framework.ts +2 -2
- package/src/api/IFramework.ts +3 -3
- package/src/api/_export.ts +3 -0
- package/src/api/camera/CameraTransformUtilities.ts +182 -0
- package/src/api/camera/ICamera.ts +42 -2
- package/src/api/camera/OrbitCamera.ts +71 -38
- package/src/api/camera/OrthographicCamera.ts +71 -28
- package/src/api/camera/PerspectiveCamera.ts +69 -33
- package/src/api/content/ContentManager.ts +18 -12
- package/src/api/content/IContentManager.ts +2 -2
- package/src/api/lights/AmbientLight.ts +8 -2
- package/src/api/lights/DirectionalLight.ts +30 -5
- package/src/api/lights/ILight.ts +22 -0
- package/src/api/lights/PointLight.ts +26 -5
- package/src/api/lights/_export.ts +1 -0
- package/src/api/material/ForwardBlinnPhongMaterial.ts +2 -2
- package/src/api/material/IMaterial.ts +8 -0
- package/src/api/material/IMaterialFactory.ts +3 -2
- package/src/api/material/IUnlitMaterialDescriptor.ts +18 -0
- package/src/api/material/MaterialFactory.ts +4 -3
- package/src/api/material/SpriteMaterial.ts +4 -0
- package/src/api/material/UnlitMaterial.ts +11 -18
- package/src/api/material/_export.ts +1 -1
- package/src/api/meshes/IRenderableMesh.ts +3 -18
- package/src/api/meshes/RenderableMesh.ts +15 -45
- package/src/api/rendering/IGraphicsDevice.ts +2 -2
- package/src/api/rendering/IRenderer.ts +14 -6
- package/src/api/rendering/_export-rendering.ts +2 -1
- package/src/api/rendering/enums.ts +5 -5
- package/src/api/rendering/primitive/IPrimitiveStateDescriptor.ts +27 -0
- package/src/api/rendering/primitive/_export.ts +1 -1
- package/src/api/rendering/render-pipelines/IMainRenderTargetRenderPipeline.ts +6 -0
- package/src/api/rendering/texture/ITextureDescriptor.ts +62 -0
- package/src/api/rendering/texture/ITextureFactory.ts +5 -3
- package/src/api/rendering/texture/TextureUtilities.ts +59 -61
- package/src/api/rendering/texture/_export-texture.ts +1 -1
- package/src/api/scene/ISceneObject.ts +13 -0
- package/src/api/scene/Scene.ts +52 -11
- package/src/api/scene/node/Node.ts +54 -0
- package/src/api/scene/node/TransformNode.ts +88 -0
- package/src/core/material/UnlitMaterialDescriptorUtilities.ts +21 -0
- package/src/core/rendering/AGraphicsDevice.ts +2 -2
- package/src/core/rendering/ARenderer.ts +26 -4
- package/src/core/rendering/primitive/PrimitiveStateDescriptorUtilities.ts +22 -0
- package/src/core/rendering/texture/TextureDescriptorUtilities.ts +28 -0
- package/src/core/rendering/texture/texture.ts +2 -2
- package/src/main.ts +5 -4
- package/src/webgl/WebGlGraphicsDevice.ts +2 -3
- package/src/webgl/lights/WebGlLightsBuffer.ts +21 -8
- package/src/webgl/primitive/WebGlPrimitiveState.ts +8 -6
- package/src/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.ts +14 -0
- package/src/webgl/texture/WebGlTexture2D.ts +9 -8
- package/src/webgl/texture/WebGlTextureFactory.ts +62 -65
- package/src/webgl/utilities/WebGlErrorUtilities.ts +3 -2
- package/src/webgl/utilities/WebGlTextureUtilities.ts +10 -4
- package/src/webgpu/WebGpuGraphicsDevice.ts +3 -3
- package/src/webgpu/primitive/WebGpuPrimitiveState.ts +7 -5
- package/src/webgpu/render-pipelines/WebGpuMainRenderTargetRenderPipeline.ts +6 -0
- package/src/webgpu/texture/WebGpuTexture2D.ts +10 -9
- package/src/webgpu/texture/WebGpuTextureFactory.ts +20 -17
- package/dist/api/material/ICameraMaterial.d.ts +0 -18
- package/dist/api/material/ICameraMaterial.d.ts.map +0 -1
- package/dist/api/rendering/primitive/PrimitiveStateDescriptor.d.ts +0 -24
- package/dist/api/rendering/primitive/PrimitiveStateDescriptor.d.ts.map +0 -1
- package/dist/api/rendering/texture/TextureDescriptor.d.ts +0 -42
- package/dist/api/rendering/texture/TextureDescriptor.d.ts.map +0 -1
- package/src/api/material/ICameraMaterial.ts +0 -22
- package/src/api/rendering/primitive/PrimitiveStateDescriptor.ts +0 -27
- package/src/api/rendering/texture/TextureDescriptor.ts +0 -52
|
@@ -5,7 +5,7 @@ import { RenderingBackend } from "./RenderingBackend.js";
|
|
|
5
5
|
import { vec2 } from "gl-matrix";
|
|
6
6
|
import type { PowerPreferenceType } from "./PowerPreference.js";
|
|
7
7
|
import type { TextureSamplerFilteringPreset } from "../../core/rendering/enums.js";
|
|
8
|
-
import type {
|
|
8
|
+
import type { ColorSpace } from "./enums.js";
|
|
9
9
|
/**
|
|
10
10
|
* The configuration for the renderer. This is used to initialize the renderer.
|
|
11
11
|
* @internal
|
|
@@ -24,7 +24,7 @@ export interface IRendererConfiguration {
|
|
|
24
24
|
*/
|
|
25
25
|
textureFiltering: TextureSamplerFilteringPreset;
|
|
26
26
|
/** The desired texture color space. */
|
|
27
|
-
textureColorSpace:
|
|
27
|
+
textureColorSpace: ColorSpace;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* The interface for a renderer.
|
|
@@ -36,12 +36,19 @@ export interface IRenderer {
|
|
|
36
36
|
*/
|
|
37
37
|
readonly graphicsDevice: IGraphicsDevice;
|
|
38
38
|
/**
|
|
39
|
-
* The preferred texture format.
|
|
40
|
-
*
|
|
41
|
-
* - {@link TextureFormat.}
|
|
42
|
-
* - {@link TextureFormat.}
|
|
39
|
+
* The preferred texture format, derived from the current {@link IRenderer.colorSpace}.
|
|
40
|
+
* Textures that do not specify a texture format are created with it:
|
|
41
|
+
* - {@link TextureFormat.RGBA_8_UNORM_SRGB} when the color space is {@link ColorSpace.SRGB} (the default).
|
|
42
|
+
* - {@link TextureFormat.RGBA_8_UNORM} when the color space is {@link ColorSpace.LINEAR}.
|
|
43
43
|
*/
|
|
44
44
|
readonly preferredTextureFormat: TextureFormat;
|
|
45
|
+
/**
|
|
46
|
+
* The color space. Defaults to the framework configuration's `textureColorSpace`.
|
|
47
|
+
* Can be switched at runtime, e.g. `framework.renderer.colorSpace = ColorSpace.SRGB`.
|
|
48
|
+
* Changing it affects textures created afterwards and the main render target's output conversion;
|
|
49
|
+
* already-created textures are not converted.
|
|
50
|
+
*/
|
|
51
|
+
colorSpace: ColorSpace;
|
|
45
52
|
/**
|
|
46
53
|
* The preferred depth stencil format.
|
|
47
54
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IRenderer.d.ts","sourceRoot":"","sources":["../../../src/api/rendering/IRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAC,KAAK,EAAC,MAAM,kBAAkB,CAAC;AACvC,OAAO,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,UAAU,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,2BAA2B,EAAE,aAAa,CAAC;IAEpD;;;OAGG;IACH,UAAU,EAAE,KAAK,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IAEnC;;;;;;;OAOG;IACH,cAAc,EAAE,IAAI,CAAC;IAErB;;OAEG;IACH,oBAAoB,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,KAAK,IAAI,GAAG,IAAI,CAAC;IAElE;;OAEG;IACH,uBAAuB,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,KAAK,IAAI,GAAG,IAAI,CAAC;IACrE;;OAEG;IACH,eAAe,IAAI,IAAI,CAAC;IAExB;;OAEG;IACH,gBAAgB,IAAI,IAAI,CAAC;IAEzB;;OAEG;IACH,cAAc,IAAI,IAAI,CAAC;IAEvB;;;OAGG;IACH,eAAe,IAAI,IAAI,CAAC;IAExB;;;OAGG;IACH,aAAa,IAAI,IAAI,CAAC;CACzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_export-rendering.d.ts","sourceRoot":"","sources":["../../../src/api/rendering/_export-rendering.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"_export-rendering.d.ts","sourceRoot":"","sources":["../../../src/api/rendering/_export-rendering.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC"}
|
|
@@ -15,11 +15,11 @@ export declare enum Culling {
|
|
|
15
15
|
*/
|
|
16
16
|
Front = 2
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
19
|
-
export declare enum
|
|
20
|
-
/**
|
|
18
|
+
/** The color space. */
|
|
19
|
+
export declare enum ColorSpace {
|
|
20
|
+
/** The linear color space. */
|
|
21
21
|
LINEAR = "LINEAR",
|
|
22
|
-
/**
|
|
23
|
-
SRGB = "
|
|
22
|
+
/** The sRGB color space. */
|
|
23
|
+
SRGB = "SRGB"
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=enums.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/api/rendering/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;AAED,
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/api/rendering/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;AAED,uBAAuB;AACvB,oBAAY,UAAU;IAElB,8BAA8B;IAC9B,MAAM,WAAW;IAEjB,4BAA4B;IAC5B,IAAI,SAAS;CAChB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PrimitiveTopology } from "./PrimitiveTopology.js";
|
|
2
|
+
import type { CullMode } from "./CullMode.js";
|
|
3
|
+
import type { FrontFace } from "./FrontFace.js";
|
|
4
|
+
/**
|
|
5
|
+
* Describes the state of a primitive. All fields are optional; the graphics device fills in the defaults.
|
|
6
|
+
*/
|
|
7
|
+
export interface IPrimitiveStateDescriptor {
|
|
8
|
+
/**
|
|
9
|
+
* The topology of the primitive.
|
|
10
|
+
* By default, it is set to TRIANGLE_LIST.
|
|
11
|
+
*/
|
|
12
|
+
topology?: PrimitiveTopology;
|
|
13
|
+
/**
|
|
14
|
+
* The culling mode.
|
|
15
|
+
* By default, it is set to BACK.
|
|
16
|
+
*/
|
|
17
|
+
cullFace?: CullMode;
|
|
18
|
+
/**
|
|
19
|
+
* The front face.
|
|
20
|
+
* By default, it is set to CCW (counter clockwise).
|
|
21
|
+
*/
|
|
22
|
+
frontFace?: FrontFace;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=IPrimitiveStateDescriptor.d.ts.map
|
|
@@ -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 "./
|
|
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
|
|
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;
|
|
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"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { TextureFormat } from "./TextureFormat.js";
|
|
2
|
+
import type { TextureUsage } from "./TextureUsage.js";
|
|
3
|
+
import type { vec2 } from "gl-matrix";
|
|
4
|
+
import type { ColorSpace } from "../enums.js";
|
|
5
|
+
/**
|
|
6
|
+
* The texture descriptor. Every field is optional; factories fill in the defaults for missing fields.
|
|
7
|
+
*/
|
|
8
|
+
export interface ITextureDescriptor {
|
|
9
|
+
/**
|
|
10
|
+
* The texture width.
|
|
11
|
+
* By default, it is 0.
|
|
12
|
+
*/
|
|
13
|
+
width?: number;
|
|
14
|
+
/**
|
|
15
|
+
* The texture height.
|
|
16
|
+
* By default, it is 0.
|
|
17
|
+
*/
|
|
18
|
+
height?: number;
|
|
19
|
+
/**
|
|
20
|
+
* The texture format. When loading texture preferred format can be set.
|
|
21
|
+
* This overrides framework preferred color space when loading or ktx2 transcoding.
|
|
22
|
+
* By default, it is UNDEFINED.
|
|
23
|
+
*/
|
|
24
|
+
textureFormat?: TextureFormat;
|
|
25
|
+
/** The preferred color space. If not defined, it is specified by framework. */
|
|
26
|
+
preferredColorSpace?: ColorSpace;
|
|
27
|
+
/**
|
|
28
|
+
* The texture usage.
|
|
29
|
+
* By default, it is TEXTURE_BINDING | COPY_DST.
|
|
30
|
+
*/
|
|
31
|
+
textureUsage?: TextureUsage;
|
|
32
|
+
/**
|
|
33
|
+
* The texture label.
|
|
34
|
+
* By default, it is null.
|
|
35
|
+
*/
|
|
36
|
+
label?: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* The data per mip level.
|
|
39
|
+
* By default, it is undefined.
|
|
40
|
+
*/
|
|
41
|
+
data?: Uint8Array[];
|
|
42
|
+
/**
|
|
43
|
+
* Should mipmaps be generated.
|
|
44
|
+
* By default, it is false.
|
|
45
|
+
*/
|
|
46
|
+
generateMipmaps?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* The block size of a texture, which must be set for compressed textures.
|
|
49
|
+
* By default, it is undefined.
|
|
50
|
+
*/
|
|
51
|
+
blockSize?: vec2;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=ITextureDescriptor.d.ts.map
|
|
@@ -0,0 +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;AACpC,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAE/B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B,gFAAgF;IAChF,mBAAmB,CAAC,EAAE,UAAU,CAAC;IAEjC;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;IAEpB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;CACpB"}
|
|
@@ -2,7 +2,7 @@ import { Color } from "../../data/Color.js";
|
|
|
2
2
|
import { TextureUsage } from "./TextureUsage.js";
|
|
3
3
|
import { TextureFormat } from "./TextureFormat.js";
|
|
4
4
|
import type { ITexture2D } from "./ITexture2D.js";
|
|
5
|
-
import {
|
|
5
|
+
import type { ITextureDescriptor } from "./ITextureDescriptor.js";
|
|
6
6
|
import type { IKtx2Texture } from "ris-ktx2";
|
|
7
7
|
/**
|
|
8
8
|
* The texture factory.
|
|
@@ -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
|
|
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
|
*/
|
|
@@ -37,6 +39,6 @@ export interface ITextureFactory {
|
|
|
37
39
|
* @param descriptor - The optional texture descriptor.
|
|
38
40
|
* @returns The 2D texture.
|
|
39
41
|
*/
|
|
40
|
-
createFromKtx2(ktxTexture: IKtx2Texture, descriptor?:
|
|
42
|
+
createFromKtx2(ktxTexture: IKtx2Texture, descriptor?: ITextureDescriptor): ITexture2D;
|
|
41
43
|
}
|
|
42
44
|
//# sourceMappingURL=ITextureFactory.d.ts.map
|
|
@@ -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,EAAC,
|
|
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;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAC7B,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,gBAAgB,GAAG,eAAe,EACpD,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,YAAY,EACpB,aAAa,CAAC,EAAE,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"}
|
|
@@ -11,27 +11,10 @@ export declare class TextureUtilities {
|
|
|
11
11
|
private static readonly _textureFormatVkFormat;
|
|
12
12
|
private static readonly _mapTextureFormatKtxTranscodeFormat;
|
|
13
13
|
private static readonly _mapKtxTranscodeFormatVkFormat;
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
static isSrgbFormat(format: TextureFormat): boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Gets the sRGB variant of a linear format, or the format itself if it has none or is already sRGB.
|
|
21
|
-
* @param format The texture format.
|
|
22
|
-
*/
|
|
23
|
-
static toSrgbFormat(format: TextureFormat): TextureFormat;
|
|
24
|
-
/**
|
|
25
|
-
* Gets the linear variant of an sRGB format, or the format itself.
|
|
26
|
-
* @param format The texture format.
|
|
27
|
-
*/
|
|
28
|
-
static toLinearFormat(format: TextureFormat): TextureFormat;
|
|
29
|
-
/**
|
|
30
|
-
* Gets the block size (width, height) of a format: 1x1 for uncompressed, 4x4 for BC/ETC2, and the ASTC block.
|
|
31
|
-
* Returns null for formats it does not know.
|
|
32
|
-
* @param format The texture format.
|
|
33
|
-
*/
|
|
34
|
-
static getBlockSize(format: TextureFormat): [number, number] | null;
|
|
14
|
+
/** sRGB format → its linear variant. */
|
|
15
|
+
private static readonly _linearVariant;
|
|
16
|
+
/** Every sRGB format. */
|
|
17
|
+
private static readonly _srgbFormats;
|
|
35
18
|
/**
|
|
36
19
|
* Checks if the given texture format is a compressed texture format.
|
|
37
20
|
* @param format - The texture format to check.
|
|
@@ -73,5 +56,30 @@ export declare class TextureUtilities {
|
|
|
73
56
|
* @returns The VkFormat.
|
|
74
57
|
*/
|
|
75
58
|
static convertKtxTranscodeFormatToVkFormat(transcodeFormat: KtxTranscodeFormat): VkFormat;
|
|
59
|
+
/**
|
|
60
|
+
* Maps the linear format to the srgb variant.
|
|
61
|
+
* @param textureFormat The linear format.
|
|
62
|
+
* @return The srgb variant, or the format itself if it is already sRGB or has no sRGB variant (e.g. PVRTC).
|
|
63
|
+
*/
|
|
64
|
+
static convertToSrgbVariant(textureFormat: TextureFormat): TextureFormat;
|
|
65
|
+
/**
|
|
66
|
+
* Maps the srgb format to the linear variant.
|
|
67
|
+
* @param textureFormat The srgb format.
|
|
68
|
+
* @return The linear variant, or the format itself if it is already linear.
|
|
69
|
+
*/
|
|
70
|
+
static convertToLinearVariant(textureFormat: TextureFormat): TextureFormat;
|
|
71
|
+
/**
|
|
72
|
+
* Checks whether the texture format is an sRGB format.
|
|
73
|
+
* @param textureFormat The texture format to check.
|
|
74
|
+
* @return True if srgb texture format.
|
|
75
|
+
*/
|
|
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;
|
|
76
84
|
}
|
|
77
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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M,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"}
|
|
@@ -5,6 +5,6 @@ export * from "./TextureViewDimension.js";
|
|
|
5
5
|
export * from "./TextureFormat.js";
|
|
6
6
|
export * from "./ITextureView.js";
|
|
7
7
|
export * from "./ITextureFactory.js";
|
|
8
|
-
export * from "./
|
|
8
|
+
export * from "./ITextureDescriptor.js";
|
|
9
9
|
export * from "./TextureUtilities.js";
|
|
10
10
|
//# sourceMappingURL=_export-texture.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_export-texture.d.ts","sourceRoot":"","sources":["../../../../src/api/rendering/texture/_export-texture.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,
|
|
1
|
+
{"version":3,"file":"_export-texture.d.ts","sourceRoot":"","sources":["../../../../src/api/rendering/texture/_export-texture.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC"}
|
|
@@ -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
|
-
|
|
11
|
-
|
|
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
|
-
*
|
|
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
|
|
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/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GAAG,IAAI;IAI3D;;;;OAIG;IACI,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,UAAU,GAAG,OAAO;IAIjE,OAAO,CAAC,SAAS;IAajB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,MAAM,CAAC,WAAW;IAS1B,qFAAqF;IACrF,OAAO,CAAC,MAAM,CAAC,SAAS;IAMxB,uDAAuD;IACvD,OAAO,CAAC,MAAM,CAAC,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
|
|
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?:
|
|
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,
|
|
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,yBAAyB,EACpE,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,C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,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAEvD,kBAAkB;aACF,aAAa,IAAI,IAAI;IAErC,kBAAkB;IACX,OAAO,IAAI,IAAI;CAIzB"}
|
|
@@ -2,6 +2,7 @@ import type { ITempRenderer } from "../../api/rendering/renderer-interface.js";
|
|
|
2
2
|
import type { vec2 } from "gl-matrix";
|
|
3
3
|
import type { RenderingLimits } from "../../api/rendering/rendering-limits.js";
|
|
4
4
|
import { Color, type IFramework, type IGraphicsDevice, type IMainRenderTargetRenderPipeline, type IRendererConfiguration, type IRenderPass, type ISwapChain, type ITexture2D, RenderingBackend, TextureFormat } from "../../api/index.js";
|
|
5
|
+
import { ColorSpace } from "../../api/rendering/enums.js";
|
|
5
6
|
export declare abstract class ARenderer implements ITempRenderer {
|
|
6
7
|
protected readonly _framework: IFramework;
|
|
7
8
|
/**
|
|
@@ -15,6 +16,7 @@ export declare abstract class ARenderer implements ITempRenderer {
|
|
|
15
16
|
private _swapChainRequiresResize;
|
|
16
17
|
private _mainRenderPassDirty;
|
|
17
18
|
private _clearColor;
|
|
19
|
+
private _colorSpace;
|
|
18
20
|
protected _mainRenderTargetRequiresResize: boolean;
|
|
19
21
|
protected _swapChain: ISwapChain;
|
|
20
22
|
protected _mainRenderTarget: ITexture2D;
|
|
@@ -31,7 +33,11 @@ export declare abstract class ARenderer implements ITempRenderer {
|
|
|
31
33
|
set clearColor(color: Color);
|
|
32
34
|
get limits(): RenderingLimits | null;
|
|
33
35
|
/** @inheritdoc */
|
|
34
|
-
|
|
36
|
+
get preferredTextureFormat(): TextureFormat;
|
|
37
|
+
/** @inheritDoc */
|
|
38
|
+
get colorSpace(): ColorSpace;
|
|
39
|
+
/** @inheritDoc */
|
|
40
|
+
set colorSpace(colorSpace: ColorSpace);
|
|
35
41
|
/** @inheritdoc */
|
|
36
42
|
get preferredDepthStencilFormat(): TextureFormat;
|
|
37
43
|
/** @inheritdoc */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ARenderer.d.ts","sourceRoot":"","sources":["../../../src/core/rendering/ARenderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,2CAA2C,CAAC;AAC7E,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EACH,KAAK,EACL,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,+BAA+B,EAAE,KAAK,sBAAsB,EACjE,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EAEf,gBAAgB,EAKhB,aAAa,EAEhB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"ARenderer.d.ts","sourceRoot":"","sources":["../../../src/core/rendering/ARenderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,2CAA2C,CAAC;AAC7E,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EACH,KAAK,EACL,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,+BAA+B,EAAE,KAAK,sBAAsB,EACjE,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EAEf,gBAAgB,EAKhB,aAAa,EAEhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAExD,8BAAsB,SAAU,YAAW,aAAa;IAEpD,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAE1C;;OAEG;IACH,SAAS,CAAC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC,EAAE,CAAM;IAEvE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IA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