ris-framework 0.1.0-dev.7 → 0.1.0
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 +4 -1
- package/LICENSE +202 -21
- package/NOTICE +2 -0
- package/README.md +29 -47
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/{core/Framework.d.ts → Framework.d.ts} +10 -8
- package/dist/Framework.d.ts.map +1 -0
- package/dist/api/FrameworkConfiguration.d.ts +23 -0
- package/dist/api/FrameworkConfiguration.d.ts.map +1 -0
- package/dist/api/IFramework.d.ts +125 -0
- package/dist/api/IFramework.d.ts.map +1 -0
- package/dist/api/IFrameworkConfiguration.d.ts +25 -0
- package/dist/api/IFrameworkConfiguration.d.ts.map +1 -0
- package/dist/api/_export.d.ts +27 -0
- package/dist/api/_export.d.ts.map +1 -0
- package/dist/api/camera/CameraFactory.d.ts +25 -0
- package/dist/api/camera/CameraFactory.d.ts.map +1 -0
- package/dist/api/camera/ICamera.d.ts +43 -0
- package/dist/api/camera/ICamera.d.ts.map +1 -0
- package/dist/api/camera/ICameraFactory.d.ts +46 -0
- package/dist/api/camera/ICameraFactory.d.ts.map +1 -0
- package/dist/api/camera/IOrthographicCamera.d.ts +31 -0
- package/dist/api/camera/IOrthographicCamera.d.ts.map +1 -0
- package/dist/api/camera/OrbitCamera.d.ts +120 -0
- package/dist/api/camera/OrbitCamera.d.ts.map +1 -0
- package/dist/api/camera/OrthographicCamera.d.ts +96 -0
- package/dist/api/camera/OrthographicCamera.d.ts.map +1 -0
- package/dist/api/camera/PerspectiveCamera.d.ts +108 -0
- package/dist/api/camera/PerspectiveCamera.d.ts.map +1 -0
- package/dist/api/camera/_export.d.ts +8 -0
- package/dist/api/camera/_export.d.ts.map +1 -0
- package/dist/api/content/ContentConfig.d.ts +11 -0
- package/dist/api/content/ContentConfig.d.ts.map +1 -0
- package/dist/{core → api}/content/ContentManager.d.ts +3 -2
- package/dist/api/content/ContentManager.d.ts.map +1 -0
- package/dist/api/content/IContent.d.ts +8 -0
- package/dist/api/content/IContent.d.ts.map +1 -0
- package/dist/api/content/IContentManager.d.ts +37 -0
- package/dist/api/content/IContentManager.d.ts.map +1 -0
- package/dist/api/content/IContentModule.d.ts +58 -0
- package/dist/api/content/IContentModule.d.ts.map +1 -0
- package/dist/api/content/ShaderModuleContent.d.ts.map +1 -0
- package/dist/api/content/_export-content.d.ts +5 -0
- package/dist/api/content/_export-content.d.ts.map +1 -0
- package/dist/api/core/IDisposable.d.ts +10 -0
- package/dist/api/core/IDisposable.d.ts.map +1 -0
- package/dist/api/core/_export-core.d.ts +2 -0
- package/dist/api/core/_export-core.d.ts.map +1 -0
- package/dist/api/data/Color.d.ts +119 -0
- package/dist/api/data/Color.d.ts.map +1 -0
- package/dist/api/data/Rect.d.ts +61 -0
- package/dist/api/data/Rect.d.ts.map +1 -0
- package/dist/api/data/State.d.ts +11 -0
- package/dist/api/data/State.d.ts.map +1 -0
- package/dist/api/data/_export.d.ts +4 -0
- package/dist/api/data/_export.d.ts.map +1 -0
- package/dist/{geometry → api/geometry}/BaseGeometry.d.ts +5 -2
- package/dist/api/geometry/BaseGeometry.d.ts.map +1 -0
- package/dist/{geometry → api/geometry}/GeometryBuilder.d.ts +1 -1
- package/dist/api/geometry/GeometryBuilder.d.ts.map +1 -0
- package/dist/api/geometry/GeometryFormat.d.ts +34 -0
- package/dist/api/geometry/GeometryFormat.d.ts.map +1 -0
- package/dist/api/geometry/IGeometry.d.ts +54 -0
- package/dist/api/geometry/IGeometry.d.ts.map +1 -0
- package/dist/api/geometry/IGeometryBuilder.d.ts +15 -0
- package/dist/api/geometry/IGeometryBuilder.d.ts.map +1 -0
- package/dist/api/geometry/VertexFormat.d.ts.map +1 -0
- package/dist/api/geometry/_export-geometry.d.ts +5 -0
- package/dist/api/geometry/_export-geometry.d.ts.map +1 -0
- package/dist/api/image/CpuImageProcessor.d.ts +16 -0
- package/dist/api/image/CpuImageProcessor.d.ts.map +1 -0
- package/dist/api/image/IImageProcessor.d.ts +26 -0
- package/dist/api/image/IImageProcessor.d.ts.map +1 -0
- package/dist/api/image/RawImageData.d.ts +34 -0
- package/dist/api/image/RawImageData.d.ts.map +1 -0
- package/dist/api/image/_export.d.ts +4 -0
- package/dist/api/image/_export.d.ts.map +1 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/input/IInputManager.d.ts +53 -0
- package/dist/api/input/IInputManager.d.ts.map +1 -0
- package/dist/api/input/InputDeviceType.d.ts +18 -0
- package/dist/api/input/InputDeviceType.d.ts.map +1 -0
- package/dist/api/input/InputManager.d.ts +73 -0
- package/dist/api/input/InputManager.d.ts.map +1 -0
- package/dist/api/input/Key.d.ts +36 -0
- package/dist/api/input/Key.d.ts.map +1 -0
- package/dist/api/input/KeyboardState.d.ts +37 -0
- package/dist/api/input/KeyboardState.d.ts.map +1 -0
- package/dist/api/input/_export.d.ts +14 -0
- package/dist/api/input/_export.d.ts.map +1 -0
- package/dist/api/input/gamepad/Button.d.ts +22 -0
- package/dist/api/input/gamepad/Button.d.ts.map +1 -0
- package/dist/api/input/gamepad/GamePadState.d.ts +48 -0
- package/dist/api/input/gamepad/GamePadState.d.ts.map +1 -0
- package/dist/api/input/gamepad/GamePadThumbSticks.d.ts +17 -0
- package/dist/api/input/gamepad/GamePadThumbSticks.d.ts.map +1 -0
- package/dist/api/input/mouse/MouseButton.d.ts +10 -0
- package/dist/api/input/mouse/MouseButton.d.ts.map +1 -0
- package/dist/api/input/mouse/MouseState.d.ts +52 -0
- package/dist/api/input/mouse/MouseState.d.ts.map +1 -0
- package/dist/api/input/touch/TouchCollection.d.ts +79 -0
- package/dist/api/input/touch/TouchCollection.d.ts.map +1 -0
- package/dist/api/input/touch/TouchLocation.d.ts +80 -0
- package/dist/api/input/touch/TouchLocation.d.ts.map +1 -0
- package/dist/api/input/touch/TouchLocationState.d.ts +16 -0
- package/dist/api/input/touch/TouchLocationState.d.ts.map +1 -0
- package/dist/api/input/touch/TouchPanelCapabilities.d.ts +24 -0
- package/dist/api/input/touch/TouchPanelCapabilities.d.ts.map +1 -0
- package/dist/api/loaders/IImageLoader.d.ts +20 -0
- package/dist/api/loaders/IImageLoader.d.ts.map +1 -0
- package/dist/api/loaders/ImageLoader.d.ts +36 -0
- package/dist/api/loaders/ImageLoader.d.ts.map +1 -0
- package/dist/api/loaders/_export.d.ts +3 -0
- package/dist/api/loaders/_export.d.ts.map +1 -0
- package/dist/api/material/IMaterial.d.ts +35 -0
- package/dist/api/material/IMaterial.d.ts.map +1 -0
- package/dist/api/material/IMaterialFactory.d.ts +19 -0
- package/dist/api/material/IMaterialFactory.d.ts.map +1 -0
- package/dist/api/material/InspectTextureMipsMaterial.d.ts +58 -0
- package/dist/api/material/InspectTextureMipsMaterial.d.ts.map +1 -0
- package/dist/api/material/MaterialFactory.d.ts +20 -0
- package/dist/api/material/MaterialFactory.d.ts.map +1 -0
- package/dist/api/material/UnlitMaterial.d.ts +76 -0
- package/dist/api/material/UnlitMaterial.d.ts.map +1 -0
- package/dist/api/material/_export.d.ts +6 -0
- package/dist/api/material/_export.d.ts.map +1 -0
- package/dist/api/meshes/IMesh.d.ts +17 -0
- package/dist/api/meshes/IMesh.d.ts.map +1 -0
- package/dist/api/meshes/IMeshFactory.d.ts +25 -0
- package/dist/api/meshes/IMeshFactory.d.ts.map +1 -0
- package/dist/api/meshes/Mesh.d.ts +93 -0
- package/dist/api/meshes/Mesh.d.ts.map +1 -0
- package/dist/api/meshes/MeshFactory.d.ts +23 -0
- package/dist/api/meshes/MeshFactory.d.ts.map +1 -0
- package/dist/api/meshes/MeshParameters.d.ts +22 -0
- package/dist/api/meshes/MeshParameters.d.ts.map +1 -0
- package/dist/api/meshes/QuadMesh.d.ts +33 -0
- package/dist/api/meshes/QuadMesh.d.ts.map +1 -0
- package/dist/api/meshes/_export.d.ts +7 -0
- package/dist/api/meshes/_export.d.ts.map +1 -0
- package/dist/api/rendering/IGPUInfo.d.ts +35 -0
- package/dist/api/rendering/IGPUInfo.d.ts.map +1 -0
- package/dist/api/rendering/IGraphicsDevice.d.ts +88 -0
- package/dist/api/rendering/IGraphicsDevice.d.ts.map +1 -0
- package/dist/api/rendering/IGraphicsDeviceFeatures.d.ts +27 -0
- package/dist/api/rendering/IGraphicsDeviceFeatures.d.ts.map +1 -0
- package/dist/api/rendering/IRenderer.d.ts +71 -0
- package/dist/api/rendering/IRenderer.d.ts.map +1 -0
- package/dist/api/rendering/PowerPreference.d.ts +13 -0
- package/dist/api/rendering/PowerPreference.d.ts.map +1 -0
- package/dist/api/rendering/RenderingBackend.d.ts +18 -0
- package/dist/api/rendering/RenderingBackend.d.ts.map +1 -0
- package/dist/api/rendering/_export-rendering.d.ts +7 -0
- package/dist/api/rendering/_export-rendering.d.ts.map +1 -0
- package/dist/api/rendering/blending/IBlendState.d.ts +16 -0
- package/dist/api/rendering/blending/IBlendState.d.ts.map +1 -0
- package/dist/api/rendering/blending/_export.d.ts +2 -0
- package/dist/api/rendering/blending/_export.d.ts.map +1 -0
- package/dist/api/rendering/buffers/BufferUsage.d.ts +57 -0
- package/dist/api/rendering/buffers/BufferUsage.d.ts.map +1 -0
- package/dist/api/rendering/buffers/IBuffer.d.ts +20 -0
- package/dist/api/rendering/buffers/IBuffer.d.ts.map +1 -0
- package/dist/api/rendering/buffers/IBufferFactory.d.ts +34 -0
- package/dist/api/rendering/buffers/IBufferFactory.d.ts.map +1 -0
- package/dist/api/rendering/buffers/IIndexBuffer.d.ts +31 -0
- package/dist/api/rendering/buffers/IIndexBuffer.d.ts.map +1 -0
- package/dist/api/rendering/buffers/IUniformBuffer.d.ts +18 -0
- package/dist/api/rendering/buffers/IUniformBuffer.d.ts.map +1 -0
- package/dist/api/rendering/buffers/IVertexBuffer.d.ts +26 -0
- package/dist/api/rendering/buffers/IVertexBuffer.d.ts.map +1 -0
- package/dist/api/rendering/buffers/IVertexBufferLayout.d.ts +23 -0
- package/dist/api/rendering/buffers/IVertexBufferLayout.d.ts.map +1 -0
- package/dist/api/rendering/buffers/IndexBufferType.d.ts +14 -0
- package/dist/api/rendering/buffers/IndexBufferType.d.ts.map +1 -0
- package/dist/api/rendering/buffers/VertexAttribute.d.ts +22 -0
- package/dist/api/rendering/buffers/VertexAttribute.d.ts.map +1 -0
- package/dist/api/rendering/buffers/VertexStepMode.d.ts +14 -0
- package/dist/api/rendering/buffers/VertexStepMode.d.ts.map +1 -0
- package/dist/api/rendering/buffers/_export-buffers.d.ts +11 -0
- package/dist/api/rendering/buffers/_export-buffers.d.ts.map +1 -0
- package/dist/{core/renderer → api/rendering}/enums.d.ts.map +1 -1
- package/dist/api/rendering/primitive/CullMode.d.ts +18 -0
- package/dist/api/rendering/primitive/CullMode.d.ts.map +1 -0
- package/dist/api/rendering/primitive/FrontFace.d.ts +14 -0
- package/dist/api/rendering/primitive/FrontFace.d.ts.map +1 -0
- package/dist/api/rendering/primitive/IPrimitiveState.d.ts +22 -0
- package/dist/api/rendering/primitive/IPrimitiveState.d.ts.map +1 -0
- package/dist/api/rendering/primitive/PrimitiveStateDescriptor.d.ts +24 -0
- package/dist/api/rendering/primitive/PrimitiveStateDescriptor.d.ts.map +1 -0
- package/dist/api/rendering/primitive/PrimitiveTopology.d.ts +26 -0
- package/dist/api/rendering/primitive/PrimitiveTopology.d.ts.map +1 -0
- package/dist/api/rendering/primitive/_export.d.ts +6 -0
- package/dist/api/rendering/primitive/_export.d.ts.map +1 -0
- package/dist/api/rendering/render-pipelines/IInspectTextureMipsRenderPipeline.d.ts +33 -0
- package/dist/api/rendering/render-pipelines/IInspectTextureMipsRenderPipeline.d.ts.map +1 -0
- package/dist/api/rendering/render-pipelines/IMainRenderTargetRenderPipeline.d.ts +18 -0
- package/dist/api/rendering/render-pipelines/IMainRenderTargetRenderPipeline.d.ts.map +1 -0
- package/dist/api/rendering/render-pipelines/IRenderPipeline.d.ts +39 -0
- package/dist/api/rendering/render-pipelines/IRenderPipeline.d.ts.map +1 -0
- package/dist/api/rendering/render-pipelines/IRenderPipelineFactory.d.ts +42 -0
- package/dist/api/rendering/render-pipelines/IRenderPipelineFactory.d.ts.map +1 -0
- package/dist/api/rendering/render-pipelines/ISpriteRenderPipeline.d.ts +22 -0
- package/dist/api/rendering/render-pipelines/ISpriteRenderPipeline.d.ts.map +1 -0
- package/dist/api/rendering/render-pipelines/IUnlitRenderPipeline.d.ts +33 -0
- package/dist/api/rendering/render-pipelines/IUnlitRenderPipeline.d.ts.map +1 -0
- package/dist/api/rendering/render-pipelines/_export-render-pipelines.d.ts +7 -0
- package/dist/api/rendering/render-pipelines/_export-render-pipelines.d.ts.map +1 -0
- package/dist/{core/renderer → api/rendering}/renderer-interface.d.ts +11 -7
- package/dist/api/rendering/renderer-interface.d.ts.map +1 -0
- package/dist/{core/renderer → api/rendering}/rendering-limits.d.ts.map +1 -1
- package/dist/api/rendering/renderpass/IRenderPass.d.ts +15 -0
- package/dist/api/rendering/renderpass/IRenderPass.d.ts.map +1 -0
- package/dist/api/rendering/renderpass/LoadAction.d.ts +33 -0
- package/dist/api/rendering/renderpass/LoadAction.d.ts.map +1 -0
- package/dist/api/rendering/renderpass/RenderPassColorAttachment.d.ts +53 -0
- package/dist/api/rendering/renderpass/RenderPassColorAttachment.d.ts.map +1 -0
- package/dist/api/rendering/renderpass/RenderPassDepthStencilAttachment.d.ts +56 -0
- package/dist/api/rendering/renderpass/RenderPassDepthStencilAttachment.d.ts.map +1 -0
- package/dist/api/rendering/renderpass/RenderPassDescriptor.d.ts +22 -0
- package/dist/api/rendering/renderpass/RenderPassDescriptor.d.ts.map +1 -0
- package/dist/api/rendering/renderpass/StoreAction.d.ts +24 -0
- package/dist/api/rendering/renderpass/StoreAction.d.ts.map +1 -0
- package/dist/api/rendering/renderpass/_export.d.ts +7 -0
- package/dist/api/rendering/renderpass/_export.d.ts.map +1 -0
- package/dist/api/rendering/sampler/ISampler.d.ts +43 -0
- package/dist/api/rendering/sampler/ISampler.d.ts.map +1 -0
- package/dist/api/rendering/sampler/MipMapSamplerFilter.d.ts +18 -0
- package/dist/api/rendering/sampler/MipMapSamplerFilter.d.ts.map +1 -0
- package/dist/api/rendering/sampler/SamplerAddressMode.d.ts +24 -0
- package/dist/api/rendering/sampler/SamplerAddressMode.d.ts.map +1 -0
- package/dist/api/rendering/sampler/SamplerDescriptor.d.ts +40 -0
- package/dist/api/rendering/sampler/SamplerDescriptor.d.ts.map +1 -0
- package/dist/api/rendering/sampler/SamplerFilter.d.ts +14 -0
- package/dist/api/rendering/sampler/SamplerFilter.d.ts.map +1 -0
- package/dist/api/rendering/sampler/_export.d.ts +6 -0
- package/dist/api/rendering/sampler/_export.d.ts.map +1 -0
- package/dist/api/rendering/sampler/sampler-enums.d.ts +15 -0
- package/dist/api/rendering/sampler/sampler-enums.d.ts.map +1 -0
- package/dist/api/rendering/swapchain/ISwapChain.d.ts +29 -0
- package/dist/api/rendering/swapchain/ISwapChain.d.ts.map +1 -0
- package/dist/api/rendering/swapchain/SurfacePresentMode.d.ts +23 -0
- package/dist/api/rendering/swapchain/SurfacePresentMode.d.ts.map +1 -0
- package/dist/api/rendering/swapchain/SwapChainDescriptor.d.ts +20 -0
- package/dist/api/rendering/swapchain/SwapChainDescriptor.d.ts.map +1 -0
- package/dist/api/rendering/swapchain/_export.d.ts +4 -0
- package/dist/api/rendering/swapchain/_export.d.ts.map +1 -0
- package/dist/api/rendering/texture/ITexture2D.d.ts +83 -0
- package/dist/api/rendering/texture/ITexture2D.d.ts.map +1 -0
- package/dist/api/rendering/texture/ITextureFactory.d.ts +42 -0
- package/dist/api/rendering/texture/ITextureFactory.d.ts.map +1 -0
- package/dist/api/rendering/texture/ITextureView.d.ts +17 -0
- package/dist/api/rendering/texture/ITextureView.d.ts.map +1 -0
- package/dist/api/rendering/texture/TextureDescriptor.d.ts +42 -0
- package/dist/api/rendering/texture/TextureDescriptor.d.ts.map +1 -0
- package/dist/api/rendering/texture/TextureFormat.d.ts +54 -0
- package/dist/api/rendering/texture/TextureFormat.d.ts.map +1 -0
- package/dist/api/rendering/texture/TextureUsage.d.ts +42 -0
- package/dist/api/rendering/texture/TextureUsage.d.ts.map +1 -0
- package/dist/api/rendering/texture/TextureUtilities.d.ts +54 -0
- package/dist/api/rendering/texture/TextureUtilities.d.ts.map +1 -0
- package/dist/api/rendering/texture/TextureViewDescriptor.d.ts +22 -0
- package/dist/api/rendering/texture/TextureViewDescriptor.d.ts.map +1 -0
- package/dist/api/rendering/texture/TextureViewDimension.d.ts +17 -0
- package/dist/api/rendering/texture/TextureViewDimension.d.ts.map +1 -0
- package/dist/api/rendering/texture/_export-texture.d.ts +10 -0
- package/dist/api/rendering/texture/_export-texture.d.ts.map +1 -0
- package/dist/api/shader/IShaderModule.d.ts +21 -0
- package/dist/api/shader/IShaderModule.d.ts.map +1 -0
- package/dist/api/shader/IShaderModuleLoader.d.ts +13 -0
- package/dist/api/shader/IShaderModuleLoader.d.ts.map +1 -0
- package/dist/api/shader/ShaderStage.d.ts +10 -0
- package/dist/api/shader/ShaderStage.d.ts.map +1 -0
- package/dist/api/shader/_export-shader.d.ts +4 -0
- package/dist/api/shader/_export-shader.d.ts.map +1 -0
- package/dist/{core → api}/shader/shader-loader.d.ts +1 -1
- package/dist/api/shader/shader-loader.d.ts.map +1 -0
- package/dist/api/sprites/ISpriteBatch.d.ts +114 -0
- package/dist/api/sprites/ISpriteBatch.d.ts.map +1 -0
- package/dist/{core/sprite-batch → api/sprites}/SpriteBatch.d.ts +1 -1
- package/dist/api/sprites/SpriteBatch.d.ts.map +1 -0
- package/dist/{core/sprite-batch → api/sprites}/SpriteBatchDrawable.d.ts +1 -1
- package/dist/api/sprites/SpriteBatchDrawable.d.ts.map +1 -0
- package/dist/{core/sprite-batch → api/sprites}/SpriteBatchMesh.d.ts +1 -1
- package/dist/api/sprites/SpriteBatchMesh.d.ts.map +1 -0
- package/dist/api/sprites/_export_sprites.d.ts +2 -0
- package/dist/api/sprites/_export_sprites.d.ts.map +1 -0
- package/dist/api/time/GameTime.d.ts +23 -0
- package/dist/api/time/GameTime.d.ts.map +1 -0
- package/dist/api/time/ITimeManager.d.ts +19 -0
- package/dist/api/time/ITimeManager.d.ts.map +1 -0
- package/dist/api/time/TimeManager.d.ts +15 -0
- package/dist/api/time/TimeManager.d.ts.map +1 -0
- package/dist/api/time/_export_time.d.ts +4 -0
- package/dist/api/time/_export_time.d.ts.map +1 -0
- package/dist/api/utilities/AlignUtilities.d.ts +20 -0
- package/dist/api/utilities/AlignUtilities.d.ts.map +1 -0
- package/dist/api/utilities/GeometryUtilities.d.ts +13 -0
- package/dist/api/utilities/GeometryUtilities.d.ts.map +1 -0
- package/dist/api/utilities/MathHelper.d.ts +162 -0
- package/dist/api/utilities/MathHelper.d.ts.map +1 -0
- package/dist/api/utilities/_export.d.ts +4 -0
- package/dist/api/utilities/_export.d.ts.map +1 -0
- package/dist/api/window/IWindowManager.d.ts +64 -0
- package/dist/api/window/IWindowManager.d.ts.map +1 -0
- package/dist/api/window/WindowBounds.d.ts +16 -0
- package/dist/api/window/WindowBounds.d.ts.map +1 -0
- package/dist/{core/window/window-manager.d.ts → api/window/WindowManager.d.ts} +3 -3
- package/dist/api/window/WindowManager.d.ts.map +1 -0
- package/dist/api/window/_export.d.ts +3 -0
- package/dist/api/window/_export.d.ts.map +1 -0
- package/dist/core/rendering/AGraphicsDevice.d.ts +10 -6
- package/dist/core/rendering/AGraphicsDevice.d.ts.map +1 -1
- package/dist/core/rendering/ARenderer.d.ts +4 -5
- package/dist/core/rendering/ARenderer.d.ts.map +1 -1
- package/dist/core/rendering/blending/enums.d.ts +5 -2
- package/dist/core/rendering/blending/enums.d.ts.map +1 -1
- package/dist/core/rendering/sampler/sampler-descriptor.d.ts +1 -1
- package/dist/core/rendering/sampler/sampler-descriptor.d.ts.map +1 -1
- package/dist/core/rendering/texture/texture.d.ts +1 -1
- package/dist/core/rendering/texture/texture.d.ts.map +1 -1
- package/dist/core/rendering/vertex-buffer-layout.d.ts +2 -3
- package/dist/core/rendering/vertex-buffer-layout.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4052 -596
- package/dist/webgl/WebGLGraphicsDeviceFeatures.d.ts +1 -1
- package/dist/webgl/WebGLGraphicsDeviceFeatures.d.ts.map +1 -1
- package/dist/webgl/WebGlGpuInfo.d.ts +1 -1
- package/dist/webgl/WebGlGpuInfo.d.ts.map +1 -1
- package/dist/webgl/WebGlGraphicsDevice.d.ts +7 -5
- package/dist/webgl/WebGlGraphicsDevice.d.ts.map +1 -1
- package/dist/webgl/WebGlRenderer.d.ts +3 -3
- package/dist/webgl/WebGlRenderer.d.ts.map +1 -1
- package/dist/webgl/blending/webgl-blend-state.d.ts +1 -1
- package/dist/webgl/blending/webgl-blend-state.d.ts.map +1 -1
- package/dist/webgl/buffers/WebGlBuffersFactory.d.ts +1 -1
- package/dist/webgl/buffers/WebGlBuffersFactory.d.ts.map +1 -1
- package/dist/webgl/buffers/WebGlUniformBuffer.d.ts +1 -1
- package/dist/webgl/buffers/WebGlUniformBuffer.d.ts.map +1 -1
- package/dist/webgl/buffers/WebGlVertexBuffer.d.ts +6 -6
- package/dist/webgl/buffers/WebGlVertexBuffer.d.ts.map +1 -1
- package/dist/webgl/buffers/webgl-index-buffer.d.ts +2 -2
- package/dist/webgl/buffers/webgl-index-buffer.d.ts.map +1 -1
- package/dist/webgl/cast/cast.d.ts +2 -2
- package/dist/webgl/cast/cast.d.ts.map +1 -1
- package/dist/webgl/primitive/WebGlPrimitiveState.d.ts +1 -3
- package/dist/webgl/primitive/WebGlPrimitiveState.d.ts.map +1 -1
- package/dist/webgl/render-pass/WebGlRenderPass.d.ts +3 -3
- package/dist/webgl/render-pass/WebGlRenderPass.d.ts.map +1 -1
- package/dist/webgl/render-pipelines/AWebGlRenderPipeline.d.ts +1 -1
- package/dist/webgl/render-pipelines/AWebGlRenderPipeline.d.ts.map +1 -1
- package/dist/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.d.ts +3 -1
- package/dist/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.d.ts.map +1 -1
- package/dist/webgl/render-pipelines/WebGlRenderPipelineFactory.d.ts +1 -1
- package/dist/webgl/render-pipelines/WebGlRenderPipelineFactory.d.ts.map +1 -1
- package/dist/webgl/render-pipelines/inspect/WebGlInspectTextureMipsRenderPipeline.d.ts +3 -3
- package/dist/webgl/render-pipelines/inspect/WebGlInspectTextureMipsRenderPipeline.d.ts.map +1 -1
- package/dist/webgl/render-pipelines/material/WebGlUnlitRenderPipeline.d.ts +2 -2
- package/dist/webgl/render-pipelines/material/WebGlUnlitRenderPipeline.d.ts.map +1 -1
- package/dist/webgl/render-pipelines/sprite/WebGlSpriteRenderPipeline.d.ts +2 -2
- package/dist/webgl/render-pipelines/sprite/WebGlSpriteRenderPipeline.d.ts.map +1 -1
- package/dist/webgl/sampler/webgl-sampler.d.ts +1 -1
- package/dist/webgl/sampler/webgl-sampler.d.ts.map +1 -1
- package/dist/webgl/shader/WebGlShaderModule.d.ts +1 -1
- package/dist/webgl/shader/WebGlShaderModule.d.ts.map +1 -1
- package/dist/webgl/shader/WebGlShaderModuleLoader.d.ts +1 -1
- package/dist/webgl/shader/WebGlShaderModuleLoader.d.ts.map +1 -1
- package/dist/webgl/swap-chain/WebGlSwapChain.d.ts +1 -1
- package/dist/webgl/swap-chain/WebGlSwapChain.d.ts.map +1 -1
- package/dist/webgl/texture/WebGlTexture2D.d.ts +1 -1
- package/dist/webgl/texture/WebGlTexture2D.d.ts.map +1 -1
- package/dist/webgl/texture/WebGlTextureFactory.d.ts +3 -3
- package/dist/webgl/texture/WebGlTextureFactory.d.ts.map +1 -1
- package/dist/webgl/utilities/WebGlBufferUtilities.d.ts +1 -1
- package/dist/webgl/utilities/WebGlBufferUtilities.d.ts.map +1 -1
- package/dist/webgl/utilities/WebGlConverter.d.ts +6 -22
- package/dist/webgl/utilities/WebGlConverter.d.ts.map +1 -1
- package/dist/webgl/utilities/WebGlFrameBufferUtilities.d.ts +1 -1
- package/dist/webgl/utilities/WebGlFrameBufferUtilities.d.ts.map +1 -1
- package/dist/webgl/utilities/WebGlSamplerUtilities.d.ts +3 -3
- package/dist/webgl/utilities/WebGlSamplerUtilities.d.ts.map +1 -1
- package/dist/webgl/utilities/WebGlTextureUtilities.d.ts +5 -5
- package/dist/webgl/utilities/WebGlTextureUtilities.d.ts.map +1 -1
- package/dist/webgl/utilities/webgl-culling-utilities.d.ts +1 -1
- package/dist/webgl/utilities/webgl-culling-utilities.d.ts.map +1 -1
- package/dist/webgl/utilities/webgl-filter-anisotropic-utilities.d.ts +1 -1
- package/dist/webgl/utilities/webgl-renderbuffer-utilities.d.ts +1 -1
- package/dist/webgl/utilities/webgl-renderbuffer-utilities.d.ts.map +1 -1
- package/package.json +7 -6
- package/shaders/glsl/sprite_fs.glsl +1 -1
- package/src/{core/Framework.ts → Framework.ts} +78 -38
- package/src/api/FrameworkConfiguration.ts +29 -0
- package/src/api/IFramework.ts +153 -0
- package/src/api/IFrameworkConfiguration.ts +30 -0
- package/src/api/_export.ts +26 -0
- package/src/api/camera/CameraFactory.ts +56 -0
- package/src/api/camera/ICamera.ts +52 -0
- package/src/api/camera/ICameraFactory.ts +69 -0
- package/src/api/camera/IOrthographicCamera.ts +38 -0
- package/src/api/camera/OrbitCamera.ts +402 -0
- package/src/api/camera/OrthographicCamera.ts +257 -0
- package/src/api/camera/PerspectiveCamera.ts +206 -0
- package/src/api/camera/_export.ts +7 -0
- package/src/api/content/ContentConfig.ts +11 -0
- package/src/{core → api}/content/ContentManager.ts +4 -3
- package/src/api/content/IContent.ts +9 -0
- package/src/api/content/IContentManager.ts +41 -0
- package/src/api/content/IContentModule.ts +67 -0
- package/src/{content → api/content}/ShaderModuleContent.ts +8 -8
- package/src/api/content/_export-content.ts +4 -0
- package/src/api/core/IDisposable.ts +10 -0
- package/src/api/core/_export-core.ts +1 -0
- package/src/api/data/Color.ts +228 -0
- package/src/api/data/Rect.ts +92 -0
- package/src/api/data/State.ts +10 -0
- package/src/api/data/_export.ts +3 -0
- package/src/{geometry → api/geometry}/BaseGeometry.ts +15 -2
- package/src/{geometry → api/geometry}/GeometryBuilder.ts +1 -1
- package/src/api/geometry/GeometryFormat.ts +33 -0
- package/src/api/geometry/IGeometry.ts +66 -0
- package/src/api/geometry/IGeometryBuilder.ts +17 -0
- package/src/{VertexFormat.ts → api/geometry/VertexFormat.ts} +3 -7
- package/src/api/geometry/_export-geometry.ts +4 -0
- package/src/api/image/CpuImageProcessor.ts +125 -0
- package/src/api/image/IImageProcessor.ts +28 -0
- package/src/api/image/RawImageData.ts +47 -0
- package/src/api/image/_export.ts +3 -0
- package/src/api/index.ts +1 -0
- package/src/api/input/IInputManager.ts +62 -0
- package/src/api/input/InputDeviceType.ts +20 -0
- package/src/api/input/InputManager.ts +513 -0
- package/src/api/input/Key.ts +35 -0
- package/src/api/input/KeyboardState.ts +44 -0
- package/src/api/input/_export.ts +13 -0
- package/src/api/input/gamepad/Button.ts +21 -0
- package/src/api/input/gamepad/GamePadState.ts +65 -0
- package/src/api/input/gamepad/GamePadThumbSticks.ts +18 -0
- package/src/api/input/mouse/MouseButton.ts +9 -0
- package/src/api/input/mouse/MouseState.ts +70 -0
- package/src/api/input/touch/TouchCollection.ts +164 -0
- package/src/api/input/touch/TouchLocation.ts +159 -0
- package/src/api/input/touch/TouchLocationState.ts +15 -0
- package/src/api/input/touch/TouchPanelCapabilities.ts +31 -0
- package/src/api/loaders/IImageLoader.ts +22 -0
- package/src/api/loaders/ImageLoader.ts +93 -0
- package/src/api/loaders/_export.ts +2 -0
- package/src/api/material/IMaterial.ts +41 -0
- package/src/api/material/IMaterialFactory.ts +21 -0
- package/src/api/material/InspectTextureMipsMaterial.ts +113 -0
- package/src/api/material/MaterialFactory.ts +27 -0
- package/src/api/material/UnlitMaterial.ts +143 -0
- package/src/api/material/_export.ts +5 -0
- package/src/api/meshes/IMesh.ts +20 -0
- package/src/api/meshes/IMeshFactory.ts +28 -0
- package/src/api/meshes/Mesh.ts +256 -0
- package/src/api/meshes/MeshFactory.ts +36 -0
- package/src/api/meshes/MeshParameters.ts +25 -0
- package/src/api/meshes/QuadMesh.ts +104 -0
- package/src/api/meshes/_export.ts +6 -0
- package/src/api/rendering/IGPUInfo.ts +42 -0
- package/src/api/rendering/IGraphicsDevice.ts +103 -0
- package/src/api/rendering/IGraphicsDeviceFeatures.ts +32 -0
- package/src/api/rendering/IRenderer.ts +84 -0
- package/src/api/rendering/PowerPreference.ts +15 -0
- package/src/api/rendering/RenderingBackend.ts +20 -0
- package/src/api/rendering/_export-rendering.ts +6 -0
- package/src/api/rendering/blending/IBlendState.ts +17 -0
- package/src/api/rendering/blending/_export.ts +1 -0
- package/src/api/rendering/buffers/BufferUsage.ts +56 -0
- package/src/api/rendering/buffers/IBuffer.ts +24 -0
- package/src/api/rendering/buffers/IBufferFactory.ts +38 -0
- package/src/api/rendering/buffers/IIndexBuffer.ts +37 -0
- package/src/api/rendering/buffers/IUniformBuffer.ts +21 -0
- package/src/api/rendering/buffers/IVertexBuffer.ts +32 -0
- package/src/api/rendering/buffers/IVertexBufferLayout.ts +27 -0
- package/src/api/rendering/buffers/IndexBufferType.ts +13 -0
- package/src/api/rendering/buffers/VertexAttribute.ts +26 -0
- package/src/api/rendering/buffers/VertexStepMode.ts +13 -0
- package/src/api/rendering/buffers/_export-buffers.ts +11 -0
- package/src/api/rendering/primitive/CullMode.ts +17 -0
- package/src/api/rendering/primitive/FrontFace.ts +13 -0
- package/src/api/rendering/primitive/IPrimitiveState.ts +25 -0
- package/src/api/rendering/primitive/PrimitiveStateDescriptor.ts +27 -0
- package/src/api/rendering/primitive/PrimitiveTopology.ts +25 -0
- package/src/api/rendering/primitive/_export.ts +5 -0
- package/src/api/rendering/render-pipelines/IInspectTextureMipsRenderPipeline.ts +38 -0
- package/src/api/rendering/render-pipelines/IMainRenderTargetRenderPipeline.ts +21 -0
- package/src/api/rendering/render-pipelines/IRenderPipeline.ts +47 -0
- package/src/api/rendering/render-pipelines/IRenderPipelineFactory.ts +52 -0
- package/src/api/rendering/render-pipelines/ISpriteRenderPipeline.ts +25 -0
- package/src/api/rendering/render-pipelines/IUnlitRenderPipeline.ts +38 -0
- package/src/api/rendering/render-pipelines/_export-render-pipelines.ts +6 -0
- package/src/{core/renderer → api/rendering}/renderer-interface.ts +15 -9
- package/src/api/rendering/renderpass/IRenderPass.ts +18 -0
- package/src/api/rendering/renderpass/LoadAction.ts +32 -0
- package/src/api/rendering/renderpass/RenderPassColorAttachment.ts +61 -0
- package/src/api/rendering/renderpass/RenderPassDepthStencilAttachment.ts +76 -0
- package/src/api/rendering/renderpass/RenderPassDescriptor.ts +26 -0
- package/src/api/rendering/renderpass/StoreAction.ts +23 -0
- package/src/api/rendering/renderpass/_export.ts +6 -0
- package/src/api/rendering/sampler/ISampler.ts +52 -0
- package/src/api/rendering/sampler/MipMapSamplerFilter.ts +17 -0
- package/src/api/rendering/sampler/SamplerAddressMode.ts +23 -0
- package/src/api/rendering/sampler/SamplerDescriptor.ts +46 -0
- package/src/api/rendering/sampler/SamplerFilter.ts +13 -0
- package/src/api/rendering/sampler/_export.ts +5 -0
- package/src/api/rendering/sampler/sampler-enums.ts +20 -0
- package/src/api/rendering/swapchain/ISwapChain.ts +33 -0
- package/src/api/rendering/swapchain/SurfacePresentMode.ts +22 -0
- package/src/api/rendering/swapchain/SwapChainDescriptor.ts +23 -0
- package/src/api/rendering/swapchain/_export.ts +3 -0
- package/src/api/rendering/texture/ITexture2D.ts +100 -0
- package/src/api/rendering/texture/ITextureFactory.ts +56 -0
- package/src/api/rendering/texture/ITextureView.ts +20 -0
- package/src/api/rendering/texture/TextureDescriptor.ts +52 -0
- package/src/api/rendering/texture/TextureFormat.ts +58 -0
- package/src/api/rendering/texture/TextureUsage.ts +41 -0
- package/src/api/rendering/texture/TextureUtilities.ts +149 -0
- package/src/api/rendering/texture/TextureViewDescriptor.ts +25 -0
- package/src/api/rendering/texture/TextureViewDimension.ts +16 -0
- package/src/api/rendering/texture/_export-texture.ts +9 -0
- package/src/api/shader/IShaderModule.ts +23 -0
- package/src/api/shader/IShaderModuleLoader.ts +15 -0
- package/src/api/shader/ShaderStage.ts +9 -0
- package/src/api/shader/_export-shader.ts +3 -0
- package/src/{core → api}/shader/shader-loader.ts +1 -1
- package/src/api/sprites/ISpriteBatch.ts +144 -0
- package/src/{core/sprite-batch → api/sprites}/SpriteBatch.ts +8 -5
- package/src/{core/sprite-batch → api/sprites}/SpriteBatchDrawable.ts +6 -6
- package/src/{core/sprite-batch → api/sprites}/SpriteBatchMesh.ts +8 -4
- package/src/api/sprites/_export_sprites.ts +1 -0
- package/src/api/time/GameTime.ts +30 -0
- package/src/api/time/ITimeManager.ts +22 -0
- package/src/api/time/TimeManager.ts +33 -0
- package/src/api/time/_export_time.ts +3 -0
- package/src/api/utilities/AlignUtilities.ts +39 -0
- package/src/api/utilities/GeometryUtilities.ts +20 -0
- package/src/api/utilities/MathHelper.ts +256 -0
- package/src/api/utilities/_export.ts +3 -0
- package/src/api/window/IWindowManager.ts +78 -0
- package/src/api/window/WindowBounds.ts +17 -0
- package/src/{core/window/window-manager.ts → api/window/WindowManager.ts} +2 -2
- package/src/api/window/_export.ts +2 -0
- package/src/core/rendering/AGraphicsDevice.ts +15 -9
- package/src/core/rendering/ARenderer.ts +7 -7
- package/src/core/rendering/blending/enums.ts +5 -5
- package/src/core/rendering/sampler/sampler-descriptor.ts +1 -1
- package/src/core/rendering/texture/texture.ts +4 -3
- package/src/core/rendering/vertex-buffer-layout.ts +3 -4
- package/src/index.ts +3 -2
- package/src/main.ts +5 -10
- package/src/webgl/WebGLGraphicsDeviceFeatures.ts +1 -1
- package/src/webgl/WebGlGpuInfo.ts +1 -1
- package/src/webgl/WebGlGraphicsDevice.ts +19 -15
- package/src/webgl/WebGlRenderer.ts +7 -5
- package/src/webgl/blending/webgl-blend-state.ts +1 -1
- package/src/webgl/buffers/WebGlBuffersFactory.ts +1 -1
- package/src/webgl/buffers/WebGlUniformBuffer.ts +1 -1
- package/src/webgl/buffers/WebGlVertexBuffer.ts +8 -7
- package/src/webgl/buffers/webgl-index-buffer.ts +2 -2
- package/src/webgl/cast/cast.ts +2 -2
- package/src/webgl/primitive/WebGlPrimitiveState.ts +7 -3
- package/src/webgl/render-pass/WebGlRenderPass.ts +17 -8
- package/src/webgl/render-pipelines/AWebGlRenderPipeline.ts +1 -1
- package/src/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.ts +10 -2
- package/src/webgl/render-pipelines/WebGlRenderPipelineFactory.ts +1 -1
- package/src/webgl/render-pipelines/inspect/WebGlInspectTextureMipsRenderPipeline.ts +3 -3
- package/src/webgl/render-pipelines/material/WebGlUnlitRenderPipeline.ts +2 -2
- package/src/webgl/render-pipelines/sprite/WebGlSpriteRenderPipeline.ts +2 -2
- package/src/webgl/sampler/webgl-sampler.ts +2 -2
- package/src/webgl/shader/WebGlShaderModule.ts +2 -2
- package/src/webgl/shader/WebGlShaderModuleLoader.ts +1 -1
- package/src/webgl/swap-chain/WebGlSwapChain.ts +1 -1
- package/src/webgl/texture/WebGlTexture2D.ts +6 -4
- package/src/webgl/texture/WebGlTextureFactory.ts +7 -7
- package/src/webgl/utilities/WebGlBufferUtilities.ts +1 -1
- package/src/webgl/utilities/WebGlConverter.ts +19 -62
- package/src/webgl/utilities/WebGlFrameBufferUtilities.ts +1 -1
- package/src/webgl/utilities/WebGlSamplerUtilities.ts +4 -4
- package/src/webgl/utilities/WebGlTextureUtilities.ts +29 -20
- package/src/webgl/utilities/webgl-culling-utilities.ts +1 -1
- package/src/webgl/utilities/webgl-filter-anisotropic-utilities.ts +1 -1
- package/src/webgl/utilities/webgl-renderbuffer-utilities.ts +1 -1
- package/dist/TextureFormat.d.ts +0 -2
- package/dist/TextureFormat.d.ts.map +0 -1
- package/dist/VertexFormat.d.ts.map +0 -1
- package/dist/_ris-ktx2-node-module-stub-nzBRmiO_.js +0 -10
- package/dist/common/sampler-enums.d.ts +0 -16
- package/dist/common/sampler-enums.d.ts.map +0 -1
- package/dist/common/vertex-step-mode.d.ts +0 -11
- package/dist/common/vertex-step-mode.d.ts.map +0 -1
- package/dist/content/ShaderModuleContent.d.ts.map +0 -1
- package/dist/core/Framework.d.ts.map +0 -1
- package/dist/core/FrameworkConfig.d.ts +0 -26
- package/dist/core/FrameworkConfig.d.ts.map +0 -1
- package/dist/core/buffers/buffers-factory-interface.d.ts +0 -2
- package/dist/core/buffers/buffers-factory-interface.d.ts.map +0 -1
- package/dist/core/buffers/vertex-buffer-interface.d.ts +0 -2
- package/dist/core/buffers/vertex-buffer-interface.d.ts.map +0 -1
- package/dist/core/content/ContentManager.d.ts.map +0 -1
- package/dist/core/dependency-injection/register-services-interface.d.ts +0 -13
- package/dist/core/dependency-injection/register-services-interface.d.ts.map +0 -1
- package/dist/core/framework-interface.d.ts +0 -2
- package/dist/core/framework-interface.d.ts.map +0 -1
- package/dist/core/input/InputManager.d.ts +0 -27
- package/dist/core/input/InputManager.d.ts.map +0 -1
- package/dist/core/renderer/renderer-interface.d.ts.map +0 -1
- package/dist/core/rendering/primitive/PrimitiveStateDescriptor.d.ts +0 -26
- package/dist/core/rendering/primitive/PrimitiveStateDescriptor.d.ts.map +0 -1
- package/dist/core/rendering/primitive/enums.d.ts +0 -56
- package/dist/core/rendering/primitive/enums.d.ts.map +0 -1
- package/dist/core/rendering/render-pass/render-pass-descriptor.d.ts +0 -2
- package/dist/core/rendering/render-pass/render-pass-descriptor.d.ts.map +0 -1
- package/dist/core/rendering/render-pass/render-pass-interface.d.ts +0 -15
- package/dist/core/rendering/render-pass/render-pass-interface.d.ts.map +0 -1
- package/dist/core/rendering/vertex-attribute.d.ts +0 -17
- package/dist/core/rendering/vertex-attribute.d.ts.map +0 -1
- package/dist/core/shader/shader-loader.d.ts.map +0 -1
- package/dist/core/shader/shader-module-interface.d.ts +0 -2
- package/dist/core/shader/shader-module-interface.d.ts.map +0 -1
- package/dist/core/sprite-batch/SpriteBatch.d.ts.map +0 -1
- package/dist/core/sprite-batch/SpriteBatchDrawable.d.ts.map +0 -1
- package/dist/core/sprite-batch/SpriteBatchMesh.d.ts.map +0 -1
- package/dist/core/window/window-manager.d.ts.map +0 -1
- package/dist/geometry/BaseGeometry.d.ts.map +0 -1
- package/dist/geometry/GeometryBuilder.d.ts.map +0 -1
- package/dist/geometry/GeometryFormat.d.ts +0 -34
- package/dist/geometry/GeometryFormat.d.ts.map +0 -1
- package/dist/webgl/utilities/webgl-render-buffer-utilities.d.ts +0 -5
- package/dist/webgl/utilities/webgl-render-buffer-utilities.d.ts.map +0 -1
- package/src/TextureFormat.ts +0 -0
- package/src/common/sampler-enums.ts +0 -21
- package/src/common/vertex-step-mode.ts +0 -12
- package/src/core/FrameworkConfig.ts +0 -31
- package/src/core/buffers/buffers-factory-interface.ts +0 -0
- package/src/core/buffers/vertex-buffer-interface.ts +0 -0
- package/src/core/dependency-injection/register-services-interface.ts +0 -15
- package/src/core/framework-interface.ts +0 -0
- package/src/core/input/InputManager.ts +0 -115
- package/src/core/rendering/primitive/PrimitiveStateDescriptor.ts +0 -32
- package/src/core/rendering/primitive/enums.ts +0 -68
- package/src/core/rendering/render-pass/render-pass-descriptor.ts +0 -0
- package/src/core/rendering/render-pass/render-pass-interface.ts +0 -17
- package/src/core/rendering/vertex-attribute.ts +0 -20
- package/src/core/shader/shader-module-interface.ts +0 -1
- package/src/counter.ts +0 -9
- package/src/geometry/GeometryFormat.ts +0 -37
- package/src/webgl/utilities/webgl-render-buffer-utilities.ts +0 -23
- /package/dist/{content → api/content}/ShaderModuleContent.d.ts +0 -0
- /package/dist/{VertexFormat.d.ts → api/geometry/VertexFormat.d.ts} +0 -0
- /package/dist/{core/renderer → api/rendering}/enums.d.ts +0 -0
- /package/dist/{core/renderer → api/rendering}/rendering-limits.d.ts +0 -0
- /package/src/{core/renderer → api/rendering}/enums.ts +0 -0
- /package/src/{core/renderer → api/rendering}/rendering-limits.ts +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { IUniformBuffer } from "../buffers/IUniformBuffer.ts";
|
|
2
|
+
import type { ITexture2D } from "../texture/ITexture2D.ts";
|
|
3
|
+
import type { ISampler } from "../sampler/ISampler.ts";
|
|
4
|
+
import type { IRenderPipeline } from "./IRenderPipeline.ts";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The pipeline for sprite rendering.
|
|
8
|
+
*/
|
|
9
|
+
export interface ISpriteRenderPipeline extends IRenderPipeline {
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The diffuse texture.
|
|
13
|
+
*/
|
|
14
|
+
spriteTexture: ITexture2D;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The sampler.
|
|
18
|
+
*/
|
|
19
|
+
textureSampler?: ISampler;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The projection view uniform buffer.
|
|
23
|
+
*/
|
|
24
|
+
projectionViewBuffer: IUniformBuffer;
|
|
25
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ITexture2D } from "../texture/ITexture2D.ts";
|
|
2
|
+
import type { ISampler } from "../sampler/ISampler.ts";
|
|
3
|
+
import type { IRenderPipeline } from "./IRenderPipeline.ts";
|
|
4
|
+
import type { IUniformBuffer } from "../buffers/IUniformBuffer.ts";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The unlit render pipeline.
|
|
8
|
+
*/
|
|
9
|
+
export interface IUnlitRenderPipeline extends IRenderPipeline {
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The diffuse texture.
|
|
13
|
+
*/
|
|
14
|
+
diffuseTexture: ITexture2D;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The texture sampler.
|
|
18
|
+
*/
|
|
19
|
+
diffuseTextureSampler?: ISampler;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The projection view uniform buffer.
|
|
23
|
+
* Contains a single matrix representing the projection view matrix.
|
|
24
|
+
*/
|
|
25
|
+
projectionViewBuffer: IUniformBuffer;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The world matrix uniform buffer.
|
|
29
|
+
* Contains a single matrix representing the world matrix.
|
|
30
|
+
*/
|
|
31
|
+
modelBuffer: IUniformBuffer;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The material buffer that contains the material properties.
|
|
35
|
+
* - vec4 diffuseColor
|
|
36
|
+
*/
|
|
37
|
+
materialBuffer: IUniformBuffer;
|
|
38
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./ISpriteRenderPipeline.ts";
|
|
2
|
+
export * from "./IMainRenderTargetRenderPipeline.ts";
|
|
3
|
+
export * from "./IRenderPipelineFactory.ts";
|
|
4
|
+
export * from "./IRenderPipeline.ts";
|
|
5
|
+
export * from "./IInspectTextureMipsRenderPipeline.ts"
|
|
6
|
+
export * from "./IUnlitRenderPipeline.ts"
|
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
import { vec2 } from "gl-matrix";
|
|
2
|
-
import { TextureSamplerFilteringPreset } from "
|
|
2
|
+
import { TextureSamplerFilteringPreset } from "../../core/rendering/enums.ts";
|
|
3
3
|
import type {RenderingLimits} from "./rendering-limits.ts";
|
|
4
|
-
import type {Color, IGraphicsDevice, IRenderer} from "
|
|
5
|
-
import type {TextureFormat} from "
|
|
4
|
+
import type {Color, IGraphicsDevice, IRenderer} from "../index.ts";
|
|
5
|
+
import type {TextureFormat} from "../index.ts";
|
|
6
|
+
import {PowerPreferenceType} from "./PowerPreference.ts";
|
|
6
7
|
|
|
7
8
|
export const RenderConfigurationSymbol = Symbol("RenderConfiguration");
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* The configuration for the renderer. This is used to initialize the renderer.
|
|
12
|
+
* @internal
|
|
11
13
|
*/
|
|
12
|
-
export
|
|
14
|
+
export interface IRendererConfiguration {
|
|
13
15
|
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/**The size of the main frame buffer. */
|
|
17
|
+
backBufferSize: vec2;
|
|
18
|
+
|
|
19
|
+
/** Should back buffer use alpha. */
|
|
20
|
+
alpha: boolean;
|
|
21
|
+
|
|
22
|
+
/** The preference when it comes to selecting GPU device. Only makes sense to set on multi-GPU devices. */
|
|
23
|
+
powerPreference: PowerPreferenceType;
|
|
18
24
|
|
|
19
25
|
/**
|
|
20
26
|
* The preset for texture sampler filtering.
|
|
21
27
|
* This is used to configure the default texture sampler in the graphics device.
|
|
22
28
|
* The default texture sampler is used when a texture is sampled without a specific sampler being bound.
|
|
23
29
|
*/
|
|
24
|
-
textureFiltering
|
|
30
|
+
textureFiltering: TextureSamplerFilteringPreset;
|
|
25
31
|
}
|
|
26
32
|
|
|
27
33
|
/**
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IDisposable } from "../../core/IDisposable.ts";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The render pass interface.
|
|
5
|
+
*/
|
|
6
|
+
export interface IRenderPass extends IDisposable {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Begins the render pass. This will set up the necessary state and resources for the render pass to be executed.
|
|
10
|
+
*/
|
|
11
|
+
beginPass(): void;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Ends the render pass. This will finalize the render pass and submit the recorded commands for execution.
|
|
15
|
+
*/
|
|
16
|
+
endPass(): void;
|
|
17
|
+
|
|
18
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specifies the action to take with the attachment contents at the beginning of a render pass.
|
|
3
|
+
*/
|
|
4
|
+
export enum LoadAction {
|
|
5
|
+
/**
|
|
6
|
+
* The attachment is cleared to a specified clear value at the start of the render pass.
|
|
7
|
+
*
|
|
8
|
+
* On tile-based renderers (especially mobile), is usually much cheaper than
|
|
9
|
+
* because it avoids loading data from main memory into tile memory.
|
|
10
|
+
*
|
|
11
|
+
* Recommended when the previous contents don't matter (e.g. rendering a skybox, full-screen quad, or when you know you'll overwrite everything).
|
|
12
|
+
*
|
|
13
|
+
* Corresponds to WebGPU clear operation.
|
|
14
|
+
*/
|
|
15
|
+
CLEAR = 0,
|
|
16
|
+
/**
|
|
17
|
+
* The existing contents of the attachment are loaded into the render pass.
|
|
18
|
+
*
|
|
19
|
+
* Corresponds to WebGPU load operation.
|
|
20
|
+
*/
|
|
21
|
+
LOAD = 1,
|
|
22
|
+
/**
|
|
23
|
+
* The attachment contents at the start of the render pass are undefined.
|
|
24
|
+
* This is the fastest possible load operation if you guarantee that **every pixel** will be written before it is read.
|
|
25
|
+
* Warning: Reading from any pixel (including via blending) before writing to it results in undefined behavior.
|
|
26
|
+
*
|
|
27
|
+
* Backends that do not natively support "don't care" will fall back to another load operation (implementation-defined).
|
|
28
|
+
*
|
|
29
|
+
* Corresponds to WebGPU undefined / discard (historically "dontcare").
|
|
30
|
+
*/
|
|
31
|
+
UNDEFINED = 2
|
|
32
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { ISwapChain } from "../swapchain/ISwapChain.ts";
|
|
2
|
+
import {Color} from "../../data/Color.ts";
|
|
3
|
+
import type { ITexture2D } from "../texture/ITexture2D.ts";
|
|
4
|
+
import type { ITextureView } from "../texture/ITextureView.ts";
|
|
5
|
+
import {StoreAction} from "./StoreAction.ts";
|
|
6
|
+
import {LoadAction} from "./LoadAction.ts";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Color attachment for a render pass.
|
|
10
|
+
*/
|
|
11
|
+
export class RenderPassColorAttachment {
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The swap chain to which the render pass will write for this attachment.
|
|
15
|
+
*/
|
|
16
|
+
public swapChain?: ISwapChain;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The texture to which the render pass will write for this attachment.
|
|
20
|
+
* Must be defined if view is not defined.
|
|
21
|
+
*/
|
|
22
|
+
public texture?: ITexture2D;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The view into to which the render pass will write for this attachment.
|
|
26
|
+
* Must be defined if texture is not defined.
|
|
27
|
+
*/
|
|
28
|
+
public view?: ITextureView;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Whether data will be written to through this attachment.
|
|
32
|
+
* Note that resolve textures (if specified) are always written to, regardless of this setting.
|
|
33
|
+
* By default, it is set to STORE, which means that the data will be stored in memory after the render pass and can be read later.
|
|
34
|
+
*/
|
|
35
|
+
public storeAction: StoreAction = StoreAction.STORE;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* How data should be read through this attachment.
|
|
39
|
+
* By default, it is set to CLEAR, which means that the data will be cleared at the beginning of the render pass.
|
|
40
|
+
*/
|
|
41
|
+
public loadAction: LoadAction = LoadAction.CLEAR;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The texture that will receive the resolved output if multisampling is used.
|
|
45
|
+
* If set, it is always written to, regardless of how Self::ops is configured.
|
|
46
|
+
*
|
|
47
|
+
* Can be used instead of if texture has default view or rendering
|
|
48
|
+
* backend does not support .
|
|
49
|
+
*/
|
|
50
|
+
public resolveTexture?: ITexture2D;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The texture view that will receive the resolved output if multisampling is used.
|
|
54
|
+
* If set, it is always written to, regardless of how Self::ops is configured.
|
|
55
|
+
* Can be used instead of if rendering backend supports .
|
|
56
|
+
*/
|
|
57
|
+
public resolveView?: ITextureView;
|
|
58
|
+
|
|
59
|
+
/** Clear color for the attachment. */
|
|
60
|
+
public clearColor = Color.transparent();
|
|
61
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
|
|
2
|
+
import type { ITextureView } from "../texture/ITextureView.ts";
|
|
3
|
+
import {LoadAction} from "./LoadAction.ts";
|
|
4
|
+
import type { ITexture2D } from "../texture/ITexture2D.ts";
|
|
5
|
+
import {StoreAction} from "./StoreAction.ts";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Describes a depth/stencil attachment used in a render pass.
|
|
10
|
+
* Controls how depth and stencil buffers are loaded, cleared, and stored.
|
|
11
|
+
*/
|
|
12
|
+
export class RenderPassDepthStencilAttachment {
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The constructor.
|
|
16
|
+
*/
|
|
17
|
+
public constructor() {
|
|
18
|
+
this.depthLoadAction = LoadAction.CLEAR;
|
|
19
|
+
this.depthStoreAction = StoreAction.DISCARD;
|
|
20
|
+
this.depthClearValue = 1.0;
|
|
21
|
+
this.stencilLoadAction = LoadAction.CLEAR;
|
|
22
|
+
this.stencilStoreAction = StoreAction.DISCARD;
|
|
23
|
+
this.stencilClearValue = 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The view into depth/stencil render target.
|
|
28
|
+
*/
|
|
29
|
+
public view?: ITextureView;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The texture used as depth/stencil render target.
|
|
33
|
+
* Can be used instead of 'view' property if 'view' is not supported
|
|
34
|
+
* for the rendering backend.
|
|
35
|
+
*/
|
|
36
|
+
public texture?: ITexture2D;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* What happens to the depth buffer at the start of the render pass.
|
|
40
|
+
* By default, it is set to , which means that the depth buffer will be cleared at the beginning of the render pass.
|
|
41
|
+
*/
|
|
42
|
+
public depthLoadAction: LoadAction;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* What happens to the depth buffer at the end of the render pass.
|
|
46
|
+
* By default, it is set to , which means that the depth buffer will be discarded after the render pass and cannot be read later.
|
|
47
|
+
*/
|
|
48
|
+
public depthStoreAction: StoreAction;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Depth value used when DepthLoadAction is Clear.
|
|
52
|
+
* Typically, 1.0 (far plane).
|
|
53
|
+
* Ignored otherwise.
|
|
54
|
+
*/
|
|
55
|
+
public depthClearValue: number;
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* What happens to the stencil buffer at the start of the render pass.
|
|
60
|
+
* By default, it is set to , which means that the stencil buffer will be cleared at the beginning of the render pass.
|
|
61
|
+
*/
|
|
62
|
+
public stencilLoadAction: LoadAction;
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* What happens to the stencil buffer at the end of the render pass.
|
|
67
|
+
* By default, it is set to , which means that the stencil buffer will be discarded after the render pass and cannot be read later.
|
|
68
|
+
*/
|
|
69
|
+
public stencilStoreAction: StoreAction;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Stencil value used when StencilLoadAction is Clear.
|
|
73
|
+
* Ignored otherwise.
|
|
74
|
+
*/
|
|
75
|
+
public stencilClearValue: number;
|
|
76
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {RenderPassDepthStencilAttachment} from "./RenderPassDepthStencilAttachment.ts";
|
|
2
|
+
import {RenderPassColorAttachment} from "./RenderPassColorAttachment.ts";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The render pass.
|
|
6
|
+
*/
|
|
7
|
+
export class RenderPassDescriptor {
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The color attachments of the render pass.
|
|
11
|
+
*/
|
|
12
|
+
public colorAttachments?: RenderPassColorAttachment[];
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The depth-stencil attachment of the render pass.
|
|
16
|
+
*/
|
|
17
|
+
public depthStencilAttachment?: RenderPassDepthStencilAttachment;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The label of the render pass.
|
|
21
|
+
* This is used for debugging purposes and can be set to any string that helps identify the render pass in graphics debuggers or profiling tools.
|
|
22
|
+
* It does not affect the functionality of the render pass and can be left empty if not needed.
|
|
23
|
+
*/
|
|
24
|
+
public label?: string;
|
|
25
|
+
|
|
26
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specifies the action to take with the attachment contents at the end of a render pass.
|
|
3
|
+
*/
|
|
4
|
+
export enum StoreAction {
|
|
5
|
+
/**
|
|
6
|
+
* The attachment contents generated during the render pass are written back to memory.
|
|
7
|
+
*
|
|
8
|
+
* Corresponds to WebGPU store operation.
|
|
9
|
+
*/
|
|
10
|
+
STORE = 0,
|
|
11
|
+
/**
|
|
12
|
+
* The attachment contents are discarded after the render pass.
|
|
13
|
+
* The texture becomes uninitialized (undefined) afterward.
|
|
14
|
+
*
|
|
15
|
+
* On tile-based GPUs (most mobile/Apple Silicon), this is significantly faster because it avoids writing data back to main memory.
|
|
16
|
+
* Use this whenever the attachment will not be read by subsequent render passes.
|
|
17
|
+
*
|
|
18
|
+
* Note: If only the depth or stencil aspect is discarded, the other aspect is preserved.
|
|
19
|
+
*
|
|
20
|
+
* Corresponds to WebGPU discard operation.
|
|
21
|
+
*/
|
|
22
|
+
DISCARD = 1
|
|
23
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {SamplerFilter} from "./SamplerFilter.ts";
|
|
2
|
+
import {MipMapSamplerFilter} from "./MipMapSamplerFilter.ts";
|
|
3
|
+
import type { IDisposable } from "../../core/IDisposable.ts";
|
|
4
|
+
import {SamplerAddressMode} from "./SamplerAddressMode.ts";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The sampler is used to sample textures in shaders.
|
|
8
|
+
* It defines how the texture is sampled, such as the filtering mode and the address mode.
|
|
9
|
+
*/
|
|
10
|
+
export interface ISampler extends IDisposable {
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The id of a sampler.
|
|
14
|
+
*/
|
|
15
|
+
readonly id: number;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The min filter of the sampler.
|
|
19
|
+
*/
|
|
20
|
+
readonly minFilter: SamplerFilter;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The mag filter of the sampler.
|
|
24
|
+
*/
|
|
25
|
+
readonly magFilter: SamplerFilter;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The mipmap filter of the sampler.
|
|
29
|
+
*/
|
|
30
|
+
readonly mipmapFilter: MipMapSamplerFilter;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The address mode of the sampler for the U coordinate.
|
|
34
|
+
*/
|
|
35
|
+
readonly addressModeU: SamplerAddressMode;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The address mode of the sampler for the V coordinate.
|
|
39
|
+
*/
|
|
40
|
+
readonly addressModeV: SamplerAddressMode;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The address mode of the sampler for the W coordinate.
|
|
44
|
+
*/
|
|
45
|
+
readonly addressModeW: SamplerAddressMode;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The underlying handle of the sampler, specific to the graphics API being used (e.g., OpenGL, DirectX, Vulkan, WebGPU).
|
|
49
|
+
*/
|
|
50
|
+
readonly handle: any;
|
|
51
|
+
|
|
52
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The mipmap sampler filter.
|
|
3
|
+
*/
|
|
4
|
+
export enum MipMapSamplerFilter {
|
|
5
|
+
/**
|
|
6
|
+
* Mipmap filtering is disabled. The mipmap level 0 will be used for sampling.
|
|
7
|
+
*/
|
|
8
|
+
NONE = 0,
|
|
9
|
+
/**
|
|
10
|
+
* The nearest mipmap filtering method. The mipmap level will be selected using the value of the nearest mipmap level.
|
|
11
|
+
*/
|
|
12
|
+
NEAREST = 1,
|
|
13
|
+
/**
|
|
14
|
+
* The linear mipmap filtering method. The mipmap level will be selected using the weighted average of the two nearest mipmap levels.
|
|
15
|
+
*/
|
|
16
|
+
LINEAR = 2
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The address mode of the sampler.
|
|
3
|
+
*/
|
|
4
|
+
export enum SamplerAddressMode {
|
|
5
|
+
/**
|
|
6
|
+
* The repeat address mode.
|
|
7
|
+
* The texture will be repeated when the texture coordinates are outside the range [0, 1].
|
|
8
|
+
*/
|
|
9
|
+
REPEAT = 0,
|
|
10
|
+
/**
|
|
11
|
+
* The mirror repeat address mode.
|
|
12
|
+
*/
|
|
13
|
+
MIRROR_REPEAT = 1,
|
|
14
|
+
/**
|
|
15
|
+
* The clamp to edge address mode.
|
|
16
|
+
*/
|
|
17
|
+
CLAMP_TO_EDGE = 2,
|
|
18
|
+
/**
|
|
19
|
+
* The clamp to border address mode.
|
|
20
|
+
* The texture will be clamped to a border color when the texture coordinates are outside the range [0, 1].
|
|
21
|
+
*/
|
|
22
|
+
CLAMP_TO_BORDER = 3
|
|
23
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {SamplerAddressMode} from "./SamplerAddressMode.ts";
|
|
2
|
+
import {SamplerFilter} from "./SamplerFilter.ts";
|
|
3
|
+
import {MipMapSamplerFilter} from "./MipMapSamplerFilter.ts";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The descriptor for creating a sampler.
|
|
7
|
+
* It contains the parameters for creating a sampler, such as the address mode and filter mode.
|
|
8
|
+
*/
|
|
9
|
+
export class SamplerDescriptor {
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The address mode for U coordinate.
|
|
13
|
+
* It determines how texture coordinates outside the [0, 1] range are handled in the U direction.
|
|
14
|
+
*/
|
|
15
|
+
public addressModeU = SamplerAddressMode.REPEAT;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The address mode for V coordinate.
|
|
19
|
+
* It determines how texture coordinates outside the [0, 1] range are handled in the V direction.
|
|
20
|
+
*/
|
|
21
|
+
public addressModeV = SamplerAddressMode.REPEAT;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The address mode for W coordinate.
|
|
25
|
+
* It determines how texture coordinates outside the [0, 1] range are handled in the W direction.
|
|
26
|
+
*/
|
|
27
|
+
public addressModeW = SamplerAddressMode.REPEAT;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The minification filter of the sampler.
|
|
31
|
+
* It determines how the texture is sampled when it is minified (i.e., when the texture is smaller than the area it is being mapped to).
|
|
32
|
+
*/
|
|
33
|
+
public minFilter = SamplerFilter.LINEAR;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The magnification filter of the sampler.
|
|
37
|
+
* It determines how the texture is sampled when it is magnified (i.e., when the texture is larger than the area it is being mapped to).
|
|
38
|
+
*/
|
|
39
|
+
public magFilter = SamplerFilter.LINEAR;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The mipmap filter of the sampler.
|
|
43
|
+
* It determines how the texture is sampled when mipmapping is used (i.e., when the texture has multiple levels of detail).
|
|
44
|
+
*/
|
|
45
|
+
public mipMapFilter = MipMapSamplerFilter.NONE;
|
|
46
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sampler filter.
|
|
3
|
+
*/
|
|
4
|
+
export enum SamplerFilter {
|
|
5
|
+
/**
|
|
6
|
+
* The nearest filtering method. The texture will be sampled using the value of the nearest texel.
|
|
7
|
+
*/
|
|
8
|
+
NEAREST = 0,
|
|
9
|
+
/**
|
|
10
|
+
* The linear filtering method. The texture will be sampled using the weighted average of the four nearest texels.
|
|
11
|
+
*/
|
|
12
|
+
LINEAR = 1
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The compare function to use when sampling a texture. This is used for depth textures and determines how the sampled depth value is compared to the reference value.
|
|
5
|
+
*/
|
|
6
|
+
export enum SamplerCompareFunction {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The comparison never passes.
|
|
10
|
+
* WebGlSamplerUtilities treats this value as "no comparison" and leaves TEXTURE_COMPARE_MODE at NONE.
|
|
11
|
+
*/
|
|
12
|
+
Never,
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The comparison passes if the reference value is less than or equal to the sampled depth value.
|
|
16
|
+
*/
|
|
17
|
+
LessEqual,
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {TextureFormat} from "../texture/TextureFormat.ts";
|
|
2
|
+
import type { IDisposable } from "../../core/IDisposable.ts";
|
|
3
|
+
import {vec2} from "gl-matrix";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The interface for a swap chain, which is used to present the rendered image to the screen.
|
|
7
|
+
*/
|
|
8
|
+
export interface ISwapChain extends IDisposable {
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The size of the back buffer.
|
|
12
|
+
*/
|
|
13
|
+
readonly backBufferSize: vec2;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The texture format of the back buffer.
|
|
17
|
+
*/
|
|
18
|
+
readonly textureFormat: TextureFormat;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Sets the back buffer size.
|
|
22
|
+
* This is used to resize the back buffer when the window is resized.
|
|
23
|
+
* @param width - The new width.
|
|
24
|
+
* @param height - The new height.
|
|
25
|
+
*/
|
|
26
|
+
resize(width: number, height: number): void;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Presents the back buffer to the screen.
|
|
30
|
+
* This is called after rendering is done, and will swap the back buffer with the front buffer to display the rendered image on the screen.
|
|
31
|
+
*/
|
|
32
|
+
present(): void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The presentation mode of the surface.
|
|
3
|
+
*/
|
|
4
|
+
export enum SurfacePresentMode {
|
|
5
|
+
/**
|
|
6
|
+
* "vsync off"
|
|
7
|
+
* Draws the frame immediately, without waiting for the screen refresh.
|
|
8
|
+
*/
|
|
9
|
+
IMMEDIATE = 0,
|
|
10
|
+
/**
|
|
11
|
+
* "vsync on"
|
|
12
|
+
* Multiple frames can be queued for presentation, but only the last one is displayed.
|
|
13
|
+
* Typically it is double buffered, which means that the application can queue one frame while the other one is being displayed,
|
|
14
|
+
* but it can be triple buffered as well, which means that the application can queue two frames while the other one is being displayed.
|
|
15
|
+
*/
|
|
16
|
+
FIFO = 1,
|
|
17
|
+
/**
|
|
18
|
+
* "fast vsync"
|
|
19
|
+
* Multiple frames can be queued for presentation, and the first one is displayed.
|
|
20
|
+
*/
|
|
21
|
+
MAILBOX = 2
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The description of a swap chain, which is used to create a swap chain for the graphics device.
|
|
3
|
+
*/
|
|
4
|
+
import {SurfacePresentMode} from "./SurfacePresentMode.ts";
|
|
5
|
+
|
|
6
|
+
export class SwapChainDescriptor {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The width of the back buffer.
|
|
10
|
+
*/
|
|
11
|
+
public width: number = 0;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The height of the back buffer.
|
|
15
|
+
*/
|
|
16
|
+
public height: number = 0;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The presentation mode of the swap chain.
|
|
20
|
+
* This determines how the swap chain presents the back buffer to the screen.
|
|
21
|
+
*/
|
|
22
|
+
public desiredPresentationMode: SurfacePresentMode = SurfacePresentMode.FIFO;
|
|
23
|
+
}
|