@onerjs/core 9.0.0 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Animations/animationGroup.pure.js.map +1 -1
- package/Cameras/targetCamera.pure.js +6 -1
- package/Cameras/targetCamera.pure.js.map +1 -1
- package/Engines/Native/nativeHardwareTexture.d.ts +8 -1
- package/Engines/Native/nativeHardwareTexture.js +7 -0
- package/Engines/Native/nativeHardwareTexture.js.map +1 -1
- package/Engines/Native/nativeHelpers.js +56 -1
- package/Engines/Native/nativeHelpers.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +37 -8
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/Native/nativeRenderTargetWrapper.d.ts +40 -0
- package/Engines/Native/nativeRenderTargetWrapper.js +265 -5
- package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
- package/Engines/Processors/shaderCodeCursor.d.ts +1 -0
- package/Engines/Processors/shaderCodeCursor.js +40 -3
- package/Engines/Processors/shaderCodeCursor.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.renderTarget.pure.js +1 -0
- package/Engines/WebGPU/Extensions/engine.renderTarget.pure.js.map +1 -1
- package/Engines/abstractEngine.pure.d.ts +15 -1
- package/Engines/abstractEngine.pure.js +12 -4
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/engine.pure.d.ts +0 -1
- package/Engines/engine.pure.js +0 -7
- package/Engines/engine.pure.js.map +1 -1
- package/Engines/nativeEngine.pure.js +1 -1
- package/Engines/nativeEngine.pure.js.map +1 -1
- package/Engines/thinEngine.pure.d.ts +1 -0
- package/Engines/thinEngine.pure.js +13 -2
- package/Engines/thinEngine.pure.js.map +1 -1
- package/Engines/thinNativeEngine.pure.d.ts +217 -17
- package/Engines/thinNativeEngine.pure.js +1431 -164
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/Engines/thinWebGPUEngine.js +6 -1
- package/Engines/thinWebGPUEngine.js.map +1 -1
- package/Engines/webgpuEngine.pure.d.ts +12 -1
- package/Engines/webgpuEngine.pure.js +8 -0
- package/Engines/webgpuEngine.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.d.ts +10 -0
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js +24 -12
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.d.ts +7 -0
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.js +43 -0
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.d.ts +16 -4
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js +20 -6
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.pure.js +3 -3
- package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.d.ts +7 -7
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js +52 -35
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.d.ts +12 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js +8 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js +4 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.d.ts +12 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.js +5 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.d.ts +2 -0
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.js +14 -2
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.d.ts +5 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.js +23 -8
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.js.map +1 -1
- package/FlowGraph/CustomTypes/flowGraphInteger.pure.d.ts +5 -0
- package/FlowGraph/CustomTypes/flowGraphInteger.pure.js +7 -0
- package/FlowGraph/CustomTypes/flowGraphInteger.pure.js.map +1 -1
- package/FlowGraph/CustomTypes/flowGraphMatrix.d.ts +10 -0
- package/FlowGraph/CustomTypes/flowGraphMatrix.js +14 -0
- package/FlowGraph/CustomTypes/flowGraphMatrix.js.map +1 -1
- package/FlowGraph/flowGraph.d.ts +2 -1
- package/FlowGraph/flowGraph.js +3 -2
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphAnimationHelpers.d.ts +24 -0
- package/FlowGraph/flowGraphAnimationHelpers.js +21 -0
- package/FlowGraph/flowGraphAnimationHelpers.js.map +1 -0
- package/FlowGraph/flowGraphContext.js +1 -0
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphValidator.js +0 -4
- package/FlowGraph/flowGraphValidator.js.map +1 -1
- package/FlowGraph/index.d.ts +2 -0
- package/FlowGraph/index.js +2 -0
- package/FlowGraph/index.js.map +1 -1
- package/FlowGraph/pure.d.ts +2 -0
- package/FlowGraph/pure.js +2 -0
- package/FlowGraph/pure.js.map +1 -1
- package/FlowGraph/serialization.d.ts +2 -2
- package/FlowGraph/serialization.js +2 -2
- package/FlowGraph/serialization.js.map +1 -1
- package/FlowGraph/typeDefinitions.d.ts +1 -1
- package/FlowGraph/typeDefinitions.js.map +1 -1
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.d.ts +1 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.js +4 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.d.ts +54 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.js +155 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.js.map +1 -0
- package/FrameGraph/Node/Blocks/Textures/pure.d.ts +1 -0
- package/FrameGraph/Node/Blocks/Textures/pure.js +1 -0
- package/FrameGraph/Node/Blocks/Textures/pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/allBlocks.pure.js +2 -0
- package/FrameGraph/Node/Blocks/allBlocks.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/index.d.ts +1 -0
- package/FrameGraph/Node/Blocks/index.js +1 -0
- package/FrameGraph/Node/Blocks/index.js.map +1 -1
- package/FrameGraph/Node/Blocks/pure.d.ts +1 -0
- package/FrameGraph/Node/Blocks/pure.js +1 -0
- package/FrameGraph/Node/Blocks/pure.js.map +1 -1
- package/FrameGraph/Tasks/Misc/minMaxReducerTask.d.ts +62 -0
- package/FrameGraph/Tasks/Misc/minMaxReducerTask.js +159 -0
- package/FrameGraph/Tasks/Misc/minMaxReducerTask.js.map +1 -0
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +3 -1
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
- package/FrameGraph/frameGraph.d.ts +4 -0
- package/FrameGraph/frameGraph.js +14 -0
- package/FrameGraph/frameGraph.js.map +1 -1
- package/FrameGraph/index.d.ts +1 -0
- package/FrameGraph/index.js +1 -0
- package/FrameGraph/index.js.map +1 -1
- package/FrameGraph/pure.d.ts +1 -0
- package/FrameGraph/pure.js +1 -0
- package/FrameGraph/pure.js.map +1 -1
- package/Inputs/scene.inputManager.js +1 -1
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Lights/Clustered/clusteredLightingSceneComponent.pure.d.ts +5 -0
- package/Lights/Clustered/clusteredLightingSceneComponent.pure.js +22 -1
- package/Lights/Clustered/clusteredLightingSceneComponent.pure.js.map +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.pure.js +7 -3
- package/Lights/Shadows/cascadedShadowGenerator.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.d.ts +7 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.js +8 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.d.ts +54 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.js +81 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.d.ts +7 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.js +8 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.d.ts +60 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.js +90 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.d.ts +31 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js +98 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +2 -2
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.d.ts +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.js +4 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.d.ts +83 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.js +191 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.d.ts +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.js +4 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.d.ts +62 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.js +125 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.js.map +1 -0
- package/Materials/GaussianSplatting/pure.d.ts +4 -0
- package/Materials/GaussianSplatting/pure.js +4 -0
- package/Materials/GaussianSplatting/pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.d.ts +1 -0
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js +12 -0
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js.map +1 -1
- package/Materials/Textures/Procedurals/proceduralTexture.pure.d.ts +1 -0
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js +31 -7
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
- package/Materials/Textures/mirrorTexture.pure.js +3 -1
- package/Materials/Textures/mirrorTexture.pure.js.map +1 -1
- package/Materials/Textures/texture.pure.js +1 -1
- package/Materials/Textures/texture.pure.js.map +1 -1
- package/Materials/effectRenderer.pure.d.ts +4 -0
- package/Materials/effectRenderer.pure.js +3 -2
- package/Materials/effectRenderer.pure.js.map +1 -1
- package/Materials/index.d.ts +4 -0
- package/Materials/index.js +4 -0
- package/Materials/index.js.map +1 -1
- package/Materials/material.pure.js +25 -12
- package/Materials/material.pure.js.map +1 -1
- package/Materials/pure.d.ts +4 -0
- package/Materials/pure.js +4 -0
- package/Materials/pure.js.map +1 -1
- package/Materials/standardMaterial.pure.d.ts +8 -0
- package/Materials/standardMaterial.pure.js +24 -2
- package/Materials/standardMaterial.pure.js.map +1 -1
- package/Meshes/Builders/polygonBuilder.pure.js +1 -1
- package/Meshes/Builders/polygonBuilder.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.d.ts +8 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.js +11 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.d.ts +231 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.js +1212 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.d.ts +14 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.js +15 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.d.ts +285 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.js +812 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +2 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +160 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +219 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +32 -4
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +114 -21
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/pure.d.ts +2 -0
- package/Meshes/GaussianSplatting/pure.js +2 -0
- package/Meshes/GaussianSplatting/pure.js.map +1 -1
- package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js +25 -11
- package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js.map +1 -1
- package/Meshes/abstractMesh.pure.d.ts +12 -0
- package/Meshes/abstractMesh.pure.js +32 -0
- package/Meshes/abstractMesh.pure.js.map +1 -1
- package/Meshes/index.d.ts +1 -0
- package/Meshes/index.js +1 -0
- package/Meshes/index.js.map +1 -1
- package/Meshes/pure.d.ts +1 -0
- package/Meshes/pure.js +1 -0
- package/Meshes/pure.js.map +1 -1
- package/Meshes/subMesh.pure.d.ts +11 -2
- package/Meshes/subMesh.pure.js +20 -5
- package/Meshes/subMesh.pure.js.map +1 -1
- package/Meshes/thinInstanceMesh.pure.js +1 -0
- package/Meshes/thinInstanceMesh.pure.js.map +1 -1
- package/Misc/andOrNotEvaluator.js +4 -0
- package/Misc/andOrNotEvaluator.js.map +1 -1
- package/Misc/minMaxReducer.pure.d.ts +6 -0
- package/Misc/minMaxReducer.pure.js +10 -0
- package/Misc/minMaxReducer.pure.js.map +1 -1
- package/Misc/thinMinMaxReducer.d.ts +19 -2
- package/Misc/thinMinMaxReducer.js +74 -21
- package/Misc/thinMinMaxReducer.js.map +1 -1
- package/Misc/tools.pure.js +1 -1
- package/Misc/tools.pure.js.map +1 -1
- package/Particles/Node/Blocks/Update/updateNoiseBlock.pure.js +19 -7
- package/Particles/Node/Blocks/Update/updateNoiseBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleSourceTextureBlock.pure.js +3 -2
- package/Particles/Node/Blocks/particleSourceTextureBlock.pure.js.map +1 -1
- package/Particles/gpuParticleSystem.pure.d.ts +2 -0
- package/Particles/gpuParticleSystem.pure.js +12 -4
- package/Particles/gpuParticleSystem.pure.js.map +1 -1
- package/Particles/particle.js +3 -2
- package/Particles/particle.js.map +1 -1
- package/Particles/solidParticleSystem.js +7 -1
- package/Particles/solidParticleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.function.d.ts +6 -0
- package/Particles/thinParticleSystem.function.js +144 -88
- package/Particles/thinParticleSystem.function.js.map +1 -1
- package/Particles/thinParticleSystem.pure.d.ts +6 -0
- package/Particles/thinParticleSystem.pure.js +70 -9
- package/Particles/thinParticleSystem.pure.js.map +1 -1
- package/Physics/v2/ragdoll.d.ts +2 -4
- package/Physics/v2/ragdoll.js +11 -4
- package/Physics/v2/ragdoll.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +12 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +43 -18
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
- package/Rendering/depthRenderer.pure.d.ts +9 -0
- package/Rendering/depthRenderer.pure.js +12 -0
- package/Rendering/depthRenderer.pure.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObject.d.ts +4 -0
- package/Rendering/fluidRenderer/fluidRenderingObject.js +6 -0
- package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.d.ts +4 -0
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js +8 -0
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js +3 -0
- package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js.map +1 -1
- package/Rendering/geometryBufferRenderer.pure.js +4 -1
- package/Rendering/geometryBufferRenderer.pure.js.map +1 -1
- package/Rendering/prePassRenderer.pure.js +3 -3
- package/Rendering/prePassRenderer.pure.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js +3 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/Shaders/ShadersInclude/lightsFragmentFunctions.js +27 -3
- package/Shaders/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/oitDeclaration.js +1 -1
- package/Shaders/ShadersInclude/oitDeclaration.js.map +1 -1
- package/Shaders/minmaxRedux.fragment.js +6 -1
- package/Shaders/minmaxRedux.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.js +65 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.js +17 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.d.ts +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +6 -78
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js +2 -2
- package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.js +79 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js +27 -3
- package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
- package/ShadersWGSL/gaussianPointSplattingBlit.fragment.d.ts +5 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.fragment.js +22 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.fragment.js.map +1 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.vertex.d.ts +5 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.vertex.js +19 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.vertex.js.map +1 -0
- package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.d.ts +5 -0
- package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.js +21 -0
- package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.js.map +1 -0
- package/ShadersWGSL/gaussianSplatting.vertex.js +2 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js +2 -1
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingVoxel.vertex.js +2 -1
- package/ShadersWGSL/gaussianSplattingVoxel.vertex.js.map +1 -1
- package/ShadersWGSL/gpsHiZBuild.compute.d.ts +5 -0
- package/ShadersWGSL/gpsHiZBuild.compute.js +16 -0
- package/ShadersWGSL/gpsHiZBuild.compute.js.map +1 -0
- package/ShadersWGSL/gpsPartition.compute.d.ts +5 -0
- package/ShadersWGSL/gpsPartition.compute.js +27 -0
- package/ShadersWGSL/gpsPartition.compute.js.map +1 -0
- package/ShadersWGSL/gpsPreprocess.compute.d.ts +5 -0
- package/ShadersWGSL/gpsPreprocess.compute.js +86 -0
- package/ShadersWGSL/gpsPreprocess.compute.js.map +1 -0
- package/ShadersWGSL/gpsResolve.compute.d.ts +5 -0
- package/ShadersWGSL/gpsResolve.compute.js +41 -0
- package/ShadersWGSL/gpsResolve.compute.js.map +1 -0
- package/ShadersWGSL/gpsScanAdd.compute.d.ts +5 -0
- package/ShadersWGSL/gpsScanAdd.compute.js +22 -0
- package/ShadersWGSL/gpsScanAdd.compute.js.map +1 -0
- package/ShadersWGSL/gpsScanBlocks.compute.d.ts +5 -0
- package/ShadersWGSL/gpsScanBlocks.compute.js +23 -0
- package/ShadersWGSL/gpsScanBlocks.compute.js.map +1 -0
- package/ShadersWGSL/gpsScanSums.compute.d.ts +5 -0
- package/ShadersWGSL/gpsScanSums.compute.js +30 -0
- package/ShadersWGSL/gpsScanSums.compute.js.map +1 -0
- package/ShadersWGSL/gpsSplat.compute.d.ts +5 -0
- package/ShadersWGSL/gpsSplat.compute.js +37 -0
- package/ShadersWGSL/gpsSplat.compute.js.map +1 -0
- package/ShadersWGSL/minmaxRedux.fragment.js +20 -3
- package/ShadersWGSL/minmaxRedux.fragment.js.map +1 -1
- package/XR/features/WebXRSpaceWarp.pure.js +2 -1
- package/XR/features/WebXRSpaceWarp.pure.js.map +1 -1
- package/assetContainer.d.ts +1 -0
- package/assetContainer.js +5 -1
- package/assetContainer.js.map +1 -1
- package/package.json +1 -1
- package/scene.pure.d.ts +13 -2
- package/scene.pure.js +28 -4
- package/scene.pure.js.map +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { FlowGraphExecutionBlockWithOutSignal } from "../../flowGraphExecutionBlockWithOutSignal.js";
|
|
3
3
|
import { RichTypeAny, RichTypeString } from "../../flowGraphRichTypes.pure.js";
|
|
4
4
|
import { RegisterClass } from "../../../Misc/typeStore.js";
|
|
5
|
+
import { RemoveFlowGraphAnimationGroupObservers } from "../../flowGraphAnimationHelpers.js";
|
|
5
6
|
/**
|
|
6
7
|
* This block will set a property on a given target asset.
|
|
7
8
|
* The property name can include dots ("."), which will be interpreted as a path to the property.
|
|
@@ -30,7 +31,9 @@ export class FlowGraphSetPropertyBlock extends FlowGraphExecutionBlockWithOutSig
|
|
|
30
31
|
const target = this.object.getValue(context);
|
|
31
32
|
const value = this.value.getValue(context);
|
|
32
33
|
const propertyName = this.propertyName.getValue(context);
|
|
33
|
-
this.
|
|
34
|
+
if (!this.config.stopOnError) {
|
|
35
|
+
this._stopRunningAnimations(context, target, propertyName);
|
|
36
|
+
}
|
|
34
37
|
const setFunction = this.customSetFunction.getValue(context);
|
|
35
38
|
if (setFunction) {
|
|
36
39
|
setFunction(target, propertyName, value, context);
|
|
@@ -38,19 +41,27 @@ export class FlowGraphSetPropertyBlock extends FlowGraphExecutionBlockWithOutSig
|
|
|
38
41
|
else {
|
|
39
42
|
this._setPropertyValue(target, propertyName, value);
|
|
40
43
|
}
|
|
44
|
+
if (this.config.stopOnError) {
|
|
45
|
+
this._stopRunningAnimations(context, target, propertyName);
|
|
46
|
+
}
|
|
41
47
|
}
|
|
42
48
|
catch (e) {
|
|
43
49
|
this._reportError(context, e);
|
|
50
|
+
if (this.config.stopOnError) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
44
53
|
}
|
|
45
54
|
this.out._activateSignal(context);
|
|
46
55
|
}
|
|
47
56
|
_stopRunningAnimations(context, target, propertyName) {
|
|
48
57
|
const currentlyRunningAnimationGroups = context._getGlobalContextVariable("currentlyRunningAnimationGroups", []);
|
|
49
|
-
for (
|
|
58
|
+
for (let groupIndex = currentlyRunningAnimationGroups.length - 1; groupIndex >= 0; groupIndex--) {
|
|
59
|
+
const uniqueId = currentlyRunningAnimationGroups[groupIndex];
|
|
50
60
|
const animationGroup = context.assetsContext.animationGroups.find((animationGroup) => animationGroup.uniqueId === uniqueId);
|
|
51
61
|
if (animationGroup) {
|
|
52
62
|
for (const targetedAnimations of animationGroup.targetedAnimations) {
|
|
53
63
|
if (targetedAnimations.target === target && targetedAnimations.animation.targetProperty === propertyName) {
|
|
64
|
+
RemoveFlowGraphAnimationGroupObservers(context, animationGroup)?._cleanupAfterExternalStop(context, animationGroup);
|
|
54
65
|
animationGroup.stop(true);
|
|
55
66
|
animationGroup.dispose();
|
|
56
67
|
const index = currentlyRunningAnimationGroups.indexOf(uniqueId);
|
|
@@ -58,6 +69,7 @@ export class FlowGraphSetPropertyBlock extends FlowGraphExecutionBlockWithOutSig
|
|
|
58
69
|
currentlyRunningAnimationGroups.splice(index, 1);
|
|
59
70
|
context._setGlobalContextVariable("currentlyRunningAnimationGroups", currentlyRunningAnimationGroups);
|
|
60
71
|
}
|
|
72
|
+
break;
|
|
61
73
|
}
|
|
62
74
|
}
|
|
63
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphSetPropertyBlock.pure.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAK7D,OAAO,EAAE,oCAAoC,EAAE,MAAM,qDAAqD,CAAC;AAC3G,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAGrF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAiBpD;;;;;;;;;GASG;AACH,MAAM,OAAO,yBAAuE,SAAQ,oCAAoC;IAsB5H;IACI;;OAEG;IACa,MAAkD;QAElE,KAAK,CAAC,MAAM,CAAC,CAAC;QAFE,WAAM,GAAN,MAAM,CAA4C;QAGlE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QAC3E,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAC1D,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,cAAc,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;QAChG,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC;IACtF,CA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J;AAED,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,MAAM,UAAU,iCAAiC;IAC7C,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,oEAAkC,yBAAyB,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\n\nimport { type AssetType, type FlowGraphAssetType } from \"core/FlowGraph/flowGraphAssetsContext\";\nimport { type FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\nimport { type FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection.pure\";\nimport { FlowGraphExecutionBlockWithOutSignal } from \"core/FlowGraph/flowGraphExecutionBlockWithOutSignal\";\nimport { RichTypeAny, RichTypeString } from \"core/FlowGraph/flowGraphRichTypes.pure\";\nimport { type FlowGraphSignalConnection } from \"core/FlowGraph/flowGraphSignalConnection.pure\";\nimport { FlowGraphBlockNames } from \"../flowGraphBlockNames\";\nimport { RegisterClass } from \"core/Misc/typeStore\";\n\n/**\n * Configuration for the FlowGraphSetPropertyBlock\n */\nexport interface IFlowGraphSetPropertyBlockConfiguration<O extends FlowGraphAssetType> {\n /**\n * The name of the property that will be set\n */\n propertyName?: string;\n\n /**\n * The target asset from which the property will be retrieved\n */\n target?: AssetType<O>;\n}\n\n/**\n * This block will set a property on a given target asset.\n * The property name can include dots (\".\"), which will be interpreted as a path to the property.\n * The target asset is an input and can be changed at any time.\n * The value of the property is an input and can be changed at any time.\n *\n * For example, with an input of a mesh asset, the property name \"position.x\" will set the x component of the position of the mesh.\n *\n * Note that it is recommended to input the object on which you are working on (i.e. a material) than providing a mesh and then getting the material from it.\n */\nexport class FlowGraphSetPropertyBlock<P extends any, O extends FlowGraphAssetType> extends FlowGraphExecutionBlockWithOutSignal {\n /**\n * Input connection: The value to set on the property.\n */\n public readonly value: FlowGraphDataConnection<P>;\n\n /**\n * Input connection: The target asset from which the property will be retrieved\n */\n public readonly object: FlowGraphDataConnection<AssetType<O>>;\n\n /**\n * Input connection: The name of the property that will be set\n */\n public readonly propertyName: FlowGraphDataConnection<string>;\n\n /**\n * Input connection: A function that can be used to set the value of the property.\n * If set it will be used instead of the default set function.\n */\n public readonly customSetFunction: FlowGraphDataConnection<(target: AssetType<O>, propertyName: string, value: P, context: FlowGraphContext) => void>;\n\n constructor(\n /**\n * the configuration of the block\n */\n public override config: IFlowGraphSetPropertyBlockConfiguration<O>\n ) {\n super(config);\n this.object = this.registerDataInput(\"object\", RichTypeAny, config.target);\n this.value = this.registerDataInput(\"value\", RichTypeAny);\n this.propertyName = this.registerDataInput(\"propertyName\", RichTypeString, config.propertyName);\n this.customSetFunction = this.registerDataInput(\"customSetFunction\", RichTypeAny);\n }\n public override _execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void {\n try {\n const target = this.object.getValue(context);\n const value = this.value.getValue(context);\n const propertyName = this.propertyName.getValue(context);\n\n this._stopRunningAnimations(context, target, propertyName);\n\n const setFunction = this.customSetFunction.getValue(context);\n if (setFunction) {\n setFunction(target, propertyName, value, context);\n } else {\n this._setPropertyValue(target, propertyName, value);\n }\n } catch (e) {\n this._reportError(context, e);\n }\n this.out._activateSignal(context);\n }\n\n private _stopRunningAnimations(context: FlowGraphContext, target: any, propertyName: string) {\n const currentlyRunningAnimationGroups = context._getGlobalContextVariable(\"currentlyRunningAnimationGroups\", []) as number[];\n for (const uniqueId of currentlyRunningAnimationGroups) {\n const animationGroup = context.assetsContext.animationGroups.find((animationGroup) => animationGroup.uniqueId === uniqueId);\n if (animationGroup) {\n for (const targetedAnimations of animationGroup.targetedAnimations) {\n if (targetedAnimations.target === target && targetedAnimations.animation.targetProperty === propertyName) {\n animationGroup.stop(true);\n animationGroup.dispose();\n\n const index = currentlyRunningAnimationGroups.indexOf(uniqueId);\n if (index !== -1) {\n currentlyRunningAnimationGroups.splice(index, 1);\n context._setGlobalContextVariable(\"currentlyRunningAnimationGroups\", currentlyRunningAnimationGroups);\n }\n }\n }\n }\n }\n }\n\n private _setPropertyValue(target: AssetType<O>, propertyName: string, value: P): void {\n const path = propertyName.split(\".\");\n let obj = target as any;\n for (let i = 0; i < path.length - 1; i++) {\n const prop = path[i];\n if (obj[prop] === undefined) {\n obj[prop] = {};\n }\n obj = obj[prop];\n }\n obj[path[path.length - 1]] = value;\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.SetProperty;\n }\n}\n\nlet _Registered = false;\n/**\n * Register side effects for flowGraphSetPropertyBlock.\n * Safe to call multiple times; only the first call has an effect.\n */\nexport function RegisterFlowGraphSetPropertyBlock(): void {\n if (_Registered) {\n return;\n }\n _Registered = true;\n\n RegisterClass(FlowGraphBlockNames.SetProperty, FlowGraphSetPropertyBlock);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"flowGraphSetPropertyBlock.pure.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAK7D,OAAO,EAAE,oCAAoC,EAAE,MAAM,qDAAqD,CAAC;AAC3G,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAGrF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,sCAAsC,EAAE,MAAM,iCAAiC,CAAC;AAoBzF;;;;;;;;;GASG;AACH,MAAM,OAAO,yBAAuE,SAAQ,oCAAoC;IAsB5H;IACI;;OAEG;IACa,MAAkD;QAElE,KAAK,CAAC,MAAM,CAAC,CAAC;QAFE,WAAM,GAAN,MAAM,CAA4C;QAGlE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QAC3E,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAC1D,IAA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C1G,CAAC;wBACD,MAAM;oBACV,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;IAEO,iBAAiB,CAAC,MAAoB,EAAE,YAAoB,EAAE,KAAQ;QAC1E,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrC,IAAI,GAAG,GAAG,MAAa,CAAC;QACxB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACrB,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;gBAC1B,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;YACnB,CAAC;YACD,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IACvC,CAAC;IAEe,YAAY;QACxB,yEAAuC;IAC3C,CAAC;CACJ;AAED,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,MAAM,UAAU,iCAAiC;IAC7C,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,oEAAkC,yBAAyB,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\n\nimport { type AssetType, type FlowGraphAssetType } from \"core/FlowGraph/flowGraphAssetsContext\";\nimport { type FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\nimport { type FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection.pure\";\nimport { FlowGraphExecutionBlockWithOutSignal } from \"core/FlowGraph/flowGraphExecutionBlockWithOutSignal\";\nimport { RichTypeAny, RichTypeString } from \"core/FlowGraph/flowGraphRichTypes.pure\";\nimport { type FlowGraphSignalConnection } from \"core/FlowGraph/flowGraphSignalConnection.pure\";\nimport { FlowGraphBlockNames } from \"../flowGraphBlockNames\";\nimport { RegisterClass } from \"core/Misc/typeStore\";\nimport { RemoveFlowGraphAnimationGroupObservers } from \"../../flowGraphAnimationHelpers\";\n\n/**\n * Configuration for the FlowGraphSetPropertyBlock\n */\nexport interface IFlowGraphSetPropertyBlockConfiguration<O extends FlowGraphAssetType> {\n /**\n * The name of the property that will be set\n */\n propertyName?: string;\n\n /**\n * The target asset from which the property will be retrieved\n */\n target?: AssetType<O>;\n\n /** Whether a failed write activates only error, without also activating out. Defaults to false. */\n stopOnError?: boolean;\n}\n\n/**\n * This block will set a property on a given target asset.\n * The property name can include dots (\".\"), which will be interpreted as a path to the property.\n * The target asset is an input and can be changed at any time.\n * The value of the property is an input and can be changed at any time.\n *\n * For example, with an input of a mesh asset, the property name \"position.x\" will set the x component of the position of the mesh.\n *\n * Note that it is recommended to input the object on which you are working on (i.e. a material) than providing a mesh and then getting the material from it.\n */\nexport class FlowGraphSetPropertyBlock<P extends any, O extends FlowGraphAssetType> extends FlowGraphExecutionBlockWithOutSignal {\n /**\n * Input connection: The value to set on the property.\n */\n public readonly value: FlowGraphDataConnection<P>;\n\n /**\n * Input connection: The target asset from which the property will be retrieved\n */\n public readonly object: FlowGraphDataConnection<AssetType<O>>;\n\n /**\n * Input connection: The name of the property that will be set\n */\n public readonly propertyName: FlowGraphDataConnection<string>;\n\n /**\n * Input connection: A function that can be used to set the value of the property.\n * If set it will be used instead of the default set function.\n */\n public readonly customSetFunction: FlowGraphDataConnection<(target: AssetType<O>, propertyName: string, value: P, context: FlowGraphContext) => void>;\n\n constructor(\n /**\n * the configuration of the block\n */\n public override config: IFlowGraphSetPropertyBlockConfiguration<O>\n ) {\n super(config);\n this.object = this.registerDataInput(\"object\", RichTypeAny, config.target);\n this.value = this.registerDataInput(\"value\", RichTypeAny);\n this.propertyName = this.registerDataInput(\"propertyName\", RichTypeString, config.propertyName);\n this.customSetFunction = this.registerDataInput(\"customSetFunction\", RichTypeAny);\n }\n public override _execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void {\n try {\n const target = this.object.getValue(context);\n const value = this.value.getValue(context);\n const propertyName = this.propertyName.getValue(context);\n\n if (!this.config.stopOnError) {\n this._stopRunningAnimations(context, target, propertyName);\n }\n\n const setFunction = this.customSetFunction.getValue(context);\n if (setFunction) {\n setFunction(target, propertyName, value, context);\n } else {\n this._setPropertyValue(target, propertyName, value);\n }\n if (this.config.stopOnError) {\n this._stopRunningAnimations(context, target, propertyName);\n }\n } catch (e) {\n this._reportError(context, e);\n if (this.config.stopOnError) {\n return;\n }\n }\n this.out._activateSignal(context);\n }\n\n private _stopRunningAnimations(context: FlowGraphContext, target: any, propertyName: string) {\n const currentlyRunningAnimationGroups = context._getGlobalContextVariable(\"currentlyRunningAnimationGroups\", []) as number[];\n for (let groupIndex = currentlyRunningAnimationGroups.length - 1; groupIndex >= 0; groupIndex--) {\n const uniqueId = currentlyRunningAnimationGroups[groupIndex];\n const animationGroup = context.assetsContext.animationGroups.find((animationGroup) => animationGroup.uniqueId === uniqueId);\n if (animationGroup) {\n for (const targetedAnimations of animationGroup.targetedAnimations) {\n if (targetedAnimations.target === target && targetedAnimations.animation.targetProperty === propertyName) {\n RemoveFlowGraphAnimationGroupObservers(context, animationGroup)?._cleanupAfterExternalStop(context, animationGroup);\n animationGroup.stop(true);\n animationGroup.dispose();\n\n const index = currentlyRunningAnimationGroups.indexOf(uniqueId);\n if (index !== -1) {\n currentlyRunningAnimationGroups.splice(index, 1);\n context._setGlobalContextVariable(\"currentlyRunningAnimationGroups\", currentlyRunningAnimationGroups);\n }\n break;\n }\n }\n }\n }\n }\n\n private _setPropertyValue(target: AssetType<O>, propertyName: string, value: P): void {\n const path = propertyName.split(\".\");\n let obj = target as any;\n for (let i = 0; i < path.length - 1; i++) {\n const prop = path[i];\n if (obj[prop] === undefined) {\n obj[prop] = {};\n }\n obj = obj[prop];\n }\n obj[path[path.length - 1]] = value;\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.SetProperty;\n }\n}\n\nlet _Registered = false;\n/**\n * Register side effects for flowGraphSetPropertyBlock.\n * Safe to call multiple times; only the first call has an effect.\n */\nexport function RegisterFlowGraphSetPropertyBlock(): void {\n if (_Registered) {\n return;\n }\n _Registered = true;\n\n RegisterClass(FlowGraphBlockNames.SetProperty, FlowGraphSetPropertyBlock);\n}\n"]}
|
|
@@ -12,9 +12,13 @@ export interface IFlowGraphSetVariableBlockConfiguration extends IFlowGraphBlock
|
|
|
12
12
|
*/
|
|
13
13
|
variable?: string;
|
|
14
14
|
/**
|
|
15
|
-
* The
|
|
15
|
+
* The names of the variables to set.
|
|
16
16
|
*/
|
|
17
17
|
variables?: string[];
|
|
18
|
+
/** Whether all input values are evaluated before any variable is written. Defaults to false. */
|
|
19
|
+
evaluateInputsBeforeWrite?: boolean;
|
|
20
|
+
/** Whether writes cancel animations targeting the user-variable dictionary without firing done. Defaults to false. */
|
|
21
|
+
cancelVariableAnimations?: boolean;
|
|
18
22
|
}
|
|
19
23
|
/**
|
|
20
24
|
* This block will set a variable on the context.
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { FlowGraphExecutionBlockWithOutSignal } from "../../flowGraphExecutionBlockWithOutSignal.js";
|
|
3
3
|
import { RichTypeAny } from "../../flowGraphRichTypes.pure.js";
|
|
4
4
|
import { RegisterClass } from "../../../Misc/typeStore.js";
|
|
5
|
+
import { RemoveFlowGraphAnimationGroupObservers } from "../../flowGraphAnimationHelpers.js";
|
|
5
6
|
/**
|
|
6
7
|
* This block will set a variable on the context.
|
|
7
8
|
*/
|
|
@@ -24,16 +25,24 @@ export class FlowGraphSetVariableBlock extends FlowGraphExecutionBlockWithOutSig
|
|
|
24
25
|
}
|
|
25
26
|
_execute(context, _callingSignal) {
|
|
26
27
|
if (this.config?.variables) {
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
const variables = this.config.variables;
|
|
29
|
+
let values;
|
|
30
|
+
if (this.config.evaluateInputsBeforeWrite) {
|
|
31
|
+
values = [];
|
|
32
|
+
for (const variable of variables) {
|
|
33
|
+
values.push(this.getDataInput(variable)?.getValue(context));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
for (let i = 0; i < variables.length; i++) {
|
|
37
|
+
this._saveVariable(context, variables[i], values?.[i], values ? undefined : variables[i]);
|
|
29
38
|
}
|
|
30
39
|
}
|
|
31
40
|
else {
|
|
32
|
-
this._saveVariable(context, this.config?.variable, "value");
|
|
41
|
+
this._saveVariable(context, this.config?.variable, undefined, "value");
|
|
33
42
|
}
|
|
34
43
|
this.out._activateSignal(context);
|
|
35
44
|
}
|
|
36
|
-
_saveVariable(context, variableName, inputName) {
|
|
45
|
+
_saveVariable(context, variableName, value, inputName) {
|
|
37
46
|
// check if there is an animation(group) running on this variable. If there is, stop the animation - a value was force-set.
|
|
38
47
|
const currentlyRunningAnimationGroups = context._getGlobalContextVariable("currentlyRunningAnimationGroups", []);
|
|
39
48
|
for (const animationUniqueId of currentlyRunningAnimationGroups) {
|
|
@@ -42,11 +51,18 @@ export class FlowGraphSetVariableBlock extends FlowGraphExecutionBlockWithOutSig
|
|
|
42
51
|
// check if there is a target animation that has the target set to be the context
|
|
43
52
|
for (const targetAnimation of animationGroup.targetedAnimations) {
|
|
44
53
|
// check if the target property is the variable we are setting
|
|
45
|
-
if (targetAnimation.target === context) {
|
|
54
|
+
if (targetAnimation.target === context || (this.config?.cancelVariableAnimations && targetAnimation.target === context.userVariables)) {
|
|
46
55
|
// check the variable name
|
|
47
56
|
if (targetAnimation.animation.targetProperty === variableName) {
|
|
48
57
|
// stop the animation
|
|
49
|
-
|
|
58
|
+
if (this.config?.cancelVariableAnimations) {
|
|
59
|
+
RemoveFlowGraphAnimationGroupObservers(context, animationGroup)?._cleanupAfterExternalStop(context, animationGroup);
|
|
60
|
+
animationGroup.stop(true);
|
|
61
|
+
animationGroup.dispose();
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
animationGroup.stop();
|
|
65
|
+
}
|
|
50
66
|
// remove the animation from the currently running animations
|
|
51
67
|
const index = currentlyRunningAnimationGroups.indexOf(animationUniqueId);
|
|
52
68
|
if (index > -1) {
|
|
@@ -59,8 +75,7 @@ export class FlowGraphSetVariableBlock extends FlowGraphExecutionBlockWithOutSig
|
|
|
59
75
|
}
|
|
60
76
|
}
|
|
61
77
|
}
|
|
62
|
-
|
|
63
|
-
context.setVariable(variableName, value);
|
|
78
|
+
context.setVariable(variableName, inputName === undefined ? value : this.getDataInput(inputName)?.getValue(context));
|
|
64
79
|
}
|
|
65
80
|
getClassName() {
|
|
66
81
|
return "FlowGraphSetVariableBlock" /* FlowGraphBlockNames.SetVariable */;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphSetVariableBlock.pure.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAI7D,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAGlG,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"flowGraphSetVariableBlock.pure.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAI7D,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAGlG,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,sCAAsC,EAAE,MAAM,iCAAiC,CAAC;AAuBzF;;GAEG;AACH,MAAM,OAAO,yBAA6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,cAAc,CAAC,OAAO,EAAE,CAAC;4BAC7B,CAAC;iCAAM,CAAC;gCACJ,cAAc,CAAC,IAAI,EAAE,CAAC;4BAC1B,CAAC;4BACD,6DAA6D;4BAC7D,MAAM,KAAK,GAAG,+BAA+B,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;4BACzE,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;gCACb,+BAA+B,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;4BACrD,CAAC;4BACD,OAAO,CAAC,yBAAyB,CAAC,iCAAiC,EAAE,+BAA+B,CAAC,CAAC;4BACtG,MAAM;wBACV,CAAC;oBACL,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;QACD,OAAO,CAAC,WAAW,CAAC,YAAY,EAAE,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IACzH,CAAC;IAEe,YAAY;QACxB,yEAAuC;IAC3C,CAAC;IAEe,SAAS,CAAC,mBAAyB;QAC/C,KAAK,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;QACrC,mBAAmB,CAAC,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC;IAChE,CAAC;CACJ;AAED,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,MAAM,UAAU,iCAAiC;IAC7C,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,oEAAkC,yBAAyB,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\n\nimport { type IFlowGraphBlockConfiguration } from \"../../flowGraphBlock\";\nimport { type FlowGraphContext } from \"../../flowGraphContext\";\nimport { FlowGraphExecutionBlockWithOutSignal } from \"../../flowGraphExecutionBlockWithOutSignal\";\nimport { type FlowGraphSignalConnection } from \"../../flowGraphSignalConnection.pure\";\nimport { FlowGraphBlockNames } from \"../flowGraphBlockNames\";\nimport { RichTypeAny } from \"core/FlowGraph/flowGraphRichTypes.pure\";\nimport { RegisterClass } from \"core/Misc/typeStore\";\nimport { RemoveFlowGraphAnimationGroupObservers } from \"../../flowGraphAnimationHelpers\";\n\n/**\n * The configuration of the FlowGraphGetVariableBlock.\n */\nexport interface IFlowGraphSetVariableBlockConfiguration extends IFlowGraphBlockConfiguration {\n /**\n * The name of the variable to set.\n */\n variable?: string;\n\n /**\n * The names of the variables to set.\n */\n variables?: string[];\n\n /** Whether all input values are evaluated before any variable is written. Defaults to false. */\n evaluateInputsBeforeWrite?: boolean;\n\n /** Whether writes cancel animations targeting the user-variable dictionary without firing done. Defaults to false. */\n cancelVariableAnimations?: boolean;\n}\n\n/**\n * This block will set a variable on the context.\n */\nexport class FlowGraphSetVariableBlock<T> extends FlowGraphExecutionBlockWithOutSignal {\n constructor(config: IFlowGraphSetVariableBlockConfiguration) {\n super(config);\n // check if the variable is an array\n if (config.variables && config.variable) {\n throw new Error(\"FlowGraphSetVariableBlock: variable and variables are both defined\");\n }\n // check if we have either a variable or variables. If we have variables, set the inputs correctly\n if (config.variables) {\n for (const variable of config.variables) {\n this.registerDataInput(variable, RichTypeAny);\n }\n } else {\n this.registerDataInput(\"value\", RichTypeAny);\n }\n }\n\n public override _execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void {\n if (this.config?.variables) {\n const variables: string[] = this.config.variables;\n let values: T[] | undefined;\n if (this.config.evaluateInputsBeforeWrite) {\n values = [];\n for (const variable of variables) {\n values.push(this.getDataInput(variable)?.getValue(context));\n }\n }\n for (let i = 0; i < variables.length; i++) {\n this._saveVariable(context, variables[i], values?.[i], values ? undefined : variables[i]);\n }\n } else {\n this._saveVariable(context, this.config?.variable, undefined, \"value\");\n }\n this.out._activateSignal(context);\n }\n\n private _saveVariable(context: FlowGraphContext, variableName: string, value: T | undefined, inputName?: string): void {\n // check if there is an animation(group) running on this variable. If there is, stop the animation - a value was force-set.\n const currentlyRunningAnimationGroups = context._getGlobalContextVariable(\"currentlyRunningAnimationGroups\", []) as number[];\n for (const animationUniqueId of currentlyRunningAnimationGroups) {\n const animationGroup = context.assetsContext.animationGroups.find((animationGroup) => animationGroup.uniqueId == animationUniqueId);\n if (animationGroup) {\n // check if there is a target animation that has the target set to be the context\n for (const targetAnimation of animationGroup.targetedAnimations) {\n // check if the target property is the variable we are setting\n if (targetAnimation.target === context || (this.config?.cancelVariableAnimations && targetAnimation.target === context.userVariables)) {\n // check the variable name\n if (targetAnimation.animation.targetProperty === variableName) {\n // stop the animation\n if (this.config?.cancelVariableAnimations) {\n RemoveFlowGraphAnimationGroupObservers(context, animationGroup)?._cleanupAfterExternalStop(context, animationGroup);\n animationGroup.stop(true);\n animationGroup.dispose();\n } else {\n animationGroup.stop();\n }\n // remove the animation from the currently running animations\n const index = currentlyRunningAnimationGroups.indexOf(animationUniqueId);\n if (index > -1) {\n currentlyRunningAnimationGroups.splice(index, 1);\n }\n context._setGlobalContextVariable(\"currentlyRunningAnimationGroups\", currentlyRunningAnimationGroups);\n break;\n }\n }\n }\n }\n }\n context.setVariable(variableName, inputName === undefined ? value : this.getDataInput(inputName)?.getValue(context));\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.SetVariable;\n }\n\n public override serialize(serializationObject?: any): void {\n super.serialize(serializationObject);\n serializationObject.config.variable = this.config?.variable;\n }\n}\n\nlet _Registered = false;\n/**\n * Register side effects for flowGraphSetVariableBlock.\n * Safe to call multiple times; only the first call has an effect.\n */\nexport function RegisterFlowGraphSetVariableBlock(): void {\n if (_Registered) {\n return;\n }\n _Registered = true;\n\n RegisterClass(FlowGraphBlockNames.SetVariable, FlowGraphSetVariableBlock);\n}\n"]}
|
|
@@ -11,6 +11,11 @@ export declare class FlowGraphInteger {
|
|
|
11
11
|
*/
|
|
12
12
|
readonly value: number;
|
|
13
13
|
constructor(value: number);
|
|
14
|
+
/**
|
|
15
|
+
* Creates an independent copy of this integer.
|
|
16
|
+
* @returns a new integer with the same value
|
|
17
|
+
*/
|
|
18
|
+
clone(): FlowGraphInteger;
|
|
14
19
|
/**
|
|
15
20
|
* Converts a float to an integer.
|
|
16
21
|
* @param n the float to convert
|
|
@@ -7,6 +7,13 @@ export class FlowGraphInteger {
|
|
|
7
7
|
constructor(value) {
|
|
8
8
|
this.value = this._toInt(value);
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Creates an independent copy of this integer.
|
|
12
|
+
* @returns a new integer with the same value
|
|
13
|
+
*/
|
|
14
|
+
clone() {
|
|
15
|
+
return new FlowGraphInteger(this.value);
|
|
16
|
+
}
|
|
10
17
|
/**
|
|
11
18
|
* Converts a float to an integer.
|
|
12
19
|
* @param n the float to convert
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphInteger.pure.js","sourceRoot":"","sources":["../../../../../dev/core/src/FlowGraph/CustomTypes/flowGraphInteger.pure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,6DAA6D;AAE7D;;GAEG;AACH,MAAM,OAAO,gBAAgB;IASzB,YAAY,KAAa;QACrB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED;;;;OAIG;IACK,MAAM,CAAC,CAAS;QACpB,OAAO,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACI,GAAG,CAAC,KAAuB;QAC9B,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1D,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,KAAuB;QACnC,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1D,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,KAAuB;QACnC,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,KAAuB;QACjC,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1D,CAAC;IAED;;;OAGG;IACI,YAAY;QACf,OAAO,gBAAgB,CAAC,SAAS,CAAC;IACtC,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,KAAuB;QACjC,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC;IACtC,CAAC;IAKD;;;;OAIG;IACI,MAAM,CAAC,SAAS,CAAC,KAAa;QACjC,OAAO,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACI,QAAQ;QACX,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IACjC,CAAC;;AAlBD,kCAAkC;AACpB,0BAAS,GAAG,kBAAkB,CAAC;AAoBjD,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,MAAM,UAAU,wBAAwB;IACpC,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAC;AACxD,CAAC","sourcesContent":["import { RegisterClass } from \"../../Misc/typeStore\";\r\n/** This file must only contain pure code and pure imports */\r\n\r\n/**\r\n * Class that represents an integer value.\r\n */\r\nexport class FlowGraphInteger {\r\n /**\r\n * The value of the integer. Its type\r\n * is a javascript number. Shouldn't be\r\n * directly modified - it is populated by\r\n * the constructor.\r\n */\r\n readonly value: number;\r\n\r\n constructor(value: number) {\r\n this.value = this._toInt(value);\r\n }\r\n\r\n /**\r\n * Converts a float to an integer.\r\n * @param n the float to convert\r\n * @returns the result of n | 0 - converting it to a int\r\n */\r\n private _toInt(n: number): number {\r\n return n | 0;\r\n }\r\n\r\n /**\r\n * Adds two integers together.\r\n * @param other the other integer to add\r\n * @returns a FlowGraphInteger with the result of the addition\r\n */\r\n public add(other: FlowGraphInteger): FlowGraphInteger {\r\n return new FlowGraphInteger(this.value + other.value);\r\n }\r\n\r\n /**\r\n * Subtracts two integers.\r\n * @param other the other integer to subtract\r\n * @returns a FlowGraphInteger with the result of the subtraction\r\n */\r\n public subtract(other: FlowGraphInteger): FlowGraphInteger {\r\n return new FlowGraphInteger(this.value - other.value);\r\n }\r\n\r\n /**\r\n * Multiplies two integers.\r\n * @param other the other integer to multiply\r\n * @returns a FlowGraphInteger with the result of the multiplication\r\n */\r\n public multiply(other: FlowGraphInteger): FlowGraphInteger {\r\n return new FlowGraphInteger(Math.imul(this.value, other.value));\r\n }\r\n\r\n /**\r\n * Divides two integers.\r\n * @param other the other integer to divide\r\n * @returns a FlowGraphInteger with the result of the division\r\n */\r\n public divide(other: FlowGraphInteger): FlowGraphInteger {\r\n return new FlowGraphInteger(this.value / other.value);\r\n }\r\n\r\n /**\r\n * The class name of this type.\r\n * @returns\r\n */\r\n public getClassName() {\r\n return FlowGraphInteger.ClassName;\r\n }\r\n\r\n /**\r\n * Compares two integers for equality.\r\n * @param other the other integer to compare\r\n * @returns true if the integers are equal\r\n */\r\n public equals(other: FlowGraphInteger): boolean {\r\n return this.value === other.value;\r\n }\r\n\r\n /** The class name of this type */\r\n public static ClassName = \"FlowGraphInteger\";\r\n\r\n /**\r\n * Parses a FlowGraphInteger from a serialization object.\r\n * @param value te number to parse\r\n * @returns a new FlowGraphInteger\r\n */\r\n public static FromValue(value: number): FlowGraphInteger {\r\n return new FlowGraphInteger(value);\r\n }\r\n\r\n /**\r\n * Returns a string representation of this integer\r\n * @returns the string representation\r\n */\r\n public toString(): string {\r\n return this.value.toString();\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n/**\r\n * Register side effects for flowGraphInteger.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\nexport function RegisterFlowGraphInteger(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n RegisterClass(\"FlowGraphInteger\", FlowGraphInteger);\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"flowGraphInteger.pure.js","sourceRoot":"","sources":["../../../../../dev/core/src/FlowGraph/CustomTypes/flowGraphInteger.pure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,6DAA6D;AAE7D;;GAEG;AACH,MAAM,OAAO,gBAAgB;IASzB,YAAY,KAAa;QACrB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED;;;OAGG;IACI,KAAK;QACR,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED;;;;OAIG;IACK,MAAM,CAAC,CAAS;QACpB,OAAO,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACI,GAAG,CAAC,KAAuB;QAC9B,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1D,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,KAAuB;QACnC,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1D,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,KAAuB;QACnC,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,KAAuB;QACjC,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1D,CAAC;IAED;;;OAGG;IACI,YAAY;QACf,OAAO,gBAAgB,CAAC,SAAS,CAAC;IACtC,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,KAAuB;QACjC,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC;IACtC,CAAC;IAKD;;;;OAIG;IACI,MAAM,CAAC,SAAS,CAAC,KAAa;QACjC,OAAO,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACI,QAAQ;QACX,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IACjC,CAAC;;AAlBD,kCAAkC;AACpB,0BAAS,GAAG,kBAAkB,CAAC;AAoBjD,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,MAAM,UAAU,wBAAwB;IACpC,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAC;AACxD,CAAC","sourcesContent":["import { RegisterClass } from \"../../Misc/typeStore\";\r\n/** This file must only contain pure code and pure imports */\r\n\r\n/**\r\n * Class that represents an integer value.\r\n */\r\nexport class FlowGraphInteger {\r\n /**\r\n * The value of the integer. Its type\r\n * is a javascript number. Shouldn't be\r\n * directly modified - it is populated by\r\n * the constructor.\r\n */\r\n readonly value: number;\r\n\r\n constructor(value: number) {\r\n this.value = this._toInt(value);\r\n }\r\n\r\n /**\r\n * Creates an independent copy of this integer.\r\n * @returns a new integer with the same value\r\n */\r\n public clone(): FlowGraphInteger {\r\n return new FlowGraphInteger(this.value);\r\n }\r\n\r\n /**\r\n * Converts a float to an integer.\r\n * @param n the float to convert\r\n * @returns the result of n | 0 - converting it to a int\r\n */\r\n private _toInt(n: number): number {\r\n return n | 0;\r\n }\r\n\r\n /**\r\n * Adds two integers together.\r\n * @param other the other integer to add\r\n * @returns a FlowGraphInteger with the result of the addition\r\n */\r\n public add(other: FlowGraphInteger): FlowGraphInteger {\r\n return new FlowGraphInteger(this.value + other.value);\r\n }\r\n\r\n /**\r\n * Subtracts two integers.\r\n * @param other the other integer to subtract\r\n * @returns a FlowGraphInteger with the result of the subtraction\r\n */\r\n public subtract(other: FlowGraphInteger): FlowGraphInteger {\r\n return new FlowGraphInteger(this.value - other.value);\r\n }\r\n\r\n /**\r\n * Multiplies two integers.\r\n * @param other the other integer to multiply\r\n * @returns a FlowGraphInteger with the result of the multiplication\r\n */\r\n public multiply(other: FlowGraphInteger): FlowGraphInteger {\r\n return new FlowGraphInteger(Math.imul(this.value, other.value));\r\n }\r\n\r\n /**\r\n * Divides two integers.\r\n * @param other the other integer to divide\r\n * @returns a FlowGraphInteger with the result of the division\r\n */\r\n public divide(other: FlowGraphInteger): FlowGraphInteger {\r\n return new FlowGraphInteger(this.value / other.value);\r\n }\r\n\r\n /**\r\n * The class name of this type.\r\n * @returns\r\n */\r\n public getClassName() {\r\n return FlowGraphInteger.ClassName;\r\n }\r\n\r\n /**\r\n * Compares two integers for equality.\r\n * @param other the other integer to compare\r\n * @returns true if the integers are equal\r\n */\r\n public equals(other: FlowGraphInteger): boolean {\r\n return this.value === other.value;\r\n }\r\n\r\n /** The class name of this type */\r\n public static ClassName = \"FlowGraphInteger\";\r\n\r\n /**\r\n * Parses a FlowGraphInteger from a serialization object.\r\n * @param value te number to parse\r\n * @returns a new FlowGraphInteger\r\n */\r\n public static FromValue(value: number): FlowGraphInteger {\r\n return new FlowGraphInteger(value);\r\n }\r\n\r\n /**\r\n * Returns a string representation of this integer\r\n * @returns the string representation\r\n */\r\n public toString(): string {\r\n return this.value.toString();\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n/**\r\n * Register side effects for flowGraphInteger.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\nexport function RegisterFlowGraphInteger(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n RegisterClass(\"FlowGraphInteger\", FlowGraphInteger);\r\n}\r\n"]}
|
|
@@ -157,6 +157,11 @@ export declare class FlowGraphMatrix2D implements IFlowGraphMatrix<Vector2> {
|
|
|
157
157
|
*/
|
|
158
158
|
_m: number[];
|
|
159
159
|
constructor(m?: number[]);
|
|
160
|
+
/**
|
|
161
|
+
* Creates an independent copy of this matrix.
|
|
162
|
+
* @returns a new matrix with copied column-major elements
|
|
163
|
+
*/
|
|
164
|
+
clone(): FlowGraphMatrix2D;
|
|
160
165
|
get m(): number[];
|
|
161
166
|
transformVector(v: Vector2): Vector2;
|
|
162
167
|
transformVectorToRef(v: Vector2, result: Vector2): Vector2;
|
|
@@ -190,6 +195,11 @@ export declare class FlowGraphMatrix3D implements IFlowGraphMatrix<Vector3> {
|
|
|
190
195
|
*/
|
|
191
196
|
_m: number[];
|
|
192
197
|
constructor(array?: number[]);
|
|
198
|
+
/**
|
|
199
|
+
* Creates an independent copy of this matrix.
|
|
200
|
+
* @returns a new matrix with copied column-major elements
|
|
201
|
+
*/
|
|
202
|
+
clone(): FlowGraphMatrix3D;
|
|
193
203
|
get m(): number[];
|
|
194
204
|
transformVector(v: Vector3): Vector3;
|
|
195
205
|
transformVectorToRef(v: Vector3, result: Vector3): Vector3;
|
|
@@ -10,6 +10,13 @@ export class FlowGraphMatrix2D {
|
|
|
10
10
|
constructor(m = [1, 0, 0, 1]) {
|
|
11
11
|
this._m = m;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Creates an independent copy of this matrix.
|
|
15
|
+
* @returns a new matrix with copied column-major elements
|
|
16
|
+
*/
|
|
17
|
+
clone() {
|
|
18
|
+
return new FlowGraphMatrix2D(this._m.slice());
|
|
19
|
+
}
|
|
13
20
|
get m() {
|
|
14
21
|
return this._m;
|
|
15
22
|
}
|
|
@@ -131,6 +138,13 @@ export class FlowGraphMatrix3D {
|
|
|
131
138
|
constructor(array = [1, 0, 0, 0, 1, 0, 0, 0, 1]) {
|
|
132
139
|
this._m = array;
|
|
133
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Creates an independent copy of this matrix.
|
|
143
|
+
* @returns a new matrix with copied column-major elements
|
|
144
|
+
*/
|
|
145
|
+
clone() {
|
|
146
|
+
return new FlowGraphMatrix3D(this._m.slice());
|
|
147
|
+
}
|
|
134
148
|
get m() {
|
|
135
149
|
return this._m;
|
|
136
150
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphMatrix.js","sourceRoot":"","sources":["../../../../../dev/core/src/FlowGraph/CustomTypes/flowGraphMatrix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAuK/D,wGAAwG;AAExG;;;;;GAKG;AACH,MAAM,OAAO,iBAAiB;IAM1B,YAAY,IAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAClC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;IAChB,CAAC;IAED,IAAW,CAAC;QACR,OAAO,IAAI,CAAC,EAAE,CAAC;IACnB,CAAC;IAEM,eAAe,CAAC,CAAU;QAC7B,OAAO,IAAI,CAAC,oBAAoB,CAAC,CAAC,EAAE,IAAI,OAAO,EAAE,CAAC,CAAC;IACvD,CAAC;IAEM,oBAAoB,CAAC,CAAU,EAAE,MAAe;QACnD,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/C,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAA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C,GAAG,OAAO;YAC/B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO;YAC/B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO;YAC/B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO;YAC/B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAClC,CAAC;IACN,CAAC;IAEM,YAAY;QACf,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEM,QAAQ;QACX,OAAO,qBAAqB,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IACtD,CAAC;CACJ","sourcesContent":["import { Vector3, Vector2 } from \"core/Maths/math.vector.pure\";\n\n/**\n * Interface representing a generic flow graph matrix.\n *\n * BREAKING (since the KHR_interactivity work): {@link FlowGraphMatrix2D} and {@link FlowGraphMatrix3D}\n * now store their elements in column-major order, matching core {@link Matrix} and the\n * glTF/KHR_interactivity convention. Previous releases stored them row-major. This changes the result\n * of building a matrix from a flat array (`fromArray`/`set`), of `transformVector`/`transformVectorToRef`,\n * and of `multiply`/`multiplyToRef` (which now computes `this * other` rather than `other * this`).\n * There is no compile error — graphs that relied on the old ordering or operand order get silently\n * different numbers, so any code constructing these from raw arrays should be re-checked.\n */\nexport interface IFlowGraphMatrix<VectorType> {\n /**\n * The matrix elements stored in column-major order.\n */\n m: number[];\n\n /**\n * Transforms a vector using this matrix.\n *\n * @param v - The vector to transform.\n * @returns The transformed vector.\n */\n transformVector(v: VectorType): VectorType;\n\n /**\n * Transforms a vector using this matrix and stores the result in a reference vector.\n *\n * @param v - The vector to transform.\n * @param result - The vector to store the result.\n * @returns The transformed vector.\n */\n transformVectorToRef(v: VectorType, result: VectorType): VectorType;\n\n /**\n * Returns the matrix elements as an array.\n *\n * @returns The matrix elements as an array.\n */\n asArray(): number[];\n\n /**\n * Copies the matrix elements to an array.\n *\n * @param emptyArray - The array to copy the elements to.\n * @returns The array with the matrix elements.\n */\n toArray(emptyArray: number[]): number[];\n\n /**\n * Sets the matrix elements from an array.\n *\n * @param array - The array containing the matrix elements.\n * @returns The updated matrix.\n */\n fromArray(array: number[]): IFlowGraphMatrix<VectorType>;\n\n /**\n * Multiplies this matrix with another matrix and stores the result in a reference matrix.\n *\n * @param other - The matrix to multiply with.\n * @param result - The matrix to store the result.\n * @returns The result matrix.\n */\n multiplyToRef(other: IFlowGraphMatrix<VectorType>, result: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;\n\n /**\n * Multiplies this matrix with another matrix.\n * To staz conform with the Matrix class, this does B * A\n *\n * @param other - The matrix to multiply with.\n * @returns The result matrix.\n */\n multiply(other: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;\n\n /**\n * Divides this matrix by another matrix and stores the result in a reference matrix.\n *\n * @param other - The matrix to divide by.\n * @param result - The matrix to store the result.\n * @returns The result matrix.\n */\n divideToRef(other: IFlowGraphMatrix<VectorType>, result: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;\n\n /**\n * Divides this matrix by another matrix.\n *\n * @param other - The matrix to divide by.\n * @returns The result matrix.\n */\n divide(other: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;\n\n /**\n * Adds another matrix to this matrix and stores the result in a reference matrix.\n *\n * @param other - The matrix to add.\n * @param result - The matrix to store the result.\n * @returns The result matrix.\n */\n addToRef(other: IFlowGraphMatrix<VectorType>, result: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;\n\n /**\n * Adds another matrix to this matrix.\n *\n * @param other - The matrix to add.\n * @returns The result matrix.\n */\n add(other: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;\n\n /**\n * Subtracts another matrix from this matrix and stores the result in a reference matrix.\n *\n * @param other - The matrix to subtract.\n * @param result - The matrix to store the result.\n * @returns The result matrix.\n */\n subtractToRef(other: IFlowGraphMatrix<VectorType>, result: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;\n\n /**\n * Subtracts another matrix from this matrix.\n *\n * @param other - The matrix to subtract.\n * @returns The result matrix.\n */\n subtract(other: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;\n\n /**\n * Transposes this matrix.\n *\n * @returns The transposed matrix.\n */\n transpose(): IFlowGraphMatrix<VectorType>;\n\n /**\n * Computes the determinant of this matrix.\n *\n * @returns The determinant of the matrix.\n */\n determinant(): number;\n\n /**\n * Computes the inverse of this matrix.\n *\n * @returns The inverse of the matrix.\n * @throws Error if the matrix is not invertible.\n */\n inverse(): IFlowGraphMatrix<VectorType>;\n\n /**\n * Gets the class name of this matrix.\n *\n * @returns The class name.\n */\n getClassName(): string;\n\n /**\n * Checks if this matrix is equal to another matrix within an optional epsilon.\n *\n * @param other - The matrix to compare with.\n * @param epsilon - The optional epsilon for comparison.\n * @returns True if the matrices are equal, false otherwise.\n */\n equals(other: IFlowGraphMatrix<VectorType>, epsilon?: number): boolean;\n}\n\n// Note - the matrix classes are basically column-major, and work similarly to Babylon.js' Matrix class.\n\n/**\n * A 2x2 matrix, stored in column-major order.\n *\n * BREAKING: this class was row-major in earlier releases — see {@link IFlowGraphMatrix} for the full\n * behaviour change (flat-array construction, transform, and multiply operand order).\n */\nexport class FlowGraphMatrix2D implements IFlowGraphMatrix<Vector2> {\n /**\n * @internal\n */\n public _m: number[];\n\n constructor(m: number[] = [1, 0, 0, 1]) {\n this._m = m;\n }\n\n public get m(): number[] {\n return this._m;\n }\n\n public transformVector(v: Vector2): Vector2 {\n return this.transformVectorToRef(v, new Vector2());\n }\n\n public transformVectorToRef(v: Vector2, result: Vector2): Vector2 {\n result.x = v.x * this._m[0] + v.y * this._m[2];\n result.y = v.x * this._m[1] + v.y * this._m[3];\n return result;\n }\n\n public asArray(): number[] {\n return this.toArray();\n }\n\n public toArray(emptyArray: number[] = []): number[] {\n for (let i = 0; i < 4; i++) {\n emptyArray[i] = this._m[i];\n }\n return emptyArray;\n }\n\n public fromArray(array: number[]): FlowGraphMatrix2D {\n for (let i = 0; i < 4; i++) {\n this._m[i] = array[i];\n }\n return this;\n }\n\n public multiplyToRef(other: FlowGraphMatrix2D, result: FlowGraphMatrix2D): FlowGraphMatrix2D {\n const otherMatrix = other._m;\n const thisMatrix = this._m;\n const r = result._m;\n // this * other, column-major (matches core Matrix and the glTF/KHR_interactivity convention)\n r[0] = thisMatrix[0] * otherMatrix[0] + thisMatrix[1] * otherMatrix[2];\n r[1] = thisMatrix[0] * otherMatrix[1] + thisMatrix[1] * otherMatrix[3];\n r[2] = thisMatrix[2] * otherMatrix[0] + thisMatrix[3] * otherMatrix[2];\n r[3] = thisMatrix[2] * otherMatrix[1] + thisMatrix[3] * otherMatrix[3];\n\n return result;\n }\n\n public multiply(other: FlowGraphMatrix2D): FlowGraphMatrix2D {\n return this.multiplyToRef(other, new FlowGraphMatrix2D());\n }\n\n public divideToRef(other: FlowGraphMatrix2D, result: FlowGraphMatrix2D): FlowGraphMatrix2D {\n const m = this._m;\n const o = other._m;\n const r = result._m;\n\n r[0] = m[0] / o[0];\n r[1] = m[1] / o[1];\n r[2] = m[2] / o[2];\n r[3] = m[3] / o[3];\n\n return result;\n }\n\n public divide(other: FlowGraphMatrix2D): FlowGraphMatrix2D {\n return this.divideToRef(other, new FlowGraphMatrix2D());\n }\n\n public addToRef(other: FlowGraphMatrix2D, result: FlowGraphMatrix2D): FlowGraphMatrix2D {\n const m = this._m;\n const o = other.m;\n const r = result.m;\n\n r[0] = m[0] + o[0];\n r[1] = m[1] + o[1];\n r[2] = m[2] + o[2];\n r[3] = m[3] + o[3];\n\n return result;\n }\n\n public add(other: FlowGraphMatrix2D): FlowGraphMatrix2D {\n return this.addToRef(other, new FlowGraphMatrix2D());\n }\n\n public subtractToRef(other: FlowGraphMatrix2D, result: FlowGraphMatrix2D): FlowGraphMatrix2D {\n const m = this._m;\n const o = other.m;\n const r = result.m;\n\n r[0] = m[0] - o[0];\n r[1] = m[1] - o[1];\n r[2] = m[2] - o[2];\n r[3] = m[3] - o[3];\n\n return result;\n }\n\n public subtract(other: FlowGraphMatrix2D): FlowGraphMatrix2D {\n return this.subtractToRef(other, new FlowGraphMatrix2D());\n }\n\n public transpose(): FlowGraphMatrix2D {\n const m = this._m;\n return new FlowGraphMatrix2D([m[0], m[2], m[1], m[3]]);\n }\n\n public determinant(): number {\n const m = this._m;\n return m[0] * m[3] - m[1] * m[2];\n }\n\n public inverse(): FlowGraphMatrix2D {\n const det = this.determinant();\n if (det === 0) {\n throw new Error(\"Matrix is not invertible\");\n }\n const m = this._m;\n const invDet = 1 / det;\n return new FlowGraphMatrix2D([m[3] * invDet, -m[1] * invDet, -m[2] * invDet, m[0] * invDet]);\n }\n\n public equals(other: IFlowGraphMatrix<Vector2>, epsilon: number = 0): boolean {\n const m = this._m;\n const o = other.m;\n if (epsilon === 0) {\n return m[0] === o[0] && m[1] === o[1] && m[2] === o[2] && m[3] === o[3];\n }\n return Math.abs(m[0] - o[0]) < epsilon && Math.abs(m[1] - o[1]) < epsilon && Math.abs(m[2] - o[2]) < epsilon && Math.abs(m[3] - o[3]) < epsilon;\n }\n\n public getClassName(): string {\n return \"FlowGraphMatrix2D\";\n }\n\n public toString(): string {\n return `FlowGraphMatrix2D(${this._m.join(\", \")})`;\n }\n}\n\n/**\n * A 3x3 matrix, stored in column-major order.\n *\n * BREAKING: this class was row-major in earlier releases — see {@link IFlowGraphMatrix} for the full\n * behaviour change (flat-array construction, transform, and multiply operand order).\n */\nexport class FlowGraphMatrix3D implements IFlowGraphMatrix<Vector3> {\n /**\n * @internal\n */\n public _m: number[];\n\n constructor(array: number[] = [1, 0, 0, 0, 1, 0, 0, 0, 1]) {\n this._m = array;\n }\n\n public get m(): number[] {\n return this._m;\n }\n\n public transformVector(v: Vector3): Vector3 {\n return this.transformVectorToRef(v, new Vector3());\n }\n\n public transformVectorToRef(v: Vector3, result: Vector3): Vector3 {\n const m = this._m;\n result.x = v.x * m[0] + v.y * m[3] + v.z * m[6];\n result.y = v.x * m[1] + v.y * m[4] + v.z * m[7];\n result.z = v.x * m[2] + v.y * m[5] + v.z * m[8];\n return result;\n }\n\n public multiplyToRef(other: FlowGraphMatrix3D, result: FlowGraphMatrix3D): FlowGraphMatrix3D {\n const otherMatrix = other._m;\n const thisMatrix = this._m;\n const r = result.m;\n\n r[0] = thisMatrix[0] * otherMatrix[0] + thisMatrix[1] * otherMatrix[3] + thisMatrix[2] * otherMatrix[6];\n r[1] = thisMatrix[0] * otherMatrix[1] + thisMatrix[1] * otherMatrix[4] + thisMatrix[2] * otherMatrix[7];\n r[2] = thisMatrix[0] * otherMatrix[2] + thisMatrix[1] * otherMatrix[5] + thisMatrix[2] * otherMatrix[8];\n\n r[3] = thisMatrix[3] * otherMatrix[0] + thisMatrix[4] * otherMatrix[3] + thisMatrix[5] * otherMatrix[6];\n r[4] = thisMatrix[3] * otherMatrix[1] + thisMatrix[4] * otherMatrix[4] + thisMatrix[5] * otherMatrix[7];\n r[5] = thisMatrix[3] * otherMatrix[2] + thisMatrix[4] * otherMatrix[5] + thisMatrix[5] * otherMatrix[8];\n\n r[6] = thisMatrix[6] * otherMatrix[0] + thisMatrix[7] * otherMatrix[3] + thisMatrix[8] * otherMatrix[6];\n r[7] = thisMatrix[6] * otherMatrix[1] + thisMatrix[7] * otherMatrix[4] + thisMatrix[8] * otherMatrix[7];\n r[8] = thisMatrix[6] * otherMatrix[2] + thisMatrix[7] * otherMatrix[5] + thisMatrix[8] * otherMatrix[8];\n\n return result;\n }\n\n public multiply(other: FlowGraphMatrix3D): FlowGraphMatrix3D {\n return this.multiplyToRef(other, new FlowGraphMatrix3D());\n }\n\n public divideToRef(other: FlowGraphMatrix3D, result: FlowGraphMatrix3D): FlowGraphMatrix3D {\n const m = this._m;\n const o = other.m;\n const r = result.m;\n\n r[0] = m[0] / o[0];\n r[1] = m[1] / o[1];\n r[2] = m[2] / o[2];\n r[3] = m[3] / o[3];\n r[4] = m[4] / o[4];\n r[5] = m[5] / o[5];\n r[6] = m[6] / o[6];\n r[7] = m[7] / o[7];\n r[8] = m[8] / o[8];\n\n return result;\n }\n\n public divide(other: FlowGraphMatrix3D): FlowGraphMatrix3D {\n return this.divideToRef(other, new FlowGraphMatrix3D());\n }\n\n public addToRef(other: FlowGraphMatrix3D, result: FlowGraphMatrix3D): FlowGraphMatrix3D {\n const m = this._m;\n const o = other.m;\n const r = result.m;\n\n r[0] = m[0] + o[0];\n r[1] = m[1] + o[1];\n r[2] = m[2] + o[2];\n r[3] = m[3] + o[3];\n r[4] = m[4] + o[4];\n r[5] = m[5] + o[5];\n r[6] = m[6] + o[6];\n r[7] = m[7] + o[7];\n r[8] = m[8] + o[8];\n\n return result;\n }\n\n public add(other: FlowGraphMatrix3D): FlowGraphMatrix3D {\n return this.addToRef(other, new FlowGraphMatrix3D());\n }\n\n public subtractToRef(other: FlowGraphMatrix3D, result: FlowGraphMatrix3D): FlowGraphMatrix3D {\n const m = this._m;\n const o = other.m;\n const r = result.m;\n\n r[0] = m[0] - o[0];\n r[1] = m[1] - o[1];\n r[2] = m[2] - o[2];\n r[3] = m[3] - o[3];\n r[4] = m[4] - o[4];\n r[5] = m[5] - o[5];\n r[6] = m[6] - o[6];\n r[7] = m[7] - o[7];\n r[8] = m[8] - o[8];\n\n return result;\n }\n\n public subtract(other: FlowGraphMatrix3D): FlowGraphMatrix3D {\n return this.subtractToRef(other, new FlowGraphMatrix3D());\n }\n\n public toArray(emptyArray: number[] = []): number[] {\n for (let i = 0; i < 9; i++) {\n emptyArray[i] = this._m[i];\n }\n return emptyArray;\n }\n\n public asArray(): number[] {\n return this.toArray();\n }\n\n public fromArray(array: number[]): FlowGraphMatrix3D {\n for (let i = 0; i < 9; i++) {\n this._m[i] = array[i];\n }\n return this;\n }\n\n public transpose(): FlowGraphMatrix3D {\n const m = this._m;\n return new FlowGraphMatrix3D([m[0], m[3], m[6], m[1], m[4], m[7], m[2], m[5], m[8]]);\n }\n\n public determinant(): number {\n const m = this._m;\n return m[0] * (m[4] * m[8] - m[5] * m[7]) - m[1] * (m[3] * m[8] - m[5] * m[6]) + m[2] * (m[3] * m[7] - m[4] * m[6]);\n }\n\n public inverse(): FlowGraphMatrix3D {\n const det = this.determinant();\n if (det === 0) {\n throw new Error(\"Matrix is not invertible\");\n }\n const m = this._m;\n const invDet = 1 / det;\n return new FlowGraphMatrix3D([\n (m[4] * m[8] - m[5] * m[7]) * invDet,\n (m[2] * m[7] - m[1] * m[8]) * invDet,\n (m[1] * m[5] - m[2] * m[4]) * invDet,\n (m[5] * m[6] - m[3] * m[8]) * invDet,\n (m[0] * m[8] - m[2] * m[6]) * invDet,\n (m[2] * m[3] - m[0] * m[5]) * invDet,\n (m[3] * m[7] - m[4] * m[6]) * invDet,\n (m[1] * m[6] - m[0] * m[7]) * invDet,\n (m[0] * m[4] - m[1] * m[3]) * invDet,\n ]);\n }\n\n public equals(other: IFlowGraphMatrix<Vector3>, epsilon: number = 0): boolean {\n const m = this._m;\n const o = other.m;\n // performance shortcut\n if (epsilon === 0) {\n return m[0] === o[0] && m[1] === o[1] && m[2] === o[2] && m[3] === o[3] && m[4] === o[4] && m[5] === o[5] && m[6] === o[6] && m[7] === o[7] && m[8] === o[8];\n }\n return (\n Math.abs(m[0] - o[0]) < epsilon &&\n Math.abs(m[1] - o[1]) < epsilon &&\n Math.abs(m[2] - o[2]) < epsilon &&\n Math.abs(m[3] - o[3]) < epsilon &&\n Math.abs(m[4] - o[4]) < epsilon &&\n Math.abs(m[5] - o[5]) < epsilon &&\n Math.abs(m[6] - o[6]) < epsilon &&\n Math.abs(m[7] - o[7]) < epsilon &&\n Math.abs(m[8] - o[8]) < epsilon\n );\n }\n\n public getClassName(): string {\n return \"FlowGraphMatrix3D\";\n }\n\n public toString(): string {\n return `FlowGraphMatrix3D(${this._m.join(\", \")})`;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"flowGraphMatrix.js","sourceRoot":"","sources":["../../../../../dev/core/src/FlowGraph/CustomTypes/flowGraphMatrix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAuK/D,wGAAwG;AAExG;;;;;GAKG;AACH,MAAM,OAAO,iBAAiB;IAM1B,YAAY,IAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAClC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;IAChB,CAAC;IAED;;;OAGG;IACI,KAAK;QACR,OAAO,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,IAAW,CAAC;QACR,OAAO,IAAI,CAAC,EAAE,CAAC;IACnB,CAAC;IAEM,eAAe,CAAC,CAAU;QAC7B,OAAO,IAAI,CAAC,oBAAoB,CAAC,CAAC,EAAE,IAAI,OAAO,EAAE,CAAC,CAAC;IACvD,CAAC;IAEM,oBAAoB,CAAC,CAAU,EAAE,MAAe;QACnD,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/C,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/C,OAAO,MAAM,CAAC;IAClB,CAAC;IAEM,OAAO;QACV,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAEM,O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GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO;YAC/B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO;YAC/B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO;YAC/B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAClC,CAAC;IACN,CAAC;IAEM,YAAY;QACf,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEM,QAAQ;QACX,OAAO,qBAAqB,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IACtD,CAAC;CACJ","sourcesContent":["import { Vector3, Vector2 } from \"core/Maths/math.vector.pure\";\n\n/**\n * Interface representing a generic flow graph matrix.\n *\n * BREAKING (since the KHR_interactivity work): {@link FlowGraphMatrix2D} and {@link FlowGraphMatrix3D}\n * now store their elements in column-major order, matching core {@link Matrix} and the\n * glTF/KHR_interactivity convention. Previous releases stored them row-major. This changes the result\n * of building a matrix from a flat array (`fromArray`/`set`), of `transformVector`/`transformVectorToRef`,\n * and of `multiply`/`multiplyToRef` (which now computes `this * other` rather than `other * this`).\n * There is no compile error — graphs that relied on the old ordering or operand order get silently\n * different numbers, so any code constructing these from raw arrays should be re-checked.\n */\nexport interface IFlowGraphMatrix<VectorType> {\n /**\n * The matrix elements stored in column-major order.\n */\n m: number[];\n\n /**\n * Transforms a vector using this matrix.\n *\n * @param v - The vector to transform.\n * @returns The transformed vector.\n */\n transformVector(v: VectorType): VectorType;\n\n /**\n * Transforms a vector using this matrix and stores the result in a reference vector.\n *\n * @param v - The vector to transform.\n * @param result - The vector to store the result.\n * @returns The transformed vector.\n */\n transformVectorToRef(v: VectorType, result: VectorType): VectorType;\n\n /**\n * Returns the matrix elements as an array.\n *\n * @returns The matrix elements as an array.\n */\n asArray(): number[];\n\n /**\n * Copies the matrix elements to an array.\n *\n * @param emptyArray - The array to copy the elements to.\n * @returns The array with the matrix elements.\n */\n toArray(emptyArray: number[]): number[];\n\n /**\n * Sets the matrix elements from an array.\n *\n * @param array - The array containing the matrix elements.\n * @returns The updated matrix.\n */\n fromArray(array: number[]): IFlowGraphMatrix<VectorType>;\n\n /**\n * Multiplies this matrix with another matrix and stores the result in a reference matrix.\n *\n * @param other - The matrix to multiply with.\n * @param result - The matrix to store the result.\n * @returns The result matrix.\n */\n multiplyToRef(other: IFlowGraphMatrix<VectorType>, result: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;\n\n /**\n * Multiplies this matrix with another matrix.\n * To staz conform with the Matrix class, this does B * A\n *\n * @param other - The matrix to multiply with.\n * @returns The result matrix.\n */\n multiply(other: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;\n\n /**\n * Divides this matrix by another matrix and stores the result in a reference matrix.\n *\n * @param other - The matrix to divide by.\n * @param result - The matrix to store the result.\n * @returns The result matrix.\n */\n divideToRef(other: IFlowGraphMatrix<VectorType>, result: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;\n\n /**\n * Divides this matrix by another matrix.\n *\n * @param other - The matrix to divide by.\n * @returns The result matrix.\n */\n divide(other: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;\n\n /**\n * Adds another matrix to this matrix and stores the result in a reference matrix.\n *\n * @param other - The matrix to add.\n * @param result - The matrix to store the result.\n * @returns The result matrix.\n */\n addToRef(other: IFlowGraphMatrix<VectorType>, result: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;\n\n /**\n * Adds another matrix to this matrix.\n *\n * @param other - The matrix to add.\n * @returns The result matrix.\n */\n add(other: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;\n\n /**\n * Subtracts another matrix from this matrix and stores the result in a reference matrix.\n *\n * @param other - The matrix to subtract.\n * @param result - The matrix to store the result.\n * @returns The result matrix.\n */\n subtractToRef(other: IFlowGraphMatrix<VectorType>, result: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;\n\n /**\n * Subtracts another matrix from this matrix.\n *\n * @param other - The matrix to subtract.\n * @returns The result matrix.\n */\n subtract(other: IFlowGraphMatrix<VectorType>): IFlowGraphMatrix<VectorType>;\n\n /**\n * Transposes this matrix.\n *\n * @returns The transposed matrix.\n */\n transpose(): IFlowGraphMatrix<VectorType>;\n\n /**\n * Computes the determinant of this matrix.\n *\n * @returns The determinant of the matrix.\n */\n determinant(): number;\n\n /**\n * Computes the inverse of this matrix.\n *\n * @returns The inverse of the matrix.\n * @throws Error if the matrix is not invertible.\n */\n inverse(): IFlowGraphMatrix<VectorType>;\n\n /**\n * Gets the class name of this matrix.\n *\n * @returns The class name.\n */\n getClassName(): string;\n\n /**\n * Checks if this matrix is equal to another matrix within an optional epsilon.\n *\n * @param other - The matrix to compare with.\n * @param epsilon - The optional epsilon for comparison.\n * @returns True if the matrices are equal, false otherwise.\n */\n equals(other: IFlowGraphMatrix<VectorType>, epsilon?: number): boolean;\n}\n\n// Note - the matrix classes are basically column-major, and work similarly to Babylon.js' Matrix class.\n\n/**\n * A 2x2 matrix, stored in column-major order.\n *\n * BREAKING: this class was row-major in earlier releases — see {@link IFlowGraphMatrix} for the full\n * behaviour change (flat-array construction, transform, and multiply operand order).\n */\nexport class FlowGraphMatrix2D implements IFlowGraphMatrix<Vector2> {\n /**\n * @internal\n */\n public _m: number[];\n\n constructor(m: number[] = [1, 0, 0, 1]) {\n this._m = m;\n }\n\n /**\n * Creates an independent copy of this matrix.\n * @returns a new matrix with copied column-major elements\n */\n public clone(): FlowGraphMatrix2D {\n return new FlowGraphMatrix2D(this._m.slice());\n }\n\n public get m(): number[] {\n return this._m;\n }\n\n public transformVector(v: Vector2): Vector2 {\n return this.transformVectorToRef(v, new Vector2());\n }\n\n public transformVectorToRef(v: Vector2, result: Vector2): Vector2 {\n result.x = v.x * this._m[0] + v.y * this._m[2];\n result.y = v.x * this._m[1] + v.y * this._m[3];\n return result;\n }\n\n public asArray(): number[] {\n return this.toArray();\n }\n\n public toArray(emptyArray: number[] = []): number[] {\n for (let i = 0; i < 4; i++) {\n emptyArray[i] = this._m[i];\n }\n return emptyArray;\n }\n\n public fromArray(array: number[]): FlowGraphMatrix2D {\n for (let i = 0; i < 4; i++) {\n this._m[i] = array[i];\n }\n return this;\n }\n\n public multiplyToRef(other: FlowGraphMatrix2D, result: FlowGraphMatrix2D): FlowGraphMatrix2D {\n const otherMatrix = other._m;\n const thisMatrix = this._m;\n const r = result._m;\n // this * other, column-major (matches core Matrix and the glTF/KHR_interactivity convention)\n r[0] = thisMatrix[0] * otherMatrix[0] + thisMatrix[1] * otherMatrix[2];\n r[1] = thisMatrix[0] * otherMatrix[1] + thisMatrix[1] * otherMatrix[3];\n r[2] = thisMatrix[2] * otherMatrix[0] + thisMatrix[3] * otherMatrix[2];\n r[3] = thisMatrix[2] * otherMatrix[1] + thisMatrix[3] * otherMatrix[3];\n\n return result;\n }\n\n public multiply(other: FlowGraphMatrix2D): FlowGraphMatrix2D {\n return this.multiplyToRef(other, new FlowGraphMatrix2D());\n }\n\n public divideToRef(other: FlowGraphMatrix2D, result: FlowGraphMatrix2D): FlowGraphMatrix2D {\n const m = this._m;\n const o = other._m;\n const r = result._m;\n\n r[0] = m[0] / o[0];\n r[1] = m[1] / o[1];\n r[2] = m[2] / o[2];\n r[3] = m[3] / o[3];\n\n return result;\n }\n\n public divide(other: FlowGraphMatrix2D): FlowGraphMatrix2D {\n return this.divideToRef(other, new FlowGraphMatrix2D());\n }\n\n public addToRef(other: FlowGraphMatrix2D, result: FlowGraphMatrix2D): FlowGraphMatrix2D {\n const m = this._m;\n const o = other.m;\n const r = result.m;\n\n r[0] = m[0] + o[0];\n r[1] = m[1] + o[1];\n r[2] = m[2] + o[2];\n r[3] = m[3] + o[3];\n\n return result;\n }\n\n public add(other: FlowGraphMatrix2D): FlowGraphMatrix2D {\n return this.addToRef(other, new FlowGraphMatrix2D());\n }\n\n public subtractToRef(other: FlowGraphMatrix2D, result: FlowGraphMatrix2D): FlowGraphMatrix2D {\n const m = this._m;\n const o = other.m;\n const r = result.m;\n\n r[0] = m[0] - o[0];\n r[1] = m[1] - o[1];\n r[2] = m[2] - o[2];\n r[3] = m[3] - o[3];\n\n return result;\n }\n\n public subtract(other: FlowGraphMatrix2D): FlowGraphMatrix2D {\n return this.subtractToRef(other, new FlowGraphMatrix2D());\n }\n\n public transpose(): FlowGraphMatrix2D {\n const m = this._m;\n return new FlowGraphMatrix2D([m[0], m[2], m[1], m[3]]);\n }\n\n public determinant(): number {\n const m = this._m;\n return m[0] * m[3] - m[1] * m[2];\n }\n\n public inverse(): FlowGraphMatrix2D {\n const det = this.determinant();\n if (det === 0) {\n throw new Error(\"Matrix is not invertible\");\n }\n const m = this._m;\n const invDet = 1 / det;\n return new FlowGraphMatrix2D([m[3] * invDet, -m[1] * invDet, -m[2] * invDet, m[0] * invDet]);\n }\n\n public equals(other: IFlowGraphMatrix<Vector2>, epsilon: number = 0): boolean {\n const m = this._m;\n const o = other.m;\n if (epsilon === 0) {\n return m[0] === o[0] && m[1] === o[1] && m[2] === o[2] && m[3] === o[3];\n }\n return Math.abs(m[0] - o[0]) < epsilon && Math.abs(m[1] - o[1]) < epsilon && Math.abs(m[2] - o[2]) < epsilon && Math.abs(m[3] - o[3]) < epsilon;\n }\n\n public getClassName(): string {\n return \"FlowGraphMatrix2D\";\n }\n\n public toString(): string {\n return `FlowGraphMatrix2D(${this._m.join(\", \")})`;\n }\n}\n\n/**\n * A 3x3 matrix, stored in column-major order.\n *\n * BREAKING: this class was row-major in earlier releases — see {@link IFlowGraphMatrix} for the full\n * behaviour change (flat-array construction, transform, and multiply operand order).\n */\nexport class FlowGraphMatrix3D implements IFlowGraphMatrix<Vector3> {\n /**\n * @internal\n */\n public _m: number[];\n\n constructor(array: number[] = [1, 0, 0, 0, 1, 0, 0, 0, 1]) {\n this._m = array;\n }\n\n /**\n * Creates an independent copy of this matrix.\n * @returns a new matrix with copied column-major elements\n */\n public clone(): FlowGraphMatrix3D {\n return new FlowGraphMatrix3D(this._m.slice());\n }\n\n public get m(): number[] {\n return this._m;\n }\n\n public transformVector(v: Vector3): Vector3 {\n return this.transformVectorToRef(v, new Vector3());\n }\n\n public transformVectorToRef(v: Vector3, result: Vector3): Vector3 {\n const m = this._m;\n result.x = v.x * m[0] + v.y * m[3] + v.z * m[6];\n result.y = v.x * m[1] + v.y * m[4] + v.z * m[7];\n result.z = v.x * m[2] + v.y * m[5] + v.z * m[8];\n return result;\n }\n\n public multiplyToRef(other: FlowGraphMatrix3D, result: FlowGraphMatrix3D): FlowGraphMatrix3D {\n const otherMatrix = other._m;\n const thisMatrix = this._m;\n const r = result.m;\n\n r[0] = thisMatrix[0] * otherMatrix[0] + thisMatrix[1] * otherMatrix[3] + thisMatrix[2] * otherMatrix[6];\n r[1] = thisMatrix[0] * otherMatrix[1] + thisMatrix[1] * otherMatrix[4] + thisMatrix[2] * otherMatrix[7];\n r[2] = thisMatrix[0] * otherMatrix[2] + thisMatrix[1] * otherMatrix[5] + thisMatrix[2] * otherMatrix[8];\n\n r[3] = thisMatrix[3] * otherMatrix[0] + thisMatrix[4] * otherMatrix[3] + thisMatrix[5] * otherMatrix[6];\n r[4] = thisMatrix[3] * otherMatrix[1] + thisMatrix[4] * otherMatrix[4] + thisMatrix[5] * otherMatrix[7];\n r[5] = thisMatrix[3] * otherMatrix[2] + thisMatrix[4] * otherMatrix[5] + thisMatrix[5] * otherMatrix[8];\n\n r[6] = thisMatrix[6] * otherMatrix[0] + thisMatrix[7] * otherMatrix[3] + thisMatrix[8] * otherMatrix[6];\n r[7] = thisMatrix[6] * otherMatrix[1] + thisMatrix[7] * otherMatrix[4] + thisMatrix[8] * otherMatrix[7];\n r[8] = thisMatrix[6] * otherMatrix[2] + thisMatrix[7] * otherMatrix[5] + thisMatrix[8] * otherMatrix[8];\n\n return result;\n }\n\n public multiply(other: FlowGraphMatrix3D): FlowGraphMatrix3D {\n return this.multiplyToRef(other, new FlowGraphMatrix3D());\n }\n\n public divideToRef(other: FlowGraphMatrix3D, result: FlowGraphMatrix3D): FlowGraphMatrix3D {\n const m = this._m;\n const o = other.m;\n const r = result.m;\n\n r[0] = m[0] / o[0];\n r[1] = m[1] / o[1];\n r[2] = m[2] / o[2];\n r[3] = m[3] / o[3];\n r[4] = m[4] / o[4];\n r[5] = m[5] / o[5];\n r[6] = m[6] / o[6];\n r[7] = m[7] / o[7];\n r[8] = m[8] / o[8];\n\n return result;\n }\n\n public divide(other: FlowGraphMatrix3D): FlowGraphMatrix3D {\n return this.divideToRef(other, new FlowGraphMatrix3D());\n }\n\n public addToRef(other: FlowGraphMatrix3D, result: FlowGraphMatrix3D): FlowGraphMatrix3D {\n const m = this._m;\n const o = other.m;\n const r = result.m;\n\n r[0] = m[0] + o[0];\n r[1] = m[1] + o[1];\n r[2] = m[2] + o[2];\n r[3] = m[3] + o[3];\n r[4] = m[4] + o[4];\n r[5] = m[5] + o[5];\n r[6] = m[6] + o[6];\n r[7] = m[7] + o[7];\n r[8] = m[8] + o[8];\n\n return result;\n }\n\n public add(other: FlowGraphMatrix3D): FlowGraphMatrix3D {\n return this.addToRef(other, new FlowGraphMatrix3D());\n }\n\n public subtractToRef(other: FlowGraphMatrix3D, result: FlowGraphMatrix3D): FlowGraphMatrix3D {\n const m = this._m;\n const o = other.m;\n const r = result.m;\n\n r[0] = m[0] - o[0];\n r[1] = m[1] - o[1];\n r[2] = m[2] - o[2];\n r[3] = m[3] - o[3];\n r[4] = m[4] - o[4];\n r[5] = m[5] - o[5];\n r[6] = m[6] - o[6];\n r[7] = m[7] - o[7];\n r[8] = m[8] - o[8];\n\n return result;\n }\n\n public subtract(other: FlowGraphMatrix3D): FlowGraphMatrix3D {\n return this.subtractToRef(other, new FlowGraphMatrix3D());\n }\n\n public toArray(emptyArray: number[] = []): number[] {\n for (let i = 0; i < 9; i++) {\n emptyArray[i] = this._m[i];\n }\n return emptyArray;\n }\n\n public asArray(): number[] {\n return this.toArray();\n }\n\n public fromArray(array: number[]): FlowGraphMatrix3D {\n for (let i = 0; i < 9; i++) {\n this._m[i] = array[i];\n }\n return this;\n }\n\n public transpose(): FlowGraphMatrix3D {\n const m = this._m;\n return new FlowGraphMatrix3D([m[0], m[3], m[6], m[1], m[4], m[7], m[2], m[5], m[8]]);\n }\n\n public determinant(): number {\n const m = this._m;\n return m[0] * (m[4] * m[8] - m[5] * m[7]) - m[1] * (m[3] * m[8] - m[5] * m[6]) + m[2] * (m[3] * m[7] - m[4] * m[6]);\n }\n\n public inverse(): FlowGraphMatrix3D {\n const det = this.determinant();\n if (det === 0) {\n throw new Error(\"Matrix is not invertible\");\n }\n const m = this._m;\n const invDet = 1 / det;\n return new FlowGraphMatrix3D([\n (m[4] * m[8] - m[5] * m[7]) * invDet,\n (m[2] * m[7] - m[1] * m[8]) * invDet,\n (m[1] * m[5] - m[2] * m[4]) * invDet,\n (m[5] * m[6] - m[3] * m[8]) * invDet,\n (m[0] * m[8] - m[2] * m[6]) * invDet,\n (m[2] * m[3] - m[0] * m[5]) * invDet,\n (m[3] * m[7] - m[4] * m[6]) * invDet,\n (m[1] * m[6] - m[0] * m[7]) * invDet,\n (m[0] * m[4] - m[1] * m[3]) * invDet,\n ]);\n }\n\n public equals(other: IFlowGraphMatrix<Vector3>, epsilon: number = 0): boolean {\n const m = this._m;\n const o = other.m;\n // performance shortcut\n if (epsilon === 0) {\n return m[0] === o[0] && m[1] === o[1] && m[2] === o[2] && m[3] === o[3] && m[4] === o[4] && m[5] === o[5] && m[6] === o[6] && m[7] === o[7] && m[8] === o[8];\n }\n return (\n Math.abs(m[0] - o[0]) < epsilon &&\n Math.abs(m[1] - o[1]) < epsilon &&\n Math.abs(m[2] - o[2]) < epsilon &&\n Math.abs(m[3] - o[3]) < epsilon &&\n Math.abs(m[4] - o[4]) < epsilon &&\n Math.abs(m[5] - o[5]) < epsilon &&\n Math.abs(m[6] - o[6]) < epsilon &&\n Math.abs(m[7] - o[7]) < epsilon &&\n Math.abs(m[8] - o[8]) < epsilon\n );\n }\n\n public getClassName(): string {\n return \"FlowGraphMatrix3D\";\n }\n\n public toString(): string {\n return `FlowGraphMatrix3D(${this._m.join(\", \")})`;\n }\n}\n"]}
|
package/FlowGraph/flowGraph.d.ts
CHANGED
|
@@ -231,8 +231,9 @@ export declare class FlowGraph {
|
|
|
231
231
|
/**
|
|
232
232
|
* Starts the flow graph. Initializes the event blocks and starts listening to events.
|
|
233
233
|
* Can also be called to resume from a paused state.
|
|
234
|
+
* @param skipSceneReadyCheck whether to activate the startup event immediately even when the scene is not yet ready
|
|
234
235
|
*/
|
|
235
|
-
start(): void;
|
|
236
|
+
start(skipSceneReadyCheck?: boolean): void;
|
|
236
237
|
private _startPendingEvents;
|
|
237
238
|
private _getContextualOrder;
|
|
238
239
|
/**
|
package/FlowGraph/flowGraph.js
CHANGED
|
@@ -393,8 +393,9 @@ export class FlowGraph {
|
|
|
393
393
|
/**
|
|
394
394
|
* Starts the flow graph. Initializes the event blocks and starts listening to events.
|
|
395
395
|
* Can also be called to resume from a paused state.
|
|
396
|
+
* @param skipSceneReadyCheck whether to activate the startup event immediately even when the scene is not yet ready
|
|
396
397
|
*/
|
|
397
|
-
start() {
|
|
398
|
+
start(skipSceneReadyCheck = false) {
|
|
398
399
|
if (this.state === 1 /* FlowGraphState.Started */) {
|
|
399
400
|
return;
|
|
400
401
|
}
|
|
@@ -411,7 +412,7 @@ export class FlowGraph {
|
|
|
411
412
|
// the flag and handle the ready state ourselves.
|
|
412
413
|
if (!resumingFromPause) {
|
|
413
414
|
this._sceneEventCoordinator.sceneReadyTriggered = false;
|
|
414
|
-
if (this._scene.isReady(true)) {
|
|
415
|
+
if (skipSceneReadyCheck || this._scene.isReady(true)) {
|
|
415
416
|
this._sceneEventCoordinator.sceneReadyTriggered = true;
|
|
416
417
|
this._sceneEventCoordinator.onEventTriggeredObservable.notifyObservers({ type: "SceneReady" /* FlowGraphEventType.SceneReady */ });
|
|
417
418
|
}
|