@babylonjs/core 6.33.1 → 6.34.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Animations/animation.js +1 -1
- package/Animations/animation.js.map +1 -1
- package/Animations/animationGroup.js +2 -2
- package/Animations/animationGroup.js.map +1 -1
- package/Animations/animationGroupMask.d.ts +4 -0
- package/Animations/animationGroupMask.js +4 -0
- package/Animations/animationGroupMask.js.map +1 -1
- package/Buffers/storageBuffer.d.ts +2 -1
- package/Buffers/storageBuffer.js +3 -2
- package/Buffers/storageBuffer.js.map +1 -1
- package/Cameras/Inputs/followCameraMouseWheelInput.js +12 -9
- package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/followCameraPointersInput.js +28 -9
- package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
- package/Cameras/arcRotateCamera.js +1 -1
- package/Cameras/arcRotateCamera.js.map +1 -1
- package/Cameras/followCameraInputsManager.js +2 -1
- package/Cameras/followCameraInputsManager.js.map +1 -1
- package/Compute/computeShader.d.ts +5 -0
- package/Compute/computeShader.js +42 -32
- package/Compute/computeShader.js.map +1 -1
- package/Debug/skeletonViewer.js +2 -1
- package/Debug/skeletonViewer.js.map +1 -1
- package/Engines/Extensions/engine.alpha.js +8 -116
- package/Engines/Extensions/engine.alpha.js.map +1 -1
- package/Engines/Extensions/engine.cubeTexture.d.ts +1 -1
- package/Engines/Extensions/engine.cubeTexture.js +11 -213
- package/Engines/Extensions/engine.cubeTexture.js.map +1 -1
- package/Engines/Extensions/engine.dynamicBuffer.js +5 -42
- package/Engines/Extensions/engine.dynamicBuffer.js.map +1 -1
- package/Engines/Extensions/engine.dynamicTexture.d.ts +1 -1
- package/Engines/Extensions/engine.dynamicTexture.js +5 -47
- package/Engines/Extensions/engine.dynamicTexture.js.map +1 -1
- package/Engines/Extensions/engine.multiRender.js +11 -341
- package/Engines/Extensions/engine.multiRender.js.map +1 -1
- package/Engines/Extensions/engine.multiview.js +6 -57
- package/Engines/Extensions/engine.multiview.js.map +1 -1
- package/Engines/Extensions/engine.query.d.ts +8 -2
- package/Engines/Extensions/engine.query.js +44 -152
- package/Engines/Extensions/engine.query.js.map +1 -1
- package/Engines/Extensions/engine.rawTexture.d.ts +1 -1
- package/Engines/Extensions/engine.rawTexture.js +20 -361
- package/Engines/Extensions/engine.rawTexture.js.map +1 -1
- package/Engines/Extensions/engine.readTexture.js +6 -112
- package/Engines/Extensions/engine.readTexture.js.map +1 -1
- package/Engines/Extensions/engine.renderTarget.d.ts +1 -1
- package/Engines/Extensions/engine.renderTarget.js +8 -173
- package/Engines/Extensions/engine.renderTarget.js.map +1 -1
- package/Engines/Extensions/engine.renderTargetCube.js +4 -55
- package/Engines/Extensions/engine.renderTargetCube.js.map +1 -1
- package/Engines/Extensions/engine.storageBuffer.d.ts +2 -1
- package/Engines/Extensions/engine.storageBuffer.js.map +1 -1
- package/Engines/Extensions/engine.textureSelector.js +11 -52
- package/Engines/Extensions/engine.textureSelector.js.map +1 -1
- package/Engines/Extensions/engine.transformFeedback.js +10 -11
- package/Engines/Extensions/engine.transformFeedback.js.map +1 -1
- package/Engines/Extensions/engine.uniformBuffer.js +9 -59
- package/Engines/Extensions/engine.uniformBuffer.js.map +1 -1
- package/Engines/Extensions/engine.videoTexture.js +4 -54
- package/Engines/Extensions/engine.videoTexture.js.map +1 -1
- package/Engines/Extensions/engine.views.d.ts +2 -24
- package/Engines/Extensions/engine.views.js +17 -136
- package/Engines/Extensions/engine.views.js.map +1 -1
- package/Engines/Processors/shaderCodeInliner.js +15 -14
- package/Engines/Processors/shaderCodeInliner.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.computeShader.js +7 -4
- package/Engines/WebGPU/Extensions/engine.computeShader.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.storageBuffer.js +14 -5
- package/Engines/WebGPU/Extensions/engine.storageBuffer.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessor.js +2 -1
- package/Engines/WebGPU/webgpuShaderProcessor.js.map +1 -1
- package/Engines/WebGPU/webgpuTintWASM.js +3 -2
- package/Engines/WebGPU/webgpuTintWASM.js.map +1 -1
- package/Engines/engine.d.ts +31 -74
- package/Engines/engine.js +322 -773
- package/Engines/engine.js.map +1 -1
- package/Engines/nativeEngine.d.ts +1 -1
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/nullEngine.d.ts +1 -1
- package/Engines/nullEngine.js.map +1 -1
- package/Engines/thinEngine.d.ts +160 -151
- package/Engines/thinEngine.js +712 -3280
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +5 -8
- package/Engines/webgpuEngine.js +143 -112
- package/Engines/webgpuEngine.js.map +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.d.ts +296 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js +758 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js.map +1 -0
- package/FlowGraph/Blocks/Data/Math/index.d.ts +1 -5
- package/FlowGraph/Blocks/Data/Math/index.js +1 -5
- package/FlowGraph/Blocks/Data/Math/index.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.d.ts +2 -2
- package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js +3 -3
- package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js +3 -3
- package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphConstantBlock.d.ts +1 -0
- package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js +5 -0
- package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.d.ts +25 -0
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js +22 -0
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.d.ts +11 -5
- package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js +12 -6
- package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.d.ts +19 -0
- package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.js +22 -0
- package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/index.d.ts +1 -0
- package/FlowGraph/Blocks/Data/index.js +1 -0
- package/FlowGraph/Blocks/Data/index.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.d.ts +10 -5
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js +15 -5
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.d.ts +1 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js +2 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.d.ts +1 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js +3 -2
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.d.ts +2 -2
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js +3 -3
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.d.ts +0 -5
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js +2 -3
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.d.ts +2 -2
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js +3 -3
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.d.ts +2 -2
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js +3 -3
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.d.ts +2 -2
- package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js +2 -2
- package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.d.ts +2 -2
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js +3 -3
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.d.ts +2 -2
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js +3 -3
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.d.ts +13 -5
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js +14 -12
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.d.ts +2 -6
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js +3 -4
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.d.ts +16 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js +26 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.d.ts +2 -2
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js +3 -3
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.d.ts +1 -6
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js +4 -4
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.d.ts +2 -2
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js +4 -4
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.d.ts +3 -2
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js +6 -5
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/index.d.ts +1 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/index.js +1 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/index.js.map +1 -1
- package/FlowGraph/Blocks/Execution/{flowGraphLogBlock.d.ts → flowGraphConsoleLogBlock.d.ts} +3 -2
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js +29 -0
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.d.ts +16 -8
- package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js +17 -10
- package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.d.ts +4 -3
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js +7 -6
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.d.ts +12 -7
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js +10 -9
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/index.d.ts +1 -2
- package/FlowGraph/Blocks/Execution/index.js +1 -3
- package/FlowGraph/Blocks/Execution/index.js.map +1 -1
- package/FlowGraph/flowGraph.d.ts +3 -1
- package/FlowGraph/flowGraph.js +6 -2
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphAsyncExecutionBlock.d.ts +6 -2
- package/FlowGraph/flowGraphAsyncExecutionBlock.js +2 -1
- package/FlowGraph/flowGraphAsyncExecutionBlock.js.map +1 -1
- package/FlowGraph/flowGraphBlock.d.ts +7 -2
- package/FlowGraph/flowGraphBlock.js +21 -19
- package/FlowGraph/flowGraphBlock.js.map +1 -1
- package/FlowGraph/flowGraphContext.d.ts +9 -5
- package/FlowGraph/flowGraphContext.js +7 -2
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphCoordinator.d.ts +4 -5
- package/FlowGraph/flowGraphCoordinator.js +12 -7
- package/FlowGraph/flowGraphCoordinator.js.map +1 -1
- package/FlowGraph/flowGraphEventBlock.js +1 -1
- package/FlowGraph/flowGraphEventBlock.js.map +1 -1
- package/FlowGraph/flowGraphExecutionBlock.d.ts +4 -2
- package/FlowGraph/flowGraphExecutionBlock.js +25 -9
- package/FlowGraph/flowGraphExecutionBlock.js.map +1 -1
- package/FlowGraph/flowGraphPath.d.ts +20 -2
- package/FlowGraph/flowGraphPath.js +27 -7
- package/FlowGraph/flowGraphPath.js.map +1 -1
- package/FlowGraph/flowGraphWithOnDoneExecutionBlock.d.ts +3 -3
- package/FlowGraph/flowGraphWithOnDoneExecutionBlock.js +3 -3
- package/FlowGraph/flowGraphWithOnDoneExecutionBlock.js.map +1 -1
- package/FlowGraph/index.d.ts +3 -0
- package/FlowGraph/index.js +3 -0
- package/FlowGraph/index.js.map +1 -1
- package/FlowGraph/serialization.js +20 -6
- package/FlowGraph/serialization.js.map +1 -1
- package/FlowGraph/typeDefinitions.d.ts +33 -0
- package/FlowGraph/typeDefinitions.js +2 -0
- package/FlowGraph/typeDefinitions.js.map +1 -0
- package/Gizmos/axisScaleGizmo.d.ts +1 -0
- package/Gizmos/axisScaleGizmo.js +12 -0
- package/Gizmos/axisScaleGizmo.js.map +1 -1
- package/Gizmos/lightGizmo.js +2 -1
- package/Gizmos/lightGizmo.js.map +1 -1
- package/Gizmos/rotationGizmo.js +1 -1
- package/Gizmos/rotationGizmo.js.map +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.js +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.js.map +1 -1
- package/Lights/light.d.ts +15 -0
- package/Lights/light.js +18 -0
- package/Lights/light.js.map +1 -1
- package/Lights/shadowLight.d.ts +18 -1
- package/Lights/shadowLight.js +34 -1
- package/Lights/shadowLight.js.map +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.js +2 -1
- package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js +3 -2
- package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragDepthBlock.js +2 -1
- package/Materials/Node/Blocks/Fragment/fragDepthBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js +2 -1
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/anisotropyBlock.js +2 -1
- package/Materials/Node/Blocks/PBR/anisotropyBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +3 -2
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/reflectionBlock.js +2 -1
- package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.js +9 -8
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterialBlock.js +2 -1
- package/Materials/Node/nodeMaterialBlock.js.map +1 -1
- package/Materials/drawWrapper.js +3 -2
- package/Materials/drawWrapper.js.map +1 -1
- package/Materials/effect.js +2 -1
- package/Materials/effect.js.map +1 -1
- package/Materials/material.js +2 -1
- package/Materials/material.js.map +1 -1
- package/Materials/uniformBuffer.d.ts +4 -1
- package/Materials/uniformBuffer.js +5 -2
- package/Materials/uniformBuffer.js.map +1 -1
- package/Meshes/Node/nodeGeometryBlock.js +11 -2
- package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
- package/Meshes/abstractMesh.js +3 -1
- package/Meshes/abstractMesh.js.map +1 -1
- package/Misc/assetsManager.js +2 -2
- package/Misc/assetsManager.js.map +1 -1
- package/Misc/dds.d.ts +2 -0
- package/Misc/dds.js +27 -23
- package/Misc/dds.js.map +1 -1
- package/Misc/logger.d.ts +3 -3
- package/Misc/logger.js +8 -4
- package/Misc/logger.js.map +1 -1
- package/Misc/sceneSerializer.js +2 -1
- package/Misc/sceneSerializer.js.map +1 -1
- package/Navigation/Plugins/recastJSPlugin.js +2 -2
- package/Navigation/Plugins/recastJSPlugin.js.map +1 -1
- package/Physics/v2/Plugins/havokPlugin.js +1 -1
- package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
- package/Physics/v2/index.d.ts +1 -0
- package/Physics/v2/index.js +1 -0
- package/Physics/v2/index.js.map +1 -1
- package/Physics/v2/ragdoll.d.ts +107 -0
- package/Physics/v2/ragdoll.js +228 -0
- package/Physics/v2/ragdoll.js.map +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +2 -2
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js +3 -2
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
- package/PostProcesses/index.d.ts +1 -1
- package/PostProcesses/index.js +1 -1
- package/PostProcesses/index.js.map +1 -1
- package/PostProcesses/passPostProcess.d.ts +1 -0
- package/PostProcesses/passPostProcess.js +6 -2
- package/PostProcesses/passPostProcess.js.map +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.js +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.js.map +1 -1
- package/PostProcesses/screenSpaceReflectionPostProcess.js +3 -2
- package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
- package/Rendering/depthPeelingRenderer.js +2 -1
- package/Rendering/depthPeelingRenderer.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockSubSurface.js +3 -2
- package/Shaders/ShadersInclude/pbrBlockSubSurface.js.map +1 -1
- package/XR/features/WebXRControllerPhysics.js +2 -2
- package/XR/features/WebXRControllerPhysics.js.map +1 -1
- package/XR/features/WebXRMeshDetector.d.ts +14 -2
- package/XR/features/WebXRMeshDetector.js +45 -9
- package/XR/features/WebXRMeshDetector.js.map +1 -1
- package/XR/features/WebXRWalkingLocomotion.js +1 -1
- package/XR/features/WebXRWalkingLocomotion.js.map +1 -1
- package/XR/webXRExperienceHelper.js +2 -2
- package/XR/webXRExperienceHelper.js.map +1 -1
- package/assetContainer.js +2 -2
- package/assetContainer.js.map +1 -1
- package/esm/Engines/Extensions/alpha/alpha.base.d.ts +34 -0
- package/esm/Engines/Extensions/alpha/alpha.base.js +2 -0
- package/esm/Engines/Extensions/alpha/alpha.base.js.map +1 -0
- package/esm/Engines/Extensions/computeShaders/computeShaders.base.d.ts +87 -0
- package/esm/Engines/Extensions/computeShaders/computeShaders.base.js +12 -0
- package/esm/Engines/Extensions/computeShaders/computeShaders.base.js.map +1 -0
- package/esm/Engines/Extensions/cubeTexture/cubeTexture.base.d.ts +79 -0
- package/esm/Engines/Extensions/cubeTexture/cubeTexture.base.js +2 -0
- package/esm/Engines/Extensions/cubeTexture/cubeTexture.base.js.map +1 -0
- package/esm/Engines/Extensions/debugging/debugging.base.d.ts +11 -0
- package/esm/Engines/Extensions/debugging/debugging.base.js +2 -0
- package/esm/Engines/Extensions/debugging/debugging.base.js.map +1 -0
- package/esm/Engines/Extensions/dynamicBuffer/dynamicBuffer.base.d.ts +20 -0
- package/esm/Engines/Extensions/dynamicBuffer/dynamicBuffer.base.js +2 -0
- package/esm/Engines/Extensions/dynamicBuffer/dynamicBuffer.base.js.map +1 -0
- package/esm/Engines/Extensions/dynamicTexture/dynamicTexture.base.d.ts +26 -0
- package/esm/Engines/Extensions/dynamicTexture/dynamicTexture.base.js +2 -0
- package/esm/Engines/Extensions/dynamicTexture/dynamicTexture.base.js.map +1 -0
- package/esm/Engines/Extensions/engine.extensions.d.ts +67 -0
- package/esm/Engines/Extensions/engine.extensions.js +49 -0
- package/esm/Engines/Extensions/engine.extensions.js.map +1 -0
- package/esm/Engines/Extensions/externalTexture/externalTexture.base.d.ts +16 -0
- package/esm/Engines/Extensions/externalTexture/externalTexture.base.js +2 -0
- package/esm/Engines/Extensions/externalTexture/externalTexture.base.js.map +1 -0
- package/esm/Engines/Extensions/multiRender/multiRender.base.d.ts +54 -0
- package/esm/Engines/Extensions/multiRender/multiRender.base.js +2 -0
- package/esm/Engines/Extensions/multiRender/multiRender.base.js.map +1 -0
- package/esm/Engines/Extensions/multiview/multiview.base.d.ts +67 -0
- package/esm/Engines/Extensions/multiview/multiview.base.js +79 -0
- package/esm/Engines/Extensions/multiview/multiview.base.js.map +1 -0
- package/esm/Engines/Extensions/query/query.base.d.ts +164 -0
- package/esm/Engines/Extensions/query/query.base.js +168 -0
- package/esm/Engines/Extensions/query/query.base.js.map +1 -0
- package/esm/Engines/Extensions/rawTexture/engine.rawTexture.base.d.ts +187 -0
- package/esm/Engines/Extensions/rawTexture/engine.rawTexture.base.js +2 -0
- package/esm/Engines/Extensions/rawTexture/engine.rawTexture.base.js.map +1 -0
- package/esm/Engines/Extensions/readTexture/readTexture.base.d.ts +9 -0
- package/esm/Engines/Extensions/readTexture/readTexture.base.js +2 -0
- package/esm/Engines/Extensions/readTexture/readTexture.base.js.map +1 -0
- package/esm/Engines/Extensions/renderTarget/renderTarget.base.d.ts +35 -0
- package/esm/Engines/Extensions/renderTarget/renderTarget.base.js +2 -0
- package/esm/Engines/Extensions/renderTarget/renderTarget.base.js.map +1 -0
- package/esm/Engines/Extensions/renderTargetCube/renderTargetCube.base.d.ts +12 -0
- package/esm/Engines/Extensions/renderTargetCube/renderTargetCube.base.js +2 -0
- package/esm/Engines/Extensions/renderTargetCube/renderTargetCube.base.js.map +1 -0
- package/esm/Engines/Extensions/storageBuffer/storageBuffer.base.d.ts +36 -0
- package/esm/Engines/Extensions/storageBuffer/storageBuffer.base.js +2 -0
- package/esm/Engines/Extensions/storageBuffer/storageBuffer.base.js.map +1 -0
- package/esm/Engines/Extensions/textureSampler/textureSampler.base.d.ts +11 -0
- package/esm/Engines/Extensions/textureSampler/textureSampler.base.js +2 -0
- package/esm/Engines/Extensions/textureSampler/textureSampler.base.js.map +1 -0
- package/esm/Engines/Extensions/textureSelector/textureSelector.base.d.ts +50 -0
- package/esm/Engines/Extensions/textureSelector/textureSelector.base.js +53 -0
- package/esm/Engines/Extensions/textureSelector/textureSelector.base.js.map +1 -0
- package/esm/Engines/Extensions/transformFeedback/engine.transformFeedback.base.d.ts +42 -0
- package/esm/Engines/Extensions/transformFeedback/engine.transformFeedback.base.js +2 -0
- package/esm/Engines/Extensions/transformFeedback/engine.transformFeedback.base.js.map +1 -0
- package/esm/Engines/Extensions/uniformBuffer/uniformBuffer.base.d.ts +48 -0
- package/esm/Engines/Extensions/uniformBuffer/uniformBuffer.base.js +2 -0
- package/esm/Engines/Extensions/uniformBuffer/uniformBuffer.base.js.map +1 -0
- package/esm/Engines/Extensions/videoTexture/videoTexture.base.d.ts +13 -0
- package/esm/Engines/Extensions/videoTexture/videoTexture.base.js +2 -0
- package/esm/Engines/Extensions/videoTexture/videoTexture.base.js.map +1 -0
- package/esm/Engines/Extensions/views/views.base.d.ts +85 -0
- package/esm/Engines/Extensions/views/views.base.js +33 -0
- package/esm/Engines/Extensions/views/views.base.js.map +1 -0
- package/esm/Engines/WebGL/Extensions/alpha/alpha.webgl.d.ts +8 -0
- package/esm/Engines/WebGL/Extensions/alpha/alpha.webgl.js +137 -0
- package/esm/Engines/WebGL/Extensions/alpha/alpha.webgl.js.map +1 -0
- package/esm/Engines/WebGL/Extensions/cubeTexture/cubeTexture.webgl.d.ts +11 -0
- package/esm/Engines/WebGL/Extensions/cubeTexture/cubeTexture.webgl.js +251 -0
- package/esm/Engines/WebGL/Extensions/cubeTexture/cubeTexture.webgl.js.map +1 -0
- package/esm/Engines/WebGL/Extensions/dynamicBuffer/dynamicBuffer.webgl.d.ts +5 -0
- package/esm/Engines/WebGL/Extensions/dynamicBuffer/dynamicBuffer.webgl.js +55 -0
- package/esm/Engines/WebGL/Extensions/dynamicBuffer/dynamicBuffer.webgl.js.map +1 -0
- package/esm/Engines/WebGL/Extensions/dynamicTexture/dynamicTexture.webgl.d.ts +5 -0
- package/esm/Engines/WebGL/Extensions/dynamicTexture/dynamicTexture.webgl.js +65 -0
- package/esm/Engines/WebGL/Extensions/dynamicTexture/dynamicTexture.webgl.js.map +1 -0
- package/esm/Engines/WebGL/Extensions/multiRender/multiRender.webgl.d.ts +10 -0
- package/esm/Engines/WebGL/Extensions/multiRender/multiRender.webgl.js +375 -0
- package/esm/Engines/WebGL/Extensions/multiRender/multiRender.webgl.js.map +1 -0
- package/esm/Engines/WebGL/Extensions/multiview/multiview.webgl.d.ts +6 -0
- package/esm/Engines/WebGL/Extensions/multiview/multiview.webgl.js +77 -0
- package/esm/Engines/WebGL/Extensions/multiview/multiview.webgl.js.map +1 -0
- package/esm/Engines/WebGL/Extensions/query/query.webgl.d.ts +21 -0
- package/esm/Engines/WebGL/Extensions/query/query.webgl.js +220 -0
- package/esm/Engines/WebGL/Extensions/query/query.webgl.js.map +1 -0
- package/esm/Engines/WebGL/Extensions/rawTexture/engine.rawTexture.webgl.d.ts +15 -0
- package/esm/Engines/WebGL/Extensions/rawTexture/engine.rawTexture.webgl.js +392 -0
- package/esm/Engines/WebGL/Extensions/rawTexture/engine.rawTexture.webgl.js.map +1 -0
- package/esm/Engines/WebGL/Extensions/readTexture/readTexture.webgl.d.ts +17 -0
- package/esm/Engines/WebGL/Extensions/readTexture/readTexture.webgl.js +133 -0
- package/esm/Engines/WebGL/Extensions/readTexture/readTexture.webgl.js.map +1 -0
- package/esm/Engines/WebGL/Extensions/renderTarget/renderTarget.webgl.d.ts +8 -0
- package/esm/Engines/WebGL/Extensions/renderTarget/renderTarget.webgl.js +199 -0
- package/esm/Engines/WebGL/Extensions/renderTarget/renderTarget.webgl.js.map +1 -0
- package/esm/Engines/WebGL/Extensions/renderTargetCube/renderTargetCube.webgl.d.ts +2 -0
- package/esm/Engines/WebGL/Extensions/renderTargetCube/renderTargetCube.webgl.js +62 -0
- package/esm/Engines/WebGL/Extensions/renderTargetCube/renderTargetCube.webgl.js.map +1 -0
- package/esm/Engines/WebGL/Extensions/textureSelector/textureSelector.webgl.d.ts +5 -0
- package/esm/Engines/WebGL/Extensions/textureSelector/textureSelector.webgl.js +28 -0
- package/esm/Engines/WebGL/Extensions/textureSelector/textureSelector.webgl.js.map +1 -0
- package/esm/Engines/WebGL/Extensions/transformFeedback/engine.transformFeedback.webgl.d.ts +11 -0
- package/esm/Engines/WebGL/Extensions/transformFeedback/engine.transformFeedback.webgl.js +45 -0
- package/esm/Engines/WebGL/Extensions/transformFeedback/engine.transformFeedback.webgl.js.map +1 -0
- package/esm/Engines/WebGL/Extensions/uniformBuffer/uniformBuffer.webgl.d.ts +9 -0
- package/esm/Engines/WebGL/Extensions/uniformBuffer/uniformBuffer.webgl.js +78 -0
- package/esm/Engines/WebGL/Extensions/uniformBuffer/uniformBuffer.webgl.js.map +1 -0
- package/esm/Engines/WebGL/Extensions/videoTexture/videoTexture.webgl.d.ts +4 -0
- package/esm/Engines/WebGL/Extensions/videoTexture/videoTexture.webgl.js +67 -0
- package/esm/Engines/WebGL/Extensions/videoTexture/videoTexture.webgl.js.map +1 -0
- package/esm/Engines/WebGL/Extensions/views/views.webgl.d.ts +18 -0
- package/esm/Engines/WebGL/Extensions/views/views.webgl.js +152 -0
- package/esm/Engines/WebGL/Extensions/views/views.webgl.js.map +1 -0
- package/esm/Engines/WebGL/engine.adapterHelpers.d.ts +43 -0
- package/esm/Engines/WebGL/engine.adapterHelpers.js +107 -0
- package/esm/Engines/WebGL/engine.adapterHelpers.js.map +1 -0
- package/esm/Engines/WebGL/engine.webgl.d.ts +1030 -0
- package/esm/Engines/WebGL/engine.webgl.js +4083 -0
- package/esm/Engines/WebGL/engine.webgl.js.map +1 -0
- package/esm/Engines/WebGPU/engine.adapterHelpers.d.ts +7 -0
- package/esm/Engines/WebGPU/engine.adapterHelpers.js +20 -0
- package/esm/Engines/WebGPU/engine.adapterHelpers.js.map +1 -0
- package/esm/Engines/WebGPU/engine.webgpu.constants.d.ts +391 -0
- package/esm/Engines/WebGPU/engine.webgpu.constants.js +2 -0
- package/esm/Engines/WebGPU/engine.webgpu.constants.js.map +1 -0
- package/esm/Engines/WebGPU/engine.webgpu.d.ts +277 -0
- package/esm/Engines/WebGPU/engine.webgpu.js +1281 -0
- package/esm/Engines/WebGPU/engine.webgpu.js.map +1 -0
- package/esm/Engines/engine.adapters.d.ts +32 -0
- package/esm/Engines/engine.adapters.js +27 -0
- package/esm/Engines/engine.adapters.js.map +1 -0
- package/esm/Engines/engine.base.d.ts +807 -0
- package/esm/Engines/engine.base.js +1235 -0
- package/esm/Engines/engine.base.js.map +1 -0
- package/esm/Engines/engine.constants.d.ts +735 -0
- package/esm/Engines/engine.constants.js +3 -0
- package/esm/Engines/engine.constants.js.map +1 -0
- package/esm/Engines/engine.extendable.d.ts +180 -0
- package/esm/Engines/engine.extendable.js +477 -0
- package/esm/Engines/engine.extendable.js.map +1 -0
- package/esm/Engines/engine.interfaces.d.ts +16 -0
- package/esm/Engines/engine.interfaces.js +9 -0
- package/esm/Engines/engine.interfaces.js.map +1 -0
- package/esm/Engines/engine.static.d.ts +215 -0
- package/esm/Engines/engine.static.js +345 -0
- package/esm/Engines/engine.static.js.map +1 -0
- package/esm/Engines/engine.tools.d.ts +20 -0
- package/esm/Engines/engine.tools.js +33 -0
- package/esm/Engines/engine.tools.js.map +1 -0
- package/esm/Engines/public.d.ts +1 -0
- package/esm/Engines/public.js +2 -0
- package/esm/Engines/public.js.map +1 -0
- package/esm/Engines/runtimeEnvironment.d.ts +37 -0
- package/esm/Engines/runtimeEnvironment.js +56 -0
- package/esm/Engines/runtimeEnvironment.js.map +1 -0
- package/package.json +2 -1
- package/scene.d.ts +1 -2
- package/scene.js +1 -1
- package/scene.js.map +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphMatrixBlocks.d.ts +0 -172
- package/FlowGraph/Blocks/Data/Math/flowGraphMatrixBlocks.js +0 -235
- package/FlowGraph/Blocks/Data/Math/flowGraphMatrixBlocks.js.map +0 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphNumberMathBlocks.d.ts +0 -269
- package/FlowGraph/Blocks/Data/Math/flowGraphNumberMathBlocks.js +0 -429
- package/FlowGraph/Blocks/Data/Math/flowGraphNumberMathBlocks.js.map +0 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphVector2MathBlocks.d.ts +0 -115
- package/FlowGraph/Blocks/Data/Math/flowGraphVector2MathBlocks.js +0 -146
- package/FlowGraph/Blocks/Data/Math/flowGraphVector2MathBlocks.js.map +0 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphVector3MathBlocks.d.ts +0 -155
- package/FlowGraph/Blocks/Data/Math/flowGraphVector3MathBlocks.js +0 -190
- package/FlowGraph/Blocks/Data/Math/flowGraphVector3MathBlocks.js.map +0 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphVector4MathBlocks.d.ts +0 -116
- package/FlowGraph/Blocks/Data/Math/flowGraphVector4MathBlocks.js +0 -144
- package/FlowGraph/Blocks/Data/Math/flowGraphVector4MathBlocks.js.map +0 -1
- package/FlowGraph/Blocks/Execution/flowGraphLogBlock.js +0 -27
- package/FlowGraph/Blocks/Execution/flowGraphLogBlock.js.map +0 -1
|
@@ -0,0 +1,1030 @@
|
|
|
1
|
+
import type { DataArray, IndicesArray, Nullable } from "../../../types.js";
|
|
2
|
+
import type { IBaseEngineProtected, IBaseEnginePublic, IBaseEngineInternals, IBaseEngineOptions } from "../engine.base";
|
|
3
|
+
import type { DataBuffer } from "../../../Buffers/dataBuffer.js";
|
|
4
|
+
import type { IEffectCreationOptions } from "../../../Materials/effect.js";
|
|
5
|
+
import { Effect } from "../../../Materials/effect.js";
|
|
6
|
+
import type { IColor4Like, IViewportLike } from "../../../Maths/math.like.js";
|
|
7
|
+
import { Constants } from "../engine.constants";
|
|
8
|
+
import type { RenderTargetWrapper } from "../../../Engines/renderTargetWrapper.js";
|
|
9
|
+
import { WebGLPipelineContext } from "../../../Engines/WebGL/webGLPipelineContext.js";
|
|
10
|
+
import type { IPipelineContext } from "../../../Engines/IPipelineContext.js";
|
|
11
|
+
import type { VertexBuffer } from "../../../Buffers/buffer.js";
|
|
12
|
+
import type { InstancingAttributeInfo } from "../../../Engines/instancingAttributeInfo.js";
|
|
13
|
+
import { InternalTextureSource, InternalTexture } from "../../../Materials/Textures/internalTexture.js";
|
|
14
|
+
import type { RenderTargetTexture } from "../../../Materials/Textures/renderTargetTexture.js";
|
|
15
|
+
import type { ThinTexture } from "../../../Materials/Textures/thinTexture.js";
|
|
16
|
+
import type { ISceneLike } from "../engine.interfaces";
|
|
17
|
+
import type { InternalTextureCreationOptions, TextureSize } from "../../../Materials/Textures/textureCreationOptions.js";
|
|
18
|
+
import type { HardwareTextureWrapper } from "../../../Materials/Textures/hardwareTextureWrapper.js";
|
|
19
|
+
import { DrawWrapper } from "../../../Materials/drawWrapper.js";
|
|
20
|
+
import type { IEffectFallbacks } from "../../../Materials/iEffectFallbacks.js";
|
|
21
|
+
import { ShaderLanguage } from "../../../Materials/shaderLanguage.js";
|
|
22
|
+
import { StencilStateComposer } from "../../../States/stencilStateComposer.js";
|
|
23
|
+
import { DepthCullingState } from "../../../States/depthCullingState.js";
|
|
24
|
+
import type { ThinEngine } from "../../../Engines/thinEngine.js";
|
|
25
|
+
import type { ShaderProcessingContext } from "../../../Engines/Processors/shaderProcessingOptions.js";
|
|
26
|
+
import type { PostProcess } from "../../../PostProcesses/postProcess.js";
|
|
27
|
+
import type { IShaderProcessor } from "../../../Engines/Processors/iShaderProcessor.js";
|
|
28
|
+
import { PerfCounter } from "../../../Misc/perfCounter.js";
|
|
29
|
+
import type { IStencilState } from "../../../States/IStencilState.js";
|
|
30
|
+
interface IWebGLEngineProtected extends IBaseEngineProtected {
|
|
31
|
+
_currentProgram: Nullable<WebGLProgram>;
|
|
32
|
+
_cachedVertexBuffers: any;
|
|
33
|
+
_cachedIndexBuffer: Nullable<DataBuffer>;
|
|
34
|
+
_cachedEffectForVertexBuffers: Nullable<Effect>;
|
|
35
|
+
_currentBoundBuffer: Array<Nullable<DataBuffer>>;
|
|
36
|
+
_depthCullingState: DepthCullingState;
|
|
37
|
+
_stencilStateComposer: StencilStateComposer;
|
|
38
|
+
_creationOptions: IWebGLEngineOptions;
|
|
39
|
+
}
|
|
40
|
+
interface TexImageParameters {
|
|
41
|
+
internalFormat: number;
|
|
42
|
+
format: number;
|
|
43
|
+
type: number;
|
|
44
|
+
}
|
|
45
|
+
export interface IWebGLEngineInternals extends IBaseEngineInternals {
|
|
46
|
+
/** @internal */
|
|
47
|
+
_webGLVersion: number;
|
|
48
|
+
/** @internal */
|
|
49
|
+
_gl: WebGL2RenderingContext;
|
|
50
|
+
/** @internal */
|
|
51
|
+
_glSRGBExtensionValues: {
|
|
52
|
+
SRGB: typeof WebGL2RenderingContext.SRGB;
|
|
53
|
+
SRGB8: typeof WebGL2RenderingContext.SRGB8 | EXT_sRGB["SRGB_ALPHA_EXT"];
|
|
54
|
+
SRGB8_ALPHA8: typeof WebGL2RenderingContext.SRGB8_ALPHA8 | EXT_sRGB["SRGB_ALPHA_EXT"];
|
|
55
|
+
};
|
|
56
|
+
_currentFramebuffer: Nullable<WebGLFramebuffer>;
|
|
57
|
+
_dummyFramebuffer: Nullable<WebGLFramebuffer>;
|
|
58
|
+
_drawCalls: PerfCounter;
|
|
59
|
+
}
|
|
60
|
+
export interface IWebGLEnginePublic extends IBaseEnginePublic {
|
|
61
|
+
webGLVersion: number;
|
|
62
|
+
enableUnpackFlipYCached: boolean;
|
|
63
|
+
}
|
|
64
|
+
export interface IWebGLEngineOptions extends IBaseEngineOptions, WebGLContextAttributes {
|
|
65
|
+
/**
|
|
66
|
+
* If sRGB Buffer support is not set during construction, use this value to force a specific state
|
|
67
|
+
* This is added due to an issue when processing textures in chrome/edge/firefox
|
|
68
|
+
* This will not influence NativeEngine and WebGPUEngine which set the behavior to true during construction.
|
|
69
|
+
*/
|
|
70
|
+
forceSRGBBufferSupportState?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Defines that engine should compile shaders with high precision floats (if supported). True by default
|
|
73
|
+
*/
|
|
74
|
+
useHighPrecisionFloats?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Defines if webgl2 should be turned off even if supported
|
|
77
|
+
* @see https://doc.babylonjs.com/setup/support/webGL2
|
|
78
|
+
*/
|
|
79
|
+
disableWebGL2Support?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Defines if the gl context should be released.
|
|
82
|
+
* It's false by default for backward compatibility, but you should probably pass true (see https://registry.khronos.org/webgl/extensions/WEBGL_lose_context/)
|
|
83
|
+
*/
|
|
84
|
+
loseContextOnDispose?: boolean;
|
|
85
|
+
}
|
|
86
|
+
export type WebGLEngineState = IWebGLEnginePublic & IWebGLEngineInternals & IWebGLEngineProtected;
|
|
87
|
+
export declare function initWebGLEngineState(canvasOrContext: Nullable<HTMLCanvasElement | OffscreenCanvas | WebGLRenderingContext | WebGL2RenderingContext>, options?: IWebGLEngineOptions): WebGLEngineState;
|
|
88
|
+
export declare function _getShaderProcessor(engineState: IWebGLEnginePublic, _shaderLanguage: ShaderLanguage): Nullable<IShaderProcessor>;
|
|
89
|
+
/**
|
|
90
|
+
* Gets an object containing information about the current webGL context
|
|
91
|
+
* @param engineState defines the engine state
|
|
92
|
+
* @returns an object containing the vendor, the renderer and the version of the current webGL context
|
|
93
|
+
*/
|
|
94
|
+
export declare function getGlInfo(engineState: IWebGLEnginePublic): {
|
|
95
|
+
glVersion: string;
|
|
96
|
+
glRenderer: string;
|
|
97
|
+
glVendor: string;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Gets the current render width
|
|
101
|
+
* @param engineState defines the engine state
|
|
102
|
+
* @param useScreen defines if screen size must be used (or the current render target if any)
|
|
103
|
+
* @returns a number defining the current render width
|
|
104
|
+
*/
|
|
105
|
+
export declare function getRenderWidth(engineState: IWebGLEnginePublic, useScreen?: boolean): number;
|
|
106
|
+
/**
|
|
107
|
+
* Gets the current render height
|
|
108
|
+
* @param engineState defines the engine state
|
|
109
|
+
* @param useScreen defines if screen size must be used (or the current render target if any)
|
|
110
|
+
* @returns a number defining the current render height
|
|
111
|
+
*/
|
|
112
|
+
export declare function getRenderHeight(engineState: IWebGLEnginePublic, useScreen?: boolean): number;
|
|
113
|
+
/**
|
|
114
|
+
* End the current frame
|
|
115
|
+
* @param engineState defines the engine state
|
|
116
|
+
*/
|
|
117
|
+
export declare function endFrame(engineState: IWebGLEnginePublic): void;
|
|
118
|
+
/**
|
|
119
|
+
* Clear the current render buffer or the current render target (if any is set up)
|
|
120
|
+
* @param engineState defines the engine state
|
|
121
|
+
* @param color defines the color to use
|
|
122
|
+
* @param backBuffer defines if the back buffer must be cleared
|
|
123
|
+
* @param depth defines if the depth buffer must be cleared
|
|
124
|
+
* @param stencil defines if the stencil buffer must be cleared
|
|
125
|
+
*/
|
|
126
|
+
export declare function clear(engineState: IWebGLEnginePublic, color: Nullable<IColor4Like>, backBuffer: boolean, depth: boolean, stencil?: boolean): void;
|
|
127
|
+
/**
|
|
128
|
+
* Apply all cached states (depth, culling, stencil and alpha)
|
|
129
|
+
*/
|
|
130
|
+
export declare function applyStates(engineState: IWebGLEnginePublic): void;
|
|
131
|
+
/**
|
|
132
|
+
* Force a WebGPU flush (ie. a flush of all waiting commands)
|
|
133
|
+
* @param reopenPass true to reopen at the end of the function the pass that was active when entering the function
|
|
134
|
+
*/
|
|
135
|
+
export declare function flushFramebuffer(engineState: IWebGLEnginePublic): void;
|
|
136
|
+
export declare const setViewport: (engineState: IWebGLEnginePublic, viewport: IViewportLike, requiredWidth?: number, requiredHeight?: number) => void;
|
|
137
|
+
/**
|
|
138
|
+
* Binds the frame buffer to the specified texture.
|
|
139
|
+
* @param rtWrapper The render target wrapper to render to
|
|
140
|
+
* @param faceIndex The face of the texture to render to in case of cube texture and if the render target wrapper is not a multi render target
|
|
141
|
+
* @param requiredWidth The width of the target to render to
|
|
142
|
+
* @param requiredHeight The height of the target to render to
|
|
143
|
+
* @param forceFullscreenViewport Forces the viewport to be the entire texture/screen if true
|
|
144
|
+
* @param lodLevel Defines the lod level to bind to the frame buffer
|
|
145
|
+
* @param layer Defines the 2d array index to bind to the frame buffer if the render target wrapper is not a multi render target
|
|
146
|
+
*/
|
|
147
|
+
export declare function bindFramebuffer(engineState: IWebGLEnginePublic, rtWrapper: RenderTargetWrapper, faceIndex?: number, requiredWidth?: number, requiredHeight?: number, forceFullscreenViewport?: boolean, lodLevel?: number, layer?: number): void;
|
|
148
|
+
/**
|
|
149
|
+
* @internal
|
|
150
|
+
*/
|
|
151
|
+
export declare function _viewport(engineState: IWebGLEnginePublic, x: number, y: number, width: number, height: number): void;
|
|
152
|
+
/**
|
|
153
|
+
* @internal
|
|
154
|
+
*/
|
|
155
|
+
export declare function _bindUnboundFramebuffer(engineState: IWebGLEnginePublic, framebuffer: Nullable<WebGLFramebuffer>): void;
|
|
156
|
+
/**
|
|
157
|
+
* Unbind the current render target texture from the webGL context
|
|
158
|
+
* @param texture defines the render target wrapper to unbind
|
|
159
|
+
* @param disableGenerateMipMaps defines a boolean indicating that mipmaps must not be generated
|
|
160
|
+
* @param onBeforeUnbind defines a function which will be called before the effective unbind
|
|
161
|
+
*/
|
|
162
|
+
export declare function unBindFramebuffer(engineState: IWebGLEnginePublic, texture: RenderTargetWrapper, disableGenerateMipMaps?: boolean, onBeforeUnbind?: () => void): void;
|
|
163
|
+
/**
|
|
164
|
+
* Generates the mipmaps for a texture
|
|
165
|
+
* @param texture texture to generate the mipmaps for
|
|
166
|
+
*/
|
|
167
|
+
export declare function generateMipmaps(engineState: IWebGLEnginePublic, texture: InternalTexture): void;
|
|
168
|
+
/**
|
|
169
|
+
* Unbind the current render target and bind the default framebuffer
|
|
170
|
+
*/
|
|
171
|
+
export declare function restoreDefaultFramebuffer(engineState: IWebGLEnginePublic): void;
|
|
172
|
+
/**
|
|
173
|
+
* Bind a webGL buffer to the webGL context
|
|
174
|
+
* @param buffer defines the buffer to bind
|
|
175
|
+
*/
|
|
176
|
+
export declare function bindArrayBuffer(engineState: IWebGLEnginePublic, buffer: Nullable<DataBuffer>): void;
|
|
177
|
+
/** @internal */
|
|
178
|
+
export declare function _resetVertexBufferBinding(engineState: IWebGLEnginePublic): void;
|
|
179
|
+
/**
|
|
180
|
+
* Creates a dynamic vertex buffer
|
|
181
|
+
* @param data the data for the dynamic vertex buffer
|
|
182
|
+
* @param _label defines the label of the buffer (for debug purpose)
|
|
183
|
+
* @returns the new WebGL dynamic buffer
|
|
184
|
+
*/
|
|
185
|
+
export declare function createDynamicVertexBuffer(engineState: IWebGLEnginePublic, data: DataArray, _label?: string): DataBuffer;
|
|
186
|
+
/**
|
|
187
|
+
* Creates a vertex buffer
|
|
188
|
+
* @param data the data for the vertex buffer
|
|
189
|
+
* @param _updatable whether the buffer should be created as updatable
|
|
190
|
+
* @param _label defines the label of the buffer (for debug purpose)
|
|
191
|
+
* @returns the new WebGL static buffer
|
|
192
|
+
*/
|
|
193
|
+
export declare function createVertexBuffer(engineState: IWebGLEnginePublic, data: DataArray, _updatable?: boolean, _label?: string): DataBuffer;
|
|
194
|
+
/**
|
|
195
|
+
* @internal
|
|
196
|
+
*/
|
|
197
|
+
export declare function _resetIndexBufferBinding(engineState: IWebGLEnginePublic): void;
|
|
198
|
+
/**
|
|
199
|
+
* Creates a new index buffer
|
|
200
|
+
* @param indices defines the content of the index buffer
|
|
201
|
+
* @param updatable defines if the index buffer must be updatable
|
|
202
|
+
* @param _label defines the label of the buffer (for debug purpose)
|
|
203
|
+
* @returns a new webGL buffer
|
|
204
|
+
*/
|
|
205
|
+
export declare function createIndexBuffer(engineState: IWebGLEnginePublic, indices: IndicesArray, updatable?: boolean, _label?: string): DataBuffer;
|
|
206
|
+
/**
|
|
207
|
+
* @internal
|
|
208
|
+
*/
|
|
209
|
+
export declare function _normalizeIndexData(engineState: IWebGLEnginePublic, indices: IndicesArray): Uint16Array | Uint32Array;
|
|
210
|
+
/**
|
|
211
|
+
* Bind a specific block at a given index in a specific shader program
|
|
212
|
+
* @param pipelineContext defines the pipeline context to use
|
|
213
|
+
* @param blockName defines the block name
|
|
214
|
+
* @param index defines the index where to bind the block
|
|
215
|
+
*/
|
|
216
|
+
export declare function bindUniformBlock(engineState: IWebGLEnginePublic, pipelineContext: IPipelineContext, blockName: string, index: number): void;
|
|
217
|
+
/**
|
|
218
|
+
* was bindIndexBuffer
|
|
219
|
+
* @internal
|
|
220
|
+
*/
|
|
221
|
+
export declare function _bindIndexBuffer(engineState: IWebGLEnginePublic, buffer: Nullable<DataBuffer>): void;
|
|
222
|
+
/**
|
|
223
|
+
* update the bound buffer with the given data
|
|
224
|
+
* @param data defines the data to update
|
|
225
|
+
*/
|
|
226
|
+
export declare function updateArrayBuffer(engineState: IWebGLEnginePublic, data: Float32Array): void;
|
|
227
|
+
/**
|
|
228
|
+
* @internal
|
|
229
|
+
*/
|
|
230
|
+
export declare function _bindIndexBufferWithCache(engineState: IWebGLEnginePublic, indexBuffer: Nullable<DataBuffer>): void;
|
|
231
|
+
/**
|
|
232
|
+
* Records a vertex array object
|
|
233
|
+
* @see https://doc.babylonjs.com/setup/support/webGL2#vertex-array-objects
|
|
234
|
+
* @param vertexBuffers defines the list of vertex buffers to store
|
|
235
|
+
* @param indexBuffer defines the index buffer to store
|
|
236
|
+
* @param effect defines the effect to store
|
|
237
|
+
* @param overrideVertexBuffers defines optional list of avertex buffers that overrides the entries in vertexBuffers
|
|
238
|
+
* @returns the new vertex array object
|
|
239
|
+
*/
|
|
240
|
+
export declare function recordVertexArrayObject(engineState: IWebGLEnginePublic, vertexBuffers: {
|
|
241
|
+
[key: string]: VertexBuffer;
|
|
242
|
+
}, indexBuffer: Nullable<DataBuffer>, effect: Effect, overrideVertexBuffers?: {
|
|
243
|
+
[kind: string]: Nullable<VertexBuffer>;
|
|
244
|
+
}): WebGLVertexArrayObject;
|
|
245
|
+
/**
|
|
246
|
+
* Bind a specific vertex array object
|
|
247
|
+
* @see https://doc.babylonjs.com/setup/support/webGL2#vertex-array-objects
|
|
248
|
+
* @param vertexArrayObject defines the vertex array object to bind
|
|
249
|
+
* @param indexBuffer defines the index buffer to bind
|
|
250
|
+
*/
|
|
251
|
+
export declare function bindVertexArrayObject(engineState: IWebGLEnginePublic, vertexArrayObject: WebGLVertexArrayObject, indexBuffer: Nullable<DataBuffer>): void;
|
|
252
|
+
/**
|
|
253
|
+
* Bind webGl buffers directly to the webGL context
|
|
254
|
+
* @param vertexBuffer defines the vertex buffer to bind
|
|
255
|
+
* @param indexBuffer defines the index buffer to bind
|
|
256
|
+
* @param vertexDeclaration defines the vertex declaration to use with the vertex buffer
|
|
257
|
+
* @param vertexStrideSize defines the vertex stride of the vertex buffer
|
|
258
|
+
* @param effect defines the effect associated with the vertex buffer
|
|
259
|
+
*/
|
|
260
|
+
export declare function bindBuffersDirectly(engineState: IWebGLEnginePublic, vertexBuffer: DataBuffer, indexBuffer: DataBuffer, vertexDeclaration: number[], vertexStrideSize: number, effect: Effect): void;
|
|
261
|
+
/**
|
|
262
|
+
* Bind a list of vertex buffers to the webGL context
|
|
263
|
+
* @param vertexBuffers defines the list of vertex buffers to bind
|
|
264
|
+
* @param indexBuffer defines the index buffer to bind
|
|
265
|
+
* @param effect defines the effect associated with the vertex buffers
|
|
266
|
+
* @param overrideVertexBuffers defines optional list of avertex buffers that overrides the entries in vertexBuffers
|
|
267
|
+
*/
|
|
268
|
+
export declare function bindBuffers(engineState: IWebGLEnginePublic, vertexBuffers: {
|
|
269
|
+
[key: string]: Nullable<VertexBuffer>;
|
|
270
|
+
}, indexBuffer: Nullable<DataBuffer>, effect: Effect, overrideVertexBuffers?: {
|
|
271
|
+
[kind: string]: Nullable<VertexBuffer>;
|
|
272
|
+
}): void;
|
|
273
|
+
/**
|
|
274
|
+
* Unbind all instance attributes
|
|
275
|
+
*/
|
|
276
|
+
export declare function unbindInstanceAttributes(engineState: IWebGLEnginePublic): void;
|
|
277
|
+
/**
|
|
278
|
+
* Release and free the memory of a vertex array object
|
|
279
|
+
* @param vao defines the vertex array object to delete
|
|
280
|
+
*/
|
|
281
|
+
export declare function releaseVertexArrayObject(engineState: IWebGLEnginePublic, vao: WebGLVertexArrayObject): void;
|
|
282
|
+
/**
|
|
283
|
+
* @internal
|
|
284
|
+
*/
|
|
285
|
+
export declare function _releaseBuffer(engineState: IWebGLEnginePublic, buffer: DataBuffer): boolean;
|
|
286
|
+
export declare function _deleteBuffer(engineState: IWebGLEnginePublic, buffer: DataBuffer): void;
|
|
287
|
+
/**
|
|
288
|
+
* Update the content of a webGL buffer used with instantiation and bind it to the webGL context
|
|
289
|
+
* @param instancesBuffer defines the webGL buffer to update and bind
|
|
290
|
+
* @param data defines the data to store in the buffer
|
|
291
|
+
* @param offsetLocations defines the offsets or attributes information used to determine where data must be stored in the buffer
|
|
292
|
+
*/
|
|
293
|
+
export declare function updateAndBindInstancesBuffer(engineState: IWebGLEnginePublic, instancesBuffer: DataBuffer, data: Float32Array, offsetLocations: number[] | InstancingAttributeInfo[]): void;
|
|
294
|
+
/**
|
|
295
|
+
* Bind the content of a webGL buffer used with instantiation
|
|
296
|
+
* @param instancesBuffer defines the webGL buffer to bind
|
|
297
|
+
* @param attributesInfo defines the offsets or attributes information used to determine where data must be stored in the buffer
|
|
298
|
+
* @param computeStride defines Whether to compute the strides from the info or use the default 0
|
|
299
|
+
*/
|
|
300
|
+
export declare function bindInstancesBuffer(engineState: IWebGLEnginePublic, instancesBuffer: DataBuffer, attributesInfo: InstancingAttributeInfo[], computeStride?: boolean): void;
|
|
301
|
+
/**
|
|
302
|
+
* Disable the instance attribute corresponding to the name in parameter
|
|
303
|
+
* @param name defines the name of the attribute to disable
|
|
304
|
+
*/
|
|
305
|
+
export declare function disableInstanceAttributeByName(engineState: IWebGLEnginePublic, name: string): void;
|
|
306
|
+
/**
|
|
307
|
+
* Disable the instance attribute corresponding to the location in parameter
|
|
308
|
+
* @param attributeLocation defines the attribute location of the attribute to disable
|
|
309
|
+
*/
|
|
310
|
+
export declare function disableInstanceAttribute(engineState: IWebGLEnginePublic, attributeLocation: number): void;
|
|
311
|
+
/**
|
|
312
|
+
* Disable the attribute corresponding to the location in parameter
|
|
313
|
+
* @param attributeLocation defines the attribute location of the attribute to disable
|
|
314
|
+
*/
|
|
315
|
+
export declare function disableAttributeByIndex(engineState: IWebGLEnginePublic, attributeLocation: number): void;
|
|
316
|
+
/**
|
|
317
|
+
* Draw a list of indexed primitives
|
|
318
|
+
* @param fillMode defines the primitive to use
|
|
319
|
+
* @param indexStart defines the starting index
|
|
320
|
+
* @param indexCount defines the number of index to draw
|
|
321
|
+
* @param instancesCount defines the number of instances to draw (if instantiation is enabled)
|
|
322
|
+
*/
|
|
323
|
+
export declare function drawElementsType(engineState: IWebGLEnginePublic, fillMode: number, indexStart: number, indexCount: number, instancesCount?: number): void;
|
|
324
|
+
/**
|
|
325
|
+
* Draw a list of unindexed primitives
|
|
326
|
+
* @param fillMode defines the primitive to use
|
|
327
|
+
* @param verticesStart defines the index of first vertex to draw
|
|
328
|
+
* @param verticesCount defines the count of vertices to draw
|
|
329
|
+
* @param instancesCount defines the number of instances to draw (if instantiation is enabled)
|
|
330
|
+
*/
|
|
331
|
+
export declare function drawArraysType(engineState: IWebGLEnginePublic, fillMode: number, verticesStart: number, verticesCount: number, instancesCount?: number): void;
|
|
332
|
+
/**
|
|
333
|
+
* Create a new effect (used to store vertex/fragment shaders)
|
|
334
|
+
* @param baseName defines the base name of the effect (The name of file without .fragment.fx or .vertex.fx)
|
|
335
|
+
* @param attributesNamesOrOptions defines either a list of attribute names or an IEffectCreationOptions object
|
|
336
|
+
* @param uniformsNamesOrEngine defines either a list of uniform names or the engine to use
|
|
337
|
+
* @param samplers defines an array of string used to represent textures
|
|
338
|
+
* @param defines defines the string containing the defines to use to compile the shaders
|
|
339
|
+
* @param fallbacks defines the list of potential fallbacks to use if shader compilation fails
|
|
340
|
+
* @param onCompiled defines a function to call when the effect creation is successful
|
|
341
|
+
* @param onError defines a function to call when the effect creation has failed
|
|
342
|
+
* @param indexParameters defines an object containing the index values to use to compile shaders (like the maximum number of simultaneous lights)
|
|
343
|
+
* @param shaderLanguage the language the shader is written in (default: GLSL)
|
|
344
|
+
* @returns the new Effect
|
|
345
|
+
*/
|
|
346
|
+
export declare function createEffect(engineState: IWebGLEnginePublic, baseName: any, attributesNamesOrOptions: string[] | IEffectCreationOptions, uniformsNamesOrEngine: string[] | ThinEngine, samplers?: string[], defines?: string, fallbacks?: IEffectFallbacks, onCompiled?: Nullable<(effect: Effect) => void>, onError?: Nullable<(effect: Effect, errors: string) => void>, indexParameters?: any, shaderLanguage?: ShaderLanguage): Effect;
|
|
347
|
+
/**
|
|
348
|
+
* @internal
|
|
349
|
+
*/
|
|
350
|
+
export declare function _getShaderSource(engineState: IWebGLEnginePublic, shader: WebGLShader): Nullable<string>;
|
|
351
|
+
/**
|
|
352
|
+
* Directly creates a webGL program
|
|
353
|
+
* @param pipelineContext defines the pipeline context to attach to
|
|
354
|
+
* @param vertexCode defines the vertex shader code to use
|
|
355
|
+
* @param fragmentCode defines the fragment shader code to use
|
|
356
|
+
* @param context defines the webGL context to use (if not set, the current one will be used)
|
|
357
|
+
* @param transformFeedbackVaryings defines the list of transform feedback varyings to use
|
|
358
|
+
* @returns the new webGL program
|
|
359
|
+
*/
|
|
360
|
+
export declare function createRawShaderProgram(engineState: IWebGLEnginePublic, pipelineContext: IPipelineContext, vertexCode: string, fragmentCode: string, context?: WebGLRenderingContext, transformFeedbackVaryings?: Nullable<string[]>): WebGLProgram;
|
|
361
|
+
/**
|
|
362
|
+
* @internal
|
|
363
|
+
*/
|
|
364
|
+
export declare function _deletePipelineContext(engineState: IWebGLEnginePublic, pipelineContext: IPipelineContext): void;
|
|
365
|
+
/**
|
|
366
|
+
* Creates a webGL program
|
|
367
|
+
* @param pipelineContext defines the pipeline context to attach to
|
|
368
|
+
* @param vertexCode defines the vertex shader code to use
|
|
369
|
+
* @param fragmentCode defines the fragment shader code to use
|
|
370
|
+
* @param defines defines the string containing the defines to use to compile the shaders
|
|
371
|
+
* @param context defines the webGL context to use (if not set, the current one will be used)
|
|
372
|
+
* @param transformFeedbackVaryings defines the list of transform feedback varyings to use
|
|
373
|
+
* @returns the new webGL program
|
|
374
|
+
*/
|
|
375
|
+
export declare function createThinShaderProgram(engineState: IWebGLEnginePublic, pipelineContext: IPipelineContext, vertexCode: string, fragmentCode: string, defines: Nullable<string>, context?: WebGLRenderingContext, transformFeedbackVaryings?: Nullable<string[]>): WebGLProgram;
|
|
376
|
+
export declare function createShaderProgram(engineState: IWebGLEnginePublic, pipelineContext: IPipelineContext, vertexCode: string, fragmentCode: string, defines: Nullable<string>, context?: WebGLRenderingContext, transformFeedbackVaryings?: Nullable<string[]>): WebGLProgram;
|
|
377
|
+
/**
|
|
378
|
+
* Creates a new pipeline context
|
|
379
|
+
* @param shaderProcessingContext defines the shader processing context used during the processing if available
|
|
380
|
+
* @returns the new pipeline
|
|
381
|
+
*/
|
|
382
|
+
export declare function createPipelineContext(engineState: IWebGLEnginePublic, shaderProcessingContext: Nullable<ShaderProcessingContext>): IPipelineContext;
|
|
383
|
+
/**
|
|
384
|
+
* @internal
|
|
385
|
+
*/
|
|
386
|
+
export declare function _getUseSRGBBuffer(engineState: IWebGLEnginePublic, useSRGBBuffer: boolean, noMipmap: boolean): boolean;
|
|
387
|
+
export declare function _createShaderProgramThin(engineState: WebGLEngineState, pipelineContext: WebGLPipelineContext, vertexShader: WebGLShader, fragmentShader: WebGLShader, context: WebGLRenderingContext, _transformFeedbackVaryings?: Nullable<string[]>): WebGLProgram;
|
|
388
|
+
export declare function _createShaderProgram(engineState: WebGLEngineState, pipelineContext: WebGLPipelineContext, vertexShader: WebGLShader, fragmentShader: WebGLShader, context: WebGLRenderingContext, transformFeedbackVaryings?: Nullable<string[]>): WebGLProgram;
|
|
389
|
+
export declare function _finalizePipelineContext(engineState: WebGLEngineState, pipelineContext: WebGLPipelineContext): void;
|
|
390
|
+
/**
|
|
391
|
+
* @internal
|
|
392
|
+
*/
|
|
393
|
+
export declare function _preparePipelineContext(engineState: IWebGLEnginePublic, pipelineContext: IPipelineContext, vertexSourceCode: string, fragmentSourceCode: string, createAsRaw: boolean, _rawVertexSourceCode: string, _rawFragmentSourceCode: string, rebuildRebind: any, defines: Nullable<string>, transformFeedbackVaryings: Nullable<string[]>, _key: string): void;
|
|
394
|
+
/**
|
|
395
|
+
* @internal
|
|
396
|
+
*/
|
|
397
|
+
export declare function _isRenderingStateCompiled(engineState: IWebGLEnginePublic, pipelineContext: IPipelineContext): boolean;
|
|
398
|
+
/**
|
|
399
|
+
* @internal
|
|
400
|
+
*/
|
|
401
|
+
export declare function _executeWhenRenderingStateIsCompiled(_engineState: IWebGLEnginePublic, pipelineContext: IPipelineContext, action: () => void): void;
|
|
402
|
+
/**
|
|
403
|
+
* Gets the list of webGL uniform locations associated with a specific program based on a list of uniform names
|
|
404
|
+
* @param pipelineContext defines the pipeline context to use
|
|
405
|
+
* @param uniformsNames defines the list of uniform names
|
|
406
|
+
* @returns an array of webGL uniform locations
|
|
407
|
+
*/
|
|
408
|
+
export declare function getUniforms(engineState: IWebGLEnginePublic, pipelineContext: IPipelineContext, uniformsNames: string[]): Nullable<WebGLUniformLocation>[];
|
|
409
|
+
/**
|
|
410
|
+
* Gets the list of active attributes for a given webGL program
|
|
411
|
+
* @param pipelineContext defines the pipeline context to use
|
|
412
|
+
* @param attributesNames defines the list of attribute names to get
|
|
413
|
+
* @returns an array of indices indicating the offset of each attribute
|
|
414
|
+
*/
|
|
415
|
+
export declare function getAttributes(engineState: IWebGLEnginePublic, pipelineContext: IPipelineContext, attributesNames: string[]): number[];
|
|
416
|
+
/**
|
|
417
|
+
* Activates an effect, making it the current one (ie. the one used for rendering)
|
|
418
|
+
* @param effect defines the effect to activate
|
|
419
|
+
*/
|
|
420
|
+
export declare function enableEffect(engineState: IWebGLEnginePublic, effect: Nullable<Effect | DrawWrapper>): void;
|
|
421
|
+
/**
|
|
422
|
+
* Force the entire cache to be cleared
|
|
423
|
+
* You should not have to use this function unless your engine needs to share the webGL context with another engine
|
|
424
|
+
* @param bruteForce defines a boolean to force clearing ALL caches (including stencil, detoh and alpha states)
|
|
425
|
+
*/
|
|
426
|
+
export declare function wipeCaches(engineState: IWebGLEnginePublic, bruteForce?: boolean): void;
|
|
427
|
+
/**
|
|
428
|
+
* @internal
|
|
429
|
+
*/
|
|
430
|
+
export declare function _getSamplingParameters(engineState: WebGLEngineState, samplingMode: number, generateMipMaps: boolean): {
|
|
431
|
+
min: number;
|
|
432
|
+
mag: number;
|
|
433
|
+
};
|
|
434
|
+
/** @internal */
|
|
435
|
+
export declare function _createTexture(engineState: WebGLEngineState): WebGLTexture;
|
|
436
|
+
/** @internal */
|
|
437
|
+
export declare function _createHardwareTexture(engineState: WebGLEngineState): HardwareTextureWrapper;
|
|
438
|
+
/**
|
|
439
|
+
* Creates an internal texture without binding it to a framebuffer
|
|
440
|
+
* @internal
|
|
441
|
+
* @param size defines the size of the texture
|
|
442
|
+
* @param options defines the options used to create the texture
|
|
443
|
+
* @param _delayGPUTextureCreation true to delay the texture creation the first time it is really needed. false to create it right away
|
|
444
|
+
* @param source source type of the texture
|
|
445
|
+
* @returns a new internal texture
|
|
446
|
+
*/
|
|
447
|
+
export declare function _createInternalTexture(engineState: IWebGLEnginePublic, size: TextureSize, options: boolean | InternalTextureCreationOptions, _delayGPUTextureCreation?: boolean, source?: InternalTextureSource): InternalTexture;
|
|
448
|
+
/**
|
|
449
|
+
* Usually called from Texture.ts.
|
|
450
|
+
* Passed information to create a WebGLTexture
|
|
451
|
+
* @param url defines a value which contains one of the following:
|
|
452
|
+
* * A conventional http URL, e.g. 'http://...' or 'file://...'
|
|
453
|
+
* * A base64 string of in-line texture data, e.g. 'data:image/jpg;base64,/...'
|
|
454
|
+
* * An indicator that data being passed using the buffer parameter, e.g. 'data:mytexture.jpg'
|
|
455
|
+
* @param noMipmap defines a boolean indicating that no mipmaps shall be generated. Ignored for compressed textures. They must be in the file
|
|
456
|
+
* @param invertY when true, image is flipped when loaded. You probably want true. Certain compressed textures may invert this if their default is inverted (eg. ktx)
|
|
457
|
+
* @param scene needed for loading to the correct scene
|
|
458
|
+
* @param samplingMode mode with should be used sample / access the texture (Default: Texture.TRILINEAR_SAMPLINGMODE)
|
|
459
|
+
* @param onLoad optional callback to be called upon successful completion
|
|
460
|
+
* @param onError optional callback to be called upon failure
|
|
461
|
+
* @param buffer a source of a file previously fetched as either a base64 string, an ArrayBuffer (compressed or image format), HTMLImageElement (image format), or a Blob
|
|
462
|
+
* @param fallback an internal argument in case the function must be called again, due to etc1 not having alpha capabilities
|
|
463
|
+
* @param format internal format. Default: RGB when extension is '.jpg' else RGBA. Ignored for compressed textures
|
|
464
|
+
* @param forcedExtension defines the extension to use to pick the right loader
|
|
465
|
+
* @param mimeType defines an optional mime type
|
|
466
|
+
* @param loaderOptions options to be passed to the loader
|
|
467
|
+
* @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
|
|
468
|
+
* @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
|
|
469
|
+
* @returns a InternalTexture for assignment back into BABYLON.Texture
|
|
470
|
+
*/
|
|
471
|
+
export declare function createTexture(engineState: IWebGLEnginePublic, url: Nullable<string>, noMipmap: boolean, invertY: boolean, scene: Nullable<ISceneLike>, samplingMode?: number, onLoad?: Nullable<(texture: InternalTexture) => void>, onError?: Nullable<(message: string, exception: any) => void>, buffer?: Nullable<string | ArrayBuffer | ArrayBufferView | HTMLImageElement | Blob | ImageBitmap>, fallback?: Nullable<InternalTexture>, format?: Nullable<number>, forcedExtension?: Nullable<string>, mimeType?: string, loaderOptions?: any, creationFlags?: number, useSRGBBuffer?: boolean): InternalTexture;
|
|
472
|
+
/**
|
|
473
|
+
* Calls to the GL texImage2D and texImage3D functions require three arguments describing the pixel format of the texture.
|
|
474
|
+
* createTexture derives these from the babylonFormat and useSRGBBuffer arguments and also the file extension of the URL it's working with.
|
|
475
|
+
* This function encapsulates that derivation for easy unit testing.
|
|
476
|
+
* @param babylonFormat Babylon's format enum, as specified in ITextureCreationOptions.
|
|
477
|
+
* @param fileExtension The file extension including the dot, e.g. .jpg.
|
|
478
|
+
* @param useSRGBBuffer Use SRGB not linear.
|
|
479
|
+
* @returns The options to pass to texImage2D or texImage3D calls.
|
|
480
|
+
* @internal
|
|
481
|
+
*/
|
|
482
|
+
export declare function _getTexImageParametersForCreateTexture(engineState: IWebGLEnginePublic, babylonFormat: Nullable<number>, fileExtension: string, useSRGBBuffer: boolean): TexImageParameters;
|
|
483
|
+
/**
|
|
484
|
+
* @internal
|
|
485
|
+
* Rescales a texture
|
|
486
|
+
* @param source input texture
|
|
487
|
+
* @param destination destination texture
|
|
488
|
+
* @param scene scene to use to render the resize
|
|
489
|
+
* @param internalFormat format to use when resizing
|
|
490
|
+
* @param onComplete callback to be called when resize has completed
|
|
491
|
+
*/
|
|
492
|
+
export declare function _rescaleTexture(engineState: IWebGLEnginePublic, source: InternalTexture, destination: InternalTexture, scene: Nullable<any>, internalFormat: number, onComplete: () => void): void;
|
|
493
|
+
/**
|
|
494
|
+
* @internal
|
|
495
|
+
*/
|
|
496
|
+
export declare function _unpackFlipY(engineState: IWebGLEnginePublic, value: boolean): void;
|
|
497
|
+
/** @internal */
|
|
498
|
+
export declare function _getUnpackAlignement(engineState: IWebGLEnginePublic): number;
|
|
499
|
+
export declare function _getTextureTarget(engineState: IWebGLEnginePublic, texture: InternalTexture): number;
|
|
500
|
+
/**
|
|
501
|
+
* Update the sampling mode of a given texture
|
|
502
|
+
* @param samplingMode defines the required sampling mode
|
|
503
|
+
* @param texture defines the texture to update
|
|
504
|
+
* @param generateMipMaps defines whether to generate mipmaps for the texture
|
|
505
|
+
*/
|
|
506
|
+
export declare function updateTextureSamplingMode(engineState: IWebGLEnginePublic, samplingMode: number, texture: InternalTexture, generateMipMaps?: boolean): void;
|
|
507
|
+
/**
|
|
508
|
+
* Update the sampling mode of a given texture
|
|
509
|
+
* @param texture defines the texture to update
|
|
510
|
+
* @param wrapU defines the texture wrap mode of the u coordinates
|
|
511
|
+
* @param wrapV defines the texture wrap mode of the v coordinates
|
|
512
|
+
* @param wrapR defines the texture wrap mode of the r coordinates
|
|
513
|
+
*/
|
|
514
|
+
export declare function updateTextureWrappingMode(engineState: IWebGLEnginePublic, texture: InternalTexture, wrapU: Nullable<number>, wrapV?: Nullable<number>, wrapR?: Nullable<number>): void;
|
|
515
|
+
/**
|
|
516
|
+
* @internal
|
|
517
|
+
*/
|
|
518
|
+
export declare function _setupDepthStencilTexture(engineState: IWebGLEnginePublic, internalTexture: InternalTexture, size: number | {
|
|
519
|
+
width: number;
|
|
520
|
+
height: number;
|
|
521
|
+
layers?: number;
|
|
522
|
+
}, generateStencil: boolean, bilinearFiltering: boolean, comparisonFunction: number, samples?: number): void;
|
|
523
|
+
/**
|
|
524
|
+
* @internal
|
|
525
|
+
*/
|
|
526
|
+
export declare function _uploadCompressedDataToTextureDirectly(engineState: IWebGLEnginePublic, texture: InternalTexture, internalFormat: number, width: number, height: number, data: ArrayBufferView, faceIndex?: number, lod?: number): void;
|
|
527
|
+
/**
|
|
528
|
+
* @internal
|
|
529
|
+
*/
|
|
530
|
+
export declare function _uploadDataToTextureDirectly(engineState: IWebGLEnginePublic, texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number, babylonInternalFormat?: number, useTextureWidthAndHeight?: boolean): void;
|
|
531
|
+
/**
|
|
532
|
+
* Update a portion of an internal texture
|
|
533
|
+
* @param texture defines the texture to update
|
|
534
|
+
* @param imageData defines the data to store into the texture
|
|
535
|
+
* @param xOffset defines the x coordinates of the update rectangle
|
|
536
|
+
* @param yOffset defines the y coordinates of the update rectangle
|
|
537
|
+
* @param width defines the width of the update rectangle
|
|
538
|
+
* @param height defines the height of the update rectangle
|
|
539
|
+
* @param faceIndex defines the face index if texture is a cube (0 by default)
|
|
540
|
+
* @param lod defines the lod level to update (0 by default)
|
|
541
|
+
* @param generateMipMaps defines whether to generate mipmaps or not
|
|
542
|
+
*/
|
|
543
|
+
export declare function updateTextureData(engineState: IWebGLEnginePublic, texture: InternalTexture, imageData: ArrayBufferView, xOffset: number, yOffset: number, width: number, height: number, faceIndex?: number, lod?: number, generateMipMaps?: boolean): void;
|
|
544
|
+
/**
|
|
545
|
+
* @internal
|
|
546
|
+
*/
|
|
547
|
+
export declare function _uploadArrayBufferViewToTexture(engineState: IWebGLEnginePublic, texture: InternalTexture, imageData: ArrayBufferView, faceIndex?: number, lod?: number): void;
|
|
548
|
+
export declare function _prepareWebGLTextureContinuation(engineState: IWebGLEnginePublic, texture: InternalTexture, scene: Nullable<ISceneLike>, noMipmap: boolean, isCompressed: boolean, samplingMode: number): void;
|
|
549
|
+
/**
|
|
550
|
+
* @internal
|
|
551
|
+
*/
|
|
552
|
+
export declare function _setupFramebufferDepthAttachments(engineState: IWebGLEnginePublic, generateStencilBuffer: boolean, generateDepthBuffer: boolean, width: number, height: number, samples?: number): Nullable<WebGLRenderbuffer>;
|
|
553
|
+
/**
|
|
554
|
+
* @internal
|
|
555
|
+
*/
|
|
556
|
+
export declare function _createRenderBuffer(engineState: IWebGLEnginePublic, width: number, height: number, samples: number, internalFormat: number, msInternalFormat: number, attachment: number, unbindBuffer?: boolean): Nullable<WebGLRenderbuffer>;
|
|
557
|
+
/**
|
|
558
|
+
* @internal
|
|
559
|
+
*/
|
|
560
|
+
export declare function _updateRenderBuffer(engineState: IWebGLEnginePublic, renderBuffer: Nullable<WebGLRenderbuffer>, width: number, height: number, samples: number, internalFormat: number, msInternalFormat: number, attachment: number, unbindBuffer?: boolean): Nullable<WebGLRenderbuffer>;
|
|
561
|
+
/**
|
|
562
|
+
* @internal
|
|
563
|
+
*/
|
|
564
|
+
export declare function _releaseTexture(engineState: IWebGLEnginePublic, texture: InternalTexture): void;
|
|
565
|
+
export declare function _deleteTexture(engineState: IWebGLEnginePublic, texture: Nullable<WebGLTexture>): void;
|
|
566
|
+
export declare function _setProgram(engineState: IWebGLEnginePublic, program: WebGLProgram): void;
|
|
567
|
+
/**
|
|
568
|
+
* Binds an effect to the webGL context
|
|
569
|
+
* @param effect defines the effect to bind
|
|
570
|
+
*/
|
|
571
|
+
export declare function bindSamplers(engineState: IWebGLEnginePublic, effect: Effect): void;
|
|
572
|
+
/**
|
|
573
|
+
* @internal
|
|
574
|
+
*/
|
|
575
|
+
export declare function _bindTextureDirectly(engineState: IWebGLEnginePublic, target: number, texture: Nullable<InternalTexture>, forTextureDataUpdate?: boolean, force?: boolean): boolean;
|
|
576
|
+
/**
|
|
577
|
+
* @internal
|
|
578
|
+
*/
|
|
579
|
+
export declare function _bindTexture(engineState: IWebGLEnginePublic, channel: number, texture: Nullable<InternalTexture>, name: string): void;
|
|
580
|
+
/**
|
|
581
|
+
* Unbind all textures from the webGL context
|
|
582
|
+
*/
|
|
583
|
+
export declare function unbindAllTextures(engineState: IWebGLEnginePublic): void;
|
|
584
|
+
/**
|
|
585
|
+
* Sets a texture to the according uniform.
|
|
586
|
+
* @param channel The texture channel
|
|
587
|
+
* @param uniform The uniform to set
|
|
588
|
+
* @param texture The texture to apply
|
|
589
|
+
* @param name The name of the uniform in the effect
|
|
590
|
+
*/
|
|
591
|
+
export declare function setTexture(engineState: IWebGLEnginePublic, channel: number, uniform: Nullable<WebGLUniformLocation>, texture: Nullable<ThinTexture>, name: string): void;
|
|
592
|
+
export declare function _setTexture(engineState: IWebGLEnginePublic, channel: number, texture: Nullable<ThinTexture>, isPartOfTextureArray?: boolean, depthStencilTexture?: boolean, _name?: string): boolean;
|
|
593
|
+
/**
|
|
594
|
+
* Sets an array of texture to the webGL context
|
|
595
|
+
* @param channel defines the channel where the texture array must be set
|
|
596
|
+
* @param uniform defines the associated uniform location
|
|
597
|
+
* @param textures defines the array of textures to bind
|
|
598
|
+
* @param name name of the channel
|
|
599
|
+
*/
|
|
600
|
+
export declare function setTextureArray(engineState: IWebGLEnginePublic, channel: number, uniform: Nullable<WebGLUniformLocation>, textures: ThinTexture[], name: string): void;
|
|
601
|
+
/**
|
|
602
|
+
* @internal
|
|
603
|
+
*/
|
|
604
|
+
export declare function _setAnisotropicLevel(engineState: IWebGLEnginePublic, target: number, internalTexture: InternalTexture, anisotropicFilteringLevel: number): void;
|
|
605
|
+
export declare function _setTextureParameterFloat(engineState: IWebGLEnginePublic, target: number, parameter: number, value: number, texture: InternalTexture): void;
|
|
606
|
+
export declare function _setTextureParameterInteger(engineState: IWebGLEnginePublic, target: number, parameter: number, value: number, texture?: InternalTexture): void;
|
|
607
|
+
/**
|
|
608
|
+
* Unbind all vertex attributes from the webGL context
|
|
609
|
+
*/
|
|
610
|
+
export declare function unbindAllAttributes(engineState: IWebGLEnginePublic): void;
|
|
611
|
+
/**
|
|
612
|
+
* Force the engine to release all cached effects. This means that next effect compilation will have to be done completely even if a similar effect was already compiled
|
|
613
|
+
*/
|
|
614
|
+
export declare function releaseEffects(engineState: IWebGLEnginePublic): void;
|
|
615
|
+
/**
|
|
616
|
+
* Attach a new callback raised when context lost event is fired
|
|
617
|
+
* @param callback defines the callback to call
|
|
618
|
+
*/
|
|
619
|
+
export declare function attachContextLostEvent(engineState: IWebGLEnginePublic, callback: (event: WebGLContextEvent) => void): void;
|
|
620
|
+
/**
|
|
621
|
+
* Attach a new callback raised when context restored event is fired
|
|
622
|
+
* @param callback defines the callback to call
|
|
623
|
+
*/
|
|
624
|
+
export declare function attachContextRestoredEvent(engineState: IWebGLEnginePublic, callback: (event: WebGLContextEvent) => void): void;
|
|
625
|
+
/**
|
|
626
|
+
* Get the current error code of the webGL context
|
|
627
|
+
* @returns the error code
|
|
628
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getError
|
|
629
|
+
*/
|
|
630
|
+
export declare function getError(engineState: IWebGLEnginePublic): number;
|
|
631
|
+
export declare function _initGLContext(engineState: IWebGLEnginePublic): void;
|
|
632
|
+
export declare function _initFeatures(engineState: IWebGLEnginePublic): void;
|
|
633
|
+
/**
|
|
634
|
+
* @internal
|
|
635
|
+
*/
|
|
636
|
+
export declare function _getWebGLTextureType(engineState: IWebGLEnginePublic, type: number): number;
|
|
637
|
+
/**
|
|
638
|
+
* @internal
|
|
639
|
+
*/
|
|
640
|
+
export declare function _getInternalFormat(engineState: IWebGLEnginePublic, format: number, useSRGBBuffer?: boolean): number;
|
|
641
|
+
/**
|
|
642
|
+
* @internal
|
|
643
|
+
*/
|
|
644
|
+
export declare function _getRGBABufferInternalSizedFormat(engineState: IWebGLEnginePublic, type: number, format?: number, useSRGBBuffer?: boolean): number;
|
|
645
|
+
/**
|
|
646
|
+
* @internal
|
|
647
|
+
*/
|
|
648
|
+
export declare function _getRGBAMultiSampleBufferFormat(engineState: IWebGLEnginePublic, type: number, format?: Constants): number;
|
|
649
|
+
/**
|
|
650
|
+
* Reads pixels from the current frame buffer. Please note that this function can be slow
|
|
651
|
+
* @param x defines the x coordinate of the rectangle where pixels must be read
|
|
652
|
+
* @param y defines the y coordinate of the rectangle where pixels must be read
|
|
653
|
+
* @param width defines the width of the rectangle where pixels must be read
|
|
654
|
+
* @param height defines the height of the rectangle where pixels must be read
|
|
655
|
+
* @param hasAlpha defines whether the output should have alpha or not (defaults to true)
|
|
656
|
+
* @param flushRenderer true to flush the renderer from the pending commands before reading the pixels
|
|
657
|
+
* @returns a ArrayBufferView promise (Uint8Array) containing RGBA colors
|
|
658
|
+
*/
|
|
659
|
+
export declare function readPixels(engineState: IWebGLEnginePublic, x: number, y: number, width: number, height: number, hasAlpha?: boolean, flushRenderer?: boolean): Promise<ArrayBufferView>;
|
|
660
|
+
/**
|
|
661
|
+
* Set the value of an uniform to a number (int)
|
|
662
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
663
|
+
* @param value defines the int number to store
|
|
664
|
+
* @returns true if the value was set
|
|
665
|
+
*/
|
|
666
|
+
export declare function setInt(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, value: number): boolean;
|
|
667
|
+
/**
|
|
668
|
+
* Set the value of an uniform to a int2
|
|
669
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
670
|
+
* @param x defines the 1st component of the value
|
|
671
|
+
* @param y defines the 2nd component of the value
|
|
672
|
+
* @returns true if the value was set
|
|
673
|
+
*/
|
|
674
|
+
export declare function setInt2(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, x: number, y: number): boolean;
|
|
675
|
+
/**
|
|
676
|
+
* Set the value of an uniform to a int3
|
|
677
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
678
|
+
* @param x defines the 1st component of the value
|
|
679
|
+
* @param y defines the 2nd component of the value
|
|
680
|
+
* @param z defines the 3rd component of the value
|
|
681
|
+
* @returns true if the value was set
|
|
682
|
+
*/
|
|
683
|
+
export declare function setInt3(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, x: number, y: number, z: number): boolean;
|
|
684
|
+
/**
|
|
685
|
+
* Set the value of an uniform to a int4
|
|
686
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
687
|
+
* @param x defines the 1st component of the value
|
|
688
|
+
* @param y defines the 2nd component of the value
|
|
689
|
+
* @param z defines the 3rd component of the value
|
|
690
|
+
* @param w defines the 4th component of the value
|
|
691
|
+
* @returns true if the value was set
|
|
692
|
+
*/
|
|
693
|
+
export declare function setInt4(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, x: number, y: number, z: number, w: number): boolean;
|
|
694
|
+
/**
|
|
695
|
+
* Set the value of an uniform to an array of int32
|
|
696
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
697
|
+
* @param array defines the array of int32 to store
|
|
698
|
+
* @returns true if the value was set
|
|
699
|
+
*/
|
|
700
|
+
export declare function setIntArray(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, array: Int32Array): boolean;
|
|
701
|
+
/**
|
|
702
|
+
* Set the value of an uniform to an array of int32 (stored as vec2)
|
|
703
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
704
|
+
* @param array defines the array of int32 to store
|
|
705
|
+
* @returns true if the value was set
|
|
706
|
+
*/
|
|
707
|
+
export declare function setIntArray2(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, array: Int32Array): boolean;
|
|
708
|
+
/**
|
|
709
|
+
* Set the value of an uniform to an array of int32 (stored as vec3)
|
|
710
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
711
|
+
* @param array defines the array of int32 to store
|
|
712
|
+
* @returns true if the value was set
|
|
713
|
+
*/
|
|
714
|
+
export declare function setIntArray3(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, array: Int32Array): boolean;
|
|
715
|
+
/**
|
|
716
|
+
* Set the value of an uniform to an array of int32 (stored as vec4)
|
|
717
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
718
|
+
* @param array defines the array of int32 to store
|
|
719
|
+
* @returns true if the value was set
|
|
720
|
+
*/
|
|
721
|
+
export declare function setIntArray4(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, array: Int32Array): boolean;
|
|
722
|
+
/**
|
|
723
|
+
* Set the value of an uniform to a number (unsigned int)
|
|
724
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
725
|
+
* @param value defines the unsigned int number to store
|
|
726
|
+
* @returns true if the value was set
|
|
727
|
+
*/
|
|
728
|
+
export declare function setUInt(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, value: number): boolean;
|
|
729
|
+
/**
|
|
730
|
+
* Set the value of an uniform to a unsigned int2
|
|
731
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
732
|
+
* @param x defines the 1st component of the value
|
|
733
|
+
* @param y defines the 2nd component of the value
|
|
734
|
+
* @returns true if the value was set
|
|
735
|
+
*/
|
|
736
|
+
export declare function setUInt2(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, x: number, y: number): boolean;
|
|
737
|
+
/**
|
|
738
|
+
* Set the value of an uniform to a unsigned int3
|
|
739
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
740
|
+
* @param x defines the 1st component of the value
|
|
741
|
+
* @param y defines the 2nd component of the value
|
|
742
|
+
* @param z defines the 3rd component of the value
|
|
743
|
+
* @returns true if the value was set
|
|
744
|
+
*/
|
|
745
|
+
export declare function setUInt3(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, x: number, y: number, z: number): boolean;
|
|
746
|
+
/**
|
|
747
|
+
* Set the value of an uniform to a unsigned int4
|
|
748
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
749
|
+
* @param x defines the 1st component of the value
|
|
750
|
+
* @param y defines the 2nd component of the value
|
|
751
|
+
* @param z defines the 3rd component of the value
|
|
752
|
+
* @param w defines the 4th component of the value
|
|
753
|
+
* @returns true if the value was set
|
|
754
|
+
*/
|
|
755
|
+
export declare function setUInt4(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, x: number, y: number, z: number, w: number): boolean;
|
|
756
|
+
/**
|
|
757
|
+
* Set the value of an uniform to an array of unsigned int32
|
|
758
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
759
|
+
* @param array defines the array of unsigned int32 to store
|
|
760
|
+
* @returns true if the value was set
|
|
761
|
+
*/
|
|
762
|
+
export declare function setUIntArray(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, array: Uint32Array): boolean;
|
|
763
|
+
/**
|
|
764
|
+
* Set the value of an uniform to an array of unsigned int32 (stored as vec2)
|
|
765
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
766
|
+
* @param array defines the array of unsigned int32 to store
|
|
767
|
+
* @returns true if the value was set
|
|
768
|
+
*/
|
|
769
|
+
export declare function setUIntArray2(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, array: Uint32Array): boolean;
|
|
770
|
+
/**
|
|
771
|
+
* Set the value of an uniform to an array of unsigned int32 (stored as vec3)
|
|
772
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
773
|
+
* @param array defines the array of unsigned int32 to store
|
|
774
|
+
* @returns true if the value was set
|
|
775
|
+
*/
|
|
776
|
+
export declare function setUIntArray3(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, array: Uint32Array): boolean;
|
|
777
|
+
/**
|
|
778
|
+
* Set the value of an uniform to an array of unsigned int32 (stored as vec4)
|
|
779
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
780
|
+
* @param array defines the array of unsigned int32 to store
|
|
781
|
+
* @returns true if the value was set
|
|
782
|
+
*/
|
|
783
|
+
export declare function setUIntArray4(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, array: Uint32Array): boolean;
|
|
784
|
+
/**
|
|
785
|
+
* Set the value of an uniform to an array of number
|
|
786
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
787
|
+
* @param array defines the array of number to store
|
|
788
|
+
* @returns true if the value was set
|
|
789
|
+
*/
|
|
790
|
+
export declare function setArray(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, array: number[] | Float32Array): boolean;
|
|
791
|
+
/**
|
|
792
|
+
* Set the value of an uniform to an array of number (stored as vec2)
|
|
793
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
794
|
+
* @param array defines the array of number to store
|
|
795
|
+
* @returns true if the value was set
|
|
796
|
+
*/
|
|
797
|
+
export declare function setArray2(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, array: number[] | Float32Array): boolean;
|
|
798
|
+
/**
|
|
799
|
+
* Set the value of an uniform to an array of number (stored as vec3)
|
|
800
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
801
|
+
* @param array defines the array of number to store
|
|
802
|
+
* @returns true if the value was set
|
|
803
|
+
*/
|
|
804
|
+
export declare function setArray3(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, array: number[] | Float32Array): boolean;
|
|
805
|
+
/**
|
|
806
|
+
* Set the value of an uniform to an array of number (stored as vec4)
|
|
807
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
808
|
+
* @param array defines the array of number to store
|
|
809
|
+
* @returns true if the value was set
|
|
810
|
+
*/
|
|
811
|
+
export declare function setArray4(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, array: number[] | Float32Array): boolean;
|
|
812
|
+
/**
|
|
813
|
+
* Set the value of an uniform to an array of float32 (stored as matrices)
|
|
814
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
815
|
+
* @param matrices defines the array of float32 to store
|
|
816
|
+
* @returns true if the value was set
|
|
817
|
+
*/
|
|
818
|
+
export declare function setMatrices(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, matrices: Float32Array): boolean;
|
|
819
|
+
/**
|
|
820
|
+
* Set the value of an uniform to a matrix (3x3)
|
|
821
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
822
|
+
* @param matrix defines the Float32Array representing the 3x3 matrix to store
|
|
823
|
+
* @returns true if the value was set
|
|
824
|
+
*/
|
|
825
|
+
export declare function setMatrix3x3(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, matrix: Float32Array): boolean;
|
|
826
|
+
/**
|
|
827
|
+
* Set the value of an uniform to a matrix (2x2)
|
|
828
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
829
|
+
* @param matrix defines the Float32Array representing the 2x2 matrix to store
|
|
830
|
+
* @returns true if the value was set
|
|
831
|
+
*/
|
|
832
|
+
export declare function setMatrix2x2(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, matrix: Float32Array): boolean;
|
|
833
|
+
/**
|
|
834
|
+
* Set the value of an uniform to a number (float)
|
|
835
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
836
|
+
* @param value defines the float number to store
|
|
837
|
+
* @returns true if the value was transferred
|
|
838
|
+
*/
|
|
839
|
+
export declare function setFloat(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, value: number): boolean;
|
|
840
|
+
/**
|
|
841
|
+
* Set the value of an uniform to a vec2
|
|
842
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
843
|
+
* @param x defines the 1st component of the value
|
|
844
|
+
* @param y defines the 2nd component of the value
|
|
845
|
+
* @returns true if the value was set
|
|
846
|
+
*/
|
|
847
|
+
export declare function setFloat2(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, x: number, y: number): boolean;
|
|
848
|
+
/**
|
|
849
|
+
* Set the value of an uniform to a vec3
|
|
850
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
851
|
+
* @param x defines the 1st component of the value
|
|
852
|
+
* @param y defines the 2nd component of the value
|
|
853
|
+
* @param z defines the 3rd component of the value
|
|
854
|
+
* @returns true if the value was set
|
|
855
|
+
*/
|
|
856
|
+
export declare function setFloat3(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, x: number, y: number, z: number): boolean;
|
|
857
|
+
/**
|
|
858
|
+
* Set the value of an uniform to a vec4
|
|
859
|
+
* @param uniform defines the webGL uniform location where to store the value
|
|
860
|
+
* @param x defines the 1st component of the value
|
|
861
|
+
* @param y defines the 2nd component of the value
|
|
862
|
+
* @param z defines the 3rd component of the value
|
|
863
|
+
* @param w defines the 4th component of the value
|
|
864
|
+
* @returns true if the value was set
|
|
865
|
+
*/
|
|
866
|
+
export declare function setFloat4(engineState: IWebGLEnginePublic, uniform: Nullable<WebGLUniformLocation>, x: number, y: number, z: number, w: number): boolean;
|
|
867
|
+
/**
|
|
868
|
+
* Dispose and release all associated resources
|
|
869
|
+
*/
|
|
870
|
+
export declare function dispose(engineState: IWebGLEnginePublic): void;
|
|
871
|
+
/**
|
|
872
|
+
* Force the mipmap generation for the given render target texture
|
|
873
|
+
* @param texture defines the render target texture to use
|
|
874
|
+
* @param unbind defines whether or not to unbind the texture after generation. Defaults to true.
|
|
875
|
+
*/
|
|
876
|
+
export declare function generateMipMapsForCubemap(engineState: IWebGLEnginePublic, texture: InternalTexture, unbind?: boolean): void;
|
|
877
|
+
/**
|
|
878
|
+
* Sets a boolean indicating if the dithering state is enabled or disabled
|
|
879
|
+
* @param value defines the dithering state
|
|
880
|
+
*/
|
|
881
|
+
export declare function setDitheringState(engineState: IWebGLEnginePublic, value: boolean): void;
|
|
882
|
+
/**
|
|
883
|
+
* Sets a boolean indicating if the rasterizer state is enabled or disabled
|
|
884
|
+
* @param value defines the rasterizer state
|
|
885
|
+
*/
|
|
886
|
+
export declare function setRasterizerState(engineState: IWebGLEnginePublic, value: boolean): void;
|
|
887
|
+
/**
|
|
888
|
+
* Directly set the WebGL Viewport
|
|
889
|
+
* @param x defines the x coordinate of the viewport (in screen space)
|
|
890
|
+
* @param y defines the y coordinate of the viewport (in screen space)
|
|
891
|
+
* @param width defines the width of the viewport (in screen space)
|
|
892
|
+
* @param height defines the height of the viewport (in screen space)
|
|
893
|
+
* @returns the current viewport Object (if any) that is being replaced by this call. You can restore this viewport later on to go back to the original state
|
|
894
|
+
*/
|
|
895
|
+
export declare function setDirectViewport(engineState: IWebGLEnginePublic, x: number, y: number, width: number, height: number): Nullable<IViewportLike>;
|
|
896
|
+
/**
|
|
897
|
+
* Executes a scissor clear (ie. a clear on a specific portion of the screen)
|
|
898
|
+
* @param x defines the x-coordinate of the bottom left corner of the clear rectangle
|
|
899
|
+
* @param y defines the y-coordinate of the corner of the clear rectangle
|
|
900
|
+
* @param width defines the width of the clear rectangle
|
|
901
|
+
* @param height defines the height of the clear rectangle
|
|
902
|
+
* @param clearColor defines the clear color
|
|
903
|
+
*/
|
|
904
|
+
export declare function scissorClear(engineState: IWebGLEnginePublic, x: number, y: number, width: number, height: number, clearColor: IColor4Like): void;
|
|
905
|
+
/**
|
|
906
|
+
* Enable scissor test on a specific rectangle (ie. render will only be executed on a specific portion of the screen)
|
|
907
|
+
* @param x defines the x-coordinate of the bottom left corner of the clear rectangle
|
|
908
|
+
* @param y defines the y-coordinate of the corner of the clear rectangle
|
|
909
|
+
* @param width defines the width of the clear rectangle
|
|
910
|
+
* @param height defines the height of the clear rectangle
|
|
911
|
+
*/
|
|
912
|
+
export declare function enableScissor(engineState: IWebGLEnginePublic, x: number, y: number, width: number, height: number): void;
|
|
913
|
+
/**
|
|
914
|
+
* Disable previously set scissor test rectangle
|
|
915
|
+
*/
|
|
916
|
+
export declare function disableScissor(engineState: IWebGLEnginePublic): void;
|
|
917
|
+
/**
|
|
918
|
+
* Gets the source code of the vertex shader associated with a specific webGL program
|
|
919
|
+
* @param program defines the program to use
|
|
920
|
+
* @returns a string containing the source code of the vertex shader associated with the program
|
|
921
|
+
*/
|
|
922
|
+
export declare function getVertexShaderSource(engineState: IWebGLEnginePublic, program: WebGLProgram): Nullable<string>;
|
|
923
|
+
/**
|
|
924
|
+
* Gets the source code of the fragment shader associated with a specific webGL program
|
|
925
|
+
* @param program defines the program to use
|
|
926
|
+
* @returns a string containing the source code of the fragment shader associated with the program
|
|
927
|
+
*/
|
|
928
|
+
export declare function getFragmentShaderSource(engineState: IWebGLEnginePublic, program: WebGLProgram): Nullable<string>;
|
|
929
|
+
/**
|
|
930
|
+
* Sets a depth stencil texture from a render target to the according uniform.
|
|
931
|
+
* @param channel The texture channel
|
|
932
|
+
* @param uniform The uniform to set
|
|
933
|
+
* @param texture The render target texture containing the depth stencil texture to apply
|
|
934
|
+
* @param name The texture name
|
|
935
|
+
*/
|
|
936
|
+
export declare function setDepthStencilTexture(engineState: IWebGLEnginePublic, channel: number, uniform: Nullable<WebGLUniformLocation>, texture: Nullable<RenderTargetTexture>, name?: string): void;
|
|
937
|
+
/**
|
|
938
|
+
* Sets a texture to the webGL context from a postprocess
|
|
939
|
+
* @param channel defines the channel to use
|
|
940
|
+
* @param postProcess defines the source postprocess
|
|
941
|
+
* @param name name of the channel
|
|
942
|
+
*/
|
|
943
|
+
export declare function setTextureFromPostProcess(engineState: IWebGLEnginePublic, channel: number, postProcess: Nullable<PostProcess>, name: string): void;
|
|
944
|
+
/**
|
|
945
|
+
* Binds the output of the passed in post process to the texture channel specified
|
|
946
|
+
* @param channel The channel the texture should be bound to
|
|
947
|
+
* @param postProcess The post process which's output should be bound
|
|
948
|
+
* @param name name of the channel
|
|
949
|
+
*/
|
|
950
|
+
export declare function setTextureFromPostProcessOutput(engineState: IWebGLEnginePublic, channel: number, postProcess: Nullable<PostProcess>, name: string): void;
|
|
951
|
+
export declare function resize(engineState: IWebGLEnginePublic, forceSetSize?: boolean): void;
|
|
952
|
+
export declare function setHardwareScalingLevel(engineState: IWebGLEnginePublic, level: number): void;
|
|
953
|
+
/**
|
|
954
|
+
* Force a specific size of the canvas
|
|
955
|
+
* @param width defines the new canvas' width
|
|
956
|
+
* @param height defines the new canvas' height
|
|
957
|
+
* @param forceSetSize true to force setting the sizes of the underlying canvas
|
|
958
|
+
* @returns true if the size was changed
|
|
959
|
+
*/
|
|
960
|
+
export declare function setSize(engineState: IWebGLEnginePublic, width: number, height: number, forceSetSize?: boolean): boolean;
|
|
961
|
+
/**
|
|
962
|
+
* Wraps an external web gl texture in a Babylon texture.
|
|
963
|
+
* @param texture defines the external texture
|
|
964
|
+
* @param hasMipMaps defines whether the external texture has mip maps (default: false)
|
|
965
|
+
* @param samplingMode defines the sampling mode for the external texture (default: Constants.Constants.TEXTURE_TRILINEAR_SAMPLINGMODE)
|
|
966
|
+
* @param width defines the width for the external texture (default: 0)
|
|
967
|
+
* @param height defines the height for the external texture (default: 0)
|
|
968
|
+
* @returns the babylon internal texture
|
|
969
|
+
*/
|
|
970
|
+
export declare function wrapWebGLTexture(engineState: IWebGLEnginePublic, texture: WebGLTexture, hasMipMaps?: boolean, samplingMode?: number, width?: number, height?: number): InternalTexture;
|
|
971
|
+
/**
|
|
972
|
+
* @internal
|
|
973
|
+
*/
|
|
974
|
+
export declare function _uploadImageToTexture(engineState: IWebGLEnginePublic, texture: InternalTexture, image: HTMLImageElement | ImageBitmap, faceIndex?: number, lod?: number): void;
|
|
975
|
+
/**
|
|
976
|
+
* Updates a depth texture Comparison Mode and Function.
|
|
977
|
+
* If the comparison Function is equal to 0, the mode will be set to none.
|
|
978
|
+
* Otherwise, this only works in webgl 2 and requires a shadow sampler in the shader.
|
|
979
|
+
* @param texture The texture to set the comparison function for
|
|
980
|
+
* @param comparisonFunction The comparison function to set, 0 if no comparison required
|
|
981
|
+
*/
|
|
982
|
+
export declare function updateTextureComparisonFunction(engineState: IWebGLEnginePublic, texture: InternalTexture, comparisonFunction: number): void;
|
|
983
|
+
/**
|
|
984
|
+
* Creates a webGL buffer to use with instantiation
|
|
985
|
+
* @param capacity defines the size of the buffer
|
|
986
|
+
* @returns the webGL buffer
|
|
987
|
+
*/
|
|
988
|
+
export declare function createInstancesBuffer(engineState: IWebGLEnginePublic, capacity: number): DataBuffer;
|
|
989
|
+
/**
|
|
990
|
+
* Delete a webGL buffer used with instantiation
|
|
991
|
+
* @param buffer defines the webGL buffer to delete
|
|
992
|
+
*/
|
|
993
|
+
export declare function deleteInstancesBuffer(engineState: IWebGLEnginePublic, buffer: WebGLBuffer): void;
|
|
994
|
+
/**
|
|
995
|
+
* @internal
|
|
996
|
+
*/
|
|
997
|
+
export declare function _readPixelsAsync(engineState: IWebGLEnginePublic, x: number, y: number, w: number, h: number, format: number, type: number, outputBuffer: ArrayBufferView): Promise<ArrayBufferView> | null;
|
|
998
|
+
export declare function setState(engineState: IWebGLEnginePublic, culling: boolean, zOffset?: number, force?: boolean, reverseSide?: boolean, cullBackFaces?: boolean, stencil?: IStencilState, zOffsetUnits?: number): void;
|
|
999
|
+
/**
|
|
1000
|
+
* Gets a boolean indicating if depth testing is enabled
|
|
1001
|
+
* @returns the current state
|
|
1002
|
+
*/
|
|
1003
|
+
export declare function getDepthBuffer(engineState: IWebGLEnginePublic): boolean;
|
|
1004
|
+
/**
|
|
1005
|
+
* Enable or disable depth buffering
|
|
1006
|
+
* @param enable defines the state to set
|
|
1007
|
+
*/
|
|
1008
|
+
export declare function setDepthBuffer(engineState: IWebGLEnginePublic, enable: boolean): void;
|
|
1009
|
+
/**
|
|
1010
|
+
* Set the z offset Factor to apply to current rendering
|
|
1011
|
+
* @param value defines the offset to apply
|
|
1012
|
+
*/
|
|
1013
|
+
export declare function setZOffset(engineState: IWebGLEnginePublic, value: number): void;
|
|
1014
|
+
/**
|
|
1015
|
+
* Gets the current value of the zOffset Factor
|
|
1016
|
+
* @returns the current zOffset Factor state
|
|
1017
|
+
*/
|
|
1018
|
+
export declare function getZOffset(engineState: IWebGLEnginePublic): number;
|
|
1019
|
+
/**
|
|
1020
|
+
* Set the z offset Units to apply to current rendering
|
|
1021
|
+
* @param value defines the offset to apply
|
|
1022
|
+
*/
|
|
1023
|
+
export declare function setZOffsetUnits(engineState: IWebGLEnginePublic, value: number): void;
|
|
1024
|
+
/**
|
|
1025
|
+
* Gets the current value of the zOffset Units
|
|
1026
|
+
* @returns the current zOffset Units state
|
|
1027
|
+
*/
|
|
1028
|
+
export declare function getZOffsetUnits(engineState: IWebGLEnginePublic): number;
|
|
1029
|
+
export declare function _releaseEffect(engineState: IWebGLEnginePublic, effect: Effect): void;
|
|
1030
|
+
export {};
|