@aura3d/rendering 1.0.6
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/README.md +18 -0
- package/dist/ArchitecturalLightingFixtures.d.ts +40 -0
- package/dist/ArchitecturalLightingFixtures.d.ts.map +1 -0
- package/dist/ArchitecturalLightingFixtures.js +171 -0
- package/dist/ArchitecturalLightingFixtures.js.map +1 -0
- package/dist/ArchitecturalMaterialCatalog.d.ts +30 -0
- package/dist/ArchitecturalMaterialCatalog.d.ts.map +1 -0
- package/dist/ArchitecturalMaterialCatalog.js +90 -0
- package/dist/ArchitecturalMaterialCatalog.js.map +1 -0
- package/dist/ArchitecturalMeasurementFixtures.d.ts +30 -0
- package/dist/ArchitecturalMeasurementFixtures.d.ts.map +1 -0
- package/dist/ArchitecturalMeasurementFixtures.js +115 -0
- package/dist/ArchitecturalMeasurementFixtures.js.map +1 -0
- package/dist/BRDFLut.d.ts +13 -0
- package/dist/BRDFLut.d.ts.map +1 -0
- package/dist/BRDFLut.js +34 -0
- package/dist/BRDFLut.js.map +1 -0
- package/dist/CameraFraming.d.ts +31 -0
- package/dist/CameraFraming.d.ts.map +1 -0
- package/dist/CameraFraming.js +143 -0
- package/dist/CameraFraming.js.map +1 -0
- package/dist/CanonicalSceneFixtures.d.ts +13 -0
- package/dist/CanonicalSceneFixtures.d.ts.map +1 -0
- package/dist/CanonicalSceneFixtures.js +78 -0
- package/dist/CanonicalSceneFixtures.js.map +1 -0
- package/dist/CascadedShadowMaps.d.ts +121 -0
- package/dist/CascadedShadowMaps.d.ts.map +1 -0
- package/dist/CascadedShadowMaps.js +315 -0
- package/dist/CascadedShadowMaps.js.map +1 -0
- package/dist/ColorManagement.d.ts +33 -0
- package/dist/ColorManagement.d.ts.map +1 -0
- package/dist/ColorManagement.js +71 -0
- package/dist/ColorManagement.js.map +1 -0
- package/dist/CullingFixtures.d.ts +70 -0
- package/dist/CullingFixtures.d.ts.map +1 -0
- package/dist/CullingFixtures.js +191 -0
- package/dist/CullingFixtures.js.map +1 -0
- package/dist/DecalGeometry.d.ts +3 -0
- package/dist/DecalGeometry.d.ts.map +1 -0
- package/dist/DecalGeometry.js +2 -0
- package/dist/DecalGeometry.js.map +1 -0
- package/dist/DepthPass.d.ts +23 -0
- package/dist/DepthPass.d.ts.map +1 -0
- package/dist/DepthPass.js +99 -0
- package/dist/DepthPass.js.map +1 -0
- package/dist/EnvironmentBackgroundPass.d.ts +27 -0
- package/dist/EnvironmentBackgroundPass.d.ts.map +1 -0
- package/dist/EnvironmentBackgroundPass.js +167 -0
- package/dist/EnvironmentBackgroundPass.js.map +1 -0
- package/dist/EnvironmentBackgroundResources.d.ts +31 -0
- package/dist/EnvironmentBackgroundResources.d.ts.map +1 -0
- package/dist/EnvironmentBackgroundResources.js +237 -0
- package/dist/EnvironmentBackgroundResources.js.map +1 -0
- package/dist/EnvironmentLighting.d.ts +10 -0
- package/dist/EnvironmentLighting.d.ts.map +1 -0
- package/dist/EnvironmentLighting.js +64 -0
- package/dist/EnvironmentLighting.js.map +1 -0
- package/dist/EnvironmentMapResources.d.ts +98 -0
- package/dist/EnvironmentMapResources.d.ts.map +1 -0
- package/dist/EnvironmentMapResources.js +794 -0
- package/dist/EnvironmentMapResources.js.map +1 -0
- package/dist/EnvironmentPipeline.d.ts +21 -0
- package/dist/EnvironmentPipeline.d.ts.map +1 -0
- package/dist/EnvironmentPipeline.js +43 -0
- package/dist/EnvironmentPipeline.js.map +1 -0
- package/dist/EnvironmentPlatform.d.ts +185 -0
- package/dist/EnvironmentPlatform.d.ts.map +1 -0
- package/dist/EnvironmentPlatform.js +922 -0
- package/dist/EnvironmentPlatform.js.map +1 -0
- package/dist/EnvironmentPreset.d.ts +35 -0
- package/dist/EnvironmentPreset.d.ts.map +1 -0
- package/dist/EnvironmentPreset.js +96 -0
- package/dist/EnvironmentPreset.js.map +1 -0
- package/dist/Exposure.d.ts +19 -0
- package/dist/Exposure.d.ts.map +1 -0
- package/dist/Exposure.js +34 -0
- package/dist/Exposure.js.map +1 -0
- package/dist/ExternalParityRenderPreset.d.ts +149 -0
- package/dist/ExternalParityRenderPreset.d.ts.map +1 -0
- package/dist/ExternalParityRenderPreset.js +519 -0
- package/dist/ExternalParityRenderPreset.js.map +1 -0
- package/dist/ForwardPass.d.ts +122 -0
- package/dist/ForwardPass.d.ts.map +1 -0
- package/dist/ForwardPass.js +1352 -0
- package/dist/ForwardPass.js.map +1 -0
- package/dist/FrameVisualMetrics.d.ts +60 -0
- package/dist/FrameVisualMetrics.d.ts.map +1 -0
- package/dist/FrameVisualMetrics.js +146 -0
- package/dist/FrameVisualMetrics.js.map +1 -0
- package/dist/Geometry.d.ts +50 -0
- package/dist/Geometry.d.ts.map +1 -0
- package/dist/Geometry.js +385 -0
- package/dist/Geometry.js.map +1 -0
- package/dist/GeometryPrimitives.d.ts +3 -0
- package/dist/GeometryPrimitives.d.ts.map +1 -0
- package/dist/GeometryPrimitives.js +2 -0
- package/dist/GeometryPrimitives.js.map +1 -0
- package/dist/HDRRenderPipeline.d.ts +27 -0
- package/dist/HDRRenderPipeline.d.ts.map +1 -0
- package/dist/HDRRenderPipeline.js +67 -0
- package/dist/HDRRenderPipeline.js.map +1 -0
- package/dist/IBL.d.ts +37 -0
- package/dist/IBL.d.ts.map +1 -0
- package/dist/IBL.js +48 -0
- package/dist/IBL.js.map +1 -0
- package/dist/IndexBuffer.d.ts +15 -0
- package/dist/IndexBuffer.d.ts.map +1 -0
- package/dist/IndexBuffer.js +51 -0
- package/dist/IndexBuffer.js.map +1 -0
- package/dist/InstancedPBRMaterial.d.ts +33 -0
- package/dist/InstancedPBRMaterial.d.ts.map +1 -0
- package/dist/InstancedPBRMaterial.js +147 -0
- package/dist/InstancedPBRMaterial.js.map +1 -0
- package/dist/InstancedUnlitMaterial.d.ts +11 -0
- package/dist/InstancedUnlitMaterial.d.ts.map +1 -0
- package/dist/InstancedUnlitMaterial.js +50 -0
- package/dist/InstancedUnlitMaterial.js.map +1 -0
- package/dist/Instancing.d.ts +7 -0
- package/dist/Instancing.d.ts.map +1 -0
- package/dist/Instancing.js +14 -0
- package/dist/Instancing.js.map +1 -0
- package/dist/LightCollector.d.ts +24 -0
- package/dist/LightCollector.d.ts.map +1 -0
- package/dist/LightCollector.js +56 -0
- package/dist/LightCollector.js.map +1 -0
- package/dist/LightUniforms.d.ts +14 -0
- package/dist/LightUniforms.d.ts.map +1 -0
- package/dist/LightUniforms.js +37 -0
- package/dist/LightUniforms.js.map +1 -0
- package/dist/LightingDebug.d.ts +13 -0
- package/dist/LightingDebug.d.ts.map +1 -0
- package/dist/LightingDebug.js +69 -0
- package/dist/LightingDebug.js.map +1 -0
- package/dist/LightingDefaults.d.ts +13 -0
- package/dist/LightingDefaults.d.ts.map +1 -0
- package/dist/LightingDefaults.js +64 -0
- package/dist/LightingDefaults.js.map +1 -0
- package/dist/LightingRig.d.ts +53 -0
- package/dist/LightingRig.d.ts.map +1 -0
- package/dist/LightingRig.js +197 -0
- package/dist/LightingRig.js.map +1 -0
- package/dist/LineGeometry.d.ts +3 -0
- package/dist/LineGeometry.d.ts.map +1 -0
- package/dist/LineGeometry.js +2 -0
- package/dist/LineGeometry.js.map +1 -0
- package/dist/Material.d.ts +77 -0
- package/dist/Material.d.ts.map +1 -0
- package/dist/Material.js +137 -0
- package/dist/Material.js.map +1 -0
- package/dist/MaterialBinding.d.ts +17 -0
- package/dist/MaterialBinding.d.ts.map +1 -0
- package/dist/MaterialBinding.js +119 -0
- package/dist/MaterialBinding.js.map +1 -0
- package/dist/MaterialInstance.d.ts +16 -0
- package/dist/MaterialInstance.d.ts.map +1 -0
- package/dist/MaterialInstance.js +53 -0
- package/dist/MaterialInstance.js.map +1 -0
- package/dist/MaterialPresets.d.ts +31 -0
- package/dist/MaterialPresets.d.ts.map +1 -0
- package/dist/MaterialPresets.js +219 -0
- package/dist/MaterialPresets.js.map +1 -0
- package/dist/MorphTarget.d.ts +10 -0
- package/dist/MorphTarget.d.ts.map +1 -0
- package/dist/MorphTarget.js +101 -0
- package/dist/MorphTarget.js.map +1 -0
- package/dist/MorphUnlitMaterial.d.ts +11 -0
- package/dist/MorphUnlitMaterial.d.ts.map +1 -0
- package/dist/MorphUnlitMaterial.js +45 -0
- package/dist/MorphUnlitMaterial.js.map +1 -0
- package/dist/NormalMappedPBRMaterial.d.ts +37 -0
- package/dist/NormalMappedPBRMaterial.d.ts.map +1 -0
- package/dist/NormalMappedPBRMaterial.js +148 -0
- package/dist/NormalMappedPBRMaterial.js.map +1 -0
- package/dist/OceanFixtures.d.ts +62 -0
- package/dist/OceanFixtures.d.ts.map +1 -0
- package/dist/OceanFixtures.js +240 -0
- package/dist/OceanFixtures.js.map +1 -0
- package/dist/PBRLightingDefaults.d.ts +4 -0
- package/dist/PBRLightingDefaults.d.ts.map +1 -0
- package/dist/PBRLightingDefaults.js +10 -0
- package/dist/PBRLightingDefaults.js.map +1 -0
- package/dist/PBRMaterial.d.ts +84 -0
- package/dist/PBRMaterial.d.ts.map +1 -0
- package/dist/PBRMaterial.js +349 -0
- package/dist/PBRMaterial.js.map +1 -0
- package/dist/PMREM.d.ts +26 -0
- package/dist/PMREM.d.ts.map +1 -0
- package/dist/PMREM.js +26 -0
- package/dist/PMREM.js.map +1 -0
- package/dist/PbrReference.d.ts +153 -0
- package/dist/PbrReference.d.ts.map +1 -0
- package/dist/PbrReference.js +500 -0
- package/dist/PbrReference.js.map +1 -0
- package/dist/PostProcessPass.d.ts +439 -0
- package/dist/PostProcessPass.d.ts.map +1 -0
- package/dist/PostProcessPass.js +1834 -0
- package/dist/PostProcessPass.js.map +1 -0
- package/dist/ProceduralTextureFixtures.d.ts +27 -0
- package/dist/ProceduralTextureFixtures.d.ts.map +1 -0
- package/dist/ProceduralTextureFixtures.js +336 -0
- package/dist/ProceduralTextureFixtures.js.map +1 -0
- package/dist/ProductTurntableFixtures.d.ts +96 -0
- package/dist/ProductTurntableFixtures.d.ts.map +1 -0
- package/dist/ProductTurntableFixtures.js +559 -0
- package/dist/ProductTurntableFixtures.js.map +1 -0
- package/dist/Raycaster.d.ts +14 -0
- package/dist/Raycaster.d.ts.map +1 -0
- package/dist/Raycaster.js +10 -0
- package/dist/Raycaster.js.map +1 -0
- package/dist/ReflectionProbe.d.ts +8 -0
- package/dist/ReflectionProbe.d.ts.map +1 -0
- package/dist/ReflectionProbe.js +10 -0
- package/dist/ReflectionProbe.js.map +1 -0
- package/dist/ReflectionSurfaces.d.ts +35 -0
- package/dist/ReflectionSurfaces.d.ts.map +1 -0
- package/dist/ReflectionSurfaces.js +155 -0
- package/dist/ReflectionSurfaces.js.map +1 -0
- package/dist/RenderBackend.d.ts +14 -0
- package/dist/RenderBackend.d.ts.map +1 -0
- package/dist/RenderBackend.js +33 -0
- package/dist/RenderBackend.js.map +1 -0
- package/dist/RenderDebugViews.d.ts +26 -0
- package/dist/RenderDebugViews.d.ts.map +1 -0
- package/dist/RenderDebugViews.js +97 -0
- package/dist/RenderDebugViews.js.map +1 -0
- package/dist/RenderDevice.d.ts +280 -0
- package/dist/RenderDevice.d.ts.map +1 -0
- package/dist/RenderDevice.js +561 -0
- package/dist/RenderDevice.js.map +1 -0
- package/dist/RenderGraph.d.ts +22 -0
- package/dist/RenderGraph.d.ts.map +1 -0
- package/dist/RenderGraph.js +159 -0
- package/dist/RenderGraph.js.map +1 -0
- package/dist/RenderPass.d.ts +23 -0
- package/dist/RenderPass.d.ts.map +1 -0
- package/dist/RenderPass.js +14 -0
- package/dist/RenderPass.js.map +1 -0
- package/dist/RenderPipeline.d.ts +39 -0
- package/dist/RenderPipeline.d.ts.map +1 -0
- package/dist/RenderPipeline.js +67 -0
- package/dist/RenderPipeline.js.map +1 -0
- package/dist/RenderQueue.d.ts +3 -0
- package/dist/RenderQueue.d.ts.map +1 -0
- package/dist/RenderQueue.js +2 -0
- package/dist/RenderQueue.js.map +1 -0
- package/dist/RenderState.d.ts +3 -0
- package/dist/RenderState.d.ts.map +1 -0
- package/dist/RenderState.js +2 -0
- package/dist/RenderState.js.map +1 -0
- package/dist/Renderer.d.ts +265 -0
- package/dist/Renderer.d.ts.map +1 -0
- package/dist/Renderer.js +2094 -0
- package/dist/Renderer.js.map +1 -0
- package/dist/RendererDebugOverlay.d.ts +20 -0
- package/dist/RendererDebugOverlay.d.ts.map +1 -0
- package/dist/RendererDebugOverlay.js +54 -0
- package/dist/RendererDebugOverlay.js.map +1 -0
- package/dist/RendererFeatureGates.d.ts +17 -0
- package/dist/RendererFeatureGates.d.ts.map +1 -0
- package/dist/RendererFeatureGates.js +92 -0
- package/dist/RendererFeatureGates.js.map +1 -0
- package/dist/RendererPostprocessPlan.d.ts +59 -0
- package/dist/RendererPostprocessPlan.d.ts.map +1 -0
- package/dist/RendererPostprocessPlan.js +155 -0
- package/dist/RendererPostprocessPlan.js.map +1 -0
- package/dist/RendererTiming.d.ts +53 -0
- package/dist/RendererTiming.d.ts.map +1 -0
- package/dist/RendererTiming.js +186 -0
- package/dist/RendererTiming.js.map +1 -0
- package/dist/RendererVisualPipelineReport.d.ts +224 -0
- package/dist/RendererVisualPipelineReport.d.ts.map +1 -0
- package/dist/RendererVisualPipelineReport.js +499 -0
- package/dist/RendererVisualPipelineReport.js.map +1 -0
- package/dist/ResourceLifecycle.d.ts +8 -0
- package/dist/ResourceLifecycle.d.ts.map +1 -0
- package/dist/ResourceLifecycle.js +18 -0
- package/dist/ResourceLifecycle.js.map +1 -0
- package/dist/Sampler.d.ts +20 -0
- package/dist/Sampler.d.ts.map +1 -0
- package/dist/Sampler.js +19 -0
- package/dist/Sampler.js.map +1 -0
- package/dist/SceneOptimization.d.ts +127 -0
- package/dist/SceneOptimization.d.ts.map +1 -0
- package/dist/SceneOptimization.js +342 -0
- package/dist/SceneOptimization.js.map +1 -0
- package/dist/ShaderChunks.d.ts +8 -0
- package/dist/ShaderChunks.d.ts.map +1 -0
- package/dist/ShaderChunks.js +386 -0
- package/dist/ShaderChunks.js.map +1 -0
- package/dist/ShaderLibrary.d.ts +63 -0
- package/dist/ShaderLibrary.d.ts.map +1 -0
- package/dist/ShaderLibrary.js +2707 -0
- package/dist/ShaderLibrary.js.map +1 -0
- package/dist/ShaderModule.d.ts +14 -0
- package/dist/ShaderModule.d.ts.map +1 -0
- package/dist/ShaderModule.js +33 -0
- package/dist/ShaderModule.js.map +1 -0
- package/dist/ShaderPreprocessor.d.ts +19 -0
- package/dist/ShaderPreprocessor.d.ts.map +1 -0
- package/dist/ShaderPreprocessor.js +212 -0
- package/dist/ShaderPreprocessor.js.map +1 -0
- package/dist/ShaderReflection.d.ts +23 -0
- package/dist/ShaderReflection.d.ts.map +1 -0
- package/dist/ShaderReflection.js +134 -0
- package/dist/ShaderReflection.js.map +1 -0
- package/dist/ShadowMap.d.ts +58 -0
- package/dist/ShadowMap.d.ts.map +1 -0
- package/dist/ShadowMap.js +183 -0
- package/dist/ShadowMap.js.map +1 -0
- package/dist/ShadowPass.d.ts +44 -0
- package/dist/ShadowPass.d.ts.map +1 -0
- package/dist/ShadowPass.js +162 -0
- package/dist/ShadowPass.js.map +1 -0
- package/dist/ShadowProjection.d.ts +15 -0
- package/dist/ShadowProjection.d.ts.map +1 -0
- package/dist/ShadowProjection.js +90 -0
- package/dist/ShadowProjection.js.map +1 -0
- package/dist/SkinnedLitMaterial.d.ts +63 -0
- package/dist/SkinnedLitMaterial.d.ts.map +1 -0
- package/dist/SkinnedLitMaterial.js +296 -0
- package/dist/SkinnedLitMaterial.js.map +1 -0
- package/dist/SkinnedUnlitMaterial.d.ts +13 -0
- package/dist/SkinnedUnlitMaterial.d.ts.map +1 -0
- package/dist/SkinnedUnlitMaterial.js +52 -0
- package/dist/SkinnedUnlitMaterial.js.map +1 -0
- package/dist/SkinningBounds.d.ts +10 -0
- package/dist/SkinningBounds.d.ts.map +1 -0
- package/dist/SkinningBounds.js +107 -0
- package/dist/SkinningBounds.js.map +1 -0
- package/dist/SpaceEnvironmentFixtures.d.ts +59 -0
- package/dist/SpaceEnvironmentFixtures.d.ts.map +1 -0
- package/dist/SpaceEnvironmentFixtures.js +132 -0
- package/dist/SpaceEnvironmentFixtures.js.map +1 -0
- package/dist/SpriteGeometry.d.ts +3 -0
- package/dist/SpriteGeometry.d.ts.map +1 -0
- package/dist/SpriteGeometry.js +21 -0
- package/dist/SpriteGeometry.js.map +1 -0
- package/dist/StereoCameraRig.d.ts +34 -0
- package/dist/StereoCameraRig.d.ts.map +1 -0
- package/dist/StereoCameraRig.js +79 -0
- package/dist/StereoCameraRig.js.map +1 -0
- package/dist/StereoEffects.d.ts +90 -0
- package/dist/StereoEffects.d.ts.map +1 -0
- package/dist/StereoEffects.js +171 -0
- package/dist/StereoEffects.js.map +1 -0
- package/dist/TerrainFixtures.d.ts +36 -0
- package/dist/TerrainFixtures.d.ts.map +1 -0
- package/dist/TerrainFixtures.js +143 -0
- package/dist/TerrainFixtures.js.map +1 -0
- package/dist/Texture.d.ts +64 -0
- package/dist/Texture.d.ts.map +1 -0
- package/dist/Texture.js +257 -0
- package/dist/Texture.js.map +1 -0
- package/dist/TextureBinding.d.ts +38 -0
- package/dist/TextureBinding.d.ts.map +1 -0
- package/dist/TextureBinding.js +66 -0
- package/dist/TextureBinding.js.map +1 -0
- package/dist/TexturedPBRMaterial.d.ts +206 -0
- package/dist/TexturedPBRMaterial.d.ts.map +1 -0
- package/dist/TexturedPBRMaterial.js +842 -0
- package/dist/TexturedPBRMaterial.js.map +1 -0
- package/dist/TexturedUnlitMaterial.d.ts +19 -0
- package/dist/TexturedUnlitMaterial.d.ts.map +1 -0
- package/dist/TexturedUnlitMaterial.js +52 -0
- package/dist/TexturedUnlitMaterial.js.map +1 -0
- package/dist/ToneMapping.d.ts +19 -0
- package/dist/ToneMapping.d.ts.map +1 -0
- package/dist/ToneMapping.js +53 -0
- package/dist/ToneMapping.js.map +1 -0
- package/dist/UniformBinder.d.ts +7 -0
- package/dist/UniformBinder.d.ts.map +1 -0
- package/dist/UniformBinder.js +14 -0
- package/dist/UniformBinder.js.map +1 -0
- package/dist/UniformLayout.d.ts +19 -0
- package/dist/UniformLayout.d.ts.map +1 -0
- package/dist/UniformLayout.js +107 -0
- package/dist/UniformLayout.js.map +1 -0
- package/dist/UnlitMaterial.d.ts +16 -0
- package/dist/UnlitMaterial.d.ts.map +1 -0
- package/dist/UnlitMaterial.js +60 -0
- package/dist/UnlitMaterial.js.map +1 -0
- package/dist/VegetationFixtures.d.ts +68 -0
- package/dist/VegetationFixtures.d.ts.map +1 -0
- package/dist/VegetationFixtures.js +241 -0
- package/dist/VegetationFixtures.js.map +1 -0
- package/dist/VertexBuffer.d.ts +29 -0
- package/dist/VertexBuffer.d.ts.map +1 -0
- package/dist/VertexBuffer.js +106 -0
- package/dist/VertexBuffer.js.map +1 -0
- package/dist/VertexFormat.d.ts +36 -0
- package/dist/VertexFormat.d.ts.map +1 -0
- package/dist/VertexFormat.js +127 -0
- package/dist/VertexFormat.js.map +1 -0
- package/dist/VoxelWorldFixtures.d.ts +54 -0
- package/dist/VoxelWorldFixtures.d.ts.map +1 -0
- package/dist/VoxelWorldFixtures.js +186 -0
- package/dist/VoxelWorldFixtures.js.map +1 -0
- package/dist/WeatherFixtures.d.ts +46 -0
- package/dist/WeatherFixtures.d.ts.map +1 -0
- package/dist/WeatherFixtures.js +142 -0
- package/dist/WeatherFixtures.js.map +1 -0
- package/dist/WebGL2Device.d.ts +137 -0
- package/dist/WebGL2Device.d.ts.map +1 -0
- package/dist/WebGL2Device.js +2107 -0
- package/dist/WebGL2Device.js.map +1 -0
- package/dist/WebGL2StateCache.d.ts +89 -0
- package/dist/WebGL2StateCache.d.ts.map +1 -0
- package/dist/WebGL2StateCache.js +265 -0
- package/dist/WebGL2StateCache.js.map +1 -0
- package/dist/WebGPUDevice.d.ts +287 -0
- package/dist/WebGPUDevice.d.ts.map +1 -0
- package/dist/WebGPUDevice.js +2403 -0
- package/dist/WebGPUDevice.js.map +1 -0
- package/dist/WebGPURenderToTextureProof.d.ts +29 -0
- package/dist/WebGPURenderToTextureProof.d.ts.map +1 -0
- package/dist/WebGPURenderToTextureProof.js +96 -0
- package/dist/WebGPURenderToTextureProof.js.map +1 -0
- package/dist/advanced-runtime/AdvancedRenderer.d.ts +23 -0
- package/dist/advanced-runtime/AdvancedRenderer.d.ts.map +1 -0
- package/dist/advanced-runtime/AdvancedRenderer.js +45 -0
- package/dist/advanced-runtime/AdvancedRenderer.js.map +1 -0
- package/dist/advanced-runtime/index.d.ts +10 -0
- package/dist/advanced-runtime/index.d.ts.map +1 -0
- package/dist/advanced-runtime/index.js +9 -0
- package/dist/advanced-runtime/index.js.map +1 -0
- package/dist/cinematic/BloomPass.d.ts +10 -0
- package/dist/cinematic/BloomPass.d.ts.map +1 -0
- package/dist/cinematic/BloomPass.js +18 -0
- package/dist/cinematic/BloomPass.js.map +1 -0
- package/dist/cinematic/CinematicDepthComposition.d.ts +12 -0
- package/dist/cinematic/CinematicDepthComposition.d.ts.map +1 -0
- package/dist/cinematic/CinematicDepthComposition.js +22 -0
- package/dist/cinematic/CinematicDepthComposition.js.map +1 -0
- package/dist/cinematic/CinematicEvidence.d.ts +43 -0
- package/dist/cinematic/CinematicEvidence.d.ts.map +1 -0
- package/dist/cinematic/CinematicEvidence.js +55 -0
- package/dist/cinematic/CinematicEvidence.js.map +1 -0
- package/dist/cinematic/CinematicLightingRig.d.ts +32 -0
- package/dist/cinematic/CinematicLightingRig.d.ts.map +1 -0
- package/dist/cinematic/CinematicLightingRig.js +90 -0
- package/dist/cinematic/CinematicLightingRig.js.map +1 -0
- package/dist/cinematic/CinematicMaterialPresets.d.ts +16 -0
- package/dist/cinematic/CinematicMaterialPresets.d.ts.map +1 -0
- package/dist/cinematic/CinematicMaterialPresets.js +114 -0
- package/dist/cinematic/CinematicMaterialPresets.js.map +1 -0
- package/dist/cinematic/CinematicPostProcess.d.ts +25 -0
- package/dist/cinematic/CinematicPostProcess.d.ts.map +1 -0
- package/dist/cinematic/CinematicPostProcess.js +64 -0
- package/dist/cinematic/CinematicPostProcess.js.map +1 -0
- package/dist/cinematic/DepthHazePass.d.ts +12 -0
- package/dist/cinematic/DepthHazePass.d.ts.map +1 -0
- package/dist/cinematic/DepthHazePass.js +20 -0
- package/dist/cinematic/DepthHazePass.js.map +1 -0
- package/dist/cinematic/EmissivePracticalLightSystem.d.ts +18 -0
- package/dist/cinematic/EmissivePracticalLightSystem.d.ts.map +1 -0
- package/dist/cinematic/EmissivePracticalLightSystem.js +25 -0
- package/dist/cinematic/EmissivePracticalLightSystem.js.map +1 -0
- package/dist/cinematic/FilmGrainPass.d.ts +9 -0
- package/dist/cinematic/FilmGrainPass.d.ts.map +1 -0
- package/dist/cinematic/FilmGrainPass.js +17 -0
- package/dist/cinematic/FilmGrainPass.js.map +1 -0
- package/dist/cinematic/FogVolumeSystem.d.ts +12 -0
- package/dist/cinematic/FogVolumeSystem.d.ts.map +1 -0
- package/dist/cinematic/FogVolumeSystem.js +20 -0
- package/dist/cinematic/FogVolumeSystem.js.map +1 -0
- package/dist/cinematic/GlowCardSystem.d.ts +17 -0
- package/dist/cinematic/GlowCardSystem.d.ts.map +1 -0
- package/dist/cinematic/GlowCardSystem.js +28 -0
- package/dist/cinematic/GlowCardSystem.js.map +1 -0
- package/dist/cinematic/RainParticleSystem.d.ts +22 -0
- package/dist/cinematic/RainParticleSystem.d.ts.map +1 -0
- package/dist/cinematic/RainParticleSystem.js +114 -0
- package/dist/cinematic/RainParticleSystem.js.map +1 -0
- package/dist/cinematic/VignettePass.d.ts +10 -0
- package/dist/cinematic/VignettePass.d.ts.map +1 -0
- package/dist/cinematic/VignettePass.js +17 -0
- package/dist/cinematic/VignettePass.js.map +1 -0
- package/dist/cinematic/WetReflectionApproximation.d.ts +13 -0
- package/dist/cinematic/WetReflectionApproximation.d.ts.map +1 -0
- package/dist/cinematic/WetReflectionApproximation.js +18 -0
- package/dist/cinematic/WetReflectionApproximation.js.map +1 -0
- package/dist/cinematic/index.d.ts +15 -0
- package/dist/cinematic/index.d.ts.map +1 -0
- package/dist/cinematic/index.js +15 -0
- package/dist/cinematic/index.js.map +1 -0
- package/dist/effects/CollisionModule.d.ts +15 -0
- package/dist/effects/CollisionModule.d.ts.map +1 -0
- package/dist/effects/CollisionModule.js +46 -0
- package/dist/effects/CollisionModule.js.map +1 -0
- package/dist/effects/ColorModule.d.ts +15 -0
- package/dist/effects/ColorModule.d.ts.map +1 -0
- package/dist/effects/ColorModule.js +45 -0
- package/dist/effects/ColorModule.js.map +1 -0
- package/dist/effects/ForceModule.d.ts +11 -0
- package/dist/effects/ForceModule.d.ts.map +1 -0
- package/dist/effects/ForceModule.js +17 -0
- package/dist/effects/ForceModule.js.map +1 -0
- package/dist/effects/GPUParticleBackend.d.ts +153 -0
- package/dist/effects/GPUParticleBackend.d.ts.map +1 -0
- package/dist/effects/GPUParticleBackend.js +397 -0
- package/dist/effects/GPUParticleBackend.js.map +1 -0
- package/dist/effects/Particle.d.ts +49 -0
- package/dist/effects/Particle.d.ts.map +1 -0
- package/dist/effects/Particle.js +56 -0
- package/dist/effects/Particle.js.map +1 -0
- package/dist/effects/ParticleDiagnostics.d.ts +58 -0
- package/dist/effects/ParticleDiagnostics.d.ts.map +1 -0
- package/dist/effects/ParticleDiagnostics.js +145 -0
- package/dist/effects/ParticleDiagnostics.js.map +1 -0
- package/dist/effects/ParticleEffectPresets.d.ts +8 -0
- package/dist/effects/ParticleEffectPresets.d.ts.map +1 -0
- package/dist/effects/ParticleEffectPresets.js +137 -0
- package/dist/effects/ParticleEffectPresets.js.map +1 -0
- package/dist/effects/ParticleEmitter.d.ts +87 -0
- package/dist/effects/ParticleEmitter.d.ts.map +1 -0
- package/dist/effects/ParticleEmitter.js +254 -0
- package/dist/effects/ParticleEmitter.js.map +1 -0
- package/dist/effects/ParticleModule.d.ts +15 -0
- package/dist/effects/ParticleModule.d.ts.map +1 -0
- package/dist/effects/ParticleModule.js +6 -0
- package/dist/effects/ParticleModule.js.map +1 -0
- package/dist/effects/ParticleRenderPass.d.ts +35 -0
- package/dist/effects/ParticleRenderPass.d.ts.map +1 -0
- package/dist/effects/ParticleRenderPass.js +91 -0
- package/dist/effects/ParticleRenderPass.js.map +1 -0
- package/dist/effects/ParticleRenderer.d.ts +34 -0
- package/dist/effects/ParticleRenderer.d.ts.map +1 -0
- package/dist/effects/ParticleRenderer.js +93 -0
- package/dist/effects/ParticleRenderer.js.map +1 -0
- package/dist/effects/ParticleSystem.d.ts +51 -0
- package/dist/effects/ParticleSystem.d.ts.map +1 -0
- package/dist/effects/ParticleSystem.js +261 -0
- package/dist/effects/ParticleSystem.js.map +1 -0
- package/dist/effects/SizeModule.d.ts +14 -0
- package/dist/effects/SizeModule.d.ts.map +1 -0
- package/dist/effects/SizeModule.js +42 -0
- package/dist/effects/SizeModule.js.map +1 -0
- package/dist/effects/TrailModule.d.ts +22 -0
- package/dist/effects/TrailModule.d.ts.map +1 -0
- package/dist/effects/TrailModule.js +50 -0
- package/dist/effects/TrailModule.js.map +1 -0
- package/dist/effects/VelocityModule.d.ts +15 -0
- package/dist/effects/VelocityModule.d.ts.map +1 -0
- package/dist/effects/VelocityModule.js +57 -0
- package/dist/effects/VelocityModule.js.map +1 -0
- package/dist/effects/index.d.ts +16 -0
- package/dist/effects/index.d.ts.map +1 -0
- package/dist/effects/index.js +16 -0
- package/dist/effects/index.js.map +1 -0
- package/dist/index.d.ts +260 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +155 -0
- package/dist/index.js.map +1 -0
- package/dist/materials/AlphaSorting.d.ts +8 -0
- package/dist/materials/AlphaSorting.d.ts.map +1 -0
- package/dist/materials/AlphaSorting.js +26 -0
- package/dist/materials/AlphaSorting.js.map +1 -0
- package/dist/materials/MaterialExtensions.d.ts +10 -0
- package/dist/materials/MaterialExtensions.d.ts.map +1 -0
- package/dist/materials/MaterialExtensions.js +20 -0
- package/dist/materials/MaterialExtensions.js.map +1 -0
- package/dist/materials/PhysicalMaterial.d.ts +36 -0
- package/dist/materials/PhysicalMaterial.d.ts.map +1 -0
- package/dist/materials/PhysicalMaterial.js +79 -0
- package/dist/materials/PhysicalMaterial.js.map +1 -0
- package/dist/materials/TransmissionPass.d.ts +16 -0
- package/dist/materials/TransmissionPass.d.ts.map +1 -0
- package/dist/materials/TransmissionPass.js +30 -0
- package/dist/materials/TransmissionPass.js.map +1 -0
- package/dist/performance/BVH.d.ts +3 -0
- package/dist/performance/BVH.d.ts.map +1 -0
- package/dist/performance/BVH.js +2 -0
- package/dist/performance/BVH.js.map +1 -0
- package/dist/performance/Batcher.d.ts +3 -0
- package/dist/performance/Batcher.d.ts.map +1 -0
- package/dist/performance/Batcher.js +2 -0
- package/dist/performance/Batcher.js.map +1 -0
- package/dist/performance/FrustumCuller.d.ts +3 -0
- package/dist/performance/FrustumCuller.d.ts.map +1 -0
- package/dist/performance/FrustumCuller.js +5 -0
- package/dist/performance/FrustumCuller.js.map +1 -0
- package/dist/performance/LOD.d.ts +8 -0
- package/dist/performance/LOD.d.ts.map +1 -0
- package/dist/performance/LOD.js +15 -0
- package/dist/performance/LOD.js.map +1 -0
- package/dist/performance/Octree.d.ts +7 -0
- package/dist/performance/Octree.d.ts.map +1 -0
- package/dist/performance/Octree.js +4 -0
- package/dist/performance/Octree.js.map +1 -0
- package/dist/performance/RenderItemSorting.d.ts +43 -0
- package/dist/performance/RenderItemSorting.d.ts.map +1 -0
- package/dist/performance/RenderItemSorting.js +111 -0
- package/dist/performance/RenderItemSorting.js.map +1 -0
- package/dist/performance/RendererStats.d.ts +23 -0
- package/dist/performance/RendererStats.d.ts.map +1 -0
- package/dist/performance/RendererStats.js +23 -0
- package/dist/performance/RendererStats.js.map +1 -0
- package/dist/performance/ResourceBudget.d.ts +19 -0
- package/dist/performance/ResourceBudget.d.ts.map +1 -0
- package/dist/performance/ResourceBudget.js +21 -0
- package/dist/performance/ResourceBudget.js.map +1 -0
- package/dist/postprocess/BloomPass.d.ts +11 -0
- package/dist/postprocess/BloomPass.d.ts.map +1 -0
- package/dist/postprocess/BloomPass.js +14 -0
- package/dist/postprocess/BloomPass.js.map +1 -0
- package/dist/postprocess/CinematicDiagnostics.d.ts +112 -0
- package/dist/postprocess/CinematicDiagnostics.d.ts.map +1 -0
- package/dist/postprocess/CinematicDiagnostics.js +492 -0
- package/dist/postprocess/CinematicDiagnostics.js.map +1 -0
- package/dist/postprocess/ColorGradingPass.d.ts +4 -0
- package/dist/postprocess/ColorGradingPass.d.ts.map +1 -0
- package/dist/postprocess/ColorGradingPass.js +15 -0
- package/dist/postprocess/ColorGradingPass.js.map +1 -0
- package/dist/postprocess/DepthOfFieldPass.d.ts +3 -0
- package/dist/postprocess/DepthOfFieldPass.d.ts.map +1 -0
- package/dist/postprocess/DepthOfFieldPass.js +7 -0
- package/dist/postprocess/DepthOfFieldPass.js.map +1 -0
- package/dist/postprocess/EffectComposer.d.ts +110 -0
- package/dist/postprocess/EffectComposer.d.ts.map +1 -0
- package/dist/postprocess/EffectComposer.js +249 -0
- package/dist/postprocess/EffectComposer.js.map +1 -0
- package/dist/postprocess/SSAOPass.d.ts +6 -0
- package/dist/postprocess/SSAOPass.d.ts.map +1 -0
- package/dist/postprocess/SSAOPass.js +18 -0
- package/dist/postprocess/SSAOPass.js.map +1 -0
- package/dist/postprocess/index.d.ts +11 -0
- package/dist/postprocess/index.d.ts.map +1 -0
- package/dist/postprocess/index.js +7 -0
- package/dist/postprocess/index.js.map +1 -0
- package/dist/production-runtime/AnimationControlsPipeline.d.ts +37 -0
- package/dist/production-runtime/AnimationControlsPipeline.d.ts.map +1 -0
- package/dist/production-runtime/AnimationControlsPipeline.js +41 -0
- package/dist/production-runtime/AnimationControlsPipeline.js.map +1 -0
- package/dist/production-runtime/PBRHDRPipeline.d.ts +81 -0
- package/dist/production-runtime/PBRHDRPipeline.d.ts.map +1 -0
- package/dist/production-runtime/PBRHDRPipeline.js +279 -0
- package/dist/production-runtime/PBRHDRPipeline.js.map +1 -0
- package/dist/production-runtime/ProductionEffectsPipeline.d.ts +20 -0
- package/dist/production-runtime/ProductionEffectsPipeline.d.ts.map +1 -0
- package/dist/production-runtime/ProductionEffectsPipeline.js +65 -0
- package/dist/production-runtime/ProductionEffectsPipeline.js.map +1 -0
- package/dist/production-runtime/ProductionRendererTypes.d.ts +97 -0
- package/dist/production-runtime/ProductionRendererTypes.d.ts.map +1 -0
- package/dist/production-runtime/ProductionRendererTypes.js +29 -0
- package/dist/production-runtime/ProductionRendererTypes.js.map +1 -0
- package/dist/production-runtime/ProductionRuntimeRenderer.d.ts +36 -0
- package/dist/production-runtime/ProductionRuntimeRenderer.d.ts.map +1 -0
- package/dist/production-runtime/ProductionRuntimeRenderer.js +124 -0
- package/dist/production-runtime/ProductionRuntimeRenderer.js.map +1 -0
- package/dist/production-runtime/ProductionWebGL2Renderer.d.ts +51 -0
- package/dist/production-runtime/ProductionWebGL2Renderer.d.ts.map +1 -0
- package/dist/production-runtime/ProductionWebGL2Renderer.js +269 -0
- package/dist/production-runtime/ProductionWebGL2Renderer.js.map +1 -0
- package/dist/production-runtime/ProductionWebGPURenderer.d.ts +69 -0
- package/dist/production-runtime/ProductionWebGPURenderer.d.ts.map +1 -0
- package/dist/production-runtime/ProductionWebGPURenderer.js +313 -0
- package/dist/production-runtime/ProductionWebGPURenderer.js.map +1 -0
- package/dist/production-runtime/TransmissionBackdropCapture.d.ts +11 -0
- package/dist/production-runtime/TransmissionBackdropCapture.d.ts.map +1 -0
- package/dist/production-runtime/TransmissionBackdropCapture.js +119 -0
- package/dist/production-runtime/TransmissionBackdropCapture.js.map +1 -0
- package/dist/production-runtime/animation/MorphTargetRenderer.d.ts +7 -0
- package/dist/production-runtime/animation/MorphTargetRenderer.d.ts.map +1 -0
- package/dist/production-runtime/animation/MorphTargetRenderer.js +2 -0
- package/dist/production-runtime/animation/MorphTargetRenderer.js.map +1 -0
- package/dist/production-runtime/animation/SkinningRenderer.d.ts +7 -0
- package/dist/production-runtime/animation/SkinningRenderer.d.ts.map +1 -0
- package/dist/production-runtime/animation/SkinningRenderer.js +2 -0
- package/dist/production-runtime/animation/SkinningRenderer.js.map +1 -0
- package/dist/production-runtime/backends/RendererBackend.d.ts +16 -0
- package/dist/production-runtime/backends/RendererBackend.d.ts.map +1 -0
- package/dist/production-runtime/backends/RendererBackend.js +2 -0
- package/dist/production-runtime/backends/RendererBackend.js.map +1 -0
- package/dist/production-runtime/backends/WebGL2RendererBackend.d.ts +15 -0
- package/dist/production-runtime/backends/WebGL2RendererBackend.d.ts.map +1 -0
- package/dist/production-runtime/backends/WebGL2RendererBackend.js +25 -0
- package/dist/production-runtime/backends/WebGL2RendererBackend.js.map +1 -0
- package/dist/production-runtime/backends/WebGPURendererBackend.d.ts +20 -0
- package/dist/production-runtime/backends/WebGPURendererBackend.d.ts.map +1 -0
- package/dist/production-runtime/backends/WebGPURendererBackend.js +19 -0
- package/dist/production-runtime/backends/WebGPURendererBackend.js.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Buffer.d.ts +11 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Buffer.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Buffer.js +8 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Buffer.js.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Capabilities.d.ts +11 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Capabilities.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Capabilities.js +8 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Capabilities.js.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2RenderTarget.d.ts +11 -0
- package/dist/production-runtime/backends/webgl2/WebGL2RenderTarget.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2RenderTarget.js +8 -0
- package/dist/production-runtime/backends/webgl2/WebGL2RenderTarget.js.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Shader.d.ts +11 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Shader.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Shader.js +8 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Shader.js.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2StateCache.d.ts +2 -0
- package/dist/production-runtime/backends/webgl2/WebGL2StateCache.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2StateCache.js +2 -0
- package/dist/production-runtime/backends/webgl2/WebGL2StateCache.js.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Texture.d.ts +11 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Texture.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Texture.js +8 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Texture.js.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPUBuffer.d.ts +11 -0
- package/dist/production-runtime/backends/webgpu/WebGPUBuffer.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPUBuffer.js +8 -0
- package/dist/production-runtime/backends/webgpu/WebGPUBuffer.js.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPUCapabilities.d.ts +11 -0
- package/dist/production-runtime/backends/webgpu/WebGPUCapabilities.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPUCapabilities.js +8 -0
- package/dist/production-runtime/backends/webgpu/WebGPUCapabilities.js.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPURenderTarget.d.ts +11 -0
- package/dist/production-runtime/backends/webgpu/WebGPURenderTarget.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPURenderTarget.js +8 -0
- package/dist/production-runtime/backends/webgpu/WebGPURenderTarget.js.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPUShader.d.ts +11 -0
- package/dist/production-runtime/backends/webgpu/WebGPUShader.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPUShader.js +8 -0
- package/dist/production-runtime/backends/webgpu/WebGPUShader.js.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPUTexture.d.ts +11 -0
- package/dist/production-runtime/backends/webgpu/WebGPUTexture.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPUTexture.js +8 -0
- package/dist/production-runtime/backends/webgpu/WebGPUTexture.js.map +1 -0
- package/dist/production-runtime/color/ColorManagement.d.ts +4 -0
- package/dist/production-runtime/color/ColorManagement.d.ts.map +1 -0
- package/dist/production-runtime/color/ColorManagement.js +3 -0
- package/dist/production-runtime/color/ColorManagement.js.map +1 -0
- package/dist/production-runtime/color/ToneMapping.d.ts +3 -0
- package/dist/production-runtime/color/ToneMapping.d.ts.map +1 -0
- package/dist/production-runtime/color/ToneMapping.js +9 -0
- package/dist/production-runtime/color/ToneMapping.js.map +1 -0
- package/dist/production-runtime/diagnostics/FrameCapture.d.ts +7 -0
- package/dist/production-runtime/diagnostics/FrameCapture.d.ts.map +1 -0
- package/dist/production-runtime/diagnostics/FrameCapture.js +2 -0
- package/dist/production-runtime/diagnostics/FrameCapture.js.map +1 -0
- package/dist/production-runtime/diagnostics/GPUCapabilities.d.ts +9 -0
- package/dist/production-runtime/diagnostics/GPUCapabilities.d.ts.map +1 -0
- package/dist/production-runtime/diagnostics/GPUCapabilities.js +2 -0
- package/dist/production-runtime/diagnostics/GPUCapabilities.js.map +1 -0
- package/dist/production-runtime/diagnostics/RendererStats.d.ts +9 -0
- package/dist/production-runtime/diagnostics/RendererStats.d.ts.map +1 -0
- package/dist/production-runtime/diagnostics/RendererStats.js +2 -0
- package/dist/production-runtime/diagnostics/RendererStats.js.map +1 -0
- package/dist/production-runtime/environment/EnvironmentMap.d.ts +8 -0
- package/dist/production-runtime/environment/EnvironmentMap.d.ts.map +1 -0
- package/dist/production-runtime/environment/EnvironmentMap.js +2 -0
- package/dist/production-runtime/environment/EnvironmentMap.js.map +1 -0
- package/dist/production-runtime/environment/HDRLoader.d.ts +19 -0
- package/dist/production-runtime/environment/HDRLoader.d.ts.map +1 -0
- package/dist/production-runtime/environment/HDRLoader.js +22 -0
- package/dist/production-runtime/environment/HDRLoader.js.map +1 -0
- package/dist/production-runtime/environment/PMREMGenerator.d.ts +99 -0
- package/dist/production-runtime/environment/PMREMGenerator.d.ts.map +1 -0
- package/dist/production-runtime/environment/PMREMGenerator.js +534 -0
- package/dist/production-runtime/environment/PMREMGenerator.js.map +1 -0
- package/dist/production-runtime/framegraph/FrameGraph.d.ts +8 -0
- package/dist/production-runtime/framegraph/FrameGraph.d.ts.map +1 -0
- package/dist/production-runtime/framegraph/FrameGraph.js +14 -0
- package/dist/production-runtime/framegraph/FrameGraph.js.map +1 -0
- package/dist/production-runtime/framegraph/RenderPass.d.ts +14 -0
- package/dist/production-runtime/framegraph/RenderPass.d.ts.map +1 -0
- package/dist/production-runtime/framegraph/RenderPass.js +2 -0
- package/dist/production-runtime/framegraph/RenderPass.js.map +1 -0
- package/dist/production-runtime/geometry/ProjectedDecalGeometry.d.ts +53 -0
- package/dist/production-runtime/geometry/ProjectedDecalGeometry.d.ts.map +1 -0
- package/dist/production-runtime/geometry/ProjectedDecalGeometry.js +340 -0
- package/dist/production-runtime/geometry/ProjectedDecalGeometry.js.map +1 -0
- package/dist/production-runtime/index.d.ts +73 -0
- package/dist/production-runtime/index.d.ts.map +1 -0
- package/dist/production-runtime/index.js +67 -0
- package/dist/production-runtime/index.js.map +1 -0
- package/dist/production-runtime/lights/LightManager.d.ts +8 -0
- package/dist/production-runtime/lights/LightManager.d.ts.map +1 -0
- package/dist/production-runtime/lights/LightManager.js +7 -0
- package/dist/production-runtime/lights/LightManager.js.map +1 -0
- package/dist/production-runtime/lights/ShadowMapRenderer.d.ts +8 -0
- package/dist/production-runtime/lights/ShadowMapRenderer.d.ts.map +1 -0
- package/dist/production-runtime/lights/ShadowMapRenderer.js +4 -0
- package/dist/production-runtime/lights/ShadowMapRenderer.js.map +1 -0
- package/dist/production-runtime/materials/GLTFMaterialAdapter.d.ts +14 -0
- package/dist/production-runtime/materials/GLTFMaterialAdapter.d.ts.map +1 -0
- package/dist/production-runtime/materials/GLTFMaterialAdapter.js +5 -0
- package/dist/production-runtime/materials/GLTFMaterialAdapter.js.map +1 -0
- package/dist/production-runtime/materials/GLTFPBRMaterialAdapter.d.ts +3 -0
- package/dist/production-runtime/materials/GLTFPBRMaterialAdapter.d.ts.map +1 -0
- package/dist/production-runtime/materials/GLTFPBRMaterialAdapter.js +2 -0
- package/dist/production-runtime/materials/GLTFPBRMaterialAdapter.js.map +1 -0
- package/dist/production-runtime/materials/MaterialCompiler.d.ts +9 -0
- package/dist/production-runtime/materials/MaterialCompiler.d.ts.map +1 -0
- package/dist/production-runtime/materials/MaterialCompiler.js +5 -0
- package/dist/production-runtime/materials/MaterialCompiler.js.map +1 -0
- package/dist/production-runtime/materials/MaterialTextureBindings.d.ts +8 -0
- package/dist/production-runtime/materials/MaterialTextureBindings.d.ts.map +1 -0
- package/dist/production-runtime/materials/MaterialTextureBindings.js +4 -0
- package/dist/production-runtime/materials/MaterialTextureBindings.js.map +1 -0
- package/dist/production-runtime/materials/PBRMaterial.d.ts +23 -0
- package/dist/production-runtime/materials/PBRMaterial.d.ts.map +1 -0
- package/dist/production-runtime/materials/PBRMaterial.js +2 -0
- package/dist/production-runtime/materials/PBRMaterial.js.map +1 -0
- package/dist/production-runtime/materials/PBRShaderFeatures.d.ts +13 -0
- package/dist/production-runtime/materials/PBRShaderFeatures.d.ts.map +1 -0
- package/dist/production-runtime/materials/PBRShaderFeatures.js +2 -0
- package/dist/production-runtime/materials/PBRShaderFeatures.js.map +1 -0
- package/dist/production-runtime/passes/ContactShadowPass.d.ts +40 -0
- package/dist/production-runtime/passes/ContactShadowPass.d.ts.map +1 -0
- package/dist/production-runtime/passes/ContactShadowPass.js +126 -0
- package/dist/production-runtime/passes/ContactShadowPass.js.map +1 -0
- package/dist/production-runtime/passes/DepthPrepass.d.ts +8 -0
- package/dist/production-runtime/passes/DepthPrepass.d.ts.map +1 -0
- package/dist/production-runtime/passes/DepthPrepass.js +7 -0
- package/dist/production-runtime/passes/DepthPrepass.js.map +1 -0
- package/dist/production-runtime/passes/OpaquePass.d.ts +8 -0
- package/dist/production-runtime/passes/OpaquePass.d.ts.map +1 -0
- package/dist/production-runtime/passes/OpaquePass.js +7 -0
- package/dist/production-runtime/passes/OpaquePass.js.map +1 -0
- package/dist/production-runtime/passes/ShadowPass.d.ts +8 -0
- package/dist/production-runtime/passes/ShadowPass.d.ts.map +1 -0
- package/dist/production-runtime/passes/ShadowPass.js +7 -0
- package/dist/production-runtime/passes/ShadowPass.js.map +1 -0
- package/dist/production-runtime/passes/SkyboxPass.d.ts +8 -0
- package/dist/production-runtime/passes/SkyboxPass.d.ts.map +1 -0
- package/dist/production-runtime/passes/SkyboxPass.js +7 -0
- package/dist/production-runtime/passes/SkyboxPass.js.map +1 -0
- package/dist/production-runtime/passes/ToneMappingPass.d.ts +8 -0
- package/dist/production-runtime/passes/ToneMappingPass.d.ts.map +1 -0
- package/dist/production-runtime/passes/ToneMappingPass.js +7 -0
- package/dist/production-runtime/passes/ToneMappingPass.js.map +1 -0
- package/dist/production-runtime/passes/TransparentPass.d.ts +8 -0
- package/dist/production-runtime/passes/TransparentPass.d.ts.map +1 -0
- package/dist/production-runtime/passes/TransparentPass.js +7 -0
- package/dist/production-runtime/passes/TransparentPass.js.map +1 -0
- package/dist/production-runtime/postprocess/BloomPass.d.ts +15 -0
- package/dist/production-runtime/postprocess/BloomPass.d.ts.map +1 -0
- package/dist/production-runtime/postprocess/BloomPass.js +37 -0
- package/dist/production-runtime/postprocess/BloomPass.js.map +1 -0
- package/dist/production-runtime/postprocess/ColorGradingPass.d.ts +16 -0
- package/dist/production-runtime/postprocess/ColorGradingPass.d.ts.map +1 -0
- package/dist/production-runtime/postprocess/ColorGradingPass.js +34 -0
- package/dist/production-runtime/postprocess/ColorGradingPass.js.map +1 -0
- package/dist/production-runtime/postprocess/DOFPass.d.ts +16 -0
- package/dist/production-runtime/postprocess/DOFPass.d.ts.map +1 -0
- package/dist/production-runtime/postprocess/DOFPass.js +31 -0
- package/dist/production-runtime/postprocess/DOFPass.js.map +1 -0
- package/dist/production-runtime/postprocess/FXAAPass.d.ts +16 -0
- package/dist/production-runtime/postprocess/FXAAPass.d.ts.map +1 -0
- package/dist/production-runtime/postprocess/FXAAPass.js +39 -0
- package/dist/production-runtime/postprocess/FXAAPass.js.map +1 -0
- package/dist/production-runtime/postprocess/ProductionEffectComposer.d.ts +21 -0
- package/dist/production-runtime/postprocess/ProductionEffectComposer.d.ts.map +1 -0
- package/dist/production-runtime/postprocess/ProductionEffectComposer.js +53 -0
- package/dist/production-runtime/postprocess/ProductionEffectComposer.js.map +1 -0
- package/dist/production-runtime/postprocess/ProductionPostProcessTypes.d.ts +37 -0
- package/dist/production-runtime/postprocess/ProductionPostProcessTypes.d.ts.map +1 -0
- package/dist/production-runtime/postprocess/ProductionPostProcessTypes.js +124 -0
- package/dist/production-runtime/postprocess/ProductionPostProcessTypes.js.map +1 -0
- package/dist/production-runtime/postprocess/SSAOPass.d.ts +15 -0
- package/dist/production-runtime/postprocess/SSAOPass.d.ts.map +1 -0
- package/dist/production-runtime/postprocess/SSAOPass.js +30 -0
- package/dist/production-runtime/postprocess/SSAOPass.js.map +1 -0
- package/dist/production-runtime/resources/GPUBuffer.d.ts +10 -0
- package/dist/production-runtime/resources/GPUBuffer.d.ts.map +1 -0
- package/dist/production-runtime/resources/GPUBuffer.js +7 -0
- package/dist/production-runtime/resources/GPUBuffer.js.map +1 -0
- package/dist/production-runtime/resources/GPUTexture.d.ts +12 -0
- package/dist/production-runtime/resources/GPUTexture.d.ts.map +1 -0
- package/dist/production-runtime/resources/GPUTexture.js +7 -0
- package/dist/production-runtime/resources/GPUTexture.js.map +1 -0
- package/dist/production-runtime/resources/RenderTarget.d.ts +11 -0
- package/dist/production-runtime/resources/RenderTarget.d.ts.map +1 -0
- package/dist/production-runtime/resources/RenderTarget.js +7 -0
- package/dist/production-runtime/resources/RenderTarget.js.map +1 -0
- package/dist/production-runtime/resources/ResourceCache.d.ts +8 -0
- package/dist/production-runtime/resources/ResourceCache.d.ts.map +1 -0
- package/dist/production-runtime/resources/ResourceCache.js +8 -0
- package/dist/production-runtime/resources/ResourceCache.js.map +1 -0
- package/dist/production-runtime/scene/Camera.d.ts +8 -0
- package/dist/production-runtime/scene/Camera.d.ts.map +1 -0
- package/dist/production-runtime/scene/Camera.js +2 -0
- package/dist/production-runtime/scene/Camera.js.map +1 -0
- package/dist/production-runtime/scene/Lights.d.ts +9 -0
- package/dist/production-runtime/scene/Lights.d.ts.map +1 -0
- package/dist/production-runtime/scene/Lights.js +2 -0
- package/dist/production-runtime/scene/Lights.js.map +1 -0
- package/dist/production-runtime/scene/RenderableMesh.d.ts +8 -0
- package/dist/production-runtime/scene/RenderableMesh.d.ts.map +1 -0
- package/dist/production-runtime/scene/RenderableMesh.js +2 -0
- package/dist/production-runtime/scene/RenderableMesh.js.map +1 -0
- package/dist/production-runtime/scene/RenderablePrimitive.d.ts +8 -0
- package/dist/production-runtime/scene/RenderablePrimitive.d.ts.map +1 -0
- package/dist/production-runtime/scene/RenderablePrimitive.js +2 -0
- package/dist/production-runtime/scene/RenderablePrimitive.js.map +1 -0
- package/dist/production-runtime/scene/RenderableScene.d.ts +11 -0
- package/dist/production-runtime/scene/RenderableScene.d.ts.map +1 -0
- package/dist/production-runtime/scene/RenderableScene.js +2 -0
- package/dist/production-runtime/scene/RenderableScene.js.map +1 -0
- package/dist/production-runtime/shaders/ShaderProgramLibrary.d.ts +12 -0
- package/dist/production-runtime/shaders/ShaderProgramLibrary.d.ts.map +1 -0
- package/dist/production-runtime/shaders/ShaderProgramLibrary.js +7 -0
- package/dist/production-runtime/shaders/ShaderProgramLibrary.js.map +1 -0
- package/dist/shadows/CascadedShadowPipeline.d.ts +25 -0
- package/dist/shadows/CascadedShadowPipeline.d.ts.map +1 -0
- package/dist/shadows/CascadedShadowPipeline.js +31 -0
- package/dist/shadows/CascadedShadowPipeline.js.map +1 -0
- package/dist/shadows/ContactShadows.d.ts +37 -0
- package/dist/shadows/ContactShadows.d.ts.map +1 -0
- package/dist/shadows/ContactShadows.js +68 -0
- package/dist/shadows/ContactShadows.js.map +1 -0
- package/dist/shadows/ShadowDebugViews.d.ts +12 -0
- package/dist/shadows/ShadowDebugViews.d.ts.map +1 -0
- package/dist/shadows/ShadowDebugViews.js +35 -0
- package/dist/shadows/ShadowDebugViews.js.map +1 -0
- package/dist/threejs-compatibility/InstancingSystem.d.ts +10 -0
- package/dist/threejs-compatibility/InstancingSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/InstancingSystem.js +11 -0
- package/dist/threejs-compatibility/InstancingSystem.js.map +1 -0
- package/dist/threejs-compatibility/LightingSystem.d.ts +11 -0
- package/dist/threejs-compatibility/LightingSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/LightingSystem.js +14 -0
- package/dist/threejs-compatibility/LightingSystem.js.map +1 -0
- package/dist/threejs-compatibility/MaterialSystem.d.ts +6 -0
- package/dist/threejs-compatibility/MaterialSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/MaterialSystem.js +7 -0
- package/dist/threejs-compatibility/MaterialSystem.js.map +1 -0
- package/dist/threejs-compatibility/RenderTargetSystem.d.ts +16 -0
- package/dist/threejs-compatibility/RenderTargetSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/RenderTargetSystem.js +23 -0
- package/dist/threejs-compatibility/RenderTargetSystem.js.map +1 -0
- package/dist/threejs-compatibility/RendererDiagnostics.d.ts +27 -0
- package/dist/threejs-compatibility/RendererDiagnostics.d.ts.map +1 -0
- package/dist/threejs-compatibility/RendererDiagnostics.js +41 -0
- package/dist/threejs-compatibility/RendererDiagnostics.js.map +1 -0
- package/dist/threejs-compatibility/SceneRenderer.d.ts +19 -0
- package/dist/threejs-compatibility/SceneRenderer.d.ts.map +1 -0
- package/dist/threejs-compatibility/SceneRenderer.js +18 -0
- package/dist/threejs-compatibility/SceneRenderer.js.map +1 -0
- package/dist/threejs-compatibility/ShadowSystem.d.ts +11 -0
- package/dist/threejs-compatibility/ShadowSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/ShadowSystem.js +12 -0
- package/dist/threejs-compatibility/ShadowSystem.js.map +1 -0
- package/dist/threejs-compatibility/TextureSystem.d.ts +9 -0
- package/dist/threejs-compatibility/TextureSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/TextureSystem.js +14 -0
- package/dist/threejs-compatibility/TextureSystem.js.map +1 -0
- package/dist/threejs-compatibility/ThreeCompatRenderer.d.ts +37 -0
- package/dist/threejs-compatibility/ThreeCompatRenderer.d.ts.map +1 -0
- package/dist/threejs-compatibility/ThreeCompatRenderer.js +77 -0
- package/dist/threejs-compatibility/ThreeCompatRenderer.js.map +1 -0
- package/dist/threejs-compatibility/TransparencySystem.d.ts +11 -0
- package/dist/threejs-compatibility/TransparencySystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/TransparencySystem.js +12 -0
- package/dist/threejs-compatibility/TransparencySystem.js.map +1 -0
- package/dist/threejs-compatibility/index.d.ts +25 -0
- package/dist/threejs-compatibility/index.d.ts.map +1 -0
- package/dist/threejs-compatibility/index.js +15 -0
- package/dist/threejs-compatibility/index.js.map +1 -0
- package/dist/threejs-compatibility/performance/BVH.d.ts +11 -0
- package/dist/threejs-compatibility/performance/BVH.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/BVH.js +10 -0
- package/dist/threejs-compatibility/performance/BVH.js.map +1 -0
- package/dist/threejs-compatibility/performance/FrustumCulling.d.ts +7 -0
- package/dist/threejs-compatibility/performance/FrustumCulling.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/FrustumCulling.js +5 -0
- package/dist/threejs-compatibility/performance/FrustumCulling.js.map +1 -0
- package/dist/threejs-compatibility/performance/Instancing.d.ts +7 -0
- package/dist/threejs-compatibility/performance/Instancing.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/Instancing.js +10 -0
- package/dist/threejs-compatibility/performance/Instancing.js.map +1 -0
- package/dist/threejs-compatibility/performance/LODSystem.d.ts +9 -0
- package/dist/threejs-compatibility/performance/LODSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/LODSystem.js +11 -0
- package/dist/threejs-compatibility/performance/LODSystem.js.map +1 -0
- package/dist/threejs-compatibility/performance/OcclusionCulling.d.ts +3 -0
- package/dist/threejs-compatibility/performance/OcclusionCulling.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/OcclusionCulling.js +5 -0
- package/dist/threejs-compatibility/performance/OcclusionCulling.js.map +1 -0
- package/dist/threejs-compatibility/performance/RaycastAcceleration.d.ts +8 -0
- package/dist/threejs-compatibility/performance/RaycastAcceleration.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/RaycastAcceleration.js +11 -0
- package/dist/threejs-compatibility/performance/RaycastAcceleration.js.map +1 -0
- package/dist/threejs-compatibility/performance/RendererProfiler.d.ts +11 -0
- package/dist/threejs-compatibility/performance/RendererProfiler.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/RendererProfiler.js +10 -0
- package/dist/threejs-compatibility/performance/RendererProfiler.js.map +1 -0
- package/dist/threejs-compatibility/performance/TextureStreaming.d.ts +7 -0
- package/dist/threejs-compatibility/performance/TextureStreaming.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/TextureStreaming.js +10 -0
- package/dist/threejs-compatibility/performance/TextureStreaming.js.map +1 -0
- package/dist/threejs-compatibility/performance/index.d.ts +13 -0
- package/dist/threejs-compatibility/performance/index.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/index.js +9 -0
- package/dist/threejs-compatibility/performance/index.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/BloomPass.d.ts +9 -0
- package/dist/threejs-compatibility/postprocess/BloomPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/BloomPass.js +14 -0
- package/dist/threejs-compatibility/postprocess/BloomPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/ColorGradingPass.d.ts +10 -0
- package/dist/threejs-compatibility/postprocess/ColorGradingPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/ColorGradingPass.js +16 -0
- package/dist/threejs-compatibility/postprocess/ColorGradingPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/DepthOfFieldPass.d.ts +9 -0
- package/dist/threejs-compatibility/postprocess/DepthOfFieldPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/DepthOfFieldPass.js +19 -0
- package/dist/threejs-compatibility/postprocess/DepthOfFieldPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/EffectComposer.d.ts +7 -0
- package/dist/threejs-compatibility/postprocess/EffectComposer.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/EffectComposer.js +11 -0
- package/dist/threejs-compatibility/postprocess/EffectComposer.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/FXAAPass.d.ts +7 -0
- package/dist/threejs-compatibility/postprocess/FXAAPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/FXAAPass.js +10 -0
- package/dist/threejs-compatibility/postprocess/FXAAPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/MotionBlurPass.d.ts +9 -0
- package/dist/threejs-compatibility/postprocess/MotionBlurPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/MotionBlurPass.js +18 -0
- package/dist/threejs-compatibility/postprocess/MotionBlurPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/OutlinePass.d.ts +9 -0
- package/dist/threejs-compatibility/postprocess/OutlinePass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/OutlinePass.js +19 -0
- package/dist/threejs-compatibility/postprocess/OutlinePass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/PostProcessTypes.d.ts +42 -0
- package/dist/threejs-compatibility/postprocess/PostProcessTypes.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/PostProcessTypes.js +123 -0
- package/dist/threejs-compatibility/postprocess/PostProcessTypes.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/RenderPass.d.ts +7 -0
- package/dist/threejs-compatibility/postprocess/RenderPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/RenderPass.js +8 -0
- package/dist/threejs-compatibility/postprocess/RenderPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/SMAAPass.d.ts +7 -0
- package/dist/threejs-compatibility/postprocess/SMAAPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/SMAAPass.js +10 -0
- package/dist/threejs-compatibility/postprocess/SMAAPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/SSAOPass.d.ts +9 -0
- package/dist/threejs-compatibility/postprocess/SSAOPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/SSAOPass.js +19 -0
- package/dist/threejs-compatibility/postprocess/SSAOPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/ShaderPass.d.ts +9 -0
- package/dist/threejs-compatibility/postprocess/ShaderPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/ShaderPass.js +11 -0
- package/dist/threejs-compatibility/postprocess/ShaderPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/TAAPass.d.ts +7 -0
- package/dist/threejs-compatibility/postprocess/TAAPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/TAAPass.js +10 -0
- package/dist/threejs-compatibility/postprocess/TAAPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/VignettePass.d.ts +9 -0
- package/dist/threejs-compatibility/postprocess/VignettePass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/VignettePass.js +14 -0
- package/dist/threejs-compatibility/postprocess/VignettePass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/index.d.ts +16 -0
- package/dist/threejs-compatibility/postprocess/index.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/index.js +15 -0
- package/dist/threejs-compatibility/postprocess/index.js.map +1 -0
- package/dist/threejs-compatibility/shaders/NodeMaterial.d.ts +14 -0
- package/dist/threejs-compatibility/shaders/NodeMaterial.d.ts.map +1 -0
- package/dist/threejs-compatibility/shaders/NodeMaterial.js +15 -0
- package/dist/threejs-compatibility/shaders/NodeMaterial.js.map +1 -0
- package/dist/threejs-compatibility/shaders/RawShaderMaterial.d.ts +6 -0
- package/dist/threejs-compatibility/shaders/RawShaderMaterial.d.ts.map +1 -0
- package/dist/threejs-compatibility/shaders/RawShaderMaterial.js +6 -0
- package/dist/threejs-compatibility/shaders/RawShaderMaterial.js.map +1 -0
- package/dist/threejs-compatibility/shaders/ShaderDiagnostics.d.ts +7 -0
- package/dist/threejs-compatibility/shaders/ShaderDiagnostics.d.ts.map +1 -0
- package/dist/threejs-compatibility/shaders/ShaderDiagnostics.js +12 -0
- package/dist/threejs-compatibility/shaders/ShaderDiagnostics.js.map +1 -0
- package/dist/threejs-compatibility/shaders/ShaderMaterial.d.ts +12 -0
- package/dist/threejs-compatibility/shaders/ShaderMaterial.d.ts.map +1 -0
- package/dist/threejs-compatibility/shaders/ShaderMaterial.js +20 -0
- package/dist/threejs-compatibility/shaders/ShaderMaterial.js.map +1 -0
- package/dist/threejs-compatibility/shaders/ThreeCompatShaderChunks.d.ts +7 -0
- package/dist/threejs-compatibility/shaders/ThreeCompatShaderChunks.d.ts.map +1 -0
- package/dist/threejs-compatibility/shaders/ThreeCompatShaderChunks.js +7 -0
- package/dist/threejs-compatibility/shaders/ThreeCompatShaderChunks.js.map +1 -0
- package/dist/threejs-compatibility/shaders/Uniforms.d.ts +8 -0
- package/dist/threejs-compatibility/shaders/Uniforms.d.ts.map +1 -0
- package/dist/threejs-compatibility/shaders/Uniforms.js +14 -0
- package/dist/threejs-compatibility/shaders/Uniforms.js.map +1 -0
- package/dist/threejs-compatibility/shaders/index.d.ts +10 -0
- package/dist/threejs-compatibility/shaders/index.d.ts.map +1 -0
- package/dist/threejs-compatibility/shaders/index.js +7 -0
- package/dist/threejs-compatibility/shaders/index.js.map +1 -0
- package/dist/threejs-compatibility/vfx/GPUPointCloud.d.ts +7 -0
- package/dist/threejs-compatibility/vfx/GPUPointCloud.d.ts.map +1 -0
- package/dist/threejs-compatibility/vfx/GPUPointCloud.js +12 -0
- package/dist/threejs-compatibility/vfx/GPUPointCloud.js.map +1 -0
- package/dist/threejs-compatibility/vfx/LineRenderer.d.ts +10 -0
- package/dist/threejs-compatibility/vfx/LineRenderer.d.ts.map +1 -0
- package/dist/threejs-compatibility/vfx/LineRenderer.js +7 -0
- package/dist/threejs-compatibility/vfx/LineRenderer.js.map +1 -0
- package/dist/threejs-compatibility/vfx/ParticleSystem.d.ts +12 -0
- package/dist/threejs-compatibility/vfx/ParticleSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/vfx/ParticleSystem.js +15 -0
- package/dist/threejs-compatibility/vfx/ParticleSystem.js.map +1 -0
- package/dist/threejs-compatibility/vfx/SpriteSystem.d.ts +11 -0
- package/dist/threejs-compatibility/vfx/SpriteSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/vfx/SpriteSystem.js +7 -0
- package/dist/threejs-compatibility/vfx/SpriteSystem.js.map +1 -0
- package/dist/threejs-compatibility/vfx/TrailRenderer.d.ts +5 -0
- package/dist/threejs-compatibility/vfx/TrailRenderer.d.ts.map +1 -0
- package/dist/threejs-compatibility/vfx/TrailRenderer.js +9 -0
- package/dist/threejs-compatibility/vfx/TrailRenderer.js.map +1 -0
- package/dist/threejs-compatibility/vfx/VFXDiagnostics.d.ts +21 -0
- package/dist/threejs-compatibility/vfx/VFXDiagnostics.d.ts.map +1 -0
- package/dist/threejs-compatibility/vfx/VFXDiagnostics.js +12 -0
- package/dist/threejs-compatibility/vfx/VFXDiagnostics.js.map +1 -0
- package/dist/threejs-compatibility/vfx/index.d.ts +10 -0
- package/dist/threejs-compatibility/vfx/index.d.ts.map +1 -0
- package/dist/threejs-compatibility/vfx/index.js +7 -0
- package/dist/threejs-compatibility/vfx/index.js.map +1 -0
- package/dist/threejs-example-parity/index.d.ts +57 -0
- package/dist/threejs-example-parity/index.d.ts.map +1 -0
- package/dist/threejs-example-parity/index.js +139 -0
- package/dist/threejs-example-parity/index.js.map +1 -0
- package/dist/webgpu/WebGPUBuffer.d.ts +2 -0
- package/dist/webgpu/WebGPUBuffer.d.ts.map +1 -0
- package/dist/webgpu/WebGPUBuffer.js +2 -0
- package/dist/webgpu/WebGPUBuffer.js.map +1 -0
- package/dist/webgpu/WebGPUCompute.d.ts +3 -0
- package/dist/webgpu/WebGPUCompute.d.ts.map +1 -0
- package/dist/webgpu/WebGPUCompute.js +2 -0
- package/dist/webgpu/WebGPUCompute.js.map +1 -0
- package/dist/webgpu/WebGPUPipelineCache.d.ts +6 -0
- package/dist/webgpu/WebGPUPipelineCache.d.ts.map +1 -0
- package/dist/webgpu/WebGPUPipelineCache.js +15 -0
- package/dist/webgpu/WebGPUPipelineCache.js.map +1 -0
- package/dist/webgpu/WebGPUPostProcess.d.ts +3 -0
- package/dist/webgpu/WebGPUPostProcess.d.ts.map +1 -0
- package/dist/webgpu/WebGPUPostProcess.js +2 -0
- package/dist/webgpu/WebGPUPostProcess.js.map +1 -0
- package/dist/webgpu/WebGPUTexture.d.ts +3 -0
- package/dist/webgpu/WebGPUTexture.d.ts.map +1 -0
- package/dist/webgpu/WebGPUTexture.js +2 -0
- package/dist/webgpu/WebGPUTexture.js.map +1 -0
- package/package.json +18 -0
- package/src/ArchitecturalLightingFixtures.ts +241 -0
- package/src/ArchitecturalMaterialCatalog.ts +130 -0
- package/src/ArchitecturalMeasurementFixtures.ts +155 -0
- package/src/BRDFLut.ts +47 -0
- package/src/CameraFraming.ts +200 -0
- package/src/CanonicalSceneFixtures.ts +95 -0
- package/src/CascadedShadowMaps.ts +449 -0
- package/src/ColorManagement.ts +127 -0
- package/src/CullingFixtures.ts +280 -0
- package/src/DecalGeometry.ts +26 -0
- package/src/DepthPass.ts +110 -0
- package/src/EnvironmentBackgroundPass.ts +194 -0
- package/src/EnvironmentBackgroundResources.ts +309 -0
- package/src/EnvironmentLighting.ts +96 -0
- package/src/EnvironmentMapResources.ts +1026 -0
- package/src/EnvironmentPipeline.ts +69 -0
- package/src/EnvironmentPlatform.ts +1306 -0
- package/src/EnvironmentPreset.ts +155 -0
- package/src/Exposure.ts +66 -0
- package/src/ExternalParityRenderPreset.ts +725 -0
- package/src/ForwardPass.ts +1639 -0
- package/src/FrameVisualMetrics.ts +218 -0
- package/src/Geometry.ts +461 -0
- package/src/GeometryPrimitives.ts +2 -0
- package/src/HDRRenderPipeline.ts +94 -0
- package/src/IBL.ts +86 -0
- package/src/IndexBuffer.ts +57 -0
- package/src/InstancedPBRMaterial.ts +186 -0
- package/src/InstancedUnlitMaterial.ts +60 -0
- package/src/Instancing.ts +19 -0
- package/src/LightCollector.ts +82 -0
- package/src/LightUniforms.ts +47 -0
- package/src/LightingDebug.ts +80 -0
- package/src/LightingDefaults.ts +79 -0
- package/src/LightingRig.ts +301 -0
- package/src/LineGeometry.ts +2 -0
- package/src/Material.ts +209 -0
- package/src/MaterialBinding.ts +131 -0
- package/src/MaterialInstance.ts +59 -0
- package/src/MaterialPresets.ts +272 -0
- package/src/MorphTarget.ts +123 -0
- package/src/MorphUnlitMaterial.ts +54 -0
- package/src/NormalMappedPBRMaterial.ts +188 -0
- package/src/OceanFixtures.ts +318 -0
- package/src/PBRLightingDefaults.ts +12 -0
- package/src/PBRMaterial.ts +442 -0
- package/src/PMREM.ts +53 -0
- package/src/PbrReference.ts +681 -0
- package/src/PostProcessPass.ts +2507 -0
- package/src/ProceduralTextureFixtures.ts +393 -0
- package/src/ProductTurntableFixtures.ts +815 -0
- package/src/Raycaster.ts +21 -0
- package/src/ReflectionProbe.ts +13 -0
- package/src/ReflectionSurfaces.ts +219 -0
- package/src/RenderBackend.ts +43 -0
- package/src/RenderDebugViews.ts +138 -0
- package/src/RenderDevice.ts +836 -0
- package/src/RenderGraph.ts +194 -0
- package/src/RenderPass.ts +27 -0
- package/src/RenderPipeline.ts +101 -0
- package/src/RenderQueue.ts +12 -0
- package/src/RenderState.ts +12 -0
- package/src/Renderer.ts +2626 -0
- package/src/RendererDebugOverlay.ts +80 -0
- package/src/RendererFeatureGates.ts +150 -0
- package/src/RendererPostprocessPlan.ts +279 -0
- package/src/RendererTiming.ts +251 -0
- package/src/RendererVisualPipelineReport.ts +836 -0
- package/src/ResourceLifecycle.ts +21 -0
- package/src/Sampler.ts +37 -0
- package/src/SceneOptimization.ts +518 -0
- package/src/ShaderChunks.ts +393 -0
- package/src/ShaderLibrary.ts +2738 -0
- package/src/ShaderModule.ts +36 -0
- package/src/ShaderPreprocessor.ts +260 -0
- package/src/ShaderReflection.ts +201 -0
- package/src/ShadowMap.ts +237 -0
- package/src/ShadowPass.ts +198 -0
- package/src/ShadowProjection.ts +115 -0
- package/src/SkinnedLitMaterial.ts +366 -0
- package/src/SkinnedUnlitMaterial.ts +63 -0
- package/src/SkinningBounds.ts +131 -0
- package/src/SpaceEnvironmentFixtures.ts +200 -0
- package/src/SpriteGeometry.ts +21 -0
- package/src/StereoCameraRig.ts +127 -0
- package/src/StereoEffects.ts +274 -0
- package/src/TerrainFixtures.ts +180 -0
- package/src/Texture.ts +307 -0
- package/src/TextureBinding.ts +91 -0
- package/src/TexturedPBRMaterial.ts +1112 -0
- package/src/TexturedUnlitMaterial.ts +67 -0
- package/src/ToneMapping.ts +105 -0
- package/src/UniformBinder.ts +16 -0
- package/src/UniformLayout.ts +129 -0
- package/src/UnlitMaterial.ts +75 -0
- package/src/VegetationFixtures.ts +314 -0
- package/src/VertexBuffer.ts +120 -0
- package/src/VertexFormat.ts +171 -0
- package/src/VoxelWorldFixtures.ts +280 -0
- package/src/WeatherFixtures.ts +223 -0
- package/src/WebGL2Device.ts +2280 -0
- package/src/WebGL2StateCache.ts +330 -0
- package/src/WebGPUDevice.ts +2806 -0
- package/src/WebGPURenderToTextureProof.ts +139 -0
- package/src/advanced-runtime/AdvancedRenderer.ts +73 -0
- package/src/advanced-runtime/index.ts +9 -0
- package/src/cinematic/BloomPass.ts +26 -0
- package/src/cinematic/CinematicDepthComposition.ts +30 -0
- package/src/cinematic/CinematicEvidence.ts +123 -0
- package/src/cinematic/CinematicLightingRig.ts +144 -0
- package/src/cinematic/CinematicMaterialPresets.ts +130 -0
- package/src/cinematic/CinematicPostProcess.ts +83 -0
- package/src/cinematic/DepthHazePass.ts +30 -0
- package/src/cinematic/EmissivePracticalLightSystem.ts +45 -0
- package/src/cinematic/FilmGrainPass.ts +24 -0
- package/src/cinematic/FogVolumeSystem.ts +30 -0
- package/src/cinematic/GlowCardSystem.ts +44 -0
- package/src/cinematic/RainParticleSystem.ts +151 -0
- package/src/cinematic/VignettePass.ts +25 -0
- package/src/cinematic/WetReflectionApproximation.ts +27 -0
- package/src/cinematic/index.ts +14 -0
- package/src/effects/CollisionModule.ts +64 -0
- package/src/effects/ColorModule.ts +60 -0
- package/src/effects/ForceModule.ts +25 -0
- package/src/effects/GPUParticleBackend.ts +569 -0
- package/src/effects/Particle.ts +108 -0
- package/src/effects/ParticleDiagnostics.ts +224 -0
- package/src/effects/ParticleEffectPresets.ts +147 -0
- package/src/effects/ParticleEmitter.ts +326 -0
- package/src/effects/ParticleModule.ts +26 -0
- package/src/effects/ParticleRenderPass.ts +117 -0
- package/src/effects/ParticleRenderer.ts +132 -0
- package/src/effects/ParticleSystem.ts +333 -0
- package/src/effects/SizeModule.ts +56 -0
- package/src/effects/TrailModule.ts +72 -0
- package/src/effects/VelocityModule.ts +75 -0
- package/src/effects/index.ts +15 -0
- package/src/index.ts +914 -0
- package/src/materials/AlphaSorting.ts +30 -0
- package/src/materials/MaterialExtensions.ts +42 -0
- package/src/materials/PhysicalMaterial.ts +133 -0
- package/src/materials/TransmissionPass.ts +51 -0
- package/src/performance/BVH.ts +18 -0
- package/src/performance/Batcher.ts +2 -0
- package/src/performance/FrustumCuller.ts +9 -0
- package/src/performance/LOD.ts +20 -0
- package/src/performance/Octree.ts +10 -0
- package/src/performance/RenderItemSorting.ts +167 -0
- package/src/performance/RendererStats.ts +43 -0
- package/src/performance/ResourceBudget.ts +44 -0
- package/src/postprocess/BloomPass.ts +28 -0
- package/src/postprocess/CinematicDiagnostics.ts +642 -0
- package/src/postprocess/ColorGradingPass.ts +24 -0
- package/src/postprocess/DepthOfFieldPass.ts +12 -0
- package/src/postprocess/EffectComposer.ts +349 -0
- package/src/postprocess/SSAOPass.ts +20 -0
- package/src/postprocess/index.ts +34 -0
- package/src/production-runtime/AnimationControlsPipeline.ts +77 -0
- package/src/production-runtime/PBRHDRPipeline.ts +381 -0
- package/src/production-runtime/ProductionEffectsPipeline.ts +85 -0
- package/src/production-runtime/ProductionRendererTypes.ts +136 -0
- package/src/production-runtime/ProductionRuntimeRenderer.ts +172 -0
- package/src/production-runtime/ProductionWebGL2Renderer.ts +313 -0
- package/src/production-runtime/ProductionWebGPURenderer.ts +396 -0
- package/src/production-runtime/TransmissionBackdropCapture.ts +130 -0
- package/src/production-runtime/animation/MorphTargetRenderer.ts +2 -0
- package/src/production-runtime/animation/SkinningRenderer.ts +2 -0
- package/src/production-runtime/backends/RendererBackend.ts +17 -0
- package/src/production-runtime/backends/WebGL2RendererBackend.ts +30 -0
- package/src/production-runtime/backends/WebGPURendererBackend.ts +24 -0
- package/src/production-runtime/backends/webgl2/WebGL2Buffer.ts +2 -0
- package/src/production-runtime/backends/webgl2/WebGL2Capabilities.ts +2 -0
- package/src/production-runtime/backends/webgl2/WebGL2RenderTarget.ts +2 -0
- package/src/production-runtime/backends/webgl2/WebGL2Shader.ts +2 -0
- package/src/production-runtime/backends/webgl2/WebGL2StateCache.ts +1 -0
- package/src/production-runtime/backends/webgl2/WebGL2Texture.ts +2 -0
- package/src/production-runtime/backends/webgpu/WebGPUBuffer.ts +2 -0
- package/src/production-runtime/backends/webgpu/WebGPUCapabilities.ts +2 -0
- package/src/production-runtime/backends/webgpu/WebGPURenderTarget.ts +2 -0
- package/src/production-runtime/backends/webgpu/WebGPUShader.ts +2 -0
- package/src/production-runtime/backends/webgpu/WebGPUTexture.ts +2 -0
- package/src/production-runtime/color/ColorManagement.ts +3 -0
- package/src/production-runtime/color/ToneMapping.ts +7 -0
- package/src/production-runtime/diagnostics/FrameCapture.ts +2 -0
- package/src/production-runtime/diagnostics/GPUCapabilities.ts +2 -0
- package/src/production-runtime/diagnostics/RendererStats.ts +2 -0
- package/src/production-runtime/environment/EnvironmentMap.ts +1 -0
- package/src/production-runtime/environment/HDRLoader.ts +57 -0
- package/src/production-runtime/environment/PMREMGenerator.ts +713 -0
- package/src/production-runtime/framegraph/FrameGraph.ts +18 -0
- package/src/production-runtime/framegraph/RenderPass.ts +15 -0
- package/src/production-runtime/geometry/ProjectedDecalGeometry.ts +439 -0
- package/src/production-runtime/index.ts +127 -0
- package/src/production-runtime/lights/LightManager.ts +7 -0
- package/src/production-runtime/lights/ShadowMapRenderer.ts +5 -0
- package/src/production-runtime/materials/GLTFMaterialAdapter.ts +6 -0
- package/src/production-runtime/materials/GLTFPBRMaterialAdapter.ts +2 -0
- package/src/production-runtime/materials/MaterialCompiler.ts +7 -0
- package/src/production-runtime/materials/MaterialTextureBindings.ts +5 -0
- package/src/production-runtime/materials/PBRMaterial.ts +2 -0
- package/src/production-runtime/materials/PBRShaderFeatures.ts +2 -0
- package/src/production-runtime/passes/ContactShadowPass.ts +184 -0
- package/src/production-runtime/passes/DepthPrepass.ts +7 -0
- package/src/production-runtime/passes/OpaquePass.ts +7 -0
- package/src/production-runtime/passes/ShadowPass.ts +7 -0
- package/src/production-runtime/passes/SkyboxPass.ts +7 -0
- package/src/production-runtime/passes/ToneMappingPass.ts +7 -0
- package/src/production-runtime/passes/TransparentPass.ts +7 -0
- package/src/production-runtime/postprocess/BloomPass.ts +51 -0
- package/src/production-runtime/postprocess/ColorGradingPass.ts +49 -0
- package/src/production-runtime/postprocess/DOFPass.ts +47 -0
- package/src/production-runtime/postprocess/FXAAPass.ts +53 -0
- package/src/production-runtime/postprocess/ProductionEffectComposer.ts +78 -0
- package/src/production-runtime/postprocess/ProductionPostProcessTypes.ts +174 -0
- package/src/production-runtime/postprocess/SSAOPass.ts +45 -0
- package/src/production-runtime/resources/GPUBuffer.ts +2 -0
- package/src/production-runtime/resources/GPUTexture.ts +2 -0
- package/src/production-runtime/resources/RenderTarget.ts +3 -0
- package/src/production-runtime/resources/ResourceCache.ts +7 -0
- package/src/production-runtime/scene/Camera.ts +1 -0
- package/src/production-runtime/scene/Lights.ts +2 -0
- package/src/production-runtime/scene/RenderableMesh.ts +2 -0
- package/src/production-runtime/scene/RenderablePrimitive.ts +1 -0
- package/src/production-runtime/scene/RenderableScene.ts +4 -0
- package/src/production-runtime/shaders/ShaderProgramLibrary.ts +7 -0
- package/src/production-runtime/shaders/chunks/brdf.glsl +2 -0
- package/src/production-runtime/shaders/chunks/ibl.glsl +3 -0
- package/src/production-runtime/shaders/chunks/pbr.frag.glsl +47 -0
- package/src/production-runtime/shaders/chunks/pbr.vert.glsl +8 -0
- package/src/production-runtime/shaders/chunks/shadows.glsl +2 -0
- package/src/production-runtime/shaders/wgsl/pbr.wgsl +3 -0
- package/src/production-runtime/shaders/wgsl/postprocess.wgsl +2 -0
- package/src/production-runtime/shaders/wgsl/skybox.wgsl +2 -0
- package/src/shaders/depth.frag.glsl +5 -0
- package/src/shaders/depth.vert.glsl +8 -0
- package/src/shaders/pbr-direct.frag.glsl +687 -0
- package/src/shaders/pbr-direct.vert.glsl +18 -0
- package/src/shaders/unlit.frag.glsl +18 -0
- package/src/shaders/unlit.vert.glsl +13 -0
- package/src/shadows/CascadedShadowPipeline.ts +53 -0
- package/src/shadows/ContactShadows.ts +106 -0
- package/src/shadows/ShadowDebugViews.ts +46 -0
- package/src/threejs-compatibility/InstancingSystem.ts +17 -0
- package/src/threejs-compatibility/LightingSystem.ts +22 -0
- package/src/threejs-compatibility/MaterialSystem.ts +9 -0
- package/src/threejs-compatibility/RenderTargetSystem.ts +35 -0
- package/src/threejs-compatibility/RendererDiagnostics.ts +61 -0
- package/src/threejs-compatibility/SceneRenderer.ts +34 -0
- package/src/threejs-compatibility/ShadowSystem.ts +19 -0
- package/src/threejs-compatibility/TextureSystem.ts +19 -0
- package/src/threejs-compatibility/ThreeCompatRenderer.ts +90 -0
- package/src/threejs-compatibility/TransparencySystem.ts +19 -0
- package/src/threejs-compatibility/index.ts +29 -0
- package/src/threejs-compatibility/performance/BVH.ts +14 -0
- package/src/threejs-compatibility/performance/FrustumCulling.ts +10 -0
- package/src/threejs-compatibility/performance/Instancing.ts +4 -0
- package/src/threejs-compatibility/performance/LODSystem.ts +16 -0
- package/src/threejs-compatibility/performance/OcclusionCulling.ts +6 -0
- package/src/threejs-compatibility/performance/RaycastAcceleration.ts +12 -0
- package/src/threejs-compatibility/performance/RendererProfiler.ts +19 -0
- package/src/threejs-compatibility/performance/TextureStreaming.ts +4 -0
- package/src/threejs-compatibility/performance/index.ts +12 -0
- package/src/threejs-compatibility/postprocess/BloomPass.ts +16 -0
- package/src/threejs-compatibility/postprocess/ColorGradingPass.ts +16 -0
- package/src/threejs-compatibility/postprocess/DepthOfFieldPass.ts +21 -0
- package/src/threejs-compatibility/postprocess/EffectComposer.ts +14 -0
- package/src/threejs-compatibility/postprocess/FXAAPass.ts +15 -0
- package/src/threejs-compatibility/postprocess/MotionBlurPass.ts +20 -0
- package/src/threejs-compatibility/postprocess/OutlinePass.ts +21 -0
- package/src/threejs-compatibility/postprocess/PostProcessTypes.ts +169 -0
- package/src/threejs-compatibility/postprocess/RenderPass.ts +9 -0
- package/src/threejs-compatibility/postprocess/SMAAPass.ts +15 -0
- package/src/threejs-compatibility/postprocess/SSAOPass.ts +21 -0
- package/src/threejs-compatibility/postprocess/ShaderPass.ts +7 -0
- package/src/threejs-compatibility/postprocess/TAAPass.ts +15 -0
- package/src/threejs-compatibility/postprocess/VignettePass.ts +16 -0
- package/src/threejs-compatibility/postprocess/index.ts +15 -0
- package/src/threejs-compatibility/shaders/NodeMaterial.ts +21 -0
- package/src/threejs-compatibility/shaders/RawShaderMaterial.ts +6 -0
- package/src/threejs-compatibility/shaders/ShaderDiagnostics.ts +17 -0
- package/src/threejs-compatibility/shaders/ShaderMaterial.ts +18 -0
- package/src/threejs-compatibility/shaders/ThreeCompatShaderChunks.ts +6 -0
- package/src/threejs-compatibility/shaders/Uniforms.ts +18 -0
- package/src/threejs-compatibility/shaders/index.ts +9 -0
- package/src/threejs-compatibility/vfx/GPUPointCloud.ts +7 -0
- package/src/threejs-compatibility/vfx/LineRenderer.ts +13 -0
- package/src/threejs-compatibility/vfx/ParticleSystem.ts +23 -0
- package/src/threejs-compatibility/vfx/SpriteSystem.ts +14 -0
- package/src/threejs-compatibility/vfx/TrailRenderer.ts +8 -0
- package/src/threejs-compatibility/vfx/VFXDiagnostics.ts +23 -0
- package/src/threejs-compatibility/vfx/index.ts +9 -0
- package/src/threejs-example-parity/index.ts +205 -0
- package/src/webgpu/WebGPUBuffer.ts +1 -0
- package/src/webgpu/WebGPUCompute.ts +2 -0
- package/src/webgpu/WebGPUPipelineCache.ts +15 -0
- package/src/webgpu/WebGPUPostProcess.ts +2 -0
- package/src/webgpu/WebGPUTexture.ts +2 -0
- package/tsconfig.json +26 -0
- package/vitest.config.ts +20 -0
|
@@ -0,0 +1,836 @@
|
|
|
1
|
+
import { type VertexFormat } from "./VertexFormat";
|
|
2
|
+
import { type TextureBinding } from "./TextureBinding";
|
|
3
|
+
import { Texture, type TextureFormat } from "./Texture";
|
|
4
|
+
import { reflectShaderSources, type ShaderReflection } from "./ShaderReflection";
|
|
5
|
+
import type { RendererPostprocessPlanDiagnostics } from "./RendererPostprocessPlan";
|
|
6
|
+
|
|
7
|
+
export type { ShaderAttributeReflection, ShaderReflection, ShaderUniformReflection } from "./ShaderReflection";
|
|
8
|
+
|
|
9
|
+
export type RenderBackendKind = "mock" | "webgl2" | "webgpu";
|
|
10
|
+
|
|
11
|
+
export type BufferUsage = "vertex" | "index" | "uniform" | "readback";
|
|
12
|
+
|
|
13
|
+
export type IndexType = "uint16" | "uint32";
|
|
14
|
+
|
|
15
|
+
export type PrimitiveTopology = "triangles" | "lines" | "points";
|
|
16
|
+
|
|
17
|
+
export interface DisposableResource {
|
|
18
|
+
readonly disposed: boolean;
|
|
19
|
+
dispose(): void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface RenderBuffer extends DisposableResource {
|
|
23
|
+
readonly id: number;
|
|
24
|
+
readonly usage: BufferUsage;
|
|
25
|
+
readonly byteLength: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface ShaderSources {
|
|
29
|
+
readonly label: string;
|
|
30
|
+
readonly vertex: string;
|
|
31
|
+
readonly fragment: string;
|
|
32
|
+
readonly marker: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface RenderShaderProgram extends DisposableResource {
|
|
36
|
+
readonly id: number;
|
|
37
|
+
readonly label: string;
|
|
38
|
+
readonly marker: string;
|
|
39
|
+
readonly reflection: ShaderReflection;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface RenderTargetDescriptor {
|
|
43
|
+
readonly width: number;
|
|
44
|
+
readonly height: number;
|
|
45
|
+
readonly label?: string;
|
|
46
|
+
readonly format?: Extract<TextureFormat, "rgba8" | "rgba16f" | "rgba32f">;
|
|
47
|
+
readonly depth?: boolean | "renderbuffer" | "texture";
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface RenderTarget extends DisposableResource {
|
|
51
|
+
readonly id: number;
|
|
52
|
+
readonly width: number;
|
|
53
|
+
readonly height: number;
|
|
54
|
+
readonly label: string;
|
|
55
|
+
readonly colorTexture: Texture;
|
|
56
|
+
readonly depthTexture?: Texture;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type LdrPostprocessPassName = "tone-mapping" | "color-grade" | "fxaa";
|
|
60
|
+
|
|
61
|
+
export interface LdrPostprocessPassDescriptor {
|
|
62
|
+
readonly name: LdrPostprocessPassName;
|
|
63
|
+
readonly options: Readonly<Record<string, unknown>>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface LdrPostprocessPresentationOptions {
|
|
67
|
+
readonly passes: readonly LdrPostprocessPassDescriptor[];
|
|
68
|
+
readonly outputTarget?: RenderTarget;
|
|
69
|
+
readonly toneMappingDefaults?: Readonly<Record<string, unknown>>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface DrawCommand {
|
|
73
|
+
readonly label?: string;
|
|
74
|
+
readonly topology: PrimitiveTopology;
|
|
75
|
+
readonly renderState?: RenderCommandState;
|
|
76
|
+
readonly vertexBuffer: RenderBuffer;
|
|
77
|
+
readonly vertexFormat?: VertexFormat;
|
|
78
|
+
readonly vertexCount: number;
|
|
79
|
+
readonly firstVertex?: number;
|
|
80
|
+
readonly instanceCount?: number;
|
|
81
|
+
readonly instanceAttributes?: readonly InstanceVertexAttribute[];
|
|
82
|
+
readonly indexBuffer?: RenderBuffer;
|
|
83
|
+
readonly indexType?: IndexType;
|
|
84
|
+
readonly indexCount?: number;
|
|
85
|
+
readonly firstIndex?: number;
|
|
86
|
+
readonly shader?: RenderShaderProgram;
|
|
87
|
+
readonly uniforms?: ReadonlyMap<string, UniformValue>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface InstanceVertexAttribute {
|
|
91
|
+
readonly buffer: RenderBuffer;
|
|
92
|
+
readonly shaderName: string;
|
|
93
|
+
readonly components: 1 | 2 | 3 | 4;
|
|
94
|
+
readonly offset: number;
|
|
95
|
+
readonly stride: number;
|
|
96
|
+
readonly normalized?: boolean;
|
|
97
|
+
readonly divisor?: number;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export type UniformValue = number | readonly number[] | Float32Array | Int32Array | Uint32Array | TextureBinding;
|
|
101
|
+
|
|
102
|
+
export interface RenderCommandState {
|
|
103
|
+
readonly depthTest: boolean;
|
|
104
|
+
readonly depthWrite: boolean;
|
|
105
|
+
readonly cullMode: "none" | "back" | "front";
|
|
106
|
+
readonly blend: boolean;
|
|
107
|
+
readonly depthCompare: "always" | "less-equal";
|
|
108
|
+
readonly colorWrite?: readonly [boolean, boolean, boolean, boolean];
|
|
109
|
+
readonly scissor?: {
|
|
110
|
+
readonly x: number;
|
|
111
|
+
readonly y: number;
|
|
112
|
+
readonly width: number;
|
|
113
|
+
readonly height: number;
|
|
114
|
+
} | null;
|
|
115
|
+
readonly polygonOffset?: {
|
|
116
|
+
readonly factor: number;
|
|
117
|
+
readonly units: number;
|
|
118
|
+
} | null;
|
|
119
|
+
readonly stencil?: {
|
|
120
|
+
readonly compare?: "never" | "less" | "less-equal" | "greater" | "greater-equal" | "equal" | "not-equal" | "always";
|
|
121
|
+
readonly reference?: number;
|
|
122
|
+
readonly readMask?: number;
|
|
123
|
+
readonly writeMask?: number;
|
|
124
|
+
readonly fail?: "keep" | "zero" | "replace" | "increment" | "decrement" | "invert" | "increment-wrap" | "decrement-wrap";
|
|
125
|
+
readonly depthFail?: "keep" | "zero" | "replace" | "increment" | "decrement" | "invert" | "increment-wrap" | "decrement-wrap";
|
|
126
|
+
readonly depthPass?: "keep" | "zero" | "replace" | "increment" | "decrement" | "invert" | "increment-wrap" | "decrement-wrap";
|
|
127
|
+
} | null;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type RenderDeviceCapability =
|
|
131
|
+
| "buffers"
|
|
132
|
+
| "buffer-readback"
|
|
133
|
+
| "shader-validation"
|
|
134
|
+
| "render-targets"
|
|
135
|
+
| "pixel-readback"
|
|
136
|
+
| "postprocess-presentation"
|
|
137
|
+
| "draw-validation"
|
|
138
|
+
| "rasterization"
|
|
139
|
+
| "native-render-pipeline"
|
|
140
|
+
| "native-sampled-textures"
|
|
141
|
+
| "native-texture-readback"
|
|
142
|
+
| "canvas-surface"
|
|
143
|
+
| "hdr-render-targets"
|
|
144
|
+
| "float-readback"
|
|
145
|
+
| "depth-render-targets"
|
|
146
|
+
| "depth-textures"
|
|
147
|
+
| "contact-shadows"
|
|
148
|
+
| "spot-shadow-maps"
|
|
149
|
+
| "point-shadow-maps"
|
|
150
|
+
| "hdr-image-based-lighting"
|
|
151
|
+
| "anisotropic-texture-filtering"
|
|
152
|
+
| "production-pbr-parity"
|
|
153
|
+
| "gpu-timing"
|
|
154
|
+
| "webgpu-compute";
|
|
155
|
+
|
|
156
|
+
export interface RenderDeviceInfo {
|
|
157
|
+
readonly backend: RenderBackendKind;
|
|
158
|
+
readonly vendor: string;
|
|
159
|
+
readonly renderer: string;
|
|
160
|
+
readonly capabilities?: readonly RenderDeviceCapability[];
|
|
161
|
+
readonly limitations?: readonly string[];
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export interface RenderDeviceDiagnostics {
|
|
165
|
+
readonly drawCalls: number;
|
|
166
|
+
readonly buffers: number;
|
|
167
|
+
readonly shaders: number;
|
|
168
|
+
readonly renderTargets?: number;
|
|
169
|
+
readonly textures?: number;
|
|
170
|
+
readonly bufferBytes?: number;
|
|
171
|
+
readonly textureBytes?: number;
|
|
172
|
+
readonly approximateGpuMemoryBytes?: number;
|
|
173
|
+
readonly disposedBuffers?: number;
|
|
174
|
+
readonly disposedShaders?: number;
|
|
175
|
+
readonly disposedRenderTargets?: number;
|
|
176
|
+
readonly disposedTextures?: number;
|
|
177
|
+
readonly compressedTextures?: number;
|
|
178
|
+
readonly compressedTextureBytes?: number;
|
|
179
|
+
readonly textureFallbacks?: number;
|
|
180
|
+
readonly textureFallbackBytes?: number;
|
|
181
|
+
readonly nativeSubmissions?: number;
|
|
182
|
+
readonly nativeTextureBindings?: number;
|
|
183
|
+
readonly nativeGeneratedBasicSubmissions?: number;
|
|
184
|
+
readonly nativeGeneratedTextureSubmissions?: number;
|
|
185
|
+
readonly nativePassthroughSubmissions?: number;
|
|
186
|
+
readonly nativePbrSubmissions?: number;
|
|
187
|
+
readonly nativeInstancedSubmissions?: number;
|
|
188
|
+
readonly nativeSkinnedSubmissions?: number;
|
|
189
|
+
readonly nativeMorphSubmissions?: number;
|
|
190
|
+
readonly nativeEnvironmentBindings?: number;
|
|
191
|
+
readonly nativeShadowMapBindings?: number;
|
|
192
|
+
readonly samplerAnisotropyUploads?: number;
|
|
193
|
+
readonly maxTextureAnisotropy?: number;
|
|
194
|
+
readonly stateCacheIssued?: number;
|
|
195
|
+
readonly stateCacheSkipped?: number;
|
|
196
|
+
readonly stateCacheProgramSwitches?: number;
|
|
197
|
+
readonly stateCacheTextureBinds?: number;
|
|
198
|
+
readonly stateCacheBufferBinds?: number;
|
|
199
|
+
readonly stateCacheVertexArrayBinds?: number;
|
|
200
|
+
readonly stateCacheSamplerBinds?: number;
|
|
201
|
+
readonly submittedObjects?: number;
|
|
202
|
+
readonly visibleObjects?: number;
|
|
203
|
+
readonly culledObjects?: number;
|
|
204
|
+
readonly frustumTestedObjects?: number;
|
|
205
|
+
readonly postprocessPasses?: number;
|
|
206
|
+
readonly postprocessPassNames?: readonly string[];
|
|
207
|
+
readonly postprocessTargetFormat?: "rgba8" | "rgba16f" | "rgba32f";
|
|
208
|
+
readonly postprocessRenderTargets?: number;
|
|
209
|
+
readonly postprocessTextures?: number;
|
|
210
|
+
readonly postprocessTargetWidth?: number;
|
|
211
|
+
readonly postprocessTargetHeight?: number;
|
|
212
|
+
readonly postprocessPlan?: RendererPostprocessPlanDiagnostics;
|
|
213
|
+
readonly lastError: string | null;
|
|
214
|
+
readonly contextLost: boolean;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface RenderDevice {
|
|
218
|
+
readonly kind: RenderBackendKind;
|
|
219
|
+
readonly info: RenderDeviceInfo;
|
|
220
|
+
readonly disposed: boolean;
|
|
221
|
+
readonly contextLost: boolean;
|
|
222
|
+
|
|
223
|
+
createBuffer(usage: BufferUsage, byteLength: number, initialData?: ArrayBufferView): RenderBuffer;
|
|
224
|
+
updateBuffer(buffer: RenderBuffer, byteOffset: number, data: ArrayBufferView): void;
|
|
225
|
+
readBuffer(buffer: RenderBuffer, byteOffset?: number, byteLength?: number): Uint8Array;
|
|
226
|
+
createShaderProgram(sources: ShaderSources): RenderShaderProgram;
|
|
227
|
+
createRenderTarget(descriptor: RenderTargetDescriptor): RenderTarget;
|
|
228
|
+
setRenderTarget(target: RenderTarget | null): void;
|
|
229
|
+
writeRenderTargetPixels?(target: RenderTarget, pixels: Uint8Array): void;
|
|
230
|
+
presentRenderTarget?(source: RenderTarget): void;
|
|
231
|
+
presentLdrPostprocess?(source: RenderTarget, options: LdrPostprocessPresentationOptions): void;
|
|
232
|
+
readPixels(x: number, y: number, width: number, height: number): Uint8Array;
|
|
233
|
+
readPixelsAsync?(x: number, y: number, width: number, height: number): Promise<Uint8Array>;
|
|
234
|
+
readFloatPixels(x: number, y: number, width: number, height: number): Float32Array;
|
|
235
|
+
readFloatPixelsAsync?(x: number, y: number, width: number, height: number): Promise<Float32Array>;
|
|
236
|
+
readDepthPixels?(x: number, y: number, width: number, height: number): Float32Array;
|
|
237
|
+
beginFrame(width: number, height: number): void;
|
|
238
|
+
clear(color: readonly [number, number, number, number]): void;
|
|
239
|
+
clearRenderTarget?(color: readonly [number, number, number, number]): void;
|
|
240
|
+
draw(command: DrawCommand): void;
|
|
241
|
+
endFrame(): void;
|
|
242
|
+
captureState(): ReadonlyMap<string, string | number | boolean | null>;
|
|
243
|
+
getDiagnostics(): RenderDeviceDiagnostics;
|
|
244
|
+
dispose(): void;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export class RenderDeviceError extends Error {
|
|
248
|
+
constructor(
|
|
249
|
+
message: string,
|
|
250
|
+
public readonly code: string,
|
|
251
|
+
public readonly details: Readonly<Record<string, unknown>> = {}
|
|
252
|
+
) {
|
|
253
|
+
super(message);
|
|
254
|
+
this.name = "RenderDeviceError";
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export class MockRenderBuffer implements RenderBuffer {
|
|
259
|
+
public disposed = false;
|
|
260
|
+
public readonly bytes: Uint8Array;
|
|
261
|
+
|
|
262
|
+
constructor(
|
|
263
|
+
public readonly id: number,
|
|
264
|
+
public readonly usage: BufferUsage,
|
|
265
|
+
public readonly byteLength: number,
|
|
266
|
+
initialData?: ArrayBufferView
|
|
267
|
+
) {
|
|
268
|
+
this.bytes = new Uint8Array(byteLength);
|
|
269
|
+
if (initialData) {
|
|
270
|
+
if (initialData.byteLength > byteLength) {
|
|
271
|
+
throw new RenderDeviceError("Initial data exceeds buffer size", "BUFFER_OVERFLOW", {
|
|
272
|
+
byteLength,
|
|
273
|
+
dataByteLength: initialData.byteLength
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
this.bytes.set(viewBytes(initialData), 0);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
dispose(): void {
|
|
281
|
+
this.disposed = true;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export class MockShaderProgram implements RenderShaderProgram {
|
|
286
|
+
public disposed = false;
|
|
287
|
+
|
|
288
|
+
constructor(
|
|
289
|
+
public readonly id: number,
|
|
290
|
+
public readonly label: string,
|
|
291
|
+
public readonly marker: string,
|
|
292
|
+
public readonly reflection: ShaderReflection
|
|
293
|
+
) {}
|
|
294
|
+
|
|
295
|
+
dispose(): void {
|
|
296
|
+
this.disposed = true;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export class MockRenderTarget implements RenderTarget {
|
|
301
|
+
public disposed = false;
|
|
302
|
+
public readonly colorPixels: Uint8Array;
|
|
303
|
+
public readonly colorFloatPixels: Float32Array | null;
|
|
304
|
+
public readonly depthPixels: Float32Array | null;
|
|
305
|
+
|
|
306
|
+
constructor(
|
|
307
|
+
public readonly id: number,
|
|
308
|
+
public readonly width: number,
|
|
309
|
+
public readonly height: number,
|
|
310
|
+
public readonly label: string,
|
|
311
|
+
public readonly colorTexture: Texture,
|
|
312
|
+
public readonly depthTexture?: Texture
|
|
313
|
+
) {
|
|
314
|
+
this.colorPixels = new Uint8Array(width * height * 4);
|
|
315
|
+
this.colorFloatPixels = colorTexture.format === "rgba16f" || colorTexture.format === "rgba32f"
|
|
316
|
+
? new Float32Array(width * height * 4)
|
|
317
|
+
: null;
|
|
318
|
+
this.depthPixels = depthTexture ? new Float32Array(width * height).fill(1) : null;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
dispose(): void {
|
|
322
|
+
this.disposed = true;
|
|
323
|
+
this.colorTexture.dispose();
|
|
324
|
+
this.depthTexture?.dispose();
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export class MockRenderDevice implements RenderDevice {
|
|
329
|
+
public readonly kind = "mock";
|
|
330
|
+
public readonly info: RenderDeviceInfo = {
|
|
331
|
+
backend: "mock",
|
|
332
|
+
vendor: "aura3d",
|
|
333
|
+
renderer: "mock-render-device",
|
|
334
|
+
capabilities: ["buffers", "buffer-readback", "shader-validation", "render-targets", "pixel-readback", "postprocess-presentation", "draw-validation", "spot-shadow-maps", "depth-render-targets", "depth-textures"],
|
|
335
|
+
limitations: ["Mock render device validates commands and readback contracts but does not rasterize geometry."]
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
public disposed = false;
|
|
339
|
+
public contextLost = false;
|
|
340
|
+
public readonly drawCommands: DrawCommand[] = [];
|
|
341
|
+
private nextId = 1;
|
|
342
|
+
private buffers = new Set<MockRenderBuffer>();
|
|
343
|
+
private shaders = new Set<MockShaderProgram>();
|
|
344
|
+
private renderTargets = new Set<MockRenderTarget>();
|
|
345
|
+
private activeRenderTarget: MockRenderTarget | null = null;
|
|
346
|
+
private backbufferPixels: Uint8Array | null = null;
|
|
347
|
+
private backbufferWidth = 0;
|
|
348
|
+
private backbufferHeight = 0;
|
|
349
|
+
private lastError: string | null = null;
|
|
350
|
+
private frameActive = false;
|
|
351
|
+
private viewportWidth = 0;
|
|
352
|
+
private viewportHeight = 0;
|
|
353
|
+
private clearColor: readonly [number, number, number, number] = [0, 0, 0, 1];
|
|
354
|
+
|
|
355
|
+
createBuffer(usage: BufferUsage, byteLength: number, initialData?: ArrayBufferView): RenderBuffer {
|
|
356
|
+
this.assertAlive();
|
|
357
|
+
if (byteLength <= 0 || !Number.isInteger(byteLength)) {
|
|
358
|
+
throw new RenderDeviceError("Buffer byteLength must be a positive integer", "INVALID_BUFFER_SIZE", { byteLength });
|
|
359
|
+
}
|
|
360
|
+
const buffer = new MockRenderBuffer(this.nextId++, usage, byteLength, initialData);
|
|
361
|
+
this.buffers.add(buffer);
|
|
362
|
+
return buffer;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
updateBuffer(buffer: RenderBuffer, byteOffset: number, data: ArrayBufferView): void {
|
|
366
|
+
this.assertAlive();
|
|
367
|
+
const mockBuffer = this.requireMockBuffer(buffer);
|
|
368
|
+
if (mockBuffer.disposed) {
|
|
369
|
+
throw new RenderDeviceError("Cannot update a disposed buffer", "DISPOSED_RESOURCE", { bufferId: buffer.id });
|
|
370
|
+
}
|
|
371
|
+
if (byteOffset < 0 || byteOffset + data.byteLength > mockBuffer.byteLength) {
|
|
372
|
+
throw new RenderDeviceError("Buffer update range is out of bounds", "BUFFER_RANGE_OUT_OF_BOUNDS", {
|
|
373
|
+
byteOffset,
|
|
374
|
+
dataByteLength: data.byteLength,
|
|
375
|
+
byteLength: mockBuffer.byteLength
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
mockBuffer.bytes.set(viewBytes(data), byteOffset);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
readBuffer(buffer: RenderBuffer, byteOffset = 0, byteLength = buffer.byteLength - byteOffset): Uint8Array {
|
|
382
|
+
this.assertAlive();
|
|
383
|
+
const mockBuffer = this.requireMockBuffer(buffer);
|
|
384
|
+
if (mockBuffer.disposed) {
|
|
385
|
+
throw new RenderDeviceError("Cannot read a disposed buffer", "DISPOSED_RESOURCE", { bufferId: buffer.id });
|
|
386
|
+
}
|
|
387
|
+
if (byteOffset < 0 || byteLength < 0 || byteOffset + byteLength > mockBuffer.byteLength) {
|
|
388
|
+
throw new RenderDeviceError("Buffer read range is out of bounds", "BUFFER_RANGE_OUT_OF_BOUNDS", {
|
|
389
|
+
byteOffset,
|
|
390
|
+
byteLength,
|
|
391
|
+
bufferByteLength: mockBuffer.byteLength
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
return mockBuffer.bytes.slice(byteOffset, byteOffset + byteLength);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
createShaderProgram(sources: ShaderSources): RenderShaderProgram {
|
|
398
|
+
this.assertAlive();
|
|
399
|
+
if (!sources.vertex.includes(sources.marker) || !sources.fragment.includes(sources.marker)) {
|
|
400
|
+
throw new RenderDeviceError("Shader source marker is missing from compiled sources", "SHADER_MARKER_MISSING", {
|
|
401
|
+
label: sources.label,
|
|
402
|
+
marker: sources.marker
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
const program = new MockShaderProgram(this.nextId++, sources.label, sources.marker, reflectShaderSources(sources));
|
|
406
|
+
this.shaders.add(program);
|
|
407
|
+
return program;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
createRenderTarget(descriptor: RenderTargetDescriptor): RenderTarget {
|
|
411
|
+
this.assertAlive();
|
|
412
|
+
if (
|
|
413
|
+
!Number.isInteger(descriptor.width) ||
|
|
414
|
+
descriptor.width <= 0 ||
|
|
415
|
+
!Number.isInteger(descriptor.height) ||
|
|
416
|
+
descriptor.height <= 0
|
|
417
|
+
) {
|
|
418
|
+
throw new RenderDeviceError("Render target dimensions must be positive integers", "INVALID_RENDER_TARGET_SIZE", {
|
|
419
|
+
width: descriptor.width,
|
|
420
|
+
height: descriptor.height,
|
|
421
|
+
label: descriptor.label
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
const target = new MockRenderTarget(
|
|
425
|
+
this.nextId++,
|
|
426
|
+
descriptor.width,
|
|
427
|
+
descriptor.height,
|
|
428
|
+
descriptor.label ?? "render-target",
|
|
429
|
+
new Texture({ width: descriptor.width, height: descriptor.height, format: descriptor.format ?? "rgba8", label: descriptor.label ?? "render-target-color" }),
|
|
430
|
+
descriptor.depth === "texture"
|
|
431
|
+
? new Texture({ width: descriptor.width, height: descriptor.height, format: "depth24", label: `${descriptor.label ?? "render-target"}-depth` })
|
|
432
|
+
: undefined
|
|
433
|
+
);
|
|
434
|
+
this.renderTargets.add(target);
|
|
435
|
+
return target;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
setRenderTarget(target: RenderTarget | null): void {
|
|
439
|
+
this.assertAlive();
|
|
440
|
+
if (target === null) {
|
|
441
|
+
this.activeRenderTarget = null;
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
if (!(target instanceof MockRenderTarget) || !this.renderTargets.has(target) || target.disposed) {
|
|
445
|
+
throw new RenderDeviceError("Render target is not a live resource owned by this device", "INVALID_RESOURCE", {
|
|
446
|
+
targetId: target.id
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
this.activeRenderTarget = target;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
writeRenderTargetPixels(target: RenderTarget, pixels: Uint8Array): void {
|
|
453
|
+
this.assertAlive();
|
|
454
|
+
const mockTarget = this.requireMockRenderTarget(target);
|
|
455
|
+
if (pixels.length !== mockTarget.width * mockTarget.height * 4) {
|
|
456
|
+
throw new RenderDeviceError("Render-target pixel upload must contain width * height * 4 bytes", "INVALID_PIXEL_UPLOAD_SIZE", {
|
|
457
|
+
targetId: target.id,
|
|
458
|
+
byteLength: pixels.length,
|
|
459
|
+
expectedByteLength: mockTarget.width * mockTarget.height * 4
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
mockTarget.colorPixels.set(pixels);
|
|
463
|
+
if (mockTarget.colorFloatPixels) {
|
|
464
|
+
for (let index = 0; index < pixels.length; index += 4) {
|
|
465
|
+
mockTarget.colorFloatPixels[index] = (pixels[index] ?? 0) / 255;
|
|
466
|
+
mockTarget.colorFloatPixels[index + 1] = (pixels[index + 1] ?? 0) / 255;
|
|
467
|
+
mockTarget.colorFloatPixels[index + 2] = (pixels[index + 2] ?? 0) / 255;
|
|
468
|
+
mockTarget.colorFloatPixels[index + 3] = (pixels[index + 3] ?? 0) / 255;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
presentRenderTarget(source: RenderTarget): void {
|
|
474
|
+
this.assertAlive();
|
|
475
|
+
const mockSource = this.requireMockRenderTarget(source);
|
|
476
|
+
this.backbufferPixels = new Uint8Array(mockSource.colorPixels);
|
|
477
|
+
this.backbufferWidth = mockSource.width;
|
|
478
|
+
this.backbufferHeight = mockSource.height;
|
|
479
|
+
this.activeRenderTarget = null;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
readPixels(x: number, y: number, width: number, height: number): Uint8Array {
|
|
483
|
+
this.assertAlive();
|
|
484
|
+
if (![x, y, width, height].every(Number.isInteger) || x < 0 || y < 0 || width <= 0 || height <= 0) {
|
|
485
|
+
throw new RenderDeviceError("Readback rectangle must be positive and in bounds", "INVALID_READBACK_RECT", { x, y, width, height });
|
|
486
|
+
}
|
|
487
|
+
const output = new Uint8Array(width * height * 4);
|
|
488
|
+
const target = this.activeRenderTarget;
|
|
489
|
+
if (!target) {
|
|
490
|
+
if (this.backbufferPixels) {
|
|
491
|
+
if (x + width > this.backbufferWidth || y + height > this.backbufferHeight) {
|
|
492
|
+
throw new RenderDeviceError("Readback rectangle exceeds backbuffer bounds", "READBACK_OUT_OF_BOUNDS", {
|
|
493
|
+
x,
|
|
494
|
+
y,
|
|
495
|
+
width,
|
|
496
|
+
height,
|
|
497
|
+
boundsWidth: this.backbufferWidth,
|
|
498
|
+
boundsHeight: this.backbufferHeight
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
for (let row = 0; row < height; row += 1) {
|
|
502
|
+
const sourceOffset = ((y + row) * this.backbufferWidth + x) * 4;
|
|
503
|
+
const destOffset = row * width * 4;
|
|
504
|
+
output.set(this.backbufferPixels.subarray(sourceOffset, sourceOffset + width * 4), destOffset);
|
|
505
|
+
}
|
|
506
|
+
return output;
|
|
507
|
+
}
|
|
508
|
+
const bytes = rgbaBytes(this.clearColor);
|
|
509
|
+
for (let i = 0; i < output.length; i += 4) output.set(bytes, i);
|
|
510
|
+
return output;
|
|
511
|
+
}
|
|
512
|
+
if (x + width > target.width || y + height > target.height) {
|
|
513
|
+
throw new RenderDeviceError("Readback rectangle exceeds render target bounds", "READBACK_OUT_OF_BOUNDS", { x, y, width, height });
|
|
514
|
+
}
|
|
515
|
+
for (let row = 0; row < height; row += 1) {
|
|
516
|
+
const sourceOffset = ((y + row) * target.width + x) * 4;
|
|
517
|
+
const destOffset = row * width * 4;
|
|
518
|
+
output.set(target.colorPixels.subarray(sourceOffset, sourceOffset + width * 4), destOffset);
|
|
519
|
+
}
|
|
520
|
+
return output;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
readFloatPixels(x: number, y: number, width: number, height: number): Float32Array {
|
|
524
|
+
this.assertAlive();
|
|
525
|
+
if (![x, y, width, height].every(Number.isInteger) || x < 0 || y < 0 || width <= 0 || height <= 0) {
|
|
526
|
+
throw new RenderDeviceError("Float readback rectangle must be positive and in bounds", "INVALID_READBACK_RECT", { x, y, width, height });
|
|
527
|
+
}
|
|
528
|
+
const output = new Float32Array(width * height * 4);
|
|
529
|
+
const target = this.activeRenderTarget;
|
|
530
|
+
if (!target) {
|
|
531
|
+
if (this.backbufferPixels) {
|
|
532
|
+
if (x + width > this.backbufferWidth || y + height > this.backbufferHeight) {
|
|
533
|
+
throw new RenderDeviceError("Float readback rectangle exceeds backbuffer bounds", "READBACK_OUT_OF_BOUNDS", {
|
|
534
|
+
x,
|
|
535
|
+
y,
|
|
536
|
+
width,
|
|
537
|
+
height,
|
|
538
|
+
boundsWidth: this.backbufferWidth,
|
|
539
|
+
boundsHeight: this.backbufferHeight
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
for (let row = 0; row < height; row += 1) {
|
|
543
|
+
const sourceOffset = ((y + row) * this.backbufferWidth + x) * 4;
|
|
544
|
+
const destOffset = row * width * 4;
|
|
545
|
+
for (let column = 0; column < width * 4; column += 1) {
|
|
546
|
+
output[destOffset + column] = (this.backbufferPixels[sourceOffset + column] ?? 0) / 255;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
return output;
|
|
550
|
+
}
|
|
551
|
+
for (let index = 0; index < output.length; index += 4) {
|
|
552
|
+
output[index] = this.clearColor[0];
|
|
553
|
+
output[index + 1] = this.clearColor[1];
|
|
554
|
+
output[index + 2] = this.clearColor[2];
|
|
555
|
+
output[index + 3] = this.clearColor[3];
|
|
556
|
+
}
|
|
557
|
+
return output;
|
|
558
|
+
}
|
|
559
|
+
if (x + width > target.width || y + height > target.height) {
|
|
560
|
+
throw new RenderDeviceError("Float readback rectangle exceeds render target bounds", "READBACK_OUT_OF_BOUNDS", { x, y, width, height });
|
|
561
|
+
}
|
|
562
|
+
if (target.colorFloatPixels) {
|
|
563
|
+
for (let row = 0; row < height; row += 1) {
|
|
564
|
+
const sourceOffset = ((y + row) * target.width + x) * 4;
|
|
565
|
+
const destOffset = row * width * 4;
|
|
566
|
+
output.set(target.colorFloatPixels.subarray(sourceOffset, sourceOffset + width * 4), destOffset);
|
|
567
|
+
}
|
|
568
|
+
return output;
|
|
569
|
+
}
|
|
570
|
+
const bytes = this.readPixels(x, y, width, height);
|
|
571
|
+
for (let index = 0; index < bytes.length; index += 1) output[index] = bytes[index]! / 255;
|
|
572
|
+
return output;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
readDepthPixels(x: number, y: number, width: number, height: number): Float32Array {
|
|
576
|
+
this.assertAlive();
|
|
577
|
+
if (![x, y, width, height].every(Number.isInteger) || x < 0 || y < 0 || width <= 0 || height <= 0) {
|
|
578
|
+
throw new RenderDeviceError("Depth readback rectangle must be positive and in bounds", "INVALID_READBACK_RECT", { x, y, width, height });
|
|
579
|
+
}
|
|
580
|
+
const target = this.activeRenderTarget;
|
|
581
|
+
if (!target || !target.depthPixels) {
|
|
582
|
+
throw new RenderDeviceError("Depth readback requires an active render target with a sampleable depth texture.", "DEPTH_READBACK_UNAVAILABLE");
|
|
583
|
+
}
|
|
584
|
+
if (x + width > target.width || y + height > target.height) {
|
|
585
|
+
throw new RenderDeviceError("Depth readback rectangle exceeds render target bounds", "READBACK_OUT_OF_BOUNDS", { x, y, width, height });
|
|
586
|
+
}
|
|
587
|
+
const output = new Float32Array(width * height);
|
|
588
|
+
for (let row = 0; row < height; row += 1) {
|
|
589
|
+
const sourceOffset = (y + row) * target.width + x;
|
|
590
|
+
const destOffset = row * width;
|
|
591
|
+
output.set(target.depthPixels.subarray(sourceOffset, sourceOffset + width), destOffset);
|
|
592
|
+
}
|
|
593
|
+
return output;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
beginFrame(width: number, height: number): void {
|
|
597
|
+
this.assertAlive();
|
|
598
|
+
if (this.frameActive) {
|
|
599
|
+
throw new RenderDeviceError("Frame is already active", "FRAME_ALREADY_ACTIVE");
|
|
600
|
+
}
|
|
601
|
+
if (width <= 0 || height <= 0) {
|
|
602
|
+
throw new RenderDeviceError("Frame dimensions must be positive", "INVALID_FRAME_SIZE", { width, height });
|
|
603
|
+
}
|
|
604
|
+
this.frameActive = true;
|
|
605
|
+
this.viewportWidth = width;
|
|
606
|
+
this.viewportHeight = height;
|
|
607
|
+
this.drawCommands.length = 0;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
clear(color: readonly [number, number, number, number]): void {
|
|
611
|
+
this.assertAlive();
|
|
612
|
+
this.assertFrame();
|
|
613
|
+
this.clearColor = color;
|
|
614
|
+
if (this.activeRenderTarget) {
|
|
615
|
+
const bytes = rgbaBytes(color);
|
|
616
|
+
for (let i = 0; i < this.activeRenderTarget.colorPixels.length; i += 4) {
|
|
617
|
+
this.activeRenderTarget.colorPixels.set(bytes, i);
|
|
618
|
+
}
|
|
619
|
+
if (this.activeRenderTarget.colorFloatPixels) {
|
|
620
|
+
for (let i = 0; i < this.activeRenderTarget.colorFloatPixels.length; i += 4) {
|
|
621
|
+
this.activeRenderTarget.colorFloatPixels[i] = color[0];
|
|
622
|
+
this.activeRenderTarget.colorFloatPixels[i + 1] = color[1];
|
|
623
|
+
this.activeRenderTarget.colorFloatPixels[i + 2] = color[2];
|
|
624
|
+
this.activeRenderTarget.colorFloatPixels[i + 3] = color[3];
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
this.activeRenderTarget.depthPixels?.fill(1);
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
clearRenderTarget(color: readonly [number, number, number, number]): void {
|
|
632
|
+
this.assertAlive();
|
|
633
|
+
this.assertFrame();
|
|
634
|
+
const previous = this.clearColor;
|
|
635
|
+
this.clear(color);
|
|
636
|
+
this.clearColor = previous;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
draw(command: DrawCommand): void {
|
|
640
|
+
this.assertAlive();
|
|
641
|
+
this.assertFrame();
|
|
642
|
+
if (command.vertexBuffer.disposed) {
|
|
643
|
+
throw new RenderDeviceError("Cannot draw with a disposed vertex buffer", "DISPOSED_RESOURCE", {
|
|
644
|
+
bufferId: command.vertexBuffer.id
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
if (command.indexBuffer?.disposed) {
|
|
648
|
+
throw new RenderDeviceError("Cannot draw with a disposed index buffer", "DISPOSED_RESOURCE", {
|
|
649
|
+
bufferId: command.indexBuffer.id
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
for (const attribute of command.instanceAttributes ?? []) {
|
|
653
|
+
if (attribute.buffer.disposed) {
|
|
654
|
+
throw new RenderDeviceError("Cannot draw with a disposed instance attribute buffer", "DISPOSED_RESOURCE", {
|
|
655
|
+
bufferId: attribute.buffer.id,
|
|
656
|
+
attribute: attribute.shaderName
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
validateInstanceVertexAttribute(attribute);
|
|
660
|
+
}
|
|
661
|
+
if (command.vertexCount <= 0) {
|
|
662
|
+
throw new RenderDeviceError("Draw command must have a positive vertex count", "INVALID_DRAW_COMMAND", {
|
|
663
|
+
vertexCount: command.vertexCount,
|
|
664
|
+
label: command.label
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
if (command.firstVertex !== undefined && (!Number.isInteger(command.firstVertex) || command.firstVertex < 0)) {
|
|
668
|
+
throw new RenderDeviceError("Draw command firstVertex must be a non-negative integer", "INVALID_DRAW_COMMAND", {
|
|
669
|
+
firstVertex: command.firstVertex,
|
|
670
|
+
label: command.label
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
if (command.indexBuffer && (command.indexCount === undefined || command.indexCount <= 0)) {
|
|
674
|
+
throw new RenderDeviceError("Indexed draw command must have a positive index count", "INVALID_DRAW_COMMAND", {
|
|
675
|
+
indexCount: command.indexCount,
|
|
676
|
+
label: command.label
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
if (command.firstIndex !== undefined && (!Number.isInteger(command.firstIndex) || command.firstIndex < 0)) {
|
|
680
|
+
throw new RenderDeviceError("Draw command firstIndex must be a non-negative integer", "INVALID_DRAW_COMMAND", {
|
|
681
|
+
firstIndex: command.firstIndex,
|
|
682
|
+
label: command.label
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
if (command.instanceCount !== undefined && (!Number.isInteger(command.instanceCount) || command.instanceCount <= 0)) {
|
|
686
|
+
throw new RenderDeviceError("Draw command instanceCount must be a positive integer", "INVALID_DRAW_COMMAND", {
|
|
687
|
+
instanceCount: command.instanceCount,
|
|
688
|
+
label: command.label
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
this.drawCommands.push(command);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
endFrame(): void {
|
|
695
|
+
this.assertAlive();
|
|
696
|
+
this.assertFrame();
|
|
697
|
+
this.frameActive = false;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
captureState(): ReadonlyMap<string, string | number | boolean | null> {
|
|
701
|
+
return new Map<string, string | number | boolean | null>([
|
|
702
|
+
["backend", this.kind],
|
|
703
|
+
["disposed", this.disposed],
|
|
704
|
+
["contextLost", this.contextLost],
|
|
705
|
+
["frameActive", this.frameActive],
|
|
706
|
+
["viewportWidth", this.viewportWidth],
|
|
707
|
+
["viewportHeight", this.viewportHeight],
|
|
708
|
+
["clearR", this.clearColor[0]],
|
|
709
|
+
["clearG", this.clearColor[1]],
|
|
710
|
+
["clearB", this.clearColor[2]],
|
|
711
|
+
["clearA", this.clearColor[3]],
|
|
712
|
+
["drawCalls", this.drawCommands.length]
|
|
713
|
+
]);
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
getDiagnostics(): RenderDeviceDiagnostics {
|
|
717
|
+
const liveRenderTargets = [...this.renderTargets].filter((target) => !target.disposed);
|
|
718
|
+
const liveTextures = liveRenderTargets.flatMap((target) => target.depthTexture ? [target.colorTexture, target.depthTexture] : [target.colorTexture]);
|
|
719
|
+
const bufferBytes = [...this.buffers].filter((buffer) => !buffer.disposed).reduce((total, buffer) => total + buffer.byteLength, 0);
|
|
720
|
+
const textureBytes = liveTextures.reduce((total, texture) => total + texture.byteLength, 0);
|
|
721
|
+
return {
|
|
722
|
+
drawCalls: this.drawCommands.length,
|
|
723
|
+
buffers: [...this.buffers].filter((buffer) => !buffer.disposed).length,
|
|
724
|
+
shaders: [...this.shaders].filter((shader) => !shader.disposed).length,
|
|
725
|
+
renderTargets: liveRenderTargets.length,
|
|
726
|
+
textures: liveTextures.length,
|
|
727
|
+
bufferBytes,
|
|
728
|
+
textureBytes,
|
|
729
|
+
approximateGpuMemoryBytes: bufferBytes + textureBytes,
|
|
730
|
+
compressedTextures: liveTextures.filter((texture) => texture.format !== "rgba8" && texture.format !== "depth24").length,
|
|
731
|
+
compressedTextureBytes: liveTextures
|
|
732
|
+
.filter((texture) => texture.format !== "rgba8" && texture.format !== "depth24")
|
|
733
|
+
.reduce((total, texture) => total + texture.byteLength, 0),
|
|
734
|
+
textureFallbacks: 0,
|
|
735
|
+
textureFallbackBytes: 0,
|
|
736
|
+
disposedBuffers: [...this.buffers].filter((buffer) => buffer.disposed).length,
|
|
737
|
+
disposedShaders: [...this.shaders].filter((shader) => shader.disposed).length,
|
|
738
|
+
disposedRenderTargets: [...this.renderTargets].filter((target) => target.disposed).length,
|
|
739
|
+
disposedTextures: [...this.renderTargets].reduce((total, target) => total + (target.colorTexture.disposed ? 1 : 0) + (target.depthTexture?.disposed ? 1 : 0), 0),
|
|
740
|
+
lastError: this.lastError,
|
|
741
|
+
contextLost: this.contextLost
|
|
742
|
+
};
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
dispose(): void {
|
|
746
|
+
for (const buffer of this.buffers) {
|
|
747
|
+
buffer.dispose();
|
|
748
|
+
}
|
|
749
|
+
for (const shader of this.shaders) {
|
|
750
|
+
shader.dispose();
|
|
751
|
+
}
|
|
752
|
+
for (const target of this.renderTargets) {
|
|
753
|
+
target.dispose();
|
|
754
|
+
}
|
|
755
|
+
this.frameActive = false;
|
|
756
|
+
this.disposed = true;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
private assertAlive(): void {
|
|
760
|
+
if (this.disposed) {
|
|
761
|
+
throw new RenderDeviceError("Render device is disposed", "DISPOSED_DEVICE");
|
|
762
|
+
}
|
|
763
|
+
if (this.contextLost) {
|
|
764
|
+
throw new RenderDeviceError("Render context is lost", "CONTEXT_LOST");
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
private assertFrame(): void {
|
|
769
|
+
if (!this.frameActive) {
|
|
770
|
+
throw new RenderDeviceError("No active frame", "NO_ACTIVE_FRAME");
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
private requireMockBuffer(buffer: RenderBuffer): MockRenderBuffer {
|
|
775
|
+
if (!(buffer instanceof MockRenderBuffer) || !this.buffers.has(buffer)) {
|
|
776
|
+
throw new RenderDeviceError("Buffer was not created by this device", "FOREIGN_RESOURCE", { bufferId: buffer.id });
|
|
777
|
+
}
|
|
778
|
+
return buffer;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
private requireMockRenderTarget(target: RenderTarget): MockRenderTarget {
|
|
782
|
+
if (!(target instanceof MockRenderTarget) || !this.renderTargets.has(target) || target.disposed) {
|
|
783
|
+
throw new RenderDeviceError("Render target is not a live resource owned by this device", "INVALID_RESOURCE", {
|
|
784
|
+
targetId: target.id
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
return target;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
function validateInstanceVertexAttribute(attribute: InstanceVertexAttribute): void {
|
|
792
|
+
if (!attribute.shaderName || typeof attribute.shaderName !== "string") {
|
|
793
|
+
throw new RenderDeviceError("Instance vertex attribute shaderName must be a non-empty string", "INVALID_DRAW_COMMAND");
|
|
794
|
+
}
|
|
795
|
+
if (![1, 2, 3, 4].includes(attribute.components)) {
|
|
796
|
+
throw new RenderDeviceError("Instance vertex attribute components must be 1, 2, 3, or 4", "INVALID_DRAW_COMMAND", {
|
|
797
|
+
attribute: attribute.shaderName,
|
|
798
|
+
components: attribute.components
|
|
799
|
+
});
|
|
800
|
+
}
|
|
801
|
+
if (!Number.isInteger(attribute.offset) || attribute.offset < 0 || attribute.offset % 4 !== 0) {
|
|
802
|
+
throw new RenderDeviceError("Instance vertex attribute offset must be non-negative and 4-byte aligned", "INVALID_DRAW_COMMAND", {
|
|
803
|
+
attribute: attribute.shaderName,
|
|
804
|
+
offset: attribute.offset
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
if (!Number.isInteger(attribute.stride) || attribute.stride <= 0 || attribute.stride % 4 !== 0) {
|
|
808
|
+
throw new RenderDeviceError("Instance vertex attribute stride must be positive and 4-byte aligned", "INVALID_DRAW_COMMAND", {
|
|
809
|
+
attribute: attribute.shaderName,
|
|
810
|
+
stride: attribute.stride
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
if (attribute.offset + attribute.components * 4 > attribute.stride) {
|
|
814
|
+
throw new RenderDeviceError("Instance vertex attribute range must fit inside its stride", "INVALID_DRAW_COMMAND", {
|
|
815
|
+
attribute: attribute.shaderName,
|
|
816
|
+
offset: attribute.offset,
|
|
817
|
+
components: attribute.components,
|
|
818
|
+
stride: attribute.stride
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
const divisor = attribute.divisor ?? 1;
|
|
822
|
+
if (!Number.isInteger(divisor) || divisor <= 0) {
|
|
823
|
+
throw new RenderDeviceError("Instance vertex attribute divisor must be a positive integer", "INVALID_DRAW_COMMAND", {
|
|
824
|
+
attribute: attribute.shaderName,
|
|
825
|
+
divisor
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
export function viewBytes(view: ArrayBufferView): Uint8Array {
|
|
831
|
+
return new Uint8Array(view.buffer, view.byteOffset, view.byteLength);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
function rgbaBytes(color: readonly [number, number, number, number]): Uint8Array {
|
|
835
|
+
return new Uint8Array(color.map((channel) => Math.round(Math.max(0, Math.min(1, channel)) * 255)));
|
|
836
|
+
}
|