ris-framework 0.2.0-dev.11 → 0.2.0-dev.13
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 +21 -29
- package/README.md +99 -150
- package/dist/Framework.d.ts +26 -8
- package/dist/Framework.d.ts.map +1 -1
- package/dist/api/IFramework.d.ts +43 -0
- package/dist/api/IFramework.d.ts.map +1 -1
- package/dist/api/_export.d.ts +1 -1
- package/dist/api/_export.d.ts.map +1 -1
- package/dist/api/content/ContentManager.d.ts +5 -57
- package/dist/api/content/ContentManager.d.ts.map +1 -1
- package/dist/api/content/IContentManager.d.ts +24 -21
- package/dist/api/content/IContentManager.d.ts.map +1 -1
- package/dist/api/lights/LightsBuffer.d.ts +13 -6
- package/dist/api/lights/LightsBuffer.d.ts.map +1 -1
- package/dist/api/loaders/ObjGeometryMapper.d.ts +2 -2
- package/dist/api/loaders/ObjLoader.d.ts +61 -0
- package/dist/api/loaders/ObjLoader.d.ts.map +1 -0
- package/dist/api/loaders/_export.d.ts +1 -0
- package/dist/api/loaders/_export.d.ts.map +1 -1
- package/dist/api/loaders/obj/{ObjLoader.d.ts → ObjParser.d.ts} +20 -5
- package/dist/api/loaders/obj/ObjParser.d.ts.map +1 -0
- package/dist/api/loaders/obj/ObjTypes.d.ts +17 -1
- package/dist/api/loaders/obj/ObjTypes.d.ts.map +1 -1
- package/dist/api/loaders/obj/index.d.ts +1 -1
- package/dist/api/material/ForwardBlinnPhongMaterial.d.ts +22 -11
- package/dist/api/material/ForwardBlinnPhongMaterial.d.ts.map +1 -1
- package/dist/api/material/ICameraMaterial.d.ts +18 -0
- package/dist/api/material/ICameraMaterial.d.ts.map +1 -0
- package/dist/api/material/ILightsMaterial.d.ts +26 -0
- package/dist/api/material/ILightsMaterial.d.ts.map +1 -0
- package/dist/api/material/IMaterial.d.ts +2 -8
- package/dist/api/material/IMaterial.d.ts.map +1 -1
- package/dist/api/material/InspectTextureMipsMaterial.d.ts +2 -2
- package/dist/api/material/InspectTextureMipsMaterial.d.ts.map +1 -1
- package/dist/api/material/SpriteMaterial.d.ts +2 -2
- package/dist/api/material/SpriteMaterial.d.ts.map +1 -1
- package/dist/api/material/UnlitMaterial.d.ts +4 -3
- package/dist/api/material/UnlitMaterial.d.ts.map +1 -1
- package/dist/api/material/_export.d.ts +2 -0
- package/dist/api/material/_export.d.ts.map +1 -1
- package/dist/api/meshes/IMesh.d.ts +29 -34
- package/dist/api/meshes/IMesh.d.ts.map +1 -1
- package/dist/api/meshes/IMeshFactory.d.ts +13 -8
- package/dist/api/meshes/IMeshFactory.d.ts.map +1 -1
- package/dist/api/meshes/IRenderableMesh.d.ts +47 -0
- package/dist/api/meshes/IRenderableMesh.d.ts.map +1 -0
- package/dist/api/meshes/Mesh.d.ts +11 -57
- package/dist/api/meshes/Mesh.d.ts.map +1 -1
- package/dist/api/meshes/MeshFactory.d.ts +6 -3
- package/dist/api/meshes/MeshFactory.d.ts.map +1 -1
- package/dist/api/meshes/QuadMesh.d.ts +3 -5
- package/dist/api/meshes/QuadMesh.d.ts.map +1 -1
- package/dist/api/meshes/RenderableMesh.d.ts +95 -0
- package/dist/api/meshes/RenderableMesh.d.ts.map +1 -0
- package/dist/api/meshes/_export.d.ts +2 -1
- package/dist/api/meshes/_export.d.ts.map +1 -1
- package/dist/api/rendering/IGraphicsDeviceFeatures.d.ts +8 -2
- package/dist/api/rendering/IGraphicsDeviceFeatures.d.ts.map +1 -1
- package/dist/api/rendering/IRenderer.d.ts +28 -1
- package/dist/api/rendering/IRenderer.d.ts.map +1 -1
- package/dist/api/rendering/enums.d.ts +7 -0
- package/dist/api/rendering/enums.d.ts.map +1 -1
- package/dist/api/rendering/renderer-interface.d.ts +1 -31
- package/dist/api/rendering/renderer-interface.d.ts.map +1 -1
- package/dist/api/rendering/renderpass/RenderPassDescriptor.d.ts +2 -6
- package/dist/api/rendering/renderpass/RenderPassDescriptor.d.ts.map +1 -1
- package/dist/api/rendering/swapchain/ISwapChain.d.ts +1 -3
- package/dist/api/rendering/swapchain/ISwapChain.d.ts.map +1 -1
- package/dist/api/rendering/texture/TextureFormat.d.ts +88 -14
- package/dist/api/rendering/texture/TextureFormat.d.ts.map +1 -1
- package/dist/api/rendering/texture/TextureUtilities.d.ts +23 -0
- package/dist/api/rendering/texture/TextureUtilities.d.ts.map +1 -1
- package/dist/api/scene/Scene.d.ts +30 -21
- package/dist/api/scene/Scene.d.ts.map +1 -1
- package/dist/api/scene/SceneMesh.d.ts +27 -0
- package/dist/api/scene/SceneMesh.d.ts.map +1 -0
- package/dist/api/utilities/AlignUtilities.d.ts.map +1 -1
- package/dist/api/window/WindowManager.d.ts.map +1 -1
- package/dist/core/rendering/ARenderer.d.ts +5 -5
- package/dist/core/rendering/ARenderer.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4006 -1355
- package/dist/webgl/WebGLGraphicsDeviceFeatures.d.ts +4 -0
- package/dist/webgl/WebGLGraphicsDeviceFeatures.d.ts.map +1 -1
- package/dist/webgl/WebGlRenderer.d.ts +1 -3
- package/dist/webgl/WebGlRenderer.d.ts.map +1 -1
- package/dist/webgl/lights/WebGlLightsBuffer.d.ts +8 -4
- package/dist/webgl/lights/WebGlLightsBuffer.d.ts.map +1 -1
- package/dist/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.d.ts +2 -0
- package/dist/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.d.ts.map +1 -1
- package/dist/webgl/swap-chain/WebGlSwapChain.d.ts +3 -2
- package/dist/webgl/swap-chain/WebGlSwapChain.d.ts.map +1 -1
- package/dist/webgl/texture/WebGlTextureFactory.d.ts +7 -0
- package/dist/webgl/texture/WebGlTextureFactory.d.ts.map +1 -1
- package/dist/webgl/utilities/WebGlConstants.d.ts +91 -0
- package/dist/webgl/utilities/WebGlConstants.d.ts.map +1 -0
- package/dist/webgl/utilities/WebGlConverter.d.ts +0 -7
- package/dist/webgl/utilities/WebGlConverter.d.ts.map +1 -1
- package/dist/webgl/utilities/WebGlErrorUtilities.d.ts +10 -0
- package/dist/webgl/utilities/WebGlErrorUtilities.d.ts.map +1 -0
- package/dist/webgl/utilities/WebGlTextureUtilities.d.ts.map +1 -1
- package/dist/webgl/utilities/WebGlUtilities.d.ts +3 -0
- package/dist/webgl/utilities/WebGlUtilities.d.ts.map +1 -1
- package/dist/webgpu/WebGpuGpuInfo.d.ts +28 -0
- package/dist/webgpu/WebGpuGpuInfo.d.ts.map +1 -0
- package/dist/webgpu/WebGpuGraphicsDevice.d.ts +80 -0
- package/dist/webgpu/WebGpuGraphicsDevice.d.ts.map +1 -0
- package/dist/webgpu/WebGpuGraphicsDeviceFeatures.d.ts +26 -0
- package/dist/webgpu/WebGpuGraphicsDeviceFeatures.d.ts.map +1 -0
- package/dist/webgpu/WebGpuRenderer.d.ts +26 -0
- package/dist/webgpu/WebGpuRenderer.d.ts.map +1 -0
- package/dist/webgpu/WebGpuTypes.d.ts +355 -0
- package/dist/webgpu/WebGpuTypes.d.ts.map +1 -0
- package/dist/webgpu/blending/WebGpuBlendState.d.ts +30 -0
- package/dist/webgpu/blending/WebGpuBlendState.d.ts.map +1 -0
- package/dist/webgpu/buffers/WebGpuBuffersFactory.d.ts +20 -0
- package/dist/webgpu/buffers/WebGpuBuffersFactory.d.ts.map +1 -0
- package/dist/webgpu/buffers/WebGpuIndexBuffer.d.ts +46 -0
- package/dist/webgpu/buffers/WebGpuIndexBuffer.d.ts.map +1 -0
- package/dist/webgpu/buffers/WebGpuUniformBuffer.d.ts +43 -0
- package/dist/webgpu/buffers/WebGpuUniformBuffer.d.ts.map +1 -0
- package/dist/webgpu/buffers/WebGpuVertexBuffer.d.ts +49 -0
- package/dist/webgpu/buffers/WebGpuVertexBuffer.d.ts.map +1 -0
- package/dist/webgpu/primitive/WebGpuPrimitiveState.d.ts +32 -0
- package/dist/webgpu/primitive/WebGpuPrimitiveState.d.ts.map +1 -0
- package/dist/webgpu/render-pass/WebGpuRenderPass.d.ts +28 -0
- package/dist/webgpu/render-pass/WebGpuRenderPass.d.ts.map +1 -0
- package/dist/webgpu/render-pipelines/AWebGpuRenderPipeline.d.ts +50 -0
- package/dist/webgpu/render-pipelines/AWebGpuRenderPipeline.d.ts.map +1 -0
- package/dist/webgpu/render-pipelines/WebGpuMainRenderTargetRenderPipeline.d.ts +34 -0
- package/dist/webgpu/render-pipelines/WebGpuMainRenderTargetRenderPipeline.d.ts.map +1 -0
- package/dist/webgpu/render-pipelines/WebGpuRenderPipelineFactory.d.ts +26 -0
- package/dist/webgpu/render-pipelines/WebGpuRenderPipelineFactory.d.ts.map +1 -0
- package/dist/webgpu/render-pipelines/material/AWebGpuMeshRenderPipeline.d.ts +72 -0
- package/dist/webgpu/render-pipelines/material/AWebGpuMeshRenderPipeline.d.ts.map +1 -0
- package/dist/webgpu/render-pipelines/material/WebGpuUnlitRenderPipeline.d.ts +40 -0
- package/dist/webgpu/render-pipelines/material/WebGpuUnlitRenderPipeline.d.ts.map +1 -0
- package/dist/webgpu/sampler/WebGpuSampler.d.ts +39 -0
- package/dist/webgpu/sampler/WebGpuSampler.d.ts.map +1 -0
- package/dist/webgpu/shader/WebGpuShaderModule.d.ts +29 -0
- package/dist/webgpu/shader/WebGpuShaderModule.d.ts.map +1 -0
- package/dist/webgpu/shader/WebGpuShaderModuleLoader.d.ts +21 -0
- package/dist/webgpu/shader/WebGpuShaderModuleLoader.d.ts.map +1 -0
- package/dist/webgpu/shader/WgslShaderContent.d.ts +9 -0
- package/dist/webgpu/shader/WgslShaderContent.d.ts.map +1 -0
- package/dist/webgpu/swap-chain/WebGpuSwapChain.d.ts +41 -0
- package/dist/webgpu/swap-chain/WebGpuSwapChain.d.ts.map +1 -0
- package/dist/webgpu/texture/WebGpuTexture2D.d.ts +47 -0
- package/dist/webgpu/texture/WebGpuTexture2D.d.ts.map +1 -0
- package/dist/webgpu/texture/WebGpuTextureFactory.d.ts +21 -0
- package/dist/webgpu/texture/WebGpuTextureFactory.d.ts.map +1 -0
- package/dist/webgpu/texture/WebGpuTextureView.d.ts +25 -0
- package/dist/webgpu/texture/WebGpuTextureView.d.ts.map +1 -0
- package/dist/webgpu/utilities/WebGpuConverter.d.ts +45 -0
- package/dist/webgpu/utilities/WebGpuConverter.d.ts.map +1 -0
- package/package.json +2 -2
- package/shaders/glsl/main_render_target_flip_y_fs.glsl +35 -1
- package/shaders/wgsl/forward_blinn_phong_material.wgsl +150 -0
- package/shaders/wgsl/inspect_texture_mips.wgsl +51 -0
- package/shaders/wgsl/main_frame_buffer.wgsl +35 -0
- package/shaders/wgsl/main_render_target_flip_y.wgsl +35 -0
- package/shaders/wgsl/sprite.wgsl +40 -0
- package/shaders/wgsl/unlit_material.wgsl +49 -0
- package/src/Framework.ts +121 -37
- package/src/api/IFramework.ts +55 -0
- package/src/api/_export.ts +1 -1
- package/src/api/content/ContentManager.ts +46 -180
- package/src/api/content/IContentManager.ts +25 -21
- package/src/api/lights/LightsBuffer.ts +13 -6
- package/src/api/loaders/ObjGeometryMapper.ts +2 -2
- package/src/api/loaders/ObjLoader.ts +126 -0
- package/src/api/loaders/_export.ts +1 -0
- package/src/api/loaders/obj/{ObjLoader.ts → ObjParser.ts} +35 -4
- package/src/api/loaders/obj/ObjTypes.ts +19 -1
- package/src/api/loaders/obj/index.ts +1 -1
- package/src/api/material/ForwardBlinnPhongMaterial.ts +48 -22
- package/src/api/material/ICameraMaterial.ts +22 -0
- package/src/api/material/ILightsMaterial.ts +32 -0
- package/src/api/material/IMaterial.ts +2 -9
- package/src/api/material/InspectTextureMipsMaterial.ts +2 -2
- package/src/api/material/SpriteMaterial.ts +2 -2
- package/src/api/material/UnlitMaterial.ts +4 -3
- package/src/api/material/_export.ts +2 -0
- package/src/api/meshes/IMesh.ts +32 -37
- package/src/api/meshes/IMeshFactory.ts +14 -8
- package/src/api/meshes/IRenderableMesh.ts +58 -0
- package/src/api/meshes/Mesh.ts +17 -132
- package/src/api/meshes/MeshFactory.ts +14 -5
- package/src/api/meshes/QuadMesh.ts +4 -6
- package/src/api/meshes/RenderableMesh.ts +207 -0
- package/src/api/meshes/_export.ts +6 -5
- package/src/api/rendering/IGraphicsDeviceFeatures.ts +28 -21
- package/src/api/rendering/IRenderer.ts +34 -1
- package/src/api/rendering/enums.ts +10 -0
- package/src/api/rendering/renderer-interface.ts +1 -36
- package/src/api/rendering/renderpass/RenderPassDescriptor.ts +10 -14
- package/src/api/rendering/swapchain/ISwapChain.ts +1 -3
- package/src/api/rendering/texture/TextureFormat.ts +128 -14
- package/src/api/rendering/texture/TextureUtilities.ts +225 -10
- package/src/api/scene/Scene.ts +102 -69
- package/src/api/scene/SceneMesh.ts +61 -0
- package/src/api/sprites/SpriteBatchMesh.ts +1 -1
- package/src/api/utilities/AlignUtilities.ts +2 -1
- package/src/api/window/WindowManager.ts +1 -1
- package/src/core/rendering/ARenderer.ts +24 -15
- package/src/index.ts +0 -1
- package/src/main.ts +2 -3
- package/src/webgl/WebGLGraphicsDeviceFeatures.ts +12 -2
- package/src/webgl/WebGlGpuInfo.ts +1 -1
- package/src/webgl/WebGlRenderer.ts +2 -5
- package/src/webgl/lights/WebGlLightsBuffer.ts +14 -4
- package/src/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.ts +18 -1
- package/src/webgl/swap-chain/WebGlSwapChain.ts +7 -6
- package/src/webgl/texture/WebGlTextureFactory.ts +49 -7
- package/src/webgl/utilities/WebGlConstants.ts +136 -0
- package/src/webgl/utilities/WebGlConverter.ts +91 -22
- package/src/webgl/utilities/WebGlErrorUtilities.ts +15 -0
- package/src/webgl/utilities/WebGlTextureUtilities.ts +5 -2
- package/src/webgl/utilities/WebGlUtilities.ts +4 -0
- package/src/webgpu/WebGpuGpuInfo.ts +61 -0
- package/src/webgpu/WebGpuGraphicsDevice.ts +199 -0
- package/src/webgpu/WebGpuGraphicsDeviceFeatures.ts +41 -0
- package/src/webgpu/WebGpuRenderer.ts +49 -0
- package/src/webgpu/WebGpuTypes.ts +288 -0
- package/src/webgpu/blending/WebGpuBlendState.ts +53 -0
- package/src/webgpu/buffers/WebGpuBuffersFactory.ts +46 -0
- package/src/webgpu/buffers/WebGpuIndexBuffer.ts +118 -0
- package/src/webgpu/buffers/WebGpuUniformBuffer.ts +102 -0
- package/src/webgpu/buffers/WebGpuVertexBuffer.ts +119 -0
- package/src/webgpu/primitive/WebGpuPrimitiveState.ts +52 -0
- package/src/webgpu/render-pass/WebGpuRenderPass.ts +131 -0
- package/src/webgpu/render-pipelines/AWebGpuRenderPipeline.ts +123 -0
- package/src/webgpu/render-pipelines/WebGpuMainRenderTargetRenderPipeline.ts +119 -0
- package/src/webgpu/render-pipelines/WebGpuRenderPipelineFactory.ts +66 -0
- package/src/webgpu/render-pipelines/material/AWebGpuMeshRenderPipeline.ts +249 -0
- package/src/webgpu/render-pipelines/material/WebGpuUnlitRenderPipeline.ts +101 -0
- package/src/webgpu/sampler/WebGpuSampler.ts +84 -0
- package/src/webgpu/shader/WebGpuShaderModule.ts +65 -0
- package/src/webgpu/shader/WebGpuShaderModuleLoader.ts +38 -0
- package/src/webgpu/shader/WgslShaderContent.ts +20 -0
- package/src/webgpu/swap-chain/WebGpuSwapChain.ts +93 -0
- package/src/webgpu/texture/WebGpuTexture2D.ts +197 -0
- package/src/webgpu/texture/WebGpuTextureFactory.ts +118 -0
- package/src/webgpu/texture/WebGpuTextureView.ts +43 -0
- package/src/webgpu/utilities/WebGpuConverter.ts +299 -0
- package/src/wgsl-raw.d.ts +4 -0
- package/dist/api/FrameworkConfiguration.d.ts +0 -23
- package/dist/api/FrameworkConfiguration.d.ts.map +0 -1
- package/dist/api/IFrameworkConfiguration.d.ts +0 -25
- package/dist/api/IFrameworkConfiguration.d.ts.map +0 -1
- package/dist/api/loaders/obj/ObjLoader.d.ts.map +0 -1
- package/dist/api/meshes/SubMesh.d.ts +0 -47
- package/dist/api/meshes/SubMesh.d.ts.map +0 -1
- package/src/api/FrameworkConfiguration.ts +0 -29
- package/src/api/IFrameworkConfiguration.ts +0 -30
- package/src/api/meshes/SubMesh.ts +0 -71
|
@@ -27,5 +27,9 @@ export declare class WebGLGraphicsDeviceFeatures implements IGraphicsDeviceFeatu
|
|
|
27
27
|
readonly s3tcExtension?: WEBGL_compressed_texture_s3tc;
|
|
28
28
|
/** @inheritdoc */
|
|
29
29
|
readonly supportsTextureCompressionS3TC: boolean;
|
|
30
|
+
/** The WEBGL_compressed_texture_s3tc_srgb extension. */
|
|
31
|
+
readonly s3tcSrgbExtension?: WEBGL_compressed_texture_s3tc_srgb;
|
|
32
|
+
/** @inheritdoc */
|
|
33
|
+
readonly supportsTextureCompressionS3TCSrgb: boolean;
|
|
30
34
|
}
|
|
31
35
|
//# sourceMappingURL=WebGLGraphicsDeviceFeatures.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebGLGraphicsDeviceFeatures.d.ts","sourceRoot":"","sources":["../../src/webgl/WebGLGraphicsDeviceFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,iBAAiB,CAAC;AAE7D;;GAEG;AACH,qBAAa,2BAA4B,YAAW,uBAAuB;IAEvE;;;OAGG;gBACgB,KAAK,EAAE,sBAAsB;
|
|
1
|
+
{"version":3,"file":"WebGLGraphicsDeviceFeatures.d.ts","sourceRoot":"","sources":["../../src/webgl/WebGLGraphicsDeviceFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,iBAAiB,CAAC;AAE7D;;GAEG;AACH,qBAAa,2BAA4B,YAAW,uBAAuB;IAEvE;;;OAGG;gBACgB,KAAK,EAAE,sBAAsB;IAqBhD,mDAAmD;IACnD,QAAQ,CAAC,aAAa,CAAC,EAAE,6BAA6B,CAAC;IAEvD,kBAAkB;IAClB,QAAQ,CAAC,8BAA8B,EAAE,OAAO,CAAC;IAEjD,kDAAkD;IAClD,QAAQ,CAAC,aAAa,CAAC,EAAE,4BAA4B,CAAC;IAEtD,kBAAkB;IAClB,QAAQ,CAAC,4BAA4B,EAAE,OAAO,CAAC;IAE/C,kDAAkD;IAClD,QAAQ,CAAC,YAAY,EAAE,4BAA4B,CAAC;IAEpD,kBAAkB;IAClB,QAAQ,CAAC,8BAA8B,EAAE,OAAO,CAAC;IAEjD,oDAAoD;IACpD,QAAQ,CAAC,cAAc,CAAC,EAAE,8BAA8B,CAAC;IAEzD,QAAQ,CAAC,+BAA+B,EAAE,OAAO,CAAC;IAElD,mDAAmD;IACnD,QAAQ,CAAC,aAAa,CAAC,EAAE,6BAA6B,CAAA;IAEtD,kBAAkB;IAClB,QAAQ,CAAC,8BAA8B,EAAE,OAAO,CAAC;IAEjD,wDAAwD;IACxD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,kCAAkC,CAAC;IAEhE,kBAAkB;IAClB,QAAQ,CAAC,kCAAkC,EAAE,OAAO,CAAC;CACxD"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { type IRendererConfiguration } from "../api/rendering/renderer-interface.js";
|
|
2
1
|
import { ARenderer } from "../core/rendering/ARenderer.js";
|
|
3
|
-
import type { IFramework, IGraphicsDevice } from "../api/index.js";
|
|
2
|
+
import type { IFramework, IGraphicsDevice, IRendererConfiguration } from "../api/index.js";
|
|
4
3
|
/**
|
|
5
4
|
* The WebGL implementation of the IRenderer interface.
|
|
6
5
|
*/
|
|
7
6
|
export declare class WebGlRenderer extends ARenderer {
|
|
8
|
-
private _renderConfiguration;
|
|
9
7
|
/**
|
|
10
8
|
* The constructor.
|
|
11
9
|
* @param framework The framework.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebGlRenderer.d.ts","sourceRoot":"","sources":["../../src/webgl/WebGlRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"WebGlRenderer.d.ts","sourceRoot":"","sources":["../../src/webgl/WebGlRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,KAAK,EAAC,UAAU,EAAE,eAAe,EAAE,sBAAsB,EAAC,MAAM,iBAAiB,CAAC;AAEzF;;GAEG;AACH,qBAAa,aAAc,SAAQ,SAAS;IAG1C;;;;OAIG;gBAEA,SAAS,EAAE,UAAU,EACrB,mBAAmB,EAAE,sBAAsB;IAI9C,kBAAkB;IAClB,SAAS,CAAC,oBAAoB,IAAI,eAAe;CAOlD"}
|
|
@@ -14,8 +14,8 @@ export declare class WebGlLightsBuffer implements LightsBuffer {
|
|
|
14
14
|
private readonly _buffer;
|
|
15
15
|
private readonly _data;
|
|
16
16
|
private readonly _uploaded;
|
|
17
|
-
private
|
|
18
|
-
private
|
|
17
|
+
private _directionalLights;
|
|
18
|
+
private _pointLights;
|
|
19
19
|
private _disposed;
|
|
20
20
|
/**
|
|
21
21
|
* The constructor.
|
|
@@ -28,11 +28,15 @@ export declare class WebGlLightsBuffer implements LightsBuffer {
|
|
|
28
28
|
/** @inheritDoc */
|
|
29
29
|
set ambientLight(ambientLight: AmbientLight);
|
|
30
30
|
/** @inheritDoc */
|
|
31
|
-
get directionalLights():
|
|
31
|
+
get directionalLights(): DirectionalLight[];
|
|
32
|
+
/** @inheritDoc */
|
|
33
|
+
set directionalLights(lights: DirectionalLight[]);
|
|
32
34
|
/** @inheritDoc */
|
|
33
35
|
readonly maxDirectionalLights: number;
|
|
34
36
|
/** @inheritDoc */
|
|
35
|
-
get pointLights():
|
|
37
|
+
get pointLights(): PointLight[];
|
|
38
|
+
/** @inheritDoc */
|
|
39
|
+
set pointLights(lights: PointLight[]);
|
|
36
40
|
/** @inheritDoc */
|
|
37
41
|
add(light: DirectionalLight | PointLight): void;
|
|
38
42
|
/** @inheritDoc */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebGlLightsBuffer.d.ts","sourceRoot":"","sources":["../../../src/webgl/lights/WebGlLightsBuffer.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EAEZ,gBAAgB,EAChB,UAAU,EAGV,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAE9B,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,qBAAa,iBAAkB,YAAW,YAAY;IAElD,6DAA6D;IAC7D,gBAAuB,mBAAmB,KAAK;IAE/C,uEAAuE;IACvE,gBAAuB,6BAA6B,KAAK;IAEzD,8HAA8H;IAC9H,gBAAuB,uBAAuB,MAAM;IAEpD,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;IACzC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAW;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAW;IACrC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"WebGlLightsBuffer.d.ts","sourceRoot":"","sources":["../../../src/webgl/lights/WebGlLightsBuffer.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EAEZ,gBAAgB,EAChB,UAAU,EAGV,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAE9B,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,qBAAa,iBAAkB,YAAW,YAAY;IAElD,6DAA6D;IAC7D,gBAAuB,mBAAmB,KAAK;IAE/C,uEAAuE;IACvE,gBAAuB,6BAA6B,KAAK;IAEzD,8HAA8H;IAC9H,gBAAuB,uBAAuB,MAAM;IAEpD,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;IACzC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAW;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAW;IACrC,OAAO,CAAC,kBAAkB,CAA0B;IACpD,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,SAAS,CAAS;IAE1B;;;;OAIG;gBACgB,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,sBAAsB;IAoB7E,kBAAkB;IAClB,IAAW,YAAY,IAAI,YAAY,CAEtC;IAED,kBAAkB;IAClB,IAAW,YAAY,CAAC,YAAY,EAAE,YAAY,EAEjD;IAED,kBAAkB;IAClB,IAAW,iBAAiB,IAAI,gBAAgB,EAAE,CAEjD;IAED,kBAAkB;IAClB,IAAW,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,EAAE,EAEtD;IAED,kBAAkB;IAClB,SAAgB,oBAAoB,EAAE,MAAM,CAAC;IAE7C,kBAAkB;IAClB,IAAW,WAAW,IAAI,UAAU,EAAE,CAErC;IAED,kBAAkB;IAClB,IAAW,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,EAE1C;IAED,kBAAkB;IACX,GAAG,CAAC,KAAK,EAAE,gBAAgB,GAAG,UAAU,GAAG,IAAI;IAWtD,kBAAkB;IACX,MAAM,CAAC,KAAK,EAAE,gBAAgB,GAAG,UAAU,GAAG,OAAO;IAU5D,kBAAkB;IAClB,SAAgB,cAAc,EAAE,MAAM,CAAC;IAEvC,kBAAkB;IAClB,IAAW,MAAM,IAAI,cAAc,CAElC;IAED,kBAAkB;IACX,MAAM,IAAI,IAAI;IAcrB,kBAAkB;IACX,OAAO,IAAI,IAAI;IAQtB,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,QAAQ;IAUhB,2FAA2F;IAC3F,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,UAAU;CA2CrB"}
|
|
@@ -8,6 +8,8 @@ export declare class WebGlMainRenderTargetRenderPipeline extends AWebGlRenderPip
|
|
|
8
8
|
private _vertexBuffer;
|
|
9
9
|
private _indexBuffer;
|
|
10
10
|
private _mainRenderTarget;
|
|
11
|
+
private _colorConversionUniformLocation;
|
|
12
|
+
private _colorSpaceValue;
|
|
11
13
|
/**
|
|
12
14
|
* The constructor.
|
|
13
15
|
* @param framework The framework.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebGlMainRenderTargetRenderPipeline.d.ts","sourceRoot":"","sources":["../../../src/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,cAAc,EAAC,MAAM,sCAAsC,CAAC;AAKpE,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,
|
|
1
|
+
{"version":3,"file":"WebGlMainRenderTargetRenderPipeline.d.ts","sourceRoot":"","sources":["../../../src/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,cAAc,EAAC,MAAM,sCAAsC,CAAC;AAKpE,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAEH,KAAK,UAAU,EACf,KAAK,+BAA+B,EACpC,KAAK,UAAU,EAElB,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,qBAAa,mCAAoC,SAAQ,oBAAqB,YAAW,+BAA+B;IAEpH,OAAO,CAAC,aAAa,CAA4B;IACjD,OAAO,CAAC,YAAY,CAA2B;IAC/C,OAAO,CAAC,iBAAiB,CAAyB;IAElD,OAAO,CAAC,+BAA+B,CAA+B;IACtE,OAAO,CAAC,gBAAgB,CAAK;IAE7B;;;;OAIG;gBACgB,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU;IAStE,kBAAkB;IAClB,SAAgB,cAAc,6CAA6C;IAE3E,kBAAkB;IAClB,SAAS,CAAC,eAAe,IAAI,WAAW,EAAE;IAI1C,kBAAkB;IAClB,IAAW,gBAAgB,IAAI,UAAU,CAKxC;IAED,kBAAkB;IAClB,IAAW,gBAAgB,CAAC,KAAK,EAAE,UAAU,EAE5C;IAED,kBAAkB;IACX,UAAU,IAAI,IAAI;IAUzB,OAAO,CAAC,gBAAgB;IAmBxB,kBAAkB;IACX,MAAM,IAAI,IAAI;IAqBrB,kBAAkB;IACF,OAAO,IAAI,IAAI;CAMlC"}
|
|
@@ -11,10 +11,11 @@ export declare class WebGlSwapChain implements ISwapChain {
|
|
|
11
11
|
* The WebGLSwapChain constructor.
|
|
12
12
|
* @param canvas The HTML canvas element that the swap chain will use for rendering.
|
|
13
13
|
* @param graphicsDevice The graphics device.
|
|
14
|
+
* @param srgb Prefer use of
|
|
14
15
|
*/
|
|
15
|
-
constructor(canvas: HTMLCanvasElement, graphicsDevice: IGraphicsDevice);
|
|
16
|
+
constructor(canvas: HTMLCanvasElement, graphicsDevice: IGraphicsDevice, srgb?: boolean);
|
|
16
17
|
/** @inheritdoc */
|
|
17
|
-
|
|
18
|
+
readonly textureFormat: TextureFormat;
|
|
18
19
|
/** @inheritdoc */
|
|
19
20
|
get backBufferSize(): vec2;
|
|
20
21
|
/** @inheritdoc */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebGlSwapChain.d.ts","sourceRoot":"","sources":["../../../src/webgl/swap-chain/WebGlSwapChain.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"WebGlSwapChain.d.ts","sourceRoot":"","sources":["../../../src/webgl/swap-chain/WebGlSwapChain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAC,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAGxF;;GAEG;AACH,qBAAa,cAAe,YAAW,UAAU;IAE7C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAC3C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAsB;IAEtD,OAAO,CAAC,eAAe,CAAO;IAE9B;;;;;OAKG;gBACgB,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,IAAI,UAAO;IAa1F,kBAAkB;IAClB,SAAgB,aAAa,EAAE,aAAa,CAAC;IAE7C,kBAAkB;IAClB,IAAW,cAAc,IAAI,IAAI,CAEhC;IAED,kBAAkB;IACX,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAIpD,kBAAkB;IACX,OAAO,IAAI,IAAI;IAKtB,kBAAkB;IACX,OAAO,IAAI,IAAI;CAGzB"}
|
|
@@ -9,6 +9,13 @@ export declare class WebGlTextureFactory implements ITextureFactory {
|
|
|
9
9
|
constructor(_framework: IFramework);
|
|
10
10
|
/** @inheritDoc */
|
|
11
11
|
createFromKtx2(ktxTexture: IKtx2Texture, descriptor?: TextureDescriptor): ITexture2D;
|
|
12
|
+
/** Whether the Vulkan format is an sRGB format. */
|
|
13
|
+
private static _isSrgbVkFormat;
|
|
14
|
+
/**
|
|
15
|
+
* Falls back to the linear variant (with a warning) when the GPU cannot sample the sRGB format.
|
|
16
|
+
* Only S3TC sRGB (BC1/BC3) has its own WebGL extension; BC7, ETC2 and ASTC sRGB ship with their base extension.
|
|
17
|
+
*/
|
|
18
|
+
private _ensureSrgbSupported;
|
|
12
19
|
/** @inheritdoc */
|
|
13
20
|
create(width: number, height: number, data?: Uint8Array | HTMLImageElement, channels?: number, label?: string | null | undefined, textureUsage?: number, textureFormat?: TextureFormat, useMipMaps?: boolean): ITexture2D;
|
|
14
21
|
/** @inheritdoc */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebGlTextureFactory.d.ts","sourceRoot":"","sources":["../../../src/webgl/texture/WebGlTextureFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,iBAAiB,EACjB,aAAa,EAGhB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAC,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"WebGlTextureFactory.d.ts","sourceRoot":"","sources":["../../../src/webgl/texture/WebGlTextureFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,iBAAiB,EACjB,aAAa,EAGhB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAC,KAAK,YAAY,EAAkD,MAAM,UAAU,CAAC;AAG5F,qBAAa,mBAAoB,YAAW,eAAe;IAM3C,OAAO,CAAC,QAAQ,CAAC,UAAU;IAJvC;;;OAGG;gBAC0B,UAAU,EAAE,UAAU;IAGnD,kBAAkB;IACX,cAAc,CAAC,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,iBAAiB,GAAG,UAAU;IA2F3F,mDAAmD;IACnD,OAAO,CAAC,MAAM,CAAC,eAAe;IAK9B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAW5B,kBAAkB;IACX,MAAM,CACT,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAC7B,IAAI,CAAC,EAAE,UAAU,GAAG,gBAAgB,EACpC,QAAQ,GAAE,MAAU,EACpB,KAAK,GAAE,MAAM,GAAG,IAAI,GAAG,SAAgB,EACvC,YAAY,SAAuD,EACnE,aAAa,gBAA4B,EACzC,UAAU,UAAQ,GAAG,UAAU;IAgCnC,kBAAkB;IACX,WAAW,CACd,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAC7B,KAAK,GAAE,KAAK,GAAG,IAAW,EAC1B,YAAY,SAAuD,EACnE,aAAa,gBAA0B,EACvC,KAAK,GAAE,MAAM,GAAG,IAAW,EAC3B,SAAS,UAAQ,GAAG,UAAU;CA0CrC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebGL extension constants that WebGL2RenderingContext does not expose.
|
|
3
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants
|
|
4
|
+
*/
|
|
5
|
+
export declare class WebGlConstants {
|
|
6
|
+
/** BC1 RGB */
|
|
7
|
+
static readonly GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 33776;
|
|
8
|
+
/** BC1 RGB sRGB (WEBGL_compressed_texture_s3tc_srgb) */
|
|
9
|
+
static readonly GL_COMPRESSED_SRGB_S3TC_DXT1_EXT = 35916;
|
|
10
|
+
/** BC3 sRGB (WEBGL_compressed_texture_s3tc_srgb) */
|
|
11
|
+
static readonly GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 35919;
|
|
12
|
+
/** BC7 sRGB (EXT_texture_compression_bptc) */
|
|
13
|
+
static readonly GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM = 36493;
|
|
14
|
+
/** ETC2 RGB8 */
|
|
15
|
+
static readonly GL_COMPRESSED_RGB8_ETC2 = 37492;
|
|
16
|
+
/** ETC2 RGB8 sRGB */
|
|
17
|
+
static readonly GL_COMPRESSED_SRGB8_ETC2 = 37493;
|
|
18
|
+
/** ETC2 RGBA8 sRGB */
|
|
19
|
+
static readonly GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 37497;
|
|
20
|
+
/** BC3 */
|
|
21
|
+
static readonly GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 33779;
|
|
22
|
+
/** BC7 */
|
|
23
|
+
static readonly GL_COMPRESSED_RGBA_BPTC_UNORM = 36492;
|
|
24
|
+
/** ETC2 */
|
|
25
|
+
static readonly GL_COMPRESSED_RGBA8_ETC2_EAC = 37496;
|
|
26
|
+
/** ASTC 4x4 */
|
|
27
|
+
static readonly GL_COMPRESSED_RGBA_ASTC_4x4_KHR = 37808;
|
|
28
|
+
/** ASTC 4x4 sRGB */
|
|
29
|
+
static readonly GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 37840;
|
|
30
|
+
/** ASTC 5x4 */
|
|
31
|
+
static readonly GL_COMPRESSED_RGBA_ASTC_5x4_KHR = 37809;
|
|
32
|
+
/** ASTC 5x4 sRGB */
|
|
33
|
+
static readonly GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 37841;
|
|
34
|
+
/** ASTC 5x5 */
|
|
35
|
+
static readonly GL_COMPRESSED_RGBA_ASTC_5x5_KHR = 37810;
|
|
36
|
+
/** ASTC 5x5 sRGB */
|
|
37
|
+
static readonly GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 37842;
|
|
38
|
+
/** ASTC 6x5 */
|
|
39
|
+
static readonly GL_COMPRESSED_RGBA_ASTC_6x5_KHR = 37811;
|
|
40
|
+
/** ASTC 6x5 sRGB */
|
|
41
|
+
static readonly GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 37843;
|
|
42
|
+
/** ASTC 6x6 */
|
|
43
|
+
static readonly GL_COMPRESSED_RGBA_ASTC_6x6_KHR = 37812;
|
|
44
|
+
/** ASTC 6x6 sRGB */
|
|
45
|
+
static readonly GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 37844;
|
|
46
|
+
/** ASTC 8x5 */
|
|
47
|
+
static readonly GL_COMPRESSED_RGBA_ASTC_8x5_KHR = 37813;
|
|
48
|
+
/** ASTC 8x5 sRGB */
|
|
49
|
+
static readonly GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 37845;
|
|
50
|
+
/** ASTC 8x6 */
|
|
51
|
+
static readonly GL_COMPRESSED_RGBA_ASTC_8x6_KHR = 37814;
|
|
52
|
+
/** ASTC 8x6 sRGB */
|
|
53
|
+
static readonly GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 37846;
|
|
54
|
+
/** ASTC 8x8 */
|
|
55
|
+
static readonly GL_COMPRESSED_RGBA_ASTC_8x8_KHR = 37815;
|
|
56
|
+
/** ASTC 8x8 sRGB */
|
|
57
|
+
static readonly GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 37847;
|
|
58
|
+
/** ASTC 10x5 */
|
|
59
|
+
static readonly GL_COMPRESSED_RGBA_ASTC_10x5_KHR = 37816;
|
|
60
|
+
/** ASTC 10x5 sRGB */
|
|
61
|
+
static readonly GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 37848;
|
|
62
|
+
/** ASTC 10x6 */
|
|
63
|
+
static readonly GL_COMPRESSED_RGBA_ASTC_10x6_KHR = 37817;
|
|
64
|
+
/** ASTC 10x6 sRGB */
|
|
65
|
+
static readonly GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 37849;
|
|
66
|
+
/** ASTC 10x8 */
|
|
67
|
+
static readonly GL_COMPRESSED_RGBA_ASTC_10x8_KHR = 37818;
|
|
68
|
+
/** ASTC 10x8 sRGB */
|
|
69
|
+
static readonly GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 37850;
|
|
70
|
+
/** ASTC 10x10 */
|
|
71
|
+
static readonly GL_COMPRESSED_RGBA_ASTC_10x10_KHR = 37819;
|
|
72
|
+
/** ASTC 10x10 sRGB */
|
|
73
|
+
static readonly GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 37851;
|
|
74
|
+
/** ASTC 12x10 */
|
|
75
|
+
static readonly GL_COMPRESSED_RGBA_ASTC_12x10_KHR = 37820;
|
|
76
|
+
/** ASTC 12x10 sRGB */
|
|
77
|
+
static readonly GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 37852;
|
|
78
|
+
/** ASTC 12x12 */
|
|
79
|
+
static readonly GL_COMPRESSED_RGBA_ASTC_12x12_KHR = 37821;
|
|
80
|
+
/** ASTC 12x12 sRGB */
|
|
81
|
+
static readonly GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 37853;
|
|
82
|
+
/** PVRTC 4 bits per pixel, RGB */
|
|
83
|
+
static readonly GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 35840;
|
|
84
|
+
/** PVRTC 2 bits per pixel, RGB */
|
|
85
|
+
static readonly GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 35841;
|
|
86
|
+
/** PVRTC 4 bits per pixel, RGBA */
|
|
87
|
+
static readonly GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 35842;
|
|
88
|
+
/** PVRTC 2 bits per pixel, RGBA */
|
|
89
|
+
static readonly GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 35843;
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=WebGlConstants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebGlConstants.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/WebGlConstants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,cAAc;IAEvB,cAAc;IACd,gBAAuB,+BAA+B,SAAU;IAEhE,wDAAwD;IACxD,gBAAuB,gCAAgC,SAAU;IAEjE,oDAAoD;IACpD,gBAAuB,sCAAsC,SAAU;IAEvE,8CAA8C;IAC9C,gBAAuB,mCAAmC,SAAU;IAEpE,gBAAgB;IAChB,gBAAuB,uBAAuB,SAAU;IAExD,qBAAqB;IACrB,gBAAuB,wBAAwB,SAAU;IAEzD,sBAAsB;IACtB,gBAAuB,mCAAmC,SAAU;IAEpE,UAAU;IACV,gBAAuB,gCAAgC,SAAU;IAEjE,UAAU;IACV,gBAAuB,6BAA6B,SAAU;IAE9D,WAAW;IACX,gBAAuB,4BAA4B,SAAU;IAI7D,eAAe;IACf,gBAAuB,+BAA+B,SAAU;IAEhE,oBAAoB;IACpB,gBAAuB,uCAAuC,SAAU;IAExE,eAAe;IACf,gBAAuB,+BAA+B,SAAU;IAEhE,oBAAoB;IACpB,gBAAuB,uCAAuC,SAAU;IAExE,eAAe;IACf,gBAAuB,+BAA+B,SAAU;IAEhE,oBAAoB;IACpB,gBAAuB,uCAAuC,SAAU;IAExE,eAAe;IACf,gBAAuB,+BAA+B,SAAU;IAEhE,oBAAoB;IACpB,gBAAuB,uCAAuC,SAAU;IAExE,eAAe;IACf,gBAAuB,+BAA+B,SAAU;IAEhE,oBAAoB;IACpB,gBAAuB,uCAAuC,SAAU;IAExE,eAAe;IACf,gBAAuB,+BAA+B,SAAU;IAEhE,oBAAoB;IACpB,gBAAuB,uCAAuC,SAAU;IAExE,eAAe;IACf,gBAAuB,+BAA+B,SAAU;IAEhE,oBAAoB;IACpB,gBAAuB,uCAAuC,SAAU;IAExE,eAAe;IACf,gBAAuB,+BAA+B,SAAU;IAEhE,oBAAoB;IACpB,gBAAuB,uCAAuC,SAAU;IAExE,gBAAgB;IAChB,gBAAuB,gCAAgC,SAAU;IAEjE,qBAAqB;IACrB,gBAAuB,wCAAwC,SAAU;IAEzE,gBAAgB;IAChB,gBAAuB,gCAAgC,SAAU;IAEjE,qBAAqB;IACrB,gBAAuB,wCAAwC,SAAU;IAEzE,gBAAgB;IAChB,gBAAuB,gCAAgC,SAAU;IAEjE,qBAAqB;IACrB,gBAAuB,wCAAwC,SAAU;IAEzE,iBAAiB;IACjB,gBAAuB,iCAAiC,SAAU;IAElE,sBAAsB;IACtB,gBAAuB,yCAAyC,SAAU;IAE1E,iBAAiB;IACjB,gBAAuB,iCAAiC,SAAU;IAElE,sBAAsB;IACtB,gBAAuB,yCAAyC,SAAU;IAE1E,iBAAiB;IACjB,gBAAuB,iCAAiC,SAAU;IAElE,sBAAsB;IACtB,gBAAuB,yCAAyC,SAAU;IAI1E,kCAAkC;IAClC,gBAAuB,kCAAkC,SAAU;IAEnE,kCAAkC;IAClC,gBAAuB,kCAAkC,SAAU;IAEnE,mCAAmC;IACnC,gBAAuB,mCAAmC,SAAU;IAEpE,mCAAmC;IACnC,gBAAuB,mCAAmC,SAAU;CACvE"}
|
|
@@ -3,13 +3,6 @@ import { BlendFactor, BlendOperation } from "../../core/rendering/blending/enums
|
|
|
3
3
|
import { VertexFormat } from "../../api/geometry/VertexFormat.js";
|
|
4
4
|
import { BufferUsage, CullMode, FrontFace, MipMapSamplerFilter, PrimitiveTopology, SamplerAddressMode, SamplerFilter, TextureFormat } from "../../api/index.js";
|
|
5
5
|
export declare class WebGlConverter {
|
|
6
|
-
/** BC3 */
|
|
7
|
-
private static GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
|
|
8
|
-
/** BC7 */
|
|
9
|
-
private static GL_COMPRESSED_RGBA_BPTC_UNORM;
|
|
10
|
-
/** ETC2 */
|
|
11
|
-
private static GL_COMPRESSED_RGBA8_ETC2_EAC;
|
|
12
|
-
private static GL_COMPRESSED_RGBA_ASTC_4x4_KHR;
|
|
13
6
|
/**
|
|
14
7
|
* Converts PrimitiveTopology to WebGL enum.
|
|
15
8
|
* @param topology The PrimitiveTopology.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebGlConverter.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/WebGlConverter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WebGlConverter.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/WebGlConverter.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAC,WAAW,EAAE,cAAc,EAAC,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAC,YAAY,EAAC,MAAM,oCAAoC,CAAC;AAChE,OAAO,EACH,WAAW,EACX,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,aAAa,EAChB,MAAM,oBAAoB,CAAC;AAE5B,qBAAa,cAAc;IAEvB;;;;OAIG;WACW,oBAAoB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM;IAkBvE;;;;OAIG;WACW,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM;IAezD;;;;OAIG;WACW,gBAAgB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM;IAW5D;;;;OAIG;WACW,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM;IAW5D;;;;;OAKG;WACW,qBAAqB,CAC/B,EAAE,EAAE,sBAAsB,EAC1B,cAAc,EAAE,cAAc,GAC/B,MAAM;IAiBT;;;;;OAKG;WACW,kBAAkB,CAC5B,EAAE,EAAE,sBAAsB,EAC1B,cAAc,EAAE,WAAW,GAC5B,MAAM;IAqBT;;;;;OAKG;WACW,cAAc,CAAC,EAAE,EAAE,sBAAsB,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM;IAalF;;;;;OAKG;WACW,qBAAqB,CAAC,EAAE,EAAE,sBAAsB,EAAE,aAAa,EAAE,aAAa,GAAG,MAAM;IA0GrG;;;;;OAKG;WACW,oBAAoB,CAAC,EAAE,EAAE,sBAAsB,EAAE,aAAa,EAAE,aAAa,GAAG,MAAM;IAcpG;;;;;OAKG;WACW,oBAAoB,CAAC,EAAE,EAAE,sBAAsB,EAAE,aAAa,EAAE,aAAa,GAAG,MAAM;IAcpG;;;;OAIG;WACW,mBAAmB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM;IAiBrE;;;;;OAKG;WACW,gBAAgB,CAAC,EAAE,EAAE,sBAAsB,EAAE,MAAM,EAAE,aAAa,GAAG,MAAM;IAWzF;;;;;;OAMG;WACW,gBAAgB,CAAC,EAAE,EAAE,sBAAsB,EAAE,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,mBAAmB,GAAG,MAAM;IA6B5H;;;;;OAKG;WACW,kBAAkB,CAAC,EAAE,EAAE,sBAAsB,EAAE,WAAW,EAAE,kBAAkB,GAAG,MAAM;CAgBxG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class WebGlErrorUtilities {
|
|
2
|
+
private readonly _map;
|
|
3
|
+
/**
|
|
4
|
+
* Maps the WebGL2 error code to string.
|
|
5
|
+
* @param error The error code.
|
|
6
|
+
* @return The string of error code.
|
|
7
|
+
*/
|
|
8
|
+
errorToStr(error: number): string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=WebGlErrorUtilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebGlErrorUtilities.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/WebGlErrorUtilities.ts"],"names":[],"mappings":"AAAA,qBAAa,mBAAmB;IAE5B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAEpB;IAED;;;;OAIG;IACI,UAAU,CAAC,KAAK,EAAE,MAAM,GAAI,MAAM;CAG5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebGlTextureUtilities.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/WebGlTextureUtilities.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"WebGlTextureUtilities.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/WebGlTextureUtilities.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAG/B;;GAEG;AACH,qBAAa,qBAAqB;IAE9B;;;;;;;;;;;OAWG;IACI,eAAe,CAClB,EAAE,EAAE,sBAAsB,EAC1B,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAC7B,IAAI,GAAE,UAAU,EAAE,GAAG,gBAAgB,EAAE,GAAG,IAAW,EACrD,aAAa,gBAA6B,EAC1C,UAAU,UAAQ,EAClB,UAAU,SAAM,EAChB,KAAK,GAAE,MAAM,GAAG,IAAW,GAC5B,YAAY;IA2Df;;;;;;;;;;OAUG;IACI,yBAAyB,CAC5B,EAAE,EAAE,sBAAsB,EAC1B,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAChC,IAAI,GAAE,UAAU,EAAE,GAAG,IAAW,EAChC,KAAK,GAAE,MAAM,GAAG,IAAW,EAC3B,aAAa,gBAA6B,EAC1C,UAAU,SAAM,GACjB,YAAY;CAkElB"}
|
|
@@ -8,6 +8,7 @@ import { WebGLRenderbufferUtilities } from "./webgl-renderbuffer-utilities";
|
|
|
8
8
|
import { WebGlSamplerUtilities } from "./WebGlSamplerUtilities.js";
|
|
9
9
|
import { WebGlShaderUtilities } from "./WebGlShaderUtilities.js";
|
|
10
10
|
import { WebGlTextureUtilities } from "./WebGlTextureUtilities.js";
|
|
11
|
+
import { WebGlErrorUtilities } from "./WebGlErrorUtilities.js";
|
|
11
12
|
/**
|
|
12
13
|
* The utility class for WebGL operations.
|
|
13
14
|
*/
|
|
@@ -56,5 +57,7 @@ export declare class WebGlUtilities {
|
|
|
56
57
|
* The WebGL program utilities.
|
|
57
58
|
*/
|
|
58
59
|
static readonly program: WebGLProgramUtilities;
|
|
60
|
+
/** The WebGL error utilities. Helper class for working with errors. */
|
|
61
|
+
static readonly error: WebGlErrorUtilities;
|
|
59
62
|
}
|
|
60
63
|
//# sourceMappingURL=WebGlUtilities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebGlUtilities.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/WebGlUtilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"WebGlUtilities.d.ts","sourceRoot":"","sources":["../../../src/webgl/utilities/WebGlUtilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAE7D;;GAEG;AACH,qBAAa,cAAc;IAEvB;;OAEG;IACH,gBAAuB,QAAQ,yBAAgC;IAE/D;;OAEG;IACH,gBAAuB,UAAU,kCAAyC;IAE1E;;OAEG;IACH,gBAAuB,OAAO,wBAA+B;IAE7D;;OAEG;IACH,gBAAuB,OAAO,wBAA+B;IAE7D;;OAEG;IACH,gBAAuB,WAAW,4BAAmC;IAErE;;OAEG;IACH,gBAAuB,YAAY,6BAAoC;IAEvE;;OAEG;IACH,gBAAuB,MAAM,uBAA8B;IAE3D;;OAEG;IACH,gBAAuB,YAAY,6BAAoC;IAEvE;;OAEG;IACH,gBAAuB,OAAO,wBAA+B;IAE7D;;OAEG;IACH,gBAAuB,MAAM,uBAA8B;IAE3D;;OAEG;IACH,gBAAuB,OAAO,wBAA+B;IAE7D,uEAAuE;IACvE,gBAAyB,KAAK,sBAA6B;CAC9D"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type IGPUInfo, RenderingBackend, TextureFormat } from "../api/index.js";
|
|
2
|
+
import type { GpuAdapter } from "./WebGpuTypes.js";
|
|
3
|
+
import type { WebGpuGraphicsDeviceFeatures } from "./WebGpuGraphicsDeviceFeatures.js";
|
|
4
|
+
/**
|
|
5
|
+
* The WebGPU GPU info, read from the adapter info.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare class WebGpuGpuInfo implements IGPUInfo {
|
|
9
|
+
/**
|
|
10
|
+
* The constructor.
|
|
11
|
+
* @param adapter The adapter.
|
|
12
|
+
* @param features The device features.
|
|
13
|
+
*/
|
|
14
|
+
constructor(adapter: GpuAdapter, features: WebGpuGraphicsDeviceFeatures);
|
|
15
|
+
/** @inheritDoc */
|
|
16
|
+
readonly name: string;
|
|
17
|
+
/** @inheritDoc */
|
|
18
|
+
readonly vendor: string;
|
|
19
|
+
/** @inheritDoc */
|
|
20
|
+
readonly apiVersion: string;
|
|
21
|
+
/** @inheritDoc */
|
|
22
|
+
readonly api: RenderingBackend;
|
|
23
|
+
/** @inheritDoc */
|
|
24
|
+
readonly underlyingBackend: RenderingBackend;
|
|
25
|
+
/** @inheritDoc */
|
|
26
|
+
readonly supportedCompressedTextureFormats: TextureFormat[];
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=WebGpuGpuInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebGpuGpuInfo.d.ts","sourceRoot":"","sources":["../../src/webgpu/WebGpuGpuInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,QAAQ,EAAE,gBAAgB,EAAE,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC/E,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAC,4BAA4B,EAAC,MAAM,mCAAmC,CAAC;AAEpF;;;GAGG;AACH,qBAAa,aAAc,YAAW,QAAQ;IAE1C;;;;OAIG;gBACgB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,4BAA4B;IA4B9E,kBAAkB;IAClB,SAAgB,IAAI,EAAE,MAAM,CAAC;IAE7B,kBAAkB;IAClB,SAAgB,MAAM,EAAE,MAAM,CAAC;IAE/B,kBAAkB;IAClB,SAAgB,UAAU,EAAE,MAAM,CAAC;IAEnC,kBAAkB;IAClB,SAAgB,GAAG,EAAE,gBAAgB,CAAC;IAEtC,kBAAkB;IAClB,SAAgB,iBAAiB,EAAE,gBAAgB,CAAC;IAEpD,kBAAkB;IAClB,SAAgB,iCAAiC,EAAE,aAAa,EAAE,CAAC;CACtE"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { AGraphicsDevice, type IGraphicsDeviceDescriptor } from "../core/rendering/AGraphicsDevice.js";
|
|
2
|
+
import type { BlendStateDescriptor } from "../core/rendering/blending/blend-state-descriptor.js";
|
|
3
|
+
import type { SamplerDescriptor } from "../core/rendering/sampler/sampler-descriptor.js";
|
|
4
|
+
import { type IBlendState, type IGPUInfo, type IPrimitiveState, type IRenderPass, type ISampler, type ISwapChain, type IWindowManager, PrimitiveStateDescriptor, RenderPassDescriptor, SwapChainDescriptor } from "../api/index.js";
|
|
5
|
+
import { type GpuAdapter, type GpuDevice, type GpuRenderPassEncoder } from "./WebGpuTypes.js";
|
|
6
|
+
import { WebGpuGraphicsDeviceFeatures } from "./WebGpuGraphicsDeviceFeatures.js";
|
|
7
|
+
import { WebGpuSwapChain } from "./swap-chain/WebGpuSwapChain.js";
|
|
8
|
+
/**
|
|
9
|
+
* The WebGPU graphics device. It requests its own adapter and device in {@link createAsync},
|
|
10
|
+
* so everything after creation is synchronous like WebGL.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare class WebGpuGraphicsDevice extends AGraphicsDevice {
|
|
14
|
+
private readonly _windowManager;
|
|
15
|
+
private readonly _adapter;
|
|
16
|
+
private readonly _device;
|
|
17
|
+
private _features;
|
|
18
|
+
private _gpuInfo;
|
|
19
|
+
private _swapChain;
|
|
20
|
+
/**
|
|
21
|
+
* The render pass encoder of the pass that is currently open, or null between passes.
|
|
22
|
+
* Set by {@link WebGpuRenderPass.beginPass}, like `currentRenderPassEncoder` in the C# device.
|
|
23
|
+
*/
|
|
24
|
+
currentRenderPassEncoder: GpuRenderPassEncoder | null;
|
|
25
|
+
/**
|
|
26
|
+
* Creates the graphics device: requests the WebGPU adapter and device.
|
|
27
|
+
* Throws when WebGPU is unavailable or no adapter is found.
|
|
28
|
+
* @param windowManager The window manager.
|
|
29
|
+
* @param descriptor The device descriptor.
|
|
30
|
+
* @returns The created graphics device.
|
|
31
|
+
*/
|
|
32
|
+
static createAsync(windowManager: IWindowManager, descriptor: IGraphicsDeviceDescriptor): Promise<WebGpuGraphicsDevice>;
|
|
33
|
+
/**
|
|
34
|
+
* The constructor. Use {@link createAsync} to create the device.
|
|
35
|
+
* @param windowManager The window manager.
|
|
36
|
+
* @param descriptor The device descriptor.
|
|
37
|
+
* @param adapter The WebGPU adapter.
|
|
38
|
+
* @param device The WebGPU device.
|
|
39
|
+
*/
|
|
40
|
+
private constructor();
|
|
41
|
+
/** The WebGPU device. */
|
|
42
|
+
get device(): GpuDevice;
|
|
43
|
+
/** The WebGPU adapter. */
|
|
44
|
+
get adapter(): GpuAdapter;
|
|
45
|
+
/** Whether the canvas should keep its alpha channel. */
|
|
46
|
+
get alpha(): boolean;
|
|
47
|
+
/** The swap chain, once created. */
|
|
48
|
+
get swapChain(): WebGpuSwapChain | null;
|
|
49
|
+
/** The window manager. */
|
|
50
|
+
get windowManager(): IWindowManager;
|
|
51
|
+
/** @inheritDoc */
|
|
52
|
+
get features(): WebGpuGraphicsDeviceFeatures;
|
|
53
|
+
/** @inheritDoc */
|
|
54
|
+
get gpuInfo(): IGPUInfo;
|
|
55
|
+
/** The current render pass encoder. Throws when no pass is open. */
|
|
56
|
+
get renderPassEncoder(): GpuRenderPassEncoder;
|
|
57
|
+
/** @inheritDoc */
|
|
58
|
+
initialize(): void;
|
|
59
|
+
/** @inheritDoc */
|
|
60
|
+
createSwapChain(canvas: HTMLCanvasElement, descriptor: SwapChainDescriptor): ISwapChain;
|
|
61
|
+
/** @inheritDoc */
|
|
62
|
+
createSampler(descriptor?: SamplerDescriptor): ISampler;
|
|
63
|
+
/** @inheritDoc */
|
|
64
|
+
createRenderPass(descriptor: RenderPassDescriptor): IRenderPass;
|
|
65
|
+
/** @inheritDoc */
|
|
66
|
+
createBlendState(descriptor: BlendStateDescriptor): IBlendState;
|
|
67
|
+
/** @inheritDoc */
|
|
68
|
+
createPrimitiveState(descriptor?: PrimitiveStateDescriptor): IPrimitiveState;
|
|
69
|
+
/** @inheritDoc */
|
|
70
|
+
setupDebugCallback(): void;
|
|
71
|
+
/** @inheritDoc */
|
|
72
|
+
frameEnd(): void;
|
|
73
|
+
/** @inheritDoc */
|
|
74
|
+
pushDebugGroup(groupName: string): void;
|
|
75
|
+
/** @inheritDoc */
|
|
76
|
+
popDebugGroup(): void;
|
|
77
|
+
/** @inheritDoc */
|
|
78
|
+
dispose(): void;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=WebGpuGraphicsDevice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebGpuGraphicsDevice.d.ts","sourceRoot":"","sources":["../../src/webgpu/WebGpuGraphicsDevice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAE,KAAK,yBAAyB,EAAC,MAAM,sCAAsC,CAAC;AACrG,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,sDAAsD,CAAC;AAC/F,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iDAAiD,CAAC;AACvF,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAkB,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AAE7G,OAAO,EAAC,4BAA4B,EAAC,MAAM,mCAAmC,CAAC;AAE/E,OAAO,EAAC,eAAe,EAAC,MAAM,iCAAiC,CAAC;AAMhE;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,eAAe;IAErD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAa;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAY;IACpC,OAAO,CAAC,SAAS,CAAuC;IACxD,OAAO,CAAC,QAAQ,CAAwB;IACxC,OAAO,CAAC,UAAU,CAAgC;IAElD;;;OAGG;IACI,wBAAwB,EAAE,oBAAoB,GAAG,IAAI,CAAQ;IAEpE;;;;;;OAMG;WACiB,WAAW,CAAC,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,yBAAyB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAoBpI;;;;;;OAMG;IACH,OAAO;IAOP,yBAAyB;IACzB,IAAW,MAAM,IAAI,SAAS,CAE7B;IAED,0BAA0B;IAC1B,IAAW,OAAO,IAAI,UAAU,CAE/B;IAED,wDAAwD;IACxD,IAAW,KAAK,IAAI,OAAO,CAE1B;IAED,oCAAoC;IACpC,IAAW,SAAS,IAAI,eAAe,GAAG,IAAI,CAE7C;IAED,0BAA0B;IAC1B,IAAW,aAAa,IAAI,cAAc,CAEzC;IAED,kBAAkB;IAClB,IAAW,QAAQ,IAAI,4BAA4B,CAElD;IAED,kBAAkB;IAClB,IAAW,OAAO,IAAI,QAAQ,CAE7B;IAED,oEAAoE;IACpE,IAAW,iBAAiB,IAAI,oBAAoB,CAKnD;IAED,kBAAkB;IACX,UAAU,IAAI,IAAI;IAOzB,kBAAkB;IACX,eAAe,CAAC,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,mBAAmB,GAAG,UAAU;IAM9F,kBAAkB;IACX,aAAa,CAAC,UAAU,CAAC,EAAE,iBAAiB,GAAG,QAAQ;IAI9D,kBAAkB;IACX,gBAAgB,CAAC,UAAU,EAAE,oBAAoB,GAAG,WAAW;IAItE,kBAAkB;IACX,gBAAgB,CAAC,UAAU,EAAE,oBAAoB,GAAG,WAAW;IAItE,kBAAkB;IACX,oBAAoB,CAAC,UAAU,CAAC,EAAE,wBAAwB,GAAG,eAAe;IAInF,kBAAkB;IACX,kBAAkB,IAAI,IAAI;IAWjC,kBAAkB;IACX,QAAQ,IAAI,IAAI;IAIvB,kBAAkB;IACX,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAI9C,kBAAkB;IACX,aAAa,IAAI,IAAI;IAI5B,kBAAkB;IACX,OAAO,IAAI,IAAI;CAMzB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IGraphicsDeviceFeatures } from "../api/index.js";
|
|
2
|
+
import type { GpuSupportedFeatures } from "./WebGpuTypes.js";
|
|
3
|
+
/**
|
|
4
|
+
* The WebGPU graphics device features, read from the device's enabled features.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class WebGpuGraphicsDeviceFeatures implements IGraphicsDeviceFeatures {
|
|
8
|
+
/**
|
|
9
|
+
* The constructor.
|
|
10
|
+
* @param features The device's enabled features.
|
|
11
|
+
*/
|
|
12
|
+
constructor(features: GpuSupportedFeatures);
|
|
13
|
+
/** @inheritDoc */
|
|
14
|
+
readonly supportsTextureCompressionS3TC: boolean;
|
|
15
|
+
/** @inheritDoc */
|
|
16
|
+
readonly supportsTextureCompressionS3TCSrgb: boolean;
|
|
17
|
+
/** @inheritDoc */
|
|
18
|
+
readonly supportsTextureCompressionBC: boolean;
|
|
19
|
+
/** @inheritDoc */
|
|
20
|
+
readonly supportsTextureCompressionETC2: boolean;
|
|
21
|
+
/** @inheritDoc */
|
|
22
|
+
readonly supportsTextureCompressionASTC: boolean;
|
|
23
|
+
/** @inheritDoc */
|
|
24
|
+
readonly supportsTextureCompressionPVRTC: boolean;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=WebGpuGraphicsDeviceFeatures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebGpuGraphicsDeviceFeatures.d.ts","sourceRoot":"","sources":["../../src/webgpu/WebGpuGraphicsDeviceFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AAE3D;;;GAGG;AACH,qBAAa,4BAA6B,YAAW,uBAAuB;IAExE;;;OAGG;gBACgB,QAAQ,EAAE,oBAAoB;IAUjD,kBAAkB;IAClB,SAAgB,8BAA8B,EAAE,OAAO,CAAC;IAExD,kBAAkB;IAClB,SAAgB,kCAAkC,EAAE,OAAO,CAAC;IAE5D,kBAAkB;IAClB,SAAgB,4BAA4B,EAAE,OAAO,CAAC;IAEtD,kBAAkB;IAClB,SAAgB,8BAA8B,EAAE,OAAO,CAAC;IAExD,kBAAkB;IAClB,SAAgB,8BAA8B,EAAE,OAAO,CAAC;IAExD,kBAAkB;IAClB,SAAgB,+BAA+B,EAAE,OAAO,CAAC;CAC5D"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ARenderer } from "../core/rendering/ARenderer.js";
|
|
2
|
+
import { type IFramework, type IGraphicsDevice, type IRendererConfiguration } from "../api/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* The WebGPU renderer. WebGPU hands out the adapter and device asynchronously, so call
|
|
5
|
+
* {@link acquireDeviceAsync} (done by `Framework.initializeAsync()`) before {@link initialize}.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare class WebGpuRenderer extends ARenderer {
|
|
9
|
+
private _createdDevice;
|
|
10
|
+
/**
|
|
11
|
+
* The constructor.
|
|
12
|
+
* @param framework The framework.
|
|
13
|
+
* @param renderConfiguration The renderer configuration.
|
|
14
|
+
*/
|
|
15
|
+
constructor(framework: IFramework, renderConfiguration: IRendererConfiguration);
|
|
16
|
+
/** Whether the browser exposes `navigator.gpu`. */
|
|
17
|
+
static isSupported(): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Creates the graphics device, which requests its own adapter and device.
|
|
20
|
+
* Throws when WebGPU is unavailable or no adapter is found.
|
|
21
|
+
*/
|
|
22
|
+
acquireDeviceAsync(): Promise<void>;
|
|
23
|
+
/** @inheritDoc */
|
|
24
|
+
protected createGraphicsDevice(): IGraphicsDevice;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=WebGpuRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebGpuRenderer.d.ts","sourceRoot":"","sources":["../../src/webgpu/WebGpuRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAC,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,sBAAsB,EAAmB,MAAM,iBAAiB,CAAC;AAIrH;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,SAAS;IAEzC,OAAO,CAAC,cAAc,CAAqC;IAE3D;;;;OAIG;gBACgB,SAAS,EAAE,UAAU,EAAE,mBAAmB,EAAE,sBAAsB;IAKrF,mDAAmD;WACrC,WAAW,IAAI,OAAO;IAIpC;;;OAGG;IACU,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAQhD,kBAAkB;IAClB,SAAS,CAAC,oBAAoB,IAAI,eAAe;CAMpD"}
|