@onerjs/core 8.55.8 → 8.56.1
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/Animations/animation.pure.js +2 -2
- package/Animations/animation.pure.js.map +1 -1
- package/Animations/runtimeAnimation.js +4 -0
- package/Animations/runtimeAnimation.js.map +1 -1
- package/AudioV2/webAudio/webAudioEngine.d.ts +7 -0
- package/AudioV2/webAudio/webAudioEngine.js +6 -5
- package/AudioV2/webAudio/webAudioEngine.js.map +1 -1
- package/Behaviors/Cameras/autoRotationBehavior.js +1 -1
- package/Behaviors/Cameras/autoRotationBehavior.js.map +1 -1
- package/Behaviors/Meshes/followBehavior.js +1 -0
- package/Behaviors/Meshes/followBehavior.js.map +1 -1
- package/Behaviors/Meshes/surfaceMagnetismBehavior.js +1 -0
- package/Behaviors/Meshes/surfaceMagnetismBehavior.js.map +1 -1
- package/Cameras/Inputs/followCameraMouseWheelInput.js +2 -2
- package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/followCameraPointersInput.d.ts +15 -0
- package/Cameras/Inputs/followCameraPointersInput.js +18 -3
- package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
- package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js +1 -1
- package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js.map +1 -1
- package/Cameras/Stereoscopic/stereoscopicUniversalCamera.pure.js +1 -1
- package/Cameras/Stereoscopic/stereoscopicUniversalCamera.pure.js.map +1 -1
- package/Cameras/arcRotateCamera.pure.js +1 -1
- package/Cameras/arcRotateCamera.pure.js.map +1 -1
- package/Collisions/gpuPicker.d.ts +1 -0
- package/Collisions/gpuPicker.js +5 -4
- package/Collisions/gpuPicker.js.map +1 -1
- package/Culling/Helper/boundingInfoHelper.js +9 -5
- package/Culling/Helper/boundingInfoHelper.js.map +1 -1
- package/Culling/boundingSphere.js +7 -4
- package/Culling/boundingSphere.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.textureLoaders.d.ts +5 -1
- package/Engines/AbstractEngine/abstractEngine.textureLoaders.js +7 -3
- package/Engines/AbstractEngine/abstractEngine.textureLoaders.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.textureLoaders.pure.d.ts +6 -0
- package/Engines/AbstractEngine/abstractEngine.textureLoaders.pure.js +16 -0
- package/Engines/AbstractEngine/abstractEngine.textureLoaders.pure.js.map +1 -0
- package/Engines/AbstractEngine/pure.d.ts +1 -0
- package/Engines/AbstractEngine/pure.js +1 -0
- package/Engines/AbstractEngine/pure.js.map +1 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.pure.js +1 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.pure.js.map +1 -1
- package/Engines/IDrawContext.d.ts +2 -0
- package/Engines/IDrawContext.js.map +1 -1
- package/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.js +48 -6
- package/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +1 -1
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/WebGPU/webgpuDrawContext.d.ts +8 -0
- package/Engines/WebGPU/webgpuDrawContext.js +15 -0
- package/Engines/WebGPU/webgpuDrawContext.js.map +1 -1
- package/Engines/abstractEngine.pure.js +2 -2
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/engine.d.ts +21 -4
- package/Engines/thinNativeEngine.pure.d.ts +6 -1
- package/Engines/thinNativeEngine.pure.js +29 -2
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +1 -0
- package/Engines/webgpuEngine.js +1 -0
- package/Engines/webgpuEngine.js.map +1 -1
- package/Engines/webgpuEngine.pure.d.ts +10 -0
- package/Engines/webgpuEngine.pure.js +15 -1
- package/Engines/webgpuEngine.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.d.ts +3 -63
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.js +5 -71
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.pure.d.ts +71 -0
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.pure.js +86 -0
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.pure.js.map +1 -0
- package/FlowGraph/Blocks/Data/pure.d.ts +1 -0
- package/FlowGraph/Blocks/Data/pure.js +1 -0
- package/FlowGraph/Blocks/Data/pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.d.ts +3 -37
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.js +5 -39
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.pure.d.ts +45 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.pure.js +54 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.pure.js.map +1 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.d.ts +3 -17
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.js +5 -22
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.pure.d.ts +25 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.pure.js +37 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.pure.js.map +1 -0
- package/FlowGraph/Blocks/Event/pure.d.ts +2 -0
- package/FlowGraph/Blocks/Event/pure.js +2 -0
- package/FlowGraph/Blocks/Event/pure.js.map +1 -1
- package/FlowGraph/Blocks/flowGraphBlockFactory.d.ts +1 -1
- package/FlowGraph/Blocks/flowGraphBlockFactory.js +198 -172
- package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.js +2 -5
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.js.map +1 -1
- package/FrameGraph/frameGraph.js +10 -1
- package/FrameGraph/frameGraph.js.map +1 -1
- package/Gamepads/gamepadManager.d.ts +1 -0
- package/Gamepads/gamepadManager.js +5 -2
- package/Gamepads/gamepadManager.js.map +1 -1
- package/Gizmos/scaleGizmo.js +1 -0
- package/Gizmos/scaleGizmo.js.map +1 -1
- package/Lights/IES/iesLoader.js +6 -8
- package/Lights/IES/iesLoader.js.map +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.pure.js +4 -6
- package/Lights/Shadows/cascadedShadowGenerator.pure.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.js +2 -2
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Lights/light.js +3 -5
- package/Lights/light.js.map +1 -1
- package/Lights/spotLight.pure.js +1 -1
- package/Lights/spotLight.pure.js.map +1 -1
- package/Materials/Background/backgroundMaterial.pure.d.ts +1 -1
- package/Materials/Background/backgroundMaterial.pure.js +3 -12
- package/Materials/Background/backgroundMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +2 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/TBNBlock.pure.js +1 -1
- package/Materials/Node/Blocks/Fragment/TBNBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.pure.js +2 -0
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js +1 -0
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/powBlock.pure.js +2 -1
- package/Materials/Node/Blocks/powBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/triPlanarBlock.pure.js +14 -12
- package/Materials/Node/Blocks/triPlanarBlock.pure.js.map +1 -1
- package/Materials/Node/nodeMaterial.pure.d.ts +1 -0
- package/Materials/Node/nodeMaterialBuildState.d.ts +3 -3
- package/Materials/PBR/openpbrMaterial.pure.d.ts +2 -1
- package/Materials/PBR/openpbrMaterial.pure.js +3 -12
- package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.d.ts +2 -1
- package/Materials/PBR/pbrBaseMaterial.pure.js +3 -12
- package/Materials/PBR/pbrBaseMaterial.pure.js.map +1 -1
- package/Materials/Textures/index.d.ts +1 -0
- package/Materials/Textures/index.js +1 -0
- package/Materials/Textures/index.js.map +1 -1
- package/Materials/Textures/renderTargetTexture.pure.js +1 -1
- package/Materials/Textures/renderTargetTexture.pure.js.map +1 -1
- package/Materials/drawWrapper.js +3 -0
- package/Materials/drawWrapper.js.map +1 -1
- package/Materials/imageProcessingConfiguration.defines.d.ts +3 -0
- package/Materials/imageProcessingConfiguration.defines.js +2 -0
- package/Materials/imageProcessingConfiguration.defines.js.map +1 -1
- package/Materials/imageProcessingConfiguration.functions.js +3 -0
- package/Materials/imageProcessingConfiguration.functions.js.map +1 -1
- package/Materials/imageProcessingConfiguration.pure.d.ts +58 -0
- package/Materials/imageProcessingConfiguration.pure.js +123 -2
- package/Materials/imageProcessingConfiguration.pure.js.map +1 -1
- package/Materials/material.pure.js +2 -2
- package/Materials/material.pure.js.map +1 -1
- package/Materials/standardMaterial.pure.d.ts +2 -1
- package/Materials/standardMaterial.pure.js +4 -13
- package/Materials/standardMaterial.pure.js.map +1 -1
- package/Materials/uniformBuffer.d.ts +29 -0
- package/Materials/uniformBuffer.js +146 -0
- package/Materials/uniformBuffer.js.map +1 -1
- package/Maths/colorTemperature.functions.d.ts +29 -0
- package/Maths/colorTemperature.functions.js +196 -0
- package/Maths/colorTemperature.functions.js.map +1 -0
- package/Maths/index.d.ts +1 -0
- package/Maths/index.js +1 -0
- package/Maths/index.js.map +1 -1
- package/Maths/math.path.js +1 -1
- package/Maths/math.path.js.map +1 -1
- package/Maths/math.polar.js +1 -1
- package/Maths/math.polar.js.map +1 -1
- package/Maths/math.vector.pure.js +4 -3
- package/Maths/math.vector.pure.js.map +1 -1
- package/Maths/pure.d.ts +1 -0
- package/Maths/pure.js +1 -0
- package/Maths/pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +72 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +164 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +2 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +36 -18
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.d.ts +5 -4
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.js +25 -8
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.js.map +1 -1
- package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js +3 -3
- package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js +2 -2
- package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/mappingBlock.pure.js +2 -2
- package/Meshes/Node/Blocks/mappingBlock.pure.js.map +1 -1
- package/Meshes/csg.js +5 -5
- package/Meshes/csg.js.map +1 -1
- package/Meshes/groundMesh.pure.js +1 -1
- package/Meshes/groundMesh.pure.js.map +1 -1
- package/Meshes/mesh.pure.js +2 -2
- package/Meshes/mesh.pure.js.map +1 -1
- package/Misc/deepMerger.js +1 -1
- package/Misc/deepMerger.js.map +1 -1
- package/Misc/dumpTools.pure.js +1 -1
- package/Misc/dumpTools.pure.js.map +1 -1
- package/Misc/index.d.ts +1 -0
- package/Misc/index.js +1 -0
- package/Misc/index.js.map +1 -1
- package/Misc/observable.pure.js +1 -3
- package/Misc/observable.pure.js.map +1 -1
- package/Misc/pure.d.ts +1 -0
- package/Misc/pure.js +1 -0
- package/Misc/pure.js.map +1 -1
- package/Misc/shaderImportLoader.d.ts +25 -0
- package/Misc/shaderImportLoader.js +54 -0
- package/Misc/shaderImportLoader.js.map +1 -0
- package/Misc/tools.pure.js +1 -1
- package/Misc/tools.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleClampBlock.pure.d.ts +0 -1
- package/Particles/Node/Blocks/particleClampBlock.pure.js +1 -6
- package/Particles/Node/Blocks/particleClampBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleMathBlock.pure.js +1 -1
- package/Particles/Node/Blocks/particleMathBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleNLerpBlock.pure.js +8 -3
- package/Particles/Node/Blocks/particleNLerpBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleSmoothStepBlock.pure.js +3 -2
- package/Particles/Node/Blocks/particleSmoothStepBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleStepBlock.pure.js +3 -2
- package/Particles/Node/Blocks/particleStepBlock.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/depthOfFieldEffect.js +1 -1
- package/PostProcesses/depthOfFieldEffect.js.map +1 -1
- package/PostProcesses/imageProcessingPostProcess.d.ts +41 -1
- package/PostProcesses/imageProcessingPostProcess.js +41 -1
- package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js.map +1 -1
- package/PostProcesses/sharpenPostProcess.pure.js +1 -1
- package/PostProcesses/sharpenPostProcess.pure.js.map +1 -1
- package/PostProcesses/thinImageProcessingPostProcess.d.ts +50 -0
- package/PostProcesses/thinImageProcessingPostProcess.js +65 -0
- package/PostProcesses/thinImageProcessingPostProcess.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsMaterialCompatibility.pure.d.ts +12 -0
- package/Rendering/IBLShadows/iblShadowsMaterialCompatibility.pure.js +22 -0
- package/Rendering/IBLShadows/iblShadowsMaterialCompatibility.pure.js.map +1 -0
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.d.ts +1 -0
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.js +39 -0
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.d.ts +12 -0
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js +17 -5
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +14 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +122 -6
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.d.ts +7 -0
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js +17 -0
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js.map +1 -1
- package/Rendering/IBLShadows/pure.d.ts +1 -0
- package/Rendering/IBLShadows/pure.js +1 -0
- package/Rendering/IBLShadows/pure.js.map +1 -1
- package/Rendering/boundingBoxRenderer.pure.js +3 -3
- package/Rendering/boundingBoxRenderer.pure.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObject.d.ts +11 -0
- package/Rendering/fluidRenderer/fluidRenderingObject.js +36 -14
- package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.d.ts +5 -0
- package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js +16 -3
- package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.d.ts +5 -0
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js +12 -0
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js.map +1 -1
- package/Rendering/iblCdfGenerator.js +10 -1
- package/Rendering/iblCdfGenerator.js.map +1 -1
- package/Rendering/outlineRenderer.pure.js +1 -0
- package/Rendering/outlineRenderer.pure.js.map +1 -1
- package/Rendering/subSurfaceConfiguration.js +1 -1
- package/Rendering/subSurfaceConfiguration.js.map +1 -1
- package/Rendering/subSurfaceSceneComponent.pure.d.ts +1 -1
- package/Rendering/subSurfaceSceneComponent.pure.js +1 -1
- package/Rendering/subSurfaceSceneComponent.pure.js.map +1 -1
- package/Rendering/utilityLayerRenderer.js +1 -1
- package/Rendering/utilityLayerRenderer.js.map +1 -1
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js +1 -1
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/helperFunctions.js +2 -2
- package/Shaders/ShadersInclude/helperFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/imageProcessingDeclaration.js +3 -0
- package/Shaders/ShadersInclude/imageProcessingDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/imageProcessingFunctions.js +3 -0
- package/Shaders/ShadersInclude/imageProcessingFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrDirectLighting.js +34 -4
- package/Shaders/ShadersInclude/openpbrDirectLighting.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrIblFunctions.js +8 -2
- package/Shaders/ShadersInclude/openpbrIblFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js +5 -0
- package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/Shaders/fluidRenderingParticleDepth.vertex.js +7 -1
- package/Shaders/fluidRenderingParticleDepth.vertex.js.map +1 -1
- package/Shaders/fluidRenderingParticleDiffuse.vertex.js +7 -1
- package/Shaders/fluidRenderingParticleDiffuse.vertex.js.map +1 -1
- package/Shaders/fluidRenderingParticleThickness.vertex.js +7 -1
- package/Shaders/fluidRenderingParticleThickness.vertex.js.map +1 -1
- package/Shaders/gaussianSplattingVoxel.fragment.js +4 -10
- package/Shaders/gaussianSplattingVoxel.fragment.js.map +1 -1
- package/Shaders/iblCombineVoxelGrids.fragment.js +1 -1
- package/Shaders/iblCombineVoxelGrids.fragment.js.map +1 -1
- package/Shaders/iblShadowVoxelTracing.fragment.js +24 -7
- package/Shaders/iblShadowVoxelTracing.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/iblVoxelOpacityAtomicMax.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/iblVoxelOpacityAtomicMax.js +13 -0
- package/ShadersWGSL/ShadersInclude/iblVoxelOpacityAtomicMax.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/imageProcessingDeclaration.js +3 -0
- package/ShadersWGSL/ShadersInclude/imageProcessingDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/imageProcessingFunctions.js +3 -0
- package/ShadersWGSL/ShadersInclude/imageProcessingFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.js +35 -5
- package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrDirectLightingInit.js +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrDirectLightingInit.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js +8 -2
- package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +5 -0
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/ShadersWGSL/fluidRenderingParticleDepth.vertex.js +16 -4
- package/ShadersWGSL/fluidRenderingParticleDepth.vertex.js.map +1 -1
- package/ShadersWGSL/fluidRenderingParticleDiffuse.vertex.js +15 -3
- package/ShadersWGSL/fluidRenderingParticleDiffuse.vertex.js.map +1 -1
- package/ShadersWGSL/fluidRenderingParticleThickness.vertex.js +15 -3
- package/ShadersWGSL/fluidRenderingParticleThickness.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingVoxel.fragment.js +15 -9
- package/ShadersWGSL/gaussianSplattingVoxel.fragment.js.map +1 -1
- package/ShadersWGSL/iblCombineVoxelGrids.fragment.js +1 -1
- package/ShadersWGSL/iblCombineVoxelGrids.fragment.js.map +1 -1
- package/ShadersWGSL/iblCopyVoxelBufferToGrid.compute.d.ts +5 -0
- package/ShadersWGSL/iblCopyVoxelBufferToGrid.compute.js +14 -0
- package/ShadersWGSL/iblCopyVoxelBufferToGrid.compute.js.map +1 -0
- package/ShadersWGSL/iblShadowVoxelTracing.fragment.js +24 -7
- package/ShadersWGSL/iblShadowVoxelTracing.fragment.js.map +1 -1
- package/ShadersWGSL/iblVoxelGrid.fragment.js +26 -6
- package/ShadersWGSL/iblVoxelGrid.fragment.js.map +1 -1
- package/SmartAssets/smartAssetManager.pure.js +1 -1
- package/SmartAssets/smartAssetManager.pure.js.map +1 -1
- package/Sprites/thinSprite.js +1 -1
- package/Sprites/thinSprite.js.map +1 -1
- package/XR/features/Layers/WebXRCompositionLayer.d.ts +182 -12
- package/XR/features/Layers/WebXRCompositionLayer.js +272 -3
- package/XR/features/Layers/WebXRCompositionLayer.js.map +1 -1
- package/XR/features/Layers/WebXRFallbackLayer.d.ts +84 -0
- package/XR/features/Layers/WebXRFallbackLayer.js +137 -0
- package/XR/features/Layers/WebXRFallbackLayer.js.map +1 -0
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.d.ts +4 -4
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.js.map +1 -1
- package/XR/features/WebXRAnchorSystem.pure.d.ts +45 -0
- package/XR/features/WebXRAnchorSystem.pure.js +153 -13
- package/XR/features/WebXRAnchorSystem.pure.js.map +1 -1
- package/XR/features/WebXRControllerPointerSelection.pure.js +2 -1
- package/XR/features/WebXRControllerPointerSelection.pure.js.map +1 -1
- package/XR/features/WebXRControllerTeleportation.pure.js +2 -1
- package/XR/features/WebXRControllerTeleportation.pure.js.map +1 -1
- package/XR/features/WebXRDepthSensing.pure.d.ts +21 -0
- package/XR/features/WebXRDepthSensing.pure.js +42 -0
- package/XR/features/WebXRDepthSensing.pure.js.map +1 -1
- package/XR/features/WebXRHandTracking.pure.js +2 -0
- package/XR/features/WebXRHandTracking.pure.js.map +1 -1
- package/XR/features/WebXRLayers.pure.d.ts +183 -8
- package/XR/features/WebXRLayers.pure.js +531 -99
- package/XR/features/WebXRLayers.pure.js.map +1 -1
- package/XR/features/WebXRLayersFallback.d.ts +5 -0
- package/XR/features/WebXRLayersFallback.js +8 -0
- package/XR/features/WebXRLayersFallback.js.map +1 -0
- package/XR/features/WebXRLayersFallback.pure.d.ts +6 -0
- package/XR/features/WebXRLayersFallback.pure.js +44 -0
- package/XR/features/WebXRLayersFallback.pure.js.map +1 -0
- package/XR/features/WebXRLightEstimation.pure.d.ts +3 -4
- package/XR/features/WebXRLightEstimation.pure.js +22 -21
- package/XR/features/WebXRLightEstimation.pure.js.map +1 -1
- package/XR/features/WebXRMeshDetector.pure.d.ts +5 -0
- package/XR/features/WebXRMeshDetector.pure.js +1 -0
- package/XR/features/WebXRMeshDetector.pure.js.map +1 -1
- package/XR/features/WebXRNearInteraction.pure.js +3 -3
- package/XR/features/WebXRNearInteraction.pure.js.map +1 -1
- package/XR/features/WebXRPlaneDetector.pure.d.ts +9 -5
- package/XR/features/WebXRPlaneDetector.pure.js +12 -8
- package/XR/features/WebXRPlaneDetector.pure.js.map +1 -1
- package/XR/features/WebXRTrackedSources.d.ts +5 -0
- package/XR/features/WebXRTrackedSources.js +8 -0
- package/XR/features/WebXRTrackedSources.js.map +1 -0
- package/XR/features/WebXRTrackedSources.pure.d.ts +70 -0
- package/XR/features/WebXRTrackedSources.pure.js +153 -0
- package/XR/features/WebXRTrackedSources.pure.js.map +1 -0
- package/XR/features/index.d.ts +1 -0
- package/XR/features/index.js +1 -0
- package/XR/features/index.js.map +1 -1
- package/XR/features/pure.d.ts +2 -0
- package/XR/features/pure.js +2 -0
- package/XR/features/pure.js.map +1 -1
- package/XR/motionController/webXRAbstractMotionController.d.ts +53 -1
- package/XR/motionController/webXRAbstractMotionController.js +61 -0
- package/XR/motionController/webXRAbstractMotionController.js.map +1 -1
- package/XR/webXRCamera.d.ts +2 -0
- package/XR/webXRCamera.js +8 -2
- package/XR/webXRCamera.js.map +1 -1
- package/XR/webXRDefaultExperience.js +8 -4
- package/XR/webXRDefaultExperience.js.map +1 -1
- package/XR/webXRExperienceHelper.js +86 -44
- package/XR/webXRExperienceHelper.js.map +1 -1
- package/XR/webXRFeaturesManager.d.ts +9 -0
- package/XR/webXRFeaturesManager.js +4 -0
- package/XR/webXRFeaturesManager.js.map +1 -1
- package/XR/webXRGraphicsBinding.d.ts +29 -0
- package/XR/webXRGraphicsBinding.js +40 -0
- package/XR/webXRGraphicsBinding.js.map +1 -1
- package/XR/webXRInputSource.js +1 -1
- package/XR/webXRInputSource.js.map +1 -1
- package/XR/webXRLayerWrapper.d.ts +26 -10
- package/XR/webXRLayerWrapper.js +19 -7
- package/XR/webXRLayerWrapper.js.map +1 -1
- package/XR/webXRRenderTargetTextureProvider.d.ts +4 -4
- package/XR/webXRRenderTargetTextureProvider.js.map +1 -1
- package/XR/webXRSessionManager.d.ts +45 -0
- package/XR/webXRSessionManager.js +174 -29
- package/XR/webXRSessionManager.js.map +1 -1
- package/XR/webXRWebGLRenderTargetTextureProvider.d.ts +2 -1
- package/XR/webXRWebGLRenderTargetTextureProvider.js.map +1 -1
- package/XR/webXRWebGPURenderTargetTextureProvider.d.ts +3 -3
- package/XR/webXRWebGPURenderTargetTextureProvider.js.map +1 -1
- package/package.json +1 -1
- package/scene.pure.d.ts +5 -0
- package/scene.pure.js +25 -0
- package/scene.pure.js.map +1 -1
|
@@ -5,6 +5,7 @@ import { type ThinTexture } from "../Materials/Textures/thinTexture.js";
|
|
|
5
5
|
import { type DataBuffer } from "../Buffers/dataBuffer.js";
|
|
6
6
|
import { type InternalTexture } from "./Textures/internalTexture.js";
|
|
7
7
|
import { type AbstractEngine } from "../Engines/abstractEngine.js";
|
|
8
|
+
import { type WebGPUDrawContext } from "../Engines/WebGPU/webgpuDrawContext.js";
|
|
8
9
|
/**
|
|
9
10
|
* Uniform buffer objects.
|
|
10
11
|
*
|
|
@@ -37,6 +38,13 @@ export declare class UniformBuffer {
|
|
|
37
38
|
private _name;
|
|
38
39
|
private _currentFrameId;
|
|
39
40
|
private _trackUBOsInFrame;
|
|
41
|
+
private _slotByOwner;
|
|
42
|
+
private _ownerListsBySlot;
|
|
43
|
+
private _slotFrameId;
|
|
44
|
+
private _ownerCount;
|
|
45
|
+
private _freeSlots;
|
|
46
|
+
private _dataGeneration;
|
|
47
|
+
private _slotGeneration;
|
|
40
48
|
private static _MAX_UNIFORM_SIZE;
|
|
41
49
|
private static _TempBuffer;
|
|
42
50
|
private static _TempBufferInt32View;
|
|
@@ -316,6 +324,7 @@ export declare class UniformBuffer {
|
|
|
316
324
|
_rebuild(): void;
|
|
317
325
|
/** @internal */
|
|
318
326
|
_rebuildAfterContextLost(): void;
|
|
327
|
+
private _resetOwnerSlots;
|
|
319
328
|
/** @internal */
|
|
320
329
|
get _numBuffers(): number;
|
|
321
330
|
/** @internal */
|
|
@@ -333,6 +342,26 @@ export declare class UniformBuffer {
|
|
|
333
342
|
* Otherwise, the buffer will be updated only if the cache differs.
|
|
334
343
|
*/
|
|
335
344
|
update(): void;
|
|
345
|
+
/**
|
|
346
|
+
* Flushes the current uniform values into the GPU buffer owned by the draw context.
|
|
347
|
+
* Invariant: `_buffers[i][1]` (the CPU shadow) always holds what the GPU buffer of slot i contains.
|
|
348
|
+
* @param owner the draw context on behalf of which the update is done
|
|
349
|
+
* @internal
|
|
350
|
+
*/
|
|
351
|
+
_updateOwnerKeyed(owner: WebGPUDrawContext): void;
|
|
352
|
+
/**
|
|
353
|
+
* Gets a slot that is not owned by any draw context and has not been flushed in the current frame, creating one if needed.
|
|
354
|
+
* @param takeOwnership true to remove the slot from the free list (it is going to be owned by a context)
|
|
355
|
+
* @returns the slot index
|
|
356
|
+
*/
|
|
357
|
+
private _takeFreeSlot;
|
|
358
|
+
/**
|
|
359
|
+
* Releases the slot owned by a draw context (called when the context is disposed), so that another context can reuse it.
|
|
360
|
+
* @param owner the draw context
|
|
361
|
+
* @internal
|
|
362
|
+
*/
|
|
363
|
+
_releaseOwnerSlot(owner: WebGPUDrawContext): void;
|
|
364
|
+
private _removeOwnerBacklink;
|
|
336
365
|
private _createNewBuffer;
|
|
337
366
|
private _checkNewFrame;
|
|
338
367
|
/**
|
|
@@ -41,6 +41,7 @@ export class UniformBuffer {
|
|
|
41
41
|
this._uniformArraySizes = {};
|
|
42
42
|
this._uniformLocationPointer = 0;
|
|
43
43
|
this._needSync = false;
|
|
44
|
+
this._dataGeneration = 0;
|
|
44
45
|
this._trackUBOsInFrame = false;
|
|
45
46
|
if ((trackUBOsInFrame === undefined && this._engine._features.trackUbosInFrame) || trackUBOsInFrame === true) {
|
|
46
47
|
this._buffers = [];
|
|
@@ -49,6 +50,7 @@ export class UniformBuffer {
|
|
|
49
50
|
this._createBufferOnWrite = false;
|
|
50
51
|
this._currentFrameId = 0;
|
|
51
52
|
this._trackUBOsInFrame = true;
|
|
53
|
+
this._resetOwnerSlots();
|
|
52
54
|
}
|
|
53
55
|
if (this._noUBO) {
|
|
54
56
|
this.updateMatrix3x3 = this._updateMatrix3x3ForEffect;
|
|
@@ -328,6 +330,7 @@ export class UniformBuffer {
|
|
|
328
330
|
// See spec, alignment must be filled as a vec4
|
|
329
331
|
this._fillAlignment(4);
|
|
330
332
|
this._bufferData = new Float32Array(this._data);
|
|
333
|
+
this._dataGeneration++;
|
|
331
334
|
this._rebuild();
|
|
332
335
|
this._needSync = true;
|
|
333
336
|
}
|
|
@@ -368,9 +371,23 @@ export class UniformBuffer {
|
|
|
368
371
|
if (this._trackUBOsInFrame) {
|
|
369
372
|
this._buffers = [];
|
|
370
373
|
this._currentFrameId = 0;
|
|
374
|
+
this._resetOwnerSlots();
|
|
371
375
|
}
|
|
372
376
|
this._rebuild();
|
|
373
377
|
}
|
|
378
|
+
_resetOwnerSlots() {
|
|
379
|
+
if (this._ownerListsBySlot) {
|
|
380
|
+
for (const list of this._ownerListsBySlot.values()) {
|
|
381
|
+
this._removeOwnerBacklink(list);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
this._ownerListsBySlot = new Map();
|
|
385
|
+
this._slotByOwner = new WeakMap();
|
|
386
|
+
this._slotFrameId = [];
|
|
387
|
+
this._ownerCount = 0;
|
|
388
|
+
this._freeSlots = [];
|
|
389
|
+
this._slotGeneration = [];
|
|
390
|
+
}
|
|
374
391
|
/** @internal */
|
|
375
392
|
get _numBuffers() {
|
|
376
393
|
return this._buffers.length;
|
|
@@ -436,6 +453,122 @@ export class UniformBuffer {
|
|
|
436
453
|
this._needSync = false;
|
|
437
454
|
this._createBufferOnWrite = this._trackUBOsInFrame;
|
|
438
455
|
}
|
|
456
|
+
/**
|
|
457
|
+
* Flushes the current uniform values into the GPU buffer owned by the draw context.
|
|
458
|
+
* Invariant: `_buffers[i][1]` (the CPU shadow) always holds what the GPU buffer of slot i contains.
|
|
459
|
+
* @param owner the draw context on behalf of which the update is done
|
|
460
|
+
* @internal
|
|
461
|
+
*/
|
|
462
|
+
_updateOwnerKeyed(owner) {
|
|
463
|
+
if (this._noUBO || !this._trackUBOsInFrame) {
|
|
464
|
+
this.update();
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
if (!this._buffer) {
|
|
468
|
+
this.create(); // _rebuild pushes slot 0, created from _bufferData, with a shadow copy of it
|
|
469
|
+
}
|
|
470
|
+
this._checkNewFrame();
|
|
471
|
+
let idx = this._slotByOwner.get(owner);
|
|
472
|
+
if (idx === undefined) {
|
|
473
|
+
if (this._ownerCount === 0 && this._buffers.length === 1 && this._freeSlots.length === 0) {
|
|
474
|
+
// the slot create() made and nobody has owned yet: hand it to the first owner instead of leaving it unused.
|
|
475
|
+
// (Once an owner has released it, it is in _freeSlots and must be taken from there, or two owners could share it.)
|
|
476
|
+
idx = 0;
|
|
477
|
+
}
|
|
478
|
+
else {
|
|
479
|
+
idx = this._takeFreeSlot(true);
|
|
480
|
+
}
|
|
481
|
+
this._slotByOwner.set(owner, idx);
|
|
482
|
+
this._ownerCount++;
|
|
483
|
+
if (!owner._uniformBuffersWithOwnedSlot) {
|
|
484
|
+
owner._uniformBuffersWithOwnedSlot = [];
|
|
485
|
+
}
|
|
486
|
+
owner._uniformBuffersWithOwnedSlot.push(this);
|
|
487
|
+
this._ownerListsBySlot.set(idx, owner._uniformBuffersWithOwnedSlot);
|
|
488
|
+
}
|
|
489
|
+
if (this._slotGeneration[idx] === this._dataGeneration) {
|
|
490
|
+
// The slot was last flushed with exactly the current data and nothing has been written since: nothing to
|
|
491
|
+
// compare, nothing to upload, and no same-frame conflict is possible either (same bytes).
|
|
492
|
+
this._bufferIndex = idx;
|
|
493
|
+
this._buffer = this._buffers[idx][0];
|
|
494
|
+
this.bindUniformBuffer();
|
|
495
|
+
this._slotFrameId[idx] = this._currentFrameId;
|
|
496
|
+
this._needSync = false;
|
|
497
|
+
this._createBufferOnWrite = false;
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
const owned = this._buffers[idx][1];
|
|
501
|
+
if (this._slotFrameId[idx] === this._currentFrameId && owned && !this._buffersEqual(this._bufferData, owned)) {
|
|
502
|
+
// The same context flushes a second time in the same frame with different values: the GPU has not consumed the
|
|
503
|
+
// first values yet, so they must not be overwritten. Use a slot nobody owns for this flush.
|
|
504
|
+
idx = this._takeFreeSlot(false);
|
|
505
|
+
}
|
|
506
|
+
this._bufferIndex = idx;
|
|
507
|
+
this._buffer = this._buffers[idx][0];
|
|
508
|
+
this.bindUniformBuffer();
|
|
509
|
+
const shadow = this._buffers[idx][1];
|
|
510
|
+
if (!shadow || !this._buffersEqual(this._bufferData, shadow)) {
|
|
511
|
+
if (shadow) {
|
|
512
|
+
this._copyBuffer(this._bufferData, shadow);
|
|
513
|
+
}
|
|
514
|
+
this._bufferUpdatedLastFrame = true;
|
|
515
|
+
this._engine.updateUniformBuffer(this._buffer, this._bufferData);
|
|
516
|
+
}
|
|
517
|
+
this._slotFrameId[idx] = this._currentFrameId;
|
|
518
|
+
this._slotGeneration[idx] = this._dataGeneration;
|
|
519
|
+
this._needSync = false;
|
|
520
|
+
this._createBufferOnWrite = false; // slots are keyed on the owner, the updateXXX methods must never switch buffer
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* Gets a slot that is not owned by any draw context and has not been flushed in the current frame, creating one if needed.
|
|
524
|
+
* @param takeOwnership true to remove the slot from the free list (it is going to be owned by a context)
|
|
525
|
+
* @returns the slot index
|
|
526
|
+
*/
|
|
527
|
+
_takeFreeSlot(takeOwnership) {
|
|
528
|
+
for (let i = 0; i < this._freeSlots.length; ++i) {
|
|
529
|
+
const idx = this._freeSlots[i];
|
|
530
|
+
if (this._slotFrameId[idx] !== this._currentFrameId) {
|
|
531
|
+
if (takeOwnership) {
|
|
532
|
+
this._freeSlots[i] = this._freeSlots[this._freeSlots.length - 1];
|
|
533
|
+
this._freeSlots.pop();
|
|
534
|
+
}
|
|
535
|
+
return idx;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
this._rebuild();
|
|
539
|
+
const idx = this._buffers.length - 1;
|
|
540
|
+
if (!takeOwnership) {
|
|
541
|
+
this._freeSlots.push(idx);
|
|
542
|
+
}
|
|
543
|
+
return idx;
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Releases the slot owned by a draw context (called when the context is disposed), so that another context can reuse it.
|
|
547
|
+
* @param owner the draw context
|
|
548
|
+
* @internal
|
|
549
|
+
*/
|
|
550
|
+
_releaseOwnerSlot(owner) {
|
|
551
|
+
const idx = this._slotByOwner?.get(owner);
|
|
552
|
+
if (idx === undefined) {
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
this._slotByOwner.delete(owner);
|
|
556
|
+
const list = this._ownerListsBySlot.get(idx);
|
|
557
|
+
if (list) {
|
|
558
|
+
this._removeOwnerBacklink(list);
|
|
559
|
+
this._ownerListsBySlot.delete(idx);
|
|
560
|
+
}
|
|
561
|
+
this._ownerCount--;
|
|
562
|
+
// Keep _slotFrameId: a draw encoded earlier this frame may still need these bytes.
|
|
563
|
+
this._freeSlots.push(idx);
|
|
564
|
+
}
|
|
565
|
+
_removeOwnerBacklink(list) {
|
|
566
|
+
const index = list.indexOf(this);
|
|
567
|
+
if (index !== -1) {
|
|
568
|
+
list[index] = list[list.length - 1];
|
|
569
|
+
list.pop();
|
|
570
|
+
}
|
|
571
|
+
}
|
|
439
572
|
_createNewBuffer() {
|
|
440
573
|
if (this._bufferIndex + 1 < this._buffers.length) {
|
|
441
574
|
this._bufferIndex++;
|
|
@@ -502,12 +635,16 @@ export class UniformBuffer {
|
|
|
502
635
|
}
|
|
503
636
|
}
|
|
504
637
|
this._needSync = this._needSync || changed;
|
|
638
|
+
if (changed) {
|
|
639
|
+
this._dataGeneration++;
|
|
640
|
+
}
|
|
505
641
|
}
|
|
506
642
|
else {
|
|
507
643
|
// No cache for dynamic
|
|
508
644
|
for (let i = 0; i < size; i++) {
|
|
509
645
|
this._bufferData[location + i] = data[i];
|
|
510
646
|
}
|
|
647
|
+
this._dataGeneration++;
|
|
511
648
|
}
|
|
512
649
|
}
|
|
513
650
|
/**
|
|
@@ -550,12 +687,16 @@ export class UniformBuffer {
|
|
|
550
687
|
}
|
|
551
688
|
}
|
|
552
689
|
this._needSync = this._needSync || changed;
|
|
690
|
+
if (changed) {
|
|
691
|
+
this._dataGeneration++;
|
|
692
|
+
}
|
|
553
693
|
}
|
|
554
694
|
else {
|
|
555
695
|
// No cache for dynamic
|
|
556
696
|
for (let i = 0; i < size; i++) {
|
|
557
697
|
this._bufferData[location + i] = data[i];
|
|
558
698
|
}
|
|
699
|
+
this._dataGeneration++;
|
|
559
700
|
}
|
|
560
701
|
}
|
|
561
702
|
_cacheMatrix(name, matrix) {
|
|
@@ -875,6 +1016,7 @@ export class UniformBuffer {
|
|
|
875
1016
|
// Note that if _buffers.length == 1, we don't copy _bufferData into _buffers[_bufferIndex][1] (see the update() method), and _bufferData already contains the right data
|
|
876
1017
|
if (this._buffers.length > 1 && this._buffers[b][1]) {
|
|
877
1018
|
this._bufferData.set(this._buffers[b][1]);
|
|
1019
|
+
this._dataGeneration++;
|
|
878
1020
|
}
|
|
879
1021
|
this._valueCache = {};
|
|
880
1022
|
// The following line prevents the current buffer (_buffer / _bufferIndex) from being updated during subsequent calls to updateXXX() due to a call to _checkNewFrame()
|
|
@@ -910,10 +1052,14 @@ export class UniformBuffer {
|
|
|
910
1052
|
uniformBuffers.pop();
|
|
911
1053
|
}
|
|
912
1054
|
if (this._trackUBOsInFrame && this._buffers) {
|
|
1055
|
+
this._resetOwnerSlots();
|
|
913
1056
|
for (let i = 0; i < this._buffers.length; ++i) {
|
|
914
1057
|
const buffer = this._buffers[i][0];
|
|
915
1058
|
this._engine._releaseBuffer(buffer);
|
|
916
1059
|
}
|
|
1060
|
+
this._buffers = [];
|
|
1061
|
+
this._buffer = null;
|
|
1062
|
+
this._bufferIndex = -1;
|
|
917
1063
|
}
|
|
918
1064
|
else if (this._buffer && this._engine._releaseBuffer(this._buffer)) {
|
|
919
1065
|
this._buffer = null;
|