@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,254 @@
|
|
|
1
|
+
import { createParticle } from "./Particle.js";
|
|
2
|
+
function seededRandom(seed) {
|
|
3
|
+
let state = seed >>> 0;
|
|
4
|
+
return () => {
|
|
5
|
+
state += 0x6d2b79f5;
|
|
6
|
+
let mixed = state;
|
|
7
|
+
mixed = Math.imul(mixed ^ (mixed >>> 15), mixed | 1);
|
|
8
|
+
mixed ^= mixed + Math.imul(mixed ^ (mixed >>> 7), mixed | 61);
|
|
9
|
+
return ((mixed ^ (mixed >>> 14)) >>> 0) / 4294967296;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function validateRange(name, value) {
|
|
13
|
+
if (typeof value === "number") {
|
|
14
|
+
if (!Number.isFinite(value) || value < 0) {
|
|
15
|
+
throw new RangeError(`${name} must be a finite non-negative number.`);
|
|
16
|
+
}
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (!Number.isFinite(value.min) || !Number.isFinite(value.max) || value.min < 0 || value.max < value.min) {
|
|
20
|
+
throw new RangeError(`${name} range must be finite and ordered.`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function sampleRange(value, random) {
|
|
24
|
+
return typeof value === "number" ? value : value.min + (value.max - value.min) * random();
|
|
25
|
+
}
|
|
26
|
+
function vector(value = {}) {
|
|
27
|
+
return { x: value.x ?? 0, y: value.y ?? 0, z: value.z ?? 0 };
|
|
28
|
+
}
|
|
29
|
+
function randomUnitVector(random) {
|
|
30
|
+
const z = random() * 2 - 1;
|
|
31
|
+
const angle = random() * Math.PI * 2;
|
|
32
|
+
const radius = Math.sqrt(Math.max(0, 1 - z * z));
|
|
33
|
+
return {
|
|
34
|
+
x: Math.cos(angle) * radius,
|
|
35
|
+
y: Math.sin(angle) * radius,
|
|
36
|
+
z,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function sampleShape(shape, random) {
|
|
40
|
+
if (shape.type === "point") {
|
|
41
|
+
return { position: vector(shape.position) };
|
|
42
|
+
}
|
|
43
|
+
if (shape.type === "box") {
|
|
44
|
+
const center = vector(shape.center);
|
|
45
|
+
return {
|
|
46
|
+
position: {
|
|
47
|
+
x: center.x + (random() - 0.5) * (shape.size.x ?? 0),
|
|
48
|
+
y: center.y + (random() - 0.5) * (shape.size.y ?? 0),
|
|
49
|
+
z: center.z + (random() - 0.5) * (shape.size.z ?? 0),
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
if (shape.type === "circle") {
|
|
54
|
+
const center = vector(shape.center);
|
|
55
|
+
const arc = shape.arc ?? Math.PI * 2;
|
|
56
|
+
const angle = random() * arc;
|
|
57
|
+
const radius = shape.radius * (shape.filled ? Math.sqrt(random()) : 1);
|
|
58
|
+
return {
|
|
59
|
+
position: {
|
|
60
|
+
x: center.x + Math.cos(angle) * radius,
|
|
61
|
+
y: center.y,
|
|
62
|
+
z: center.z + Math.sin(angle) * radius,
|
|
63
|
+
},
|
|
64
|
+
direction: { x: Math.cos(angle), y: 0, z: Math.sin(angle) }
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
if (shape.type === "cone") {
|
|
68
|
+
const origin = vector(shape.origin);
|
|
69
|
+
const axial = shape.length * (shape.emitFromVolume ? random() : 1);
|
|
70
|
+
const radiusAtAxial = shape.radius * (shape.emitFromVolume ? axial / shape.length : 1);
|
|
71
|
+
const angle = random() * Math.PI * 2;
|
|
72
|
+
const radial = radiusAtAxial * (shape.emitFromVolume ? Math.sqrt(random()) : 1);
|
|
73
|
+
const direction = sampleConeDirection(shape, random);
|
|
74
|
+
return {
|
|
75
|
+
position: {
|
|
76
|
+
x: origin.x + Math.cos(angle) * radial,
|
|
77
|
+
y: origin.y + axial,
|
|
78
|
+
z: origin.z + Math.sin(angle) * radial,
|
|
79
|
+
},
|
|
80
|
+
direction
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
const center = vector(shape.center);
|
|
84
|
+
const direction = randomUnitVector(random);
|
|
85
|
+
const radius = shape.radius * (shape.shell ? 1 : Math.cbrt(random()));
|
|
86
|
+
return {
|
|
87
|
+
position: {
|
|
88
|
+
x: center.x + direction.x * radius,
|
|
89
|
+
y: center.y + direction.y * radius,
|
|
90
|
+
z: center.z + direction.z * radius,
|
|
91
|
+
},
|
|
92
|
+
direction
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function sampleConeDirection(shape, random) {
|
|
96
|
+
const maxAngle = shape.angle ?? Math.atan2(shape.radius, shape.length);
|
|
97
|
+
const theta = random() * Math.PI * 2;
|
|
98
|
+
const spread = Math.tan(maxAngle) * Math.sqrt(random());
|
|
99
|
+
return normalize({
|
|
100
|
+
x: Math.cos(theta) * spread,
|
|
101
|
+
y: 1,
|
|
102
|
+
z: Math.sin(theta) * spread
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function normalize(value) {
|
|
106
|
+
const length = Math.hypot(value.x, value.y, value.z) || 1;
|
|
107
|
+
return { x: value.x / length, y: value.y / length, z: value.z / length };
|
|
108
|
+
}
|
|
109
|
+
function validateShape(shape) {
|
|
110
|
+
if (shape.type === "sphere" && (!Number.isFinite(shape.radius) || shape.radius < 0)) {
|
|
111
|
+
throw new RangeError("Particle sphere radius must be a finite non-negative number.");
|
|
112
|
+
}
|
|
113
|
+
if (shape.type === "circle") {
|
|
114
|
+
if (!Number.isFinite(shape.radius) || shape.radius < 0)
|
|
115
|
+
throw new RangeError("Particle circle radius must be a finite non-negative number.");
|
|
116
|
+
if (shape.arc !== undefined && (!Number.isFinite(shape.arc) || shape.arc <= 0 || shape.arc > Math.PI * 2)) {
|
|
117
|
+
throw new RangeError("Particle circle arc must be in the range (0, 2pi].");
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (shape.type === "cone") {
|
|
121
|
+
if (!Number.isFinite(shape.radius) || shape.radius < 0)
|
|
122
|
+
throw new RangeError("Particle cone radius must be a finite non-negative number.");
|
|
123
|
+
if (!Number.isFinite(shape.length) || shape.length <= 0)
|
|
124
|
+
throw new RangeError("Particle cone length must be a finite positive number.");
|
|
125
|
+
if (shape.angle !== undefined && (!Number.isFinite(shape.angle) || shape.angle <= 0 || shape.angle >= Math.PI / 2)) {
|
|
126
|
+
throw new RangeError("Particle cone angle must be in the range (0, pi/2).");
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
export class ParticleEmitter {
|
|
131
|
+
random;
|
|
132
|
+
maxParticles;
|
|
133
|
+
bursts;
|
|
134
|
+
emissionRate;
|
|
135
|
+
duration;
|
|
136
|
+
looping;
|
|
137
|
+
lifetime;
|
|
138
|
+
speed;
|
|
139
|
+
shape;
|
|
140
|
+
initial;
|
|
141
|
+
elapsedTime = 0;
|
|
142
|
+
paused = false;
|
|
143
|
+
emissionCarry = 0;
|
|
144
|
+
nextParticleId = 1;
|
|
145
|
+
burstExecutions;
|
|
146
|
+
constructor(options = {}) {
|
|
147
|
+
this.random = seededRandom(options.seed ?? 1);
|
|
148
|
+
this.emissionRate = options.emissionRate ?? 10;
|
|
149
|
+
this.maxParticles = options.maxParticles ?? Number.POSITIVE_INFINITY;
|
|
150
|
+
this.duration = options.duration ?? Number.POSITIVE_INFINITY;
|
|
151
|
+
this.looping = options.looping ?? false;
|
|
152
|
+
this.lifetime = options.lifetime ?? 1;
|
|
153
|
+
this.speed = options.speed ?? 0;
|
|
154
|
+
this.shape = options.shape ?? { type: "point" };
|
|
155
|
+
this.bursts = options.bursts ?? [];
|
|
156
|
+
this.initial = options.initial ?? {};
|
|
157
|
+
this.burstExecutions = this.bursts.map(() => 0);
|
|
158
|
+
validateShape(this.shape);
|
|
159
|
+
if (!Number.isFinite(this.emissionRate) || this.emissionRate < 0) {
|
|
160
|
+
throw new RangeError("Particle emissionRate must be a finite non-negative number.");
|
|
161
|
+
}
|
|
162
|
+
if (!Number.isFinite(this.duration) && this.duration !== Number.POSITIVE_INFINITY) {
|
|
163
|
+
throw new RangeError("Particle duration must be finite or positive infinity.");
|
|
164
|
+
}
|
|
165
|
+
if (this.duration <= 0) {
|
|
166
|
+
throw new RangeError("Particle duration must be greater than zero.");
|
|
167
|
+
}
|
|
168
|
+
validateRange("Particle lifetime", this.lifetime);
|
|
169
|
+
validateRange("Particle speed", this.speed);
|
|
170
|
+
}
|
|
171
|
+
reset() {
|
|
172
|
+
this.elapsedTime = 0;
|
|
173
|
+
this.emissionCarry = 0;
|
|
174
|
+
this.nextParticleId = 1;
|
|
175
|
+
this.burstExecutions = this.bursts.map(() => 0);
|
|
176
|
+
this.paused = false;
|
|
177
|
+
}
|
|
178
|
+
emit(deltaTime, capacity = Number.POSITIVE_INFINITY) {
|
|
179
|
+
if (!Number.isFinite(deltaTime) || deltaTime < 0) {
|
|
180
|
+
throw new RangeError("ParticleEmitter.emit deltaTime must be a finite non-negative number.");
|
|
181
|
+
}
|
|
182
|
+
if (this.paused || capacity <= 0) {
|
|
183
|
+
return { particles: [], requested: 0, emitted: 0 };
|
|
184
|
+
}
|
|
185
|
+
const previousTime = this.elapsedTime;
|
|
186
|
+
this.elapsedTime = this.advanceTime(deltaTime);
|
|
187
|
+
const requested = this.countContinuous(deltaTime, previousTime) + this.countBursts(previousTime, this.elapsedTime);
|
|
188
|
+
const capped = Math.max(0, Math.min(requested, capacity, this.maxParticles));
|
|
189
|
+
const particles = [];
|
|
190
|
+
for (let index = 0; index < capped; index += 1) {
|
|
191
|
+
particles.push(this.createParticle());
|
|
192
|
+
}
|
|
193
|
+
return { particles, requested, emitted: particles.length };
|
|
194
|
+
}
|
|
195
|
+
createParticle() {
|
|
196
|
+
const emitted = sampleShape(this.shape, this.random);
|
|
197
|
+
const position = emitted.position;
|
|
198
|
+
const direction = emitted.direction ?? randomUnitVector(this.random);
|
|
199
|
+
const speed = sampleRange(this.speed, this.random);
|
|
200
|
+
return createParticle({
|
|
201
|
+
...this.initial,
|
|
202
|
+
id: this.nextParticleId++,
|
|
203
|
+
age: 0,
|
|
204
|
+
lifetime: sampleRange(this.lifetime, this.random),
|
|
205
|
+
position,
|
|
206
|
+
velocity: {
|
|
207
|
+
x: direction.x * speed,
|
|
208
|
+
y: direction.y * speed,
|
|
209
|
+
z: direction.z * speed,
|
|
210
|
+
},
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
advanceTime(deltaTime) {
|
|
214
|
+
if (!Number.isFinite(this.duration)) {
|
|
215
|
+
return this.elapsedTime + deltaTime;
|
|
216
|
+
}
|
|
217
|
+
const next = this.elapsedTime + deltaTime;
|
|
218
|
+
return this.looping ? next % this.duration : Math.min(next, this.duration);
|
|
219
|
+
}
|
|
220
|
+
countContinuous(deltaTime, previousTime) {
|
|
221
|
+
if (previousTime >= this.duration && !this.looping) {
|
|
222
|
+
return 0;
|
|
223
|
+
}
|
|
224
|
+
const activeDelta = Number.isFinite(this.duration) && !this.looping ? Math.min(deltaTime, this.duration - previousTime) : deltaTime;
|
|
225
|
+
this.emissionCarry += this.emissionRate * Math.max(0, activeDelta);
|
|
226
|
+
const count = Math.floor(this.emissionCarry);
|
|
227
|
+
this.emissionCarry -= count;
|
|
228
|
+
return count;
|
|
229
|
+
}
|
|
230
|
+
countBursts(previousTime, currentTime) {
|
|
231
|
+
let count = 0;
|
|
232
|
+
for (let index = 0; index < this.bursts.length; index += 1) {
|
|
233
|
+
const burst = this.bursts[index];
|
|
234
|
+
if (burst.count < 0 || burst.time < 0) {
|
|
235
|
+
throw new RangeError("Particle burst time and count must be non-negative.");
|
|
236
|
+
}
|
|
237
|
+
const cycles = burst.cycles ?? 1;
|
|
238
|
+
const interval = burst.interval ?? 0;
|
|
239
|
+
let executions = this.burstExecutions[index] ?? 0;
|
|
240
|
+
while (executions < cycles) {
|
|
241
|
+
const triggerTime = burst.time + interval * executions;
|
|
242
|
+
const crossed = (triggerTime === 0 && previousTime === 0) || (triggerTime > previousTime && triggerTime <= currentTime);
|
|
243
|
+
if (!crossed) {
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
count += burst.count;
|
|
247
|
+
executions += 1;
|
|
248
|
+
}
|
|
249
|
+
this.burstExecutions[index] = executions;
|
|
250
|
+
}
|
|
251
|
+
return count;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
//# sourceMappingURL=ParticleEmitter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParticleEmitter.js","sourceRoot":"","sources":["../../../../../packages/rendering/src/effects/ParticleEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA8D,MAAM,eAAe,CAAC;AAmC3G,SAAS,YAAY,CAAC,IAAY;IAChC,IAAI,KAAK,GAAG,IAAI,KAAK,CAAC,CAAC;IAEvB,OAAO,GAAG,EAAE;QACV,KAAK,IAAI,UAAU,CAAC;QACpB,IAAI,KAAK,GAAG,KAAK,CAAC;QAClB,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;QACrD,KAAK,IAAI,KAAK,GA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AAC,eAAe,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC;QAC3C,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Particle } from "./Particle.js";
|
|
2
|
+
export interface ParticleUpdateContext {
|
|
3
|
+
deltaTime: number;
|
|
4
|
+
elapsedTime: number;
|
|
5
|
+
normalizedAge: number;
|
|
6
|
+
random: () => number;
|
|
7
|
+
}
|
|
8
|
+
export interface ParticleModule {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
onSpawn?(particle: Particle, context: ParticleUpdateContext): void;
|
|
11
|
+
update?(particle: Particle, context: ParticleUpdateContext): void;
|
|
12
|
+
afterIntegrate?(particle: Particle, context: ParticleUpdateContext): void;
|
|
13
|
+
}
|
|
14
|
+
export declare function applyParticleModules(modules: readonly ParticleModule[], hook: "onSpawn" | "update" | "afterIntegrate", particle: Particle, context: ParticleUpdateContext): void;
|
|
15
|
+
//# sourceMappingURL=ParticleModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParticleModule.d.ts","sourceRoot":"","sources":["../../../../../packages/rendering/src/effects/ParticleModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACnE,MAAM,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAClE,cAAc,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAAC;CAC3E;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,gBAAgB,EAC7C,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,qBAAqB,GAC7B,IAAI,CAIN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParticleModule.js","sourceRoot":"","sources":["../../../../../packages/rendering/src/effects/ParticleModule.ts"],"names":[],"mappings":"AAgBA,MAAM,UAAU,oBAAoB,CAClC,OAAkC,EAClC,IAA6C,EAC7C,QAAkB,EAClB,OAA8B;IAE9B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACpC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BaseRenderPass, type RenderPassContext } from "../RenderPass.js";
|
|
2
|
+
import { type GPUParticleBackend } from "./GPUParticleBackend.js";
|
|
3
|
+
import { ParticleRenderer, type ParticleDrawTarget, type ParticleRenderBatch, type ParticleRenderOptions } from "./ParticleRenderer.js";
|
|
4
|
+
import { type ParticleSystem } from "./ParticleSystem.js";
|
|
5
|
+
export type ParticleRenderPassUpdateMode = "none" | "cpu" | "gpu";
|
|
6
|
+
export interface ParticleRenderPassUpdateOptions {
|
|
7
|
+
readonly deltaTime: number;
|
|
8
|
+
readonly gpuBackend?: GPUParticleBackend;
|
|
9
|
+
readonly preferGPU?: boolean;
|
|
10
|
+
readonly allowCPUFallback?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface ParticleRenderPassOptions {
|
|
13
|
+
readonly system: ParticleSystem;
|
|
14
|
+
readonly target: ParticleDrawTarget;
|
|
15
|
+
readonly renderer?: ParticleRenderer;
|
|
16
|
+
readonly renderOptions?: ParticleRenderOptions;
|
|
17
|
+
readonly update?: ParticleRenderPassUpdateOptions;
|
|
18
|
+
readonly reads?: readonly string[];
|
|
19
|
+
readonly writes?: readonly string[];
|
|
20
|
+
}
|
|
21
|
+
export declare class ParticleRenderPass extends BaseRenderPass {
|
|
22
|
+
private readonly options;
|
|
23
|
+
readonly renderer: ParticleRenderer;
|
|
24
|
+
private lastBatch;
|
|
25
|
+
private lastUpdateMode;
|
|
26
|
+
constructor(options: ParticleRenderPassOptions);
|
|
27
|
+
execute(_context: RenderPassContext): void;
|
|
28
|
+
executeAsync(_context: RenderPassContext): Promise<void>;
|
|
29
|
+
getLastBatch(): ParticleRenderBatch | null;
|
|
30
|
+
getLastUpdateMode(): ParticleRenderPassUpdateMode;
|
|
31
|
+
private requiresAsyncUpdate;
|
|
32
|
+
private updateSync;
|
|
33
|
+
private updateAsync;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=ParticleRenderPass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParticleRenderPass.d.ts","sourceRoot":"","sources":["../../../../../packages/rendering/src/effects/ParticleRenderPass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACxI,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,MAAM,4BAA4B,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;AAElE,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IACzC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IACrC,QAAQ,CAAC,aAAa,CAAC,EAAE,qBAAqB,CAAC;IAC/C,QAAQ,CAAC,MAAM,CAAC,EAAE,+BAA+B,CAAC;IAClD,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,qBAAa,kBAAmB,SAAQ,cAAc;IAKxC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAJpC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,OAAO,CAAC,SAAS,CAAoC;IACrD,OAAO,CAAC,cAAc,CAAwC;gBAEjC,OAAO,EAAE,yBAAyB;IAK/D,OAAO,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI;IAQpC,YAAY,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9D,YAAY,IAAI,mBAAmB,GAAG,IAAI;IAmB1C,iBAAiB,IAAI,4BAA4B;IAIjD,OAAO,CAAC,mBAAmB;IAK3B,OAAO,CAAC,UAAU;YAcJ,WAAW;CAqB1B"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { BaseRenderPass } from "../RenderPass.js";
|
|
2
|
+
import {} from "./GPUParticleBackend.js";
|
|
3
|
+
import { ParticleRenderer } from "./ParticleRenderer.js";
|
|
4
|
+
import {} from "./ParticleSystem.js";
|
|
5
|
+
export class ParticleRenderPass extends BaseRenderPass {
|
|
6
|
+
options;
|
|
7
|
+
renderer;
|
|
8
|
+
lastBatch = null;
|
|
9
|
+
lastUpdateMode = "none";
|
|
10
|
+
constructor(options) {
|
|
11
|
+
super("particles", options.reads ?? ["color"], options.writes ?? ["color"], ["color"]);
|
|
12
|
+
this.options = options;
|
|
13
|
+
this.renderer = options.renderer ?? new ParticleRenderer();
|
|
14
|
+
}
|
|
15
|
+
execute(_context) {
|
|
16
|
+
if (this.requiresAsyncUpdate()) {
|
|
17
|
+
throw new Error("ParticleRenderPass with a supported GPU update backend must run through RenderGraph.executeAsync().");
|
|
18
|
+
}
|
|
19
|
+
this.updateSync();
|
|
20
|
+
this.lastBatch = this.renderer.render(this.options.system, this.options.target, this.options.renderOptions);
|
|
21
|
+
}
|
|
22
|
+
async executeAsync(_context) {
|
|
23
|
+
await this.updateAsync();
|
|
24
|
+
this.lastBatch = this.renderer.render(this.options.system, this.options.target, this.options.renderOptions);
|
|
25
|
+
}
|
|
26
|
+
getLastBatch() {
|
|
27
|
+
if (!this.lastBatch) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
sprites: this.lastBatch.sprites.map((sprite) => ({
|
|
32
|
+
...sprite,
|
|
33
|
+
position: { ...sprite.position },
|
|
34
|
+
color: { ...sprite.color }
|
|
35
|
+
})),
|
|
36
|
+
liveCount: this.lastBatch.liveCount,
|
|
37
|
+
uploadedBytes: this.lastBatch.uploadedBytes,
|
|
38
|
+
bounds: this.lastBatch.bounds ? {
|
|
39
|
+
min: { ...this.lastBatch.bounds.min },
|
|
40
|
+
max: { ...this.lastBatch.bounds.max }
|
|
41
|
+
} : null
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
getLastUpdateMode() {
|
|
45
|
+
return this.lastUpdateMode;
|
|
46
|
+
}
|
|
47
|
+
requiresAsyncUpdate() {
|
|
48
|
+
const update = this.options.update;
|
|
49
|
+
return Boolean(update?.gpuBackend?.capabilities.supported && (update.preferGPU ?? true));
|
|
50
|
+
}
|
|
51
|
+
updateSync() {
|
|
52
|
+
const update = this.options.update;
|
|
53
|
+
if (!update) {
|
|
54
|
+
this.lastUpdateMode = "none";
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
validateDeltaTime(update.deltaTime);
|
|
58
|
+
if (update.gpuBackend && update.preferGPU !== false && !update.gpuBackend.capabilities.supported && update.allowCPUFallback === false) {
|
|
59
|
+
throw new Error(update.gpuBackend.capabilities.reason ?? "GPU particle backend is unsupported.");
|
|
60
|
+
}
|
|
61
|
+
this.options.system.update(update.deltaTime);
|
|
62
|
+
this.lastUpdateMode = "cpu";
|
|
63
|
+
}
|
|
64
|
+
async updateAsync() {
|
|
65
|
+
const update = this.options.update;
|
|
66
|
+
if (!update) {
|
|
67
|
+
this.lastUpdateMode = "none";
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
validateDeltaTime(update.deltaTime);
|
|
71
|
+
const backend = update.gpuBackend;
|
|
72
|
+
if (backend && (update.preferGPU ?? true)) {
|
|
73
|
+
if (backend.capabilities.supported) {
|
|
74
|
+
await this.options.system.updateOnGPU(update.deltaTime, backend);
|
|
75
|
+
this.lastUpdateMode = "gpu";
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (update.allowCPUFallback === false) {
|
|
79
|
+
throw new Error(backend.capabilities.reason ?? "GPU particle backend is unsupported.");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
this.options.system.update(update.deltaTime);
|
|
83
|
+
this.lastUpdateMode = "cpu";
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function validateDeltaTime(deltaTime) {
|
|
87
|
+
if (!Number.isFinite(deltaTime) || deltaTime < 0) {
|
|
88
|
+
throw new RangeError("ParticleRenderPass update deltaTime must be a finite non-negative number.");
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=ParticleRenderPass.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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AAC,YAAY,CAAC,MAAM,IAAI,sCAAsC,CAAC,CAAC;YACzF,CAAC;QACH,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC7C,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;IAC9B,CAAC;CACF;AAED,SAAS,iBAAiB,CAAC,SAAiB;IAC1C,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;QACjD,MAAM,IAAI,UAAU,CAAC,2EAA2E,CAAC,CAAC;IACpG,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ColorLike, Particle, Vector3Like } from "./Particle.js";
|
|
2
|
+
import type { ParticleSystem } from "./ParticleSystem.js";
|
|
3
|
+
export interface ParticleSprite {
|
|
4
|
+
id: number;
|
|
5
|
+
position: Vector3Like;
|
|
6
|
+
color: ColorLike;
|
|
7
|
+
size: number;
|
|
8
|
+
rotation: number;
|
|
9
|
+
}
|
|
10
|
+
export interface ParticleBatchBounds {
|
|
11
|
+
min: Vector3Like;
|
|
12
|
+
max: Vector3Like;
|
|
13
|
+
}
|
|
14
|
+
export interface ParticleRenderBatch {
|
|
15
|
+
sprites: ParticleSprite[];
|
|
16
|
+
liveCount: number;
|
|
17
|
+
uploadedBytes: number;
|
|
18
|
+
bounds: ParticleBatchBounds | null;
|
|
19
|
+
}
|
|
20
|
+
export interface ParticleDrawTarget {
|
|
21
|
+
drawParticles(batch: ParticleRenderBatch): void;
|
|
22
|
+
}
|
|
23
|
+
export type ParticleSortMode = "none" | "front-to-back" | "back-to-front";
|
|
24
|
+
export interface ParticleRenderOptions {
|
|
25
|
+
readonly sort?: ParticleSortMode;
|
|
26
|
+
readonly cameraPosition?: Vector3Like;
|
|
27
|
+
}
|
|
28
|
+
export declare class ParticleRenderer {
|
|
29
|
+
private lastBatch;
|
|
30
|
+
buildBatch(particles: readonly Particle[], options?: ParticleRenderOptions): ParticleRenderBatch;
|
|
31
|
+
render(system: ParticleSystem, target: ParticleDrawTarget, options?: ParticleRenderOptions): ParticleRenderBatch;
|
|
32
|
+
getLastBatch(): ParticleRenderBatch;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=ParticleRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParticleRenderer.d.ts","sourceRoot":"","sources":["../../../../../packages/rendering/src/effects/ParticleRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,WAAW,CAAC;IACtB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,WAAW,CAAC;IACjB,GAAG,EAAE,WAAW,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAAC;CACjD;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,eAAe,GAAG,eAAe,CAAC;AAE1E,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,cAAc,CAAC,EAAE,WAAW,CAAC;CACvC;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,SAAS,CAKf;IAEF,UAAU,CAAC,SAAS,EAAE,SAAS,QAAQ,EAAE,EAAE,OAAO,GAAE,qBAA0B,GAAG,mBAAmB;IAsBpG,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,GAAE,qBAA0B,GAAG,mBAAmB;IAOpH,YAAY,IAAI,mBAAmB;CAepC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export class ParticleRenderer {
|
|
2
|
+
lastBatch = {
|
|
3
|
+
sprites: [],
|
|
4
|
+
liveCount: 0,
|
|
5
|
+
uploadedBytes: 0,
|
|
6
|
+
bounds: null,
|
|
7
|
+
};
|
|
8
|
+
buildBatch(particles, options = {}) {
|
|
9
|
+
const sprites = particles
|
|
10
|
+
.filter((particle) => particle.alive)
|
|
11
|
+
.map((particle) => ({
|
|
12
|
+
id: particle.id,
|
|
13
|
+
position: { ...particle.position },
|
|
14
|
+
color: { ...particle.color },
|
|
15
|
+
size: particle.size,
|
|
16
|
+
rotation: particle.rotation,
|
|
17
|
+
}));
|
|
18
|
+
sortSprites(sprites, options);
|
|
19
|
+
this.lastBatch = {
|
|
20
|
+
sprites,
|
|
21
|
+
liveCount: sprites.length,
|
|
22
|
+
uploadedBytes: sprites.length * (3 + 4 + 1 + 1) * Float32Array.BYTES_PER_ELEMENT,
|
|
23
|
+
bounds: computeBounds(sprites),
|
|
24
|
+
};
|
|
25
|
+
return this.lastBatch;
|
|
26
|
+
}
|
|
27
|
+
render(system, target, options = {}) {
|
|
28
|
+
const batch = this.buildBatch(system.particles, options);
|
|
29
|
+
target.drawParticles(batch);
|
|
30
|
+
system.recordBufferUpload(batch.uploadedBytes);
|
|
31
|
+
return batch;
|
|
32
|
+
}
|
|
33
|
+
getLastBatch() {
|
|
34
|
+
return {
|
|
35
|
+
sprites: this.lastBatch.sprites.map((sprite) => ({
|
|
36
|
+
...sprite,
|
|
37
|
+
position: { ...sprite.position },
|
|
38
|
+
color: { ...sprite.color },
|
|
39
|
+
})),
|
|
40
|
+
liveCount: this.lastBatch.liveCount,
|
|
41
|
+
uploadedBytes: this.lastBatch.uploadedBytes,
|
|
42
|
+
bounds: this.lastBatch.bounds ? {
|
|
43
|
+
min: { ...this.lastBatch.bounds.min },
|
|
44
|
+
max: { ...this.lastBatch.bounds.max },
|
|
45
|
+
} : null,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function sortSprites(sprites, options) {
|
|
50
|
+
const mode = options.sort ?? "none";
|
|
51
|
+
if (mode === "none")
|
|
52
|
+
return;
|
|
53
|
+
const camera = options.cameraPosition;
|
|
54
|
+
if (!camera || !isFiniteVector(camera)) {
|
|
55
|
+
throw new RangeError("ParticleRenderer cameraPosition must be finite when depth sorting is enabled.");
|
|
56
|
+
}
|
|
57
|
+
const direction = mode === "back-to-front" ? -1 : 1;
|
|
58
|
+
sprites.sort((a, b) => {
|
|
59
|
+
const distanceDelta = distanceSquared(a.position, camera) - distanceSquared(b.position, camera);
|
|
60
|
+
if (Math.abs(distanceDelta) > 1e-9)
|
|
61
|
+
return distanceDelta * direction;
|
|
62
|
+
return a.id - b.id;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function computeBounds(sprites) {
|
|
66
|
+
if (sprites.length === 0)
|
|
67
|
+
return null;
|
|
68
|
+
const min = { x: Number.POSITIVE_INFINITY, y: Number.POSITIVE_INFINITY, z: Number.POSITIVE_INFINITY };
|
|
69
|
+
const max = { x: Number.NEGATIVE_INFINITY, y: Number.NEGATIVE_INFINITY, z: Number.NEGATIVE_INFINITY };
|
|
70
|
+
for (const sprite of sprites) {
|
|
71
|
+
if (!isFiniteVector(sprite.position) || !Number.isFinite(sprite.size) || sprite.size < 0) {
|
|
72
|
+
throw new RangeError("ParticleRenderer sprites require finite positions and non-negative finite sizes.");
|
|
73
|
+
}
|
|
74
|
+
const radius = sprite.size * 0.5;
|
|
75
|
+
min.x = Math.min(min.x, sprite.position.x - radius);
|
|
76
|
+
min.y = Math.min(min.y, sprite.position.y - radius);
|
|
77
|
+
min.z = Math.min(min.z, sprite.position.z - radius);
|
|
78
|
+
max.x = Math.max(max.x, sprite.position.x + radius);
|
|
79
|
+
max.y = Math.max(max.y, sprite.position.y + radius);
|
|
80
|
+
max.z = Math.max(max.z, sprite.position.z + radius);
|
|
81
|
+
}
|
|
82
|
+
return { min, max };
|
|
83
|
+
}
|
|
84
|
+
function distanceSquared(a, b) {
|
|
85
|
+
const x = a.x - b.x;
|
|
86
|
+
const y = a.y - b.y;
|
|
87
|
+
const z = a.z - b.z;
|
|
88
|
+
return x * x + y * y + z * z;
|
|
89
|
+
}
|
|
90
|
+
function isFiniteVector(value) {
|
|
91
|
+
return Number.isFinite(value.x) && Number.isFinite(value.y) && Number.isFinite(value.z);
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=ParticleRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParticleRenderer.js","sourceRoot":"","sources":["../../../../../packages/rendering/src/effects/ParticleRenderer.ts"],"names":[],"mappings":"AAkCA,MAAM,OAAO,gBAAgB;IACnB,SAAS,GAAwB;QACvC,OAAO,EAAE,EAAE;QACX,SAAS,EAAE,CAAC;QACZ,aAAa,EAAE,CAAC;QAChB,MAAM,EAAE,IAAI;KACb,CAAC;IAEF,UAAU,CAAC,SAA8B,EAAE,UAAiC,EAAE;QAC5E,MAAM,OAAO,GAAG,SAAS;aACtB,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;aACpC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;YAClB,EAAE,EAAE,QAAQ,CAAC,EAAE;YACf,QAAQ,EAAE,EAAE,GAAG,QAAQ,CAAC,QAAQ,EAAE;YAClC,KAAK,EAAE,EAAE,GAAG,QAAQ,CAAC,KAAK,EAAE;YAC5B,IAAI,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,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AACtB,CAAC;AAED,SAAS,eAAe,CAAC,CAAc,EAAE,CAAc;IACrD,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACpB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACpB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,cAAc,CAAC,KAAkB;IACxC,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC1F,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type Particle } from "./Particle.js";
|
|
2
|
+
import { ParticleEmitter } from "./ParticleEmitter.js";
|
|
3
|
+
import type { GPUParticleBackend } from "./GPUParticleBackend.js";
|
|
4
|
+
import { type ParticleModule } from "./ParticleModule.js";
|
|
5
|
+
export interface ParticleSystemStats {
|
|
6
|
+
liveCount: number;
|
|
7
|
+
capacity: number;
|
|
8
|
+
spawnedCount: number;
|
|
9
|
+
killedCount: number;
|
|
10
|
+
droppedCount: number;
|
|
11
|
+
bufferUploads: number;
|
|
12
|
+
uploadedBytes: number;
|
|
13
|
+
gpuSpawns: number;
|
|
14
|
+
gpuUpdates: number;
|
|
15
|
+
}
|
|
16
|
+
export interface ParticleSystemOptions {
|
|
17
|
+
maxParticles?: number;
|
|
18
|
+
emitters?: readonly ParticleEmitter[];
|
|
19
|
+
modules?: readonly ParticleModule[];
|
|
20
|
+
gpuBackend?: GPUParticleBackend;
|
|
21
|
+
preferGPU?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare class ParticleSystem {
|
|
24
|
+
readonly particles: Particle[];
|
|
25
|
+
readonly emitters: ParticleEmitter[];
|
|
26
|
+
readonly modules: ParticleModule[];
|
|
27
|
+
readonly maxParticles: number;
|
|
28
|
+
elapsedTime: number;
|
|
29
|
+
paused: boolean;
|
|
30
|
+
private stats;
|
|
31
|
+
private gpuBackend?;
|
|
32
|
+
private preferGPU;
|
|
33
|
+
constructor(options?: ParticleSystemOptions);
|
|
34
|
+
addEmitter(emitter: ParticleEmitter): this;
|
|
35
|
+
addModule(module: ParticleModule): this;
|
|
36
|
+
setGPUBackend(backend: GPUParticleBackend | undefined, preferGPU?: boolean): this;
|
|
37
|
+
clear(): void;
|
|
38
|
+
dispose(): void;
|
|
39
|
+
update(deltaTime: number): void;
|
|
40
|
+
updateOnGPU(deltaTime: number, backend: GPUParticleBackend): Promise<void>;
|
|
41
|
+
updateBest(deltaTime: number): Promise<"gpu" | "cpu">;
|
|
42
|
+
getStats(): ParticleSystemStats;
|
|
43
|
+
recordBufferUpload(bytes: number): void;
|
|
44
|
+
private spawn;
|
|
45
|
+
private initializeSpawnedOnGPU;
|
|
46
|
+
private integrate;
|
|
47
|
+
private integrateOnGPU;
|
|
48
|
+
private compactDeadParticles;
|
|
49
|
+
private createContext;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=ParticleSystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParticleSystem.d.ts","sourceRoot":"","sources":["../../../../../packages/rendering/src/effects/ParticleSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,QAAQ,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,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