@babylonjs/core 5.22.1 → 5.24.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/Actions/abstractActionManager.d.ts +6 -6
- package/Actions/abstractActionManager.js +1 -1
- package/Actions/abstractActionManager.js.map +1 -1
- package/Actions/actionManager.d.ts +5 -5
- package/Actions/actionManager.js +5 -5
- package/Actions/actionManager.js.map +1 -1
- package/Animations/animatable.js +2 -1
- package/Animations/animatable.js.map +1 -1
- package/Animations/animation.js +137 -139
- package/Animations/animation.js.map +1 -1
- package/Animations/animationGroup.d.ts +3 -3
- package/Animations/animationGroup.js +3 -3
- package/Animations/animationGroup.js.map +1 -1
- package/Animations/runtimeAnimation.js +6 -7
- package/Animations/runtimeAnimation.js.map +1 -1
- package/Audio/audioSceneComponent.d.ts +1 -1
- package/Audio/audioSceneComponent.js.map +1 -1
- package/Audio/sound.d.ts +2 -1
- package/Audio/sound.js +21 -9
- package/Audio/sound.js.map +1 -1
- package/Behaviors/Cameras/autoRotationBehavior.d.ts +1 -1
- package/Behaviors/Cameras/autoRotationBehavior.js +1 -1
- package/Behaviors/Cameras/autoRotationBehavior.js.map +1 -1
- package/Behaviors/Cameras/bouncingBehavior.d.ts +1 -1
- package/Behaviors/Cameras/bouncingBehavior.js +1 -1
- package/Behaviors/Cameras/bouncingBehavior.js.map +1 -1
- package/Behaviors/Cameras/framingBehavior.d.ts +1 -1
- package/Behaviors/Cameras/framingBehavior.js +1 -1
- package/Behaviors/Cameras/framingBehavior.js.map +1 -1
- package/Bones/bone.d.ts +1 -1
- package/Bones/bone.js +1 -1
- package/Bones/bone.js.map +1 -1
- package/Bones/skeleton.d.ts +2 -2
- package/Bones/skeleton.js +11 -5
- package/Bones/skeleton.js.map +1 -1
- package/Cameras/Inputs/BaseCameraMouseWheelInput.js +3 -22
- package/Cameras/Inputs/BaseCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/BaseCameraPointersInput.js +3 -3
- package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js +1 -11
- package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/flyCameraMouseInput.js +3 -3
- package/Cameras/Inputs/flyCameraMouseInput.js.map +1 -1
- package/Cameras/Inputs/followCameraMouseWheelInput.js +1 -4
- package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraMouseInput.js +3 -3
- package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
- package/Cameras/arcRotateCamera.d.ts +1 -1
- package/Cameras/arcRotateCamera.js +1 -1
- package/Cameras/arcRotateCamera.js.map +1 -1
- package/Cameras/camera.d.ts +2 -2
- package/Cameras/camera.js +2 -2
- package/Cameras/camera.js.map +1 -1
- package/Cameras/freeCamera.d.ts +1 -1
- package/Cameras/freeCamera.js +1 -1
- package/Cameras/freeCamera.js.map +1 -1
- package/Cameras/gamepadCamera.d.ts +1 -1
- package/Cameras/gamepadCamera.js +1 -1
- package/Cameras/gamepadCamera.js.map +1 -1
- package/Cameras/targetCamera.d.ts +1 -1
- package/Cameras/targetCamera.js +1 -1
- package/Cameras/targetCamera.js.map +1 -1
- package/Cameras/touchCamera.d.ts +1 -1
- package/Cameras/touchCamera.js +1 -1
- package/Cameras/touchCamera.js.map +1 -1
- package/Cameras/universalCamera.d.ts +1 -1
- package/Cameras/universalCamera.js +1 -1
- package/Cameras/universalCamera.js.map +1 -1
- package/Cameras/virtualJoysticksCamera.d.ts +1 -1
- package/Cameras/virtualJoysticksCamera.js +1 -1
- package/Cameras/virtualJoysticksCamera.js.map +1 -1
- package/Culling/boundingBox.d.ts +2 -2
- package/Culling/boundingBox.js +2 -2
- package/Culling/boundingBox.js.map +1 -1
- package/Culling/ray.d.ts +1 -1
- package/Culling/ray.js +1 -1
- package/Culling/ray.js.map +1 -1
- package/Debug/debugLayer.d.ts +1 -1
- package/Debug/debugLayer.js +1 -1
- package/Debug/debugLayer.js.map +1 -1
- package/DeviceInput/webDeviceInputSystem.js +20 -2
- package/DeviceInput/webDeviceInputSystem.js.map +1 -1
- package/Engines/Extensions/engine.multiRender.js +8 -10
- package/Engines/Extensions/engine.multiRender.js.map +1 -1
- package/Engines/Extensions/engine.query.d.ts +2 -2
- package/Engines/Extensions/engine.query.js.map +1 -1
- package/Engines/ICanvas.d.ts +11 -0
- package/Engines/ICanvas.js.map +1 -1
- package/Engines/WebGL/webGLPipelineContext.d.ts +29 -19
- package/Engines/WebGL/webGLPipelineContext.js +99 -311
- package/Engines/WebGL/webGLPipelineContext.js.map +1 -1
- package/Engines/WebGL/webGLRenderTargetWrapper.js +1 -1
- package/Engines/WebGL/webGLRenderTargetWrapper.js.map +1 -1
- package/Engines/engine.d.ts +2 -2
- package/Engines/engine.js +2 -2
- package/Engines/engine.js.map +1 -1
- package/Engines/nativeEngine.d.ts +2 -2
- package/Engines/nativeEngine.js +2 -2
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/renderTargetWrapper.d.ts +1 -0
- package/Engines/renderTargetWrapper.js +5 -2
- package/Engines/renderTargetWrapper.js.map +1 -1
- package/Engines/thinEngine.d.ts +6 -5
- package/Engines/thinEngine.js +11 -7
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.js +4 -1
- package/Engines/webgpuEngine.js.map +1 -1
- package/Events/clipboardEvents.d.ts +1 -1
- package/Events/clipboardEvents.js +1 -1
- package/Events/clipboardEvents.js.map +1 -1
- package/Events/deviceInputEvents.d.ts +11 -4
- package/Events/deviceInputEvents.js.map +1 -1
- package/Gamepads/Controllers/windowsMotionController.d.ts +1 -1
- package/Gamepads/Controllers/windowsMotionController.js +1 -1
- package/Gamepads/Controllers/windowsMotionController.js.map +1 -1
- package/Gizmos/boundingBoxGizmo.d.ts +4 -0
- package/Gizmos/boundingBoxGizmo.js +6 -0
- package/Gizmos/boundingBoxGizmo.js.map +1 -1
- package/Inputs/scene.inputManager.js +4 -4
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Layers/effectLayer.d.ts +3 -3
- package/Layers/effectLayer.js +1 -1
- package/Layers/effectLayer.js.map +1 -1
- package/Layers/glowLayer.d.ts +3 -3
- package/Layers/glowLayer.js +2 -2
- package/Layers/glowLayer.js.map +1 -1
- package/Layers/highlightLayer.d.ts +3 -3
- package/Layers/highlightLayer.js +2 -2
- package/Layers/highlightLayer.js.map +1 -1
- package/Lights/directionalLight.d.ts +2 -2
- package/Lights/directionalLight.js +2 -2
- package/Lights/directionalLight.js.map +1 -1
- package/Lights/hemisphericLight.d.ts +3 -3
- package/Lights/hemisphericLight.js +3 -3
- package/Lights/hemisphericLight.js.map +1 -1
- package/Lights/light.d.ts +2 -2
- package/Lights/light.js +2 -2
- package/Lights/light.js.map +1 -1
- package/Lights/lightConstants.d.ts +1 -1
- package/Lights/lightConstants.js +1 -1
- package/Lights/lightConstants.js.map +1 -1
- package/Loading/Plugins/babylonFileLoader.js +3 -0
- package/Loading/Plugins/babylonFileLoader.js.map +1 -1
- package/Loading/sceneLoader.d.ts +1 -1
- package/Loading/sceneLoader.js.map +1 -1
- package/Materials/Background/backgroundMaterial.js +4 -0
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js +4 -1
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.d.ts +1 -1
- package/Materials/Node/nodeMaterial.js +5 -1
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.js +4 -1
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/Textures/Filtering/hdrFiltering.d.ts +1 -1
- package/Materials/Textures/Filtering/hdrFiltering.js +1 -1
- package/Materials/Textures/Filtering/hdrFiltering.js.map +1 -1
- package/Materials/Textures/Procedurals/customProceduralTexture.d.ts +2 -1
- package/Materials/Textures/Procedurals/customProceduralTexture.js +9 -3
- package/Materials/Textures/Procedurals/customProceduralTexture.js.map +1 -1
- package/Materials/Textures/Procedurals/proceduralTexture.d.ts +9 -9
- package/Materials/Textures/Procedurals/proceduralTexture.js +9 -9
- package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
- package/Materials/Textures/colorGradingTexture.d.ts +1 -1
- package/Materials/Textures/colorGradingTexture.js +1 -1
- package/Materials/Textures/colorGradingTexture.js.map +1 -1
- package/Materials/Textures/cubeTexture.d.ts +2 -2
- package/Materials/Textures/cubeTexture.js +2 -2
- package/Materials/Textures/cubeTexture.js.map +1 -1
- package/Materials/Textures/rawCubeTexture.d.ts +1 -1
- package/Materials/Textures/rawCubeTexture.js +1 -1
- package/Materials/Textures/rawCubeTexture.js.map +1 -1
- package/Materials/Textures/renderTargetTexture.d.ts +3 -5
- package/Materials/Textures/renderTargetTexture.js +19 -19
- package/Materials/Textures/renderTargetTexture.js.map +1 -1
- package/Materials/colorCurves.d.ts +3 -3
- package/Materials/colorCurves.js +3 -3
- package/Materials/colorCurves.js.map +1 -1
- package/Materials/effect.d.ts +27 -27
- package/Materials/effect.js +22 -288
- package/Materials/effect.js.map +1 -1
- package/Materials/fresnelParameters.d.ts +1 -1
- package/Materials/fresnelParameters.js +1 -1
- package/Materials/fresnelParameters.js.map +1 -1
- package/Materials/imageProcessingConfiguration.d.ts +4 -4
- package/Materials/imageProcessingConfiguration.js +4 -4
- package/Materials/imageProcessingConfiguration.js.map +1 -1
- package/Materials/shaderMaterial.d.ts +25 -25
- package/Materials/shaderMaterial.js +25 -25
- package/Materials/shaderMaterial.js.map +1 -1
- package/Materials/standardMaterial.js +4 -1
- package/Materials/standardMaterial.js.map +1 -1
- package/Maths/index.d.ts +1 -0
- package/Maths/index.js +1 -0
- package/Maths/index.js.map +1 -1
- package/Maths/math.functions.d.ts +2 -2
- package/Maths/math.functions.js +2 -2
- package/Maths/math.functions.js.map +1 -1
- package/Maths/math.polar.d.ts +77 -0
- package/Maths/math.polar.js +114 -0
- package/Maths/math.polar.js.map +1 -0
- package/Maths/math.scalar.d.ts +2 -2
- package/Maths/math.scalar.js +2 -2
- package/Maths/math.scalar.js.map +1 -1
- package/Maths/math.vector.d.ts +13 -12
- package/Maths/math.vector.js +13 -12
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/abstractMesh.d.ts +1 -1
- package/Meshes/abstractMesh.js +13 -2
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/geometry.d.ts +3 -3
- package/Meshes/geometry.js +3 -3
- package/Meshes/geometry.js.map +1 -1
- package/Meshes/groundMesh.d.ts +5 -4
- package/Meshes/groundMesh.js +5 -4
- package/Meshes/groundMesh.js.map +1 -1
- package/Meshes/instancedMesh.d.ts +1 -1
- package/Meshes/instancedMesh.js +1 -1
- package/Meshes/instancedMesh.js.map +1 -1
- package/Meshes/mesh.d.ts +3 -3
- package/Meshes/mesh.js +7 -3
- package/Meshes/mesh.js.map +1 -1
- package/Meshes/subMesh.d.ts +1 -1
- package/Meshes/subMesh.js +1 -1
- package/Meshes/subMesh.js.map +1 -1
- package/Meshes/thinInstanceMesh.d.ts +1 -1
- package/Meshes/thinInstanceMesh.js.map +1 -1
- package/Meshes/transformNode.js +6 -0
- package/Meshes/transformNode.js.map +1 -1
- package/Misc/HighDynamicRange/cubemapToSphericalPolynomial.d.ts +2 -2
- package/Misc/HighDynamicRange/cubemapToSphericalPolynomial.js +2 -2
- package/Misc/HighDynamicRange/cubemapToSphericalPolynomial.js.map +1 -1
- package/Misc/HighDynamicRange/hdr.d.ts +3 -3
- package/Misc/HighDynamicRange/hdr.js +3 -3
- package/Misc/HighDynamicRange/hdr.js.map +1 -1
- package/Misc/HighDynamicRange/panoramaToCubemap.d.ts +1 -1
- package/Misc/HighDynamicRange/panoramaToCubemap.js +1 -1
- package/Misc/HighDynamicRange/panoramaToCubemap.js.map +1 -1
- package/Misc/arrayTools.d.ts +13 -12
- package/Misc/arrayTools.js +70 -39
- package/Misc/arrayTools.js.map +1 -1
- package/Misc/assetsManager.d.ts +3 -3
- package/Misc/assetsManager.js +3 -3
- package/Misc/assetsManager.js.map +1 -1
- package/Misc/basis.js +17 -3
- package/Misc/basis.js.map +1 -1
- package/Misc/environmentTextureTools.d.ts +4 -4
- package/Misc/environmentTextureTools.js +5 -5
- package/Misc/environmentTextureTools.js.map +1 -1
- package/Misc/fileTools.d.ts +3 -3
- package/Misc/fileTools.js +19 -12
- package/Misc/fileTools.js.map +1 -1
- package/Misc/logger.js +1 -1
- package/Misc/logger.js.map +1 -1
- package/Misc/observable.d.ts +1 -1
- package/Misc/observable.js +1 -1
- package/Misc/observable.js.map +1 -1
- package/Misc/performanceMonitor.d.ts +3 -3
- package/Misc/performanceMonitor.js +3 -3
- package/Misc/performanceMonitor.js.map +1 -1
- package/Misc/rgbdTextureTools.d.ts +1 -1
- package/Misc/rgbdTextureTools.js +1 -1
- package/Misc/rgbdTextureTools.js.map +1 -1
- package/Misc/sceneOptimizer.d.ts +7 -7
- package/Misc/sceneOptimizer.js +7 -7
- package/Misc/sceneOptimizer.js.map +1 -1
- package/Misc/stringDictionary.d.ts +6 -6
- package/Misc/stringDictionary.js +6 -6
- package/Misc/stringDictionary.js.map +1 -1
- package/Misc/textureTools.d.ts +4 -4
- package/Misc/textureTools.js +4 -4
- package/Misc/textureTools.js.map +1 -1
- package/Misc/tools.d.ts +6 -6
- package/Misc/tools.js +6 -6
- package/Misc/tools.js.map +1 -1
- package/Misc/videoRecorder.d.ts +1 -1
- package/Misc/videoRecorder.js +1 -1
- package/Misc/videoRecorder.js.map +1 -1
- package/Offline/database.js +3 -3
- package/Offline/database.js.map +1 -1
- package/Particles/IParticleSystem.d.ts +1 -1
- package/Particles/IParticleSystem.js.map +1 -1
- package/Particles/gpuParticleSystem.d.ts +1 -1
- package/Particles/gpuParticleSystem.js +1 -1
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/particleSystem.d.ts +1 -1
- package/Particles/particleSystem.js +1 -1
- package/Particles/particleSystem.js.map +1 -1
- package/Particles/solidParticleSystem.d.ts +4 -0
- package/Particles/solidParticleSystem.js +25 -3
- package/Particles/solidParticleSystem.js.map +1 -1
- package/Physics/Plugins/ammoJSPlugin.d.ts +1 -1
- package/Physics/Plugins/ammoJSPlugin.js +1 -1
- package/Physics/Plugins/ammoJSPlugin.js.map +1 -1
- package/Physics/Plugins/oimoJSPlugin.js +1 -1
- package/Physics/Plugins/oimoJSPlugin.js.map +1 -1
- package/Physics/physicsEngineComponent.d.ts +1 -1
- package/Physics/physicsEngineComponent.js +1 -1
- package/Physics/physicsEngineComponent.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js +3 -3
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js +1 -2
- package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js.map +1 -1
- package/PostProcesses/blurPostProcess.d.ts +3 -3
- package/PostProcesses/blurPostProcess.js +3 -3
- package/PostProcesses/blurPostProcess.js.map +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.d.ts +3 -3
- package/PostProcesses/volumetricLightScatteringPostProcess.js +3 -3
- package/PostProcesses/volumetricLightScatteringPostProcess.js.map +1 -1
- package/Rendering/depthPeelingRenderer.d.ts +1 -0
- package/Rendering/depthPeelingRenderer.js +32 -5
- package/Rendering/depthPeelingRenderer.js.map +1 -1
- package/Rendering/edgesRenderer.d.ts +2 -2
- package/Rendering/edgesRenderer.js +1 -1
- package/Rendering/edgesRenderer.js.map +1 -1
- package/Rendering/geometryBufferRenderer.d.ts +4 -2
- package/Rendering/geometryBufferRenderer.js +5 -3
- package/Rendering/geometryBufferRenderer.js.map +1 -1
- package/Rendering/geometryBufferRendererSceneComponent.d.ts +2 -1
- package/Rendering/geometryBufferRendererSceneComponent.js +3 -2
- package/Rendering/geometryBufferRendererSceneComponent.js.map +1 -1
- package/Rendering/prePassRenderer.d.ts +11 -3
- package/Rendering/prePassRenderer.js +18 -3
- package/Rendering/prePassRenderer.js.map +1 -1
- package/Rendering/subSurfaceConfiguration.d.ts +2 -2
- package/Rendering/subSurfaceConfiguration.js +2 -2
- package/Rendering/subSurfaceConfiguration.js.map +1 -1
- package/Sprites/spriteSceneComponent.js +4 -1
- package/Sprites/spriteSceneComponent.js.map +1 -1
- package/XR/features/WebXRControllerTeleportation.d.ts +4 -0
- package/XR/features/WebXRControllerTeleportation.js +24 -19
- package/XR/features/WebXRControllerTeleportation.js.map +1 -1
- package/XR/motionController/webXRAbstractMotionController.d.ts +2 -2
- package/XR/motionController/webXRAbstractMotionController.js +2 -2
- package/XR/motionController/webXRAbstractMotionController.js.map +1 -1
- package/XR/motionController/webXRControllerComponent.d.ts +1 -1
- package/XR/motionController/webXRControllerComponent.js +1 -1
- package/XR/motionController/webXRControllerComponent.js.map +1 -1
- package/XR/motionController/webXRMotionControllerManager.d.ts +3 -3
- package/XR/motionController/webXRMotionControllerManager.js +3 -3
- package/XR/motionController/webXRMotionControllerManager.js.map +1 -1
- package/node.d.ts +4 -4
- package/node.js +3 -3
- package/node.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +0 -4
- package/scene.d.ts +80 -63
- package/scene.js +92 -46
- package/scene.js.map +1 -1
- package/sceneComponent.d.ts +1 -1
- package/sceneComponent.js.map +1 -1
package/Materials/effect.js
CHANGED
|
@@ -221,6 +221,27 @@ export class Effect {
|
|
|
221
221
|
shaderCodes[1] = fragmentCode;
|
|
222
222
|
shadersLoaded();
|
|
223
223
|
});
|
|
224
|
+
const proxyFunction = function (functionName) {
|
|
225
|
+
// check if the function exists in the pipelineContext
|
|
226
|
+
return function () {
|
|
227
|
+
if (this._pipelineContext) {
|
|
228
|
+
const func = this._pipelineContext[functionName];
|
|
229
|
+
func.apply(this._pipelineContext, arguments);
|
|
230
|
+
}
|
|
231
|
+
return this;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
["Int?", "IntArray?", "Array?", "Color?", "Vector?", "Float?", "Matrices", "Matrix", "Matrix3x3", "Matrix2x2", "Quaternion", "DirectColor4"].forEach((functionName) => {
|
|
235
|
+
const name = `set${functionName}`;
|
|
236
|
+
if (name.endsWith("?")) {
|
|
237
|
+
["", 2, 3, 4].forEach((n) => {
|
|
238
|
+
this[(name.slice(0, -1) + n)] = this[(name.slice(0, -1) + n)] || proxyFunction(name.slice(0, -1) + n).bind(this);
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
this[name] = this[name] || proxyFunction(name).bind(this);
|
|
243
|
+
}
|
|
244
|
+
});
|
|
224
245
|
}
|
|
225
246
|
/**
|
|
226
247
|
* Gets or sets the relative url used to load shaders if using the engine in non-minified mode
|
|
@@ -747,92 +768,6 @@ export class Effect {
|
|
|
747
768
|
bindUniformBlock(blockName, index) {
|
|
748
769
|
this._engine.bindUniformBlock(this._pipelineContext, blockName, index);
|
|
749
770
|
}
|
|
750
|
-
/**
|
|
751
|
-
* Sets an integer value on a uniform variable.
|
|
752
|
-
* @param uniformName Name of the variable.
|
|
753
|
-
* @param value Value to be set.
|
|
754
|
-
* @returns this effect.
|
|
755
|
-
*/
|
|
756
|
-
setInt(uniformName, value) {
|
|
757
|
-
this._pipelineContext.setInt(uniformName, value);
|
|
758
|
-
return this;
|
|
759
|
-
}
|
|
760
|
-
/**
|
|
761
|
-
* Sets an int2 value on a uniform variable.
|
|
762
|
-
* @param uniformName Name of the variable.
|
|
763
|
-
* @param x First int in int2.
|
|
764
|
-
* @param y Second int in int2.
|
|
765
|
-
* @returns this effect.
|
|
766
|
-
*/
|
|
767
|
-
setInt2(uniformName, x, y) {
|
|
768
|
-
this._pipelineContext.setInt2(uniformName, x, y);
|
|
769
|
-
return this;
|
|
770
|
-
}
|
|
771
|
-
/**
|
|
772
|
-
* Sets an int3 value on a uniform variable.
|
|
773
|
-
* @param uniformName Name of the variable.
|
|
774
|
-
* @param x First int in int3.
|
|
775
|
-
* @param y Second int in int3.
|
|
776
|
-
* @param z Third int in int3.
|
|
777
|
-
* @returns this effect.
|
|
778
|
-
*/
|
|
779
|
-
setInt3(uniformName, x, y, z) {
|
|
780
|
-
this._pipelineContext.setInt3(uniformName, x, y, z);
|
|
781
|
-
return this;
|
|
782
|
-
}
|
|
783
|
-
/**
|
|
784
|
-
* Sets an int4 value on a uniform variable.
|
|
785
|
-
* @param uniformName Name of the variable.
|
|
786
|
-
* @param x First int in int4.
|
|
787
|
-
* @param y Second int in int4.
|
|
788
|
-
* @param z Third int in int4.
|
|
789
|
-
* @param w Fourth int in int4.
|
|
790
|
-
* @returns this effect.
|
|
791
|
-
*/
|
|
792
|
-
setInt4(uniformName, x, y, z, w) {
|
|
793
|
-
this._pipelineContext.setInt4(uniformName, x, y, z, w);
|
|
794
|
-
return this;
|
|
795
|
-
}
|
|
796
|
-
/**
|
|
797
|
-
* Sets an int array on a uniform variable.
|
|
798
|
-
* @param uniformName Name of the variable.
|
|
799
|
-
* @param array array to be set.
|
|
800
|
-
* @returns this effect.
|
|
801
|
-
*/
|
|
802
|
-
setIntArray(uniformName, array) {
|
|
803
|
-
this._pipelineContext.setIntArray(uniformName, array);
|
|
804
|
-
return this;
|
|
805
|
-
}
|
|
806
|
-
/**
|
|
807
|
-
* Sets an int array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)
|
|
808
|
-
* @param uniformName Name of the variable.
|
|
809
|
-
* @param array array to be set.
|
|
810
|
-
* @returns this effect.
|
|
811
|
-
*/
|
|
812
|
-
setIntArray2(uniformName, array) {
|
|
813
|
-
this._pipelineContext.setIntArray2(uniformName, array);
|
|
814
|
-
return this;
|
|
815
|
-
}
|
|
816
|
-
/**
|
|
817
|
-
* Sets an int array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)
|
|
818
|
-
* @param uniformName Name of the variable.
|
|
819
|
-
* @param array array to be set.
|
|
820
|
-
* @returns this effect.
|
|
821
|
-
*/
|
|
822
|
-
setIntArray3(uniformName, array) {
|
|
823
|
-
this._pipelineContext.setIntArray3(uniformName, array);
|
|
824
|
-
return this;
|
|
825
|
-
}
|
|
826
|
-
/**
|
|
827
|
-
* Sets an int array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)
|
|
828
|
-
* @param uniformName Name of the variable.
|
|
829
|
-
* @param array array to be set.
|
|
830
|
-
* @returns this effect.
|
|
831
|
-
*/
|
|
832
|
-
setIntArray4(uniformName, array) {
|
|
833
|
-
this._pipelineContext.setIntArray4(uniformName, array);
|
|
834
|
-
return this;
|
|
835
|
-
}
|
|
836
771
|
/**
|
|
837
772
|
* Sets an float array on a uniform variable.
|
|
838
773
|
* @param uniformName Name of the variable.
|
|
@@ -873,98 +808,6 @@ export class Effect {
|
|
|
873
808
|
this._pipelineContext.setArray4(uniformName, array);
|
|
874
809
|
return this;
|
|
875
810
|
}
|
|
876
|
-
/**
|
|
877
|
-
* Sets an array on a uniform variable.
|
|
878
|
-
* @param uniformName Name of the variable.
|
|
879
|
-
* @param array array to be set.
|
|
880
|
-
* @returns this effect.
|
|
881
|
-
*/
|
|
882
|
-
setArray(uniformName, array) {
|
|
883
|
-
this._pipelineContext.setArray(uniformName, array);
|
|
884
|
-
return this;
|
|
885
|
-
}
|
|
886
|
-
/**
|
|
887
|
-
* Sets an array 2 on a uniform variable. (Array is specified as single array eg. [1,2,3,4] will result in [[1,2],[3,4]] in the shader)
|
|
888
|
-
* @param uniformName Name of the variable.
|
|
889
|
-
* @param array array to be set.
|
|
890
|
-
* @returns this effect.
|
|
891
|
-
*/
|
|
892
|
-
setArray2(uniformName, array) {
|
|
893
|
-
this._pipelineContext.setArray2(uniformName, array);
|
|
894
|
-
return this;
|
|
895
|
-
}
|
|
896
|
-
/**
|
|
897
|
-
* Sets an array 3 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6] will result in [[1,2,3],[4,5,6]] in the shader)
|
|
898
|
-
* @param uniformName Name of the variable.
|
|
899
|
-
* @param array array to be set.
|
|
900
|
-
* @returns this effect.
|
|
901
|
-
*/
|
|
902
|
-
setArray3(uniformName, array) {
|
|
903
|
-
this._pipelineContext.setArray3(uniformName, array);
|
|
904
|
-
return this;
|
|
905
|
-
}
|
|
906
|
-
/**
|
|
907
|
-
* Sets an array 4 on a uniform variable. (Array is specified as single array eg. [1,2,3,4,5,6,7,8] will result in [[1,2,3,4],[5,6,7,8]] in the shader)
|
|
908
|
-
* @param uniformName Name of the variable.
|
|
909
|
-
* @param array array to be set.
|
|
910
|
-
* @returns this effect.
|
|
911
|
-
*/
|
|
912
|
-
setArray4(uniformName, array) {
|
|
913
|
-
this._pipelineContext.setArray4(uniformName, array);
|
|
914
|
-
return this;
|
|
915
|
-
}
|
|
916
|
-
/**
|
|
917
|
-
* Sets matrices on a uniform variable.
|
|
918
|
-
* @param uniformName Name of the variable.
|
|
919
|
-
* @param matrices matrices to be set.
|
|
920
|
-
* @returns this effect.
|
|
921
|
-
*/
|
|
922
|
-
setMatrices(uniformName, matrices) {
|
|
923
|
-
this._pipelineContext.setMatrices(uniformName, matrices);
|
|
924
|
-
return this;
|
|
925
|
-
}
|
|
926
|
-
/**
|
|
927
|
-
* Sets matrix on a uniform variable.
|
|
928
|
-
* @param uniformName Name of the variable.
|
|
929
|
-
* @param matrix matrix to be set.
|
|
930
|
-
* @returns this effect.
|
|
931
|
-
*/
|
|
932
|
-
setMatrix(uniformName, matrix) {
|
|
933
|
-
this._pipelineContext.setMatrix(uniformName, matrix);
|
|
934
|
-
return this;
|
|
935
|
-
}
|
|
936
|
-
/**
|
|
937
|
-
* Sets a 3x3 matrix on a uniform variable. (Specified as [1,2,3,4,5,6,7,8,9] will result in [1,2,3][4,5,6][7,8,9] matrix)
|
|
938
|
-
* @param uniformName Name of the variable.
|
|
939
|
-
* @param matrix matrix to be set.
|
|
940
|
-
* @returns this effect.
|
|
941
|
-
*/
|
|
942
|
-
setMatrix3x3(uniformName, matrix) {
|
|
943
|
-
// the cast is ok because it is gl.uniformMatrix3fv() which is called at the end, and this function accepts Float32Array and Array<number>
|
|
944
|
-
this._pipelineContext.setMatrix3x3(uniformName, matrix);
|
|
945
|
-
return this;
|
|
946
|
-
}
|
|
947
|
-
/**
|
|
948
|
-
* Sets a 2x2 matrix on a uniform variable. (Specified as [1,2,3,4] will result in [1,2][3,4] matrix)
|
|
949
|
-
* @param uniformName Name of the variable.
|
|
950
|
-
* @param matrix matrix to be set.
|
|
951
|
-
* @returns this effect.
|
|
952
|
-
*/
|
|
953
|
-
setMatrix2x2(uniformName, matrix) {
|
|
954
|
-
// the cast is ok because it is gl.uniformMatrix3fv() which is called at the end, and this function accepts Float32Array and Array<number>
|
|
955
|
-
this._pipelineContext.setMatrix2x2(uniformName, matrix);
|
|
956
|
-
return this;
|
|
957
|
-
}
|
|
958
|
-
/**
|
|
959
|
-
* Sets a float on a uniform variable.
|
|
960
|
-
* @param uniformName Name of the variable.
|
|
961
|
-
* @param value value to be set.
|
|
962
|
-
* @returns this effect.
|
|
963
|
-
*/
|
|
964
|
-
setFloat(uniformName, value) {
|
|
965
|
-
this._pipelineContext.setFloat(uniformName, value);
|
|
966
|
-
return this;
|
|
967
|
-
}
|
|
968
811
|
/**
|
|
969
812
|
* Sets a boolean on a uniform variable.
|
|
970
813
|
* @param uniformName Name of the variable.
|
|
@@ -975,120 +818,11 @@ export class Effect {
|
|
|
975
818
|
this._pipelineContext.setInt(uniformName, bool ? 1 : 0);
|
|
976
819
|
return this;
|
|
977
820
|
}
|
|
978
|
-
/**
|
|
979
|
-
* Sets a Vector2 on a uniform variable.
|
|
980
|
-
* @param uniformName Name of the variable.
|
|
981
|
-
* @param vector2 vector2 to be set.
|
|
982
|
-
* @returns this effect.
|
|
983
|
-
*/
|
|
984
|
-
setVector2(uniformName, vector2) {
|
|
985
|
-
this._pipelineContext.setVector2(uniformName, vector2);
|
|
986
|
-
return this;
|
|
987
|
-
}
|
|
988
|
-
/**
|
|
989
|
-
* Sets a float2 on a uniform variable.
|
|
990
|
-
* @param uniformName Name of the variable.
|
|
991
|
-
* @param x First float in float2.
|
|
992
|
-
* @param y Second float in float2.
|
|
993
|
-
* @returns this effect.
|
|
994
|
-
*/
|
|
995
|
-
setFloat2(uniformName, x, y) {
|
|
996
|
-
this._pipelineContext.setFloat2(uniformName, x, y);
|
|
997
|
-
return this;
|
|
998
|
-
}
|
|
999
|
-
/**
|
|
1000
|
-
* Sets a Vector3 on a uniform variable.
|
|
1001
|
-
* @param uniformName Name of the variable.
|
|
1002
|
-
* @param vector3 Value to be set.
|
|
1003
|
-
* @returns this effect.
|
|
1004
|
-
*/
|
|
1005
|
-
setVector3(uniformName, vector3) {
|
|
1006
|
-
this._pipelineContext.setVector3(uniformName, vector3);
|
|
1007
|
-
return this;
|
|
1008
|
-
}
|
|
1009
|
-
/**
|
|
1010
|
-
* Sets a float3 on a uniform variable.
|
|
1011
|
-
* @param uniformName Name of the variable.
|
|
1012
|
-
* @param x First float in float3.
|
|
1013
|
-
* @param y Second float in float3.
|
|
1014
|
-
* @param z Third float in float3.
|
|
1015
|
-
* @returns this effect.
|
|
1016
|
-
*/
|
|
1017
|
-
setFloat3(uniformName, x, y, z) {
|
|
1018
|
-
this._pipelineContext.setFloat3(uniformName, x, y, z);
|
|
1019
|
-
return this;
|
|
1020
|
-
}
|
|
1021
|
-
/**
|
|
1022
|
-
* Sets a Vector4 on a uniform variable.
|
|
1023
|
-
* @param uniformName Name of the variable.
|
|
1024
|
-
* @param vector4 Value to be set.
|
|
1025
|
-
* @returns this effect.
|
|
1026
|
-
*/
|
|
1027
|
-
setVector4(uniformName, vector4) {
|
|
1028
|
-
this._pipelineContext.setVector4(uniformName, vector4);
|
|
1029
|
-
return this;
|
|
1030
|
-
}
|
|
1031
|
-
/**
|
|
1032
|
-
* Sets a Quaternion on a uniform variable.
|
|
1033
|
-
* @param uniformName Name of the variable.
|
|
1034
|
-
* @param quaternion Value to be set.
|
|
1035
|
-
* @returns this effect.
|
|
1036
|
-
*/
|
|
1037
|
-
setQuaternion(uniformName, quaternion) {
|
|
1038
|
-
this._pipelineContext.setQuaternion(uniformName, quaternion);
|
|
1039
|
-
return this;
|
|
1040
|
-
}
|
|
1041
|
-
/**
|
|
1042
|
-
* Sets a float4 on a uniform variable.
|
|
1043
|
-
* @param uniformName Name of the variable.
|
|
1044
|
-
* @param x First float in float4.
|
|
1045
|
-
* @param y Second float in float4.
|
|
1046
|
-
* @param z Third float in float4.
|
|
1047
|
-
* @param w Fourth float in float4.
|
|
1048
|
-
* @returns this effect.
|
|
1049
|
-
*/
|
|
1050
|
-
setFloat4(uniformName, x, y, z, w) {
|
|
1051
|
-
this._pipelineContext.setFloat4(uniformName, x, y, z, w);
|
|
1052
|
-
return this;
|
|
1053
|
-
}
|
|
1054
|
-
/**
|
|
1055
|
-
* Sets a Color3 on a uniform variable.
|
|
1056
|
-
* @param uniformName Name of the variable.
|
|
1057
|
-
* @param color3 Value to be set.
|
|
1058
|
-
* @returns this effect.
|
|
1059
|
-
*/
|
|
1060
|
-
setColor3(uniformName, color3) {
|
|
1061
|
-
this._pipelineContext.setColor3(uniformName, color3);
|
|
1062
|
-
return this;
|
|
1063
|
-
}
|
|
1064
|
-
/**
|
|
1065
|
-
* Sets a Color4 on a uniform variable.
|
|
1066
|
-
* @param uniformName Name of the variable.
|
|
1067
|
-
* @param color3 Value to be set.
|
|
1068
|
-
* @param alpha Alpha value to be set.
|
|
1069
|
-
* @returns this effect.
|
|
1070
|
-
*/
|
|
1071
|
-
setColor4(uniformName, color3, alpha) {
|
|
1072
|
-
this._pipelineContext.setColor4(uniformName, color3, alpha);
|
|
1073
|
-
return this;
|
|
1074
|
-
}
|
|
1075
|
-
/**
|
|
1076
|
-
* Sets a Color4 on a uniform variable
|
|
1077
|
-
* @param uniformName defines the name of the variable
|
|
1078
|
-
* @param color4 defines the value to be set
|
|
1079
|
-
* @returns this effect.
|
|
1080
|
-
*/
|
|
1081
|
-
setDirectColor4(uniformName, color4) {
|
|
1082
|
-
this._pipelineContext.setDirectColor4(uniformName, color4);
|
|
1083
|
-
return this;
|
|
1084
|
-
}
|
|
1085
821
|
/**
|
|
1086
822
|
* Release all associated resources.
|
|
1087
823
|
**/
|
|
1088
824
|
dispose() {
|
|
1089
|
-
|
|
1090
|
-
this._pipelineContext.dispose();
|
|
1091
|
-
}
|
|
825
|
+
this._pipelineContext?.dispose();
|
|
1092
826
|
this._engine._releaseEffect(this);
|
|
1093
827
|
this._isDisposed = true;
|
|
1094
828
|
}
|