@babylonjs/core 8.12.1 → 8.13.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/AudioV2/abstractAudio/abstractAudioBus.d.ts +4 -21
- package/AudioV2/abstractAudio/abstractAudioBus.js +2 -34
- package/AudioV2/abstractAudio/abstractAudioBus.js.map +1 -1
- package/AudioV2/abstractAudio/abstractAudioOutNode.d.ts +40 -0
- package/AudioV2/abstractAudio/abstractAudioOutNode.js +56 -0
- package/AudioV2/abstractAudio/abstractAudioOutNode.js.map +1 -0
- package/AudioV2/abstractAudio/abstractSoundSource.d.ts +5 -16
- package/AudioV2/abstractAudio/abstractSoundSource.js +2 -27
- package/AudioV2/abstractAudio/abstractSoundSource.js.map +1 -1
- package/AudioV2/abstractAudio/audioEngineV2.d.ts +13 -0
- package/AudioV2/abstractAudio/audioEngineV2.js +4 -0
- package/AudioV2/abstractAudio/audioEngineV2.js.map +1 -1
- package/AudioV2/abstractAudio/index.d.ts +1 -0
- package/AudioV2/abstractAudio/index.js +1 -0
- package/AudioV2/abstractAudio/index.js.map +1 -1
- package/AudioV2/abstractAudio/subNodes/volumeAudioSubNode.d.ts +3 -0
- package/AudioV2/abstractAudio/subNodes/volumeAudioSubNode.js.map +1 -1
- package/AudioV2/audioParameter.d.ts +31 -0
- package/AudioV2/audioParameter.js +19 -0
- package/AudioV2/audioParameter.js.map +1 -0
- package/AudioV2/audioUtils.d.ts +3 -0
- package/AudioV2/audioUtils.js +61 -0
- package/AudioV2/audioUtils.js.map +1 -1
- package/AudioV2/index.d.ts +1 -0
- package/AudioV2/index.js +1 -0
- package/AudioV2/index.js.map +1 -1
- package/AudioV2/webAudio/components/webAudioParameterComponent.d.ts +37 -0
- package/AudioV2/webAudio/components/webAudioParameterComponent.js +89 -0
- package/AudioV2/webAudio/components/webAudioParameterComponent.js.map +1 -0
- package/AudioV2/webAudio/subNodes/spatialWebAudioSubNode.d.ts +8 -0
- package/AudioV2/webAudio/subNodes/spatialWebAudioSubNode.js +24 -6
- package/AudioV2/webAudio/subNodes/spatialWebAudioSubNode.js.map +1 -1
- package/AudioV2/webAudio/subNodes/stereoWebAudioSubNode.d.ts +2 -0
- package/AudioV2/webAudio/subNodes/stereoWebAudioSubNode.js +9 -4
- package/AudioV2/webAudio/subNodes/stereoWebAudioSubNode.js.map +1 -1
- package/AudioV2/webAudio/subNodes/volumeWebAudioSubNode.d.ts +7 -1
- package/AudioV2/webAudio/subNodes/volumeWebAudioSubNode.js +14 -5
- package/AudioV2/webAudio/subNodes/volumeWebAudioSubNode.js.map +1 -1
- package/AudioV2/webAudio/subProperties/spatialWebAudioListener.js +92 -30
- package/AudioV2/webAudio/subProperties/spatialWebAudioListener.js.map +1 -1
- package/AudioV2/webAudio/webAudioEngine.d.ts +4 -2
- package/AudioV2/webAudio/webAudioEngine.js +9 -4
- package/AudioV2/webAudio/webAudioEngine.js.map +1 -1
- package/AudioV2/webAudio/webAudioMainOut.d.ts +6 -2
- package/AudioV2/webAudio/webAudioMainOut.js +15 -10
- package/AudioV2/webAudio/webAudioMainOut.js.map +1 -1
- package/AudioV2/webAudio/webAudioStaticSound.d.ts +4 -2
- package/AudioV2/webAudio/webAudioStaticSound.js +17 -14
- package/AudioV2/webAudio/webAudioStaticSound.js.map +1 -1
- package/BakedVertexAnimation/vertexAnimationBaker.d.ts +10 -2
- package/BakedVertexAnimation/vertexAnimationBaker.js +48 -2
- package/BakedVertexAnimation/vertexAnimationBaker.js.map +1 -1
- package/Behaviors/Meshes/pointerDragBehavior.d.ts +5 -0
- package/Behaviors/Meshes/pointerDragBehavior.js +7 -1
- package/Behaviors/Meshes/pointerDragBehavior.js.map +1 -1
- package/Cameras/camera.d.ts +6 -0
- package/Cameras/camera.js +8 -0
- package/Cameras/camera.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.d.ts +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js +27 -18
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js.map +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.d.ts +55 -3
- package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.js +83 -2
- package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.d.ts +1 -0
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js +23 -2
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js +5 -5
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js.map +1 -1
- package/FlowGraph/Blocks/flowGraphBlockFactory.js +10 -0
- package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
- package/FlowGraph/Blocks/flowGraphBlockNames.d.ts +5 -0
- package/FlowGraph/Blocks/flowGraphBlockNames.js +5 -0
- package/FlowGraph/Blocks/flowGraphBlockNames.js.map +1 -1
- package/FlowGraph/flowGraphRichTypes.js +10 -8
- package/FlowGraph/flowGraphRichTypes.js.map +1 -1
- package/FlowGraph/utils.d.ts +3 -3
- package/FlowGraph/utils.js +5 -4
- package/FlowGraph/utils.js.map +1 -1
- package/Gizmos/boundingBoxGizmo.d.ts +6 -0
- package/Gizmos/boundingBoxGizmo.js +16 -1
- package/Gizmos/boundingBoxGizmo.js.map +1 -1
- package/Instrumentation/engineInstrumentation.d.ts +2 -2
- package/Instrumentation/engineInstrumentation.js +5 -0
- package/Instrumentation/engineInstrumentation.js.map +1 -1
- package/Instrumentation/sceneInstrumentation.d.ts +1 -0
- package/Instrumentation/sceneInstrumentation.js +5 -0
- package/Instrumentation/sceneInstrumentation.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +2 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
- package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.d.ts +2 -5
- package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.js +8 -71
- package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.d.ts +2 -0
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +7 -8
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/index.d.ts +1 -0
- package/Materials/Node/Blocks/Fragment/index.js +1 -0
- package/Materials/Node/Blocks/Fragment/index.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/smartFilterFragmentOutputBlock.d.ts +29 -0
- package/Materials/Node/Blocks/Fragment/smartFilterFragmentOutputBlock.js +100 -0
- package/Materials/Node/Blocks/Fragment/smartFilterFragmentOutputBlock.js.map +1 -0
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js +3 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +1 -0
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.js +5 -5
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.js +1 -1
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.d.ts +0 -2
- package/Materials/Node/nodeMaterialBuildState.js +0 -2
- package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
- package/Materials/Node/nodeMaterialDefault.js +2 -1
- package/Materials/Node/nodeMaterialDefault.js.map +1 -1
- package/Materials/PBR/pbrSubSurfaceConfiguration.d.ts +10 -3
- package/Materials/PBR/pbrSubSurfaceConfiguration.js +16 -5
- package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
- package/Maths/math.vector.d.ts +14 -0
- package/Maths/math.vector.functions.d.ts +25 -1
- package/Maths/math.vector.functions.js +35 -0
- package/Maths/math.vector.functions.js.map +1 -1
- package/Maths/math.vector.js +28 -0
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +6 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +11 -4
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/csg2.js +1 -1
- package/Meshes/csg2.js.map +1 -1
- package/Meshes/linesMesh.d.ts +4 -12
- package/Meshes/linesMesh.js +15 -24
- package/Meshes/linesMesh.js.map +1 -1
- package/Misc/environmentTextureTools.d.ts +4 -1
- package/Misc/environmentTextureTools.js +9 -2
- package/Misc/environmentTextureTools.js.map +1 -1
- package/Morph/morphTargetManager.d.ts +5 -0
- package/Morph/morphTargetManager.js +8 -0
- package/Morph/morphTargetManager.js.map +1 -1
- package/Particles/Node/Blocks/particleDebugBlock.d.ts +6 -0
- package/Particles/Node/Blocks/particleDebugBlock.js +10 -0
- package/Particles/Node/Blocks/particleDebugBlock.js.map +1 -1
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js +16 -2
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
- package/Shaders/gaussianSplatting.vertex.js +2 -3
- package/Shaders/gaussianSplatting.vertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js +17 -2
- package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js +2 -3
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/XR/features/WebXRControllerPointerSelection.js +3 -3
- package/XR/features/WebXRControllerPointerSelection.js.map +1 -1
- package/package.json +1 -1
|
@@ -40,16 +40,16 @@ export class FlowGraphSetVariableBlock extends FlowGraphExecutionBlockWithOutSig
|
|
|
40
40
|
// check if there is an animation(group) running on this variable. If there is, stop the animation - a value was force-set.
|
|
41
41
|
const currentlyRunningAnimationGroups = context._getGlobalContextVariable("currentlyRunningAnimationGroups", []);
|
|
42
42
|
for (const animationUniqueId of currentlyRunningAnimationGroups) {
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
const animationGroup = context.assetsContext.animationGroups.find((animationGroup) => animationGroup.uniqueId == animationUniqueId);
|
|
44
|
+
if (animationGroup) {
|
|
45
|
+
// check if there is a target animation that has the target set to be the context
|
|
46
|
+
for (const targetAnimation of animationGroup.targetedAnimations) {
|
|
47
47
|
// check if the target property is the variable we are setting
|
|
48
48
|
if (targetAnimation.target === context) {
|
|
49
49
|
// check the variable name
|
|
50
50
|
if (targetAnimation.animation.targetProperty === variableName) {
|
|
51
51
|
// stop the animation
|
|
52
|
-
|
|
52
|
+
animationGroup.stop();
|
|
53
53
|
// remove the animation from the currently running animations
|
|
54
54
|
const index = currentlyRunningAnimationGroups.indexOf(animationUniqueId);
|
|
55
55
|
if (index > -1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphSetVariableBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mCAA4B;AAGpD,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAGlG,OAAO,EAAE,WAAW,EAAE,oCAA0C;AA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MAAM,+BAA+B,GAAG,OAAO,CAAC,yBAAyB,CAAC,iCAAiC,EAAE,EAAE,CAAa,CAAC;QAC7H,KAAK,MAAM,iBAAiB,IAAI,+BAA+B,EAAE,CAAC;YAC9D,MAAM,
|
|
1
|
+
{"version":3,"file":"flowGraphSetVariableBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mCAA4B;AAGpD,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAGlG,OAAO,EAAE,WAAW,EAAE,oCAA0C;AAiBhE;;GAEG;AACH,MAAM,OAAO,yBAA6B,SAAQ,oCAAoC;IAClF,YAAY,MAA+C;QACvD,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,mCAAmC;QACnC,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;QACpF,CAAC;QACD,oCAAoC;QACpC,IAAI,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC,CAAC;QAC1F,CAAC;QACD,kGAAkG;QAClG,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;YACnB,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;gBACtC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;YAClD,CAAC;QACL,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QACjD,CAAC;IACL,CAAC;IAEe,QAAQ,CAAC,OAAyB,EAAE,cAAyC;QACzF,IAAI,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC;YACzB,KAAK,MAA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ACD,OAAO,CAAC,yBAAyB,CAAC,iCAAiC,EAAE,+BAA+B,CAAC,CAAC;4BACtG,MAAM;wBACV,CAAC;oBACL,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,IAAI,YAAY,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC9E,OAAO,CAAC,WAAW,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IAC7C,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,aAAa,oEAAkC,yBAAyB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"core/Misc/typeStore\";\nimport type { IFlowGraphBlockConfiguration } from \"../../flowGraphBlock\";\nimport type { FlowGraphContext } from \"../../flowGraphContext\";\nimport { FlowGraphExecutionBlockWithOutSignal } from \"../../flowGraphExecutionBlockWithOutSignal\";\nimport type { FlowGraphSignalConnection } from \"../../flowGraphSignalConnection\";\nimport { FlowGraphBlockNames } from \"../flowGraphBlockNames\";\nimport { RichTypeAny } from \"core/FlowGraph/flowGraphRichTypes\";\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 name of the variables to set.\n */\n variables?: string[];\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 defined\n if (!config.variable && !config.variables) {\n throw new Error(\"FlowGraphSetVariableBlock: variable/variables is not defined\");\n }\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 for (const variable of this.config.variables) {\n this._saveVariable(context, variable);\n }\n } else {\n this._saveVariable(context, this.config?.variable, \"value\");\n }\n this.out._activateSignal(context);\n }\n\n private _saveVariable(context: FlowGraphContext, variableName: string, 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) {\n // check the variable name\n if (targetAnimation.animation.targetProperty === variableName) {\n // stop the animation\n animationGroup.stop();\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 const value = this.getDataInput(inputName || variableName)?.getValue(context);\n context.setVariable(variableName, value);\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\nRegisterClass(FlowGraphBlockNames.SetVariable, FlowGraphSetVariableBlock);\n"]}
|
|
@@ -249,6 +249,16 @@ export function blockFactory(blockName) {
|
|
|
249
249
|
return async () => (await import("./Data/Math/flowGraphVectorMathBlocks.js")).FlowGraphTransformBlock;
|
|
250
250
|
case "FlowGraphTransformCoordinatesBlock" /* FlowGraphBlockNames.TransformCoordinates */:
|
|
251
251
|
return async () => (await import("./Data/Math/flowGraphVectorMathBlocks.js")).FlowGraphTransformCoordinatesBlock;
|
|
252
|
+
case "FlowGraphConjugateBlock" /* FlowGraphBlockNames.Conjugate */:
|
|
253
|
+
return async () => (await import("./Data/Math/flowGraphVectorMathBlocks.js")).FlowGraphConjugateBlock;
|
|
254
|
+
case "FlowGraphAngleBetweenBlock" /* FlowGraphBlockNames.AngleBetween */:
|
|
255
|
+
return async () => (await import("./Data/Math/flowGraphVectorMathBlocks.js")).FlowGraphAngleBetweenBlock;
|
|
256
|
+
case "FlowGraphQuaternionFromAxisAngleBlock" /* FlowGraphBlockNames.QuaternionFromAxisAngle */:
|
|
257
|
+
return async () => (await import("./Data/Math/flowGraphVectorMathBlocks.js")).FlowGraphQuaternionFromAxisAngleBlock;
|
|
258
|
+
case "FlowGraphAxisAngleFromQuaternionBlock" /* FlowGraphBlockNames.AxisAngleFromQuaternion */:
|
|
259
|
+
return async () => (await import("./Data/Math/flowGraphVectorMathBlocks.js")).FlowGraphAxisAngleFromQuaternionBlock;
|
|
260
|
+
case "FlowGraphQuaternionFromDirectionsBlock" /* FlowGraphBlockNames.QuaternionFromDirections */:
|
|
261
|
+
return async () => (await import("./Data/Math/flowGraphVectorMathBlocks.js")).FlowGraphQuaternionFromDirectionsBlock;
|
|
252
262
|
case "FlowGraphMatrixDecompose" /* FlowGraphBlockNames.MatrixDecompose */:
|
|
253
263
|
return async () => (await import("./Data/Math/flowGraphMatrixMathBlocks.js")).FlowGraphMatrixDecomposeBlock;
|
|
254
264
|
case "FlowGraphMatrixCompose" /* FlowGraphBlockNames.MatrixCompose */:
|
|
@@ -1 +1 @@
|
|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ames\";\n\n/**\n * Any external module that wishes to add a new block to the flow graph can add to this object using the helper function.\n */\nconst CustomBlocks: Record<string, () => Promise<typeof FlowGraphBlock>> = {};\n\n/**\n * If you want to add a new block to the block factory, you should use this function.\n * Please be sure to choose a unique name and define the responsible module.\n * @param module the name of the module that is responsible for the block\n * @param blockName the name of the block. This should be unique.\n * @param factory an async factory function to generate the block\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function addToBlockFactory(module: string, blockName: string, factory: () => Promise<typeof FlowGraphBlock>): void {\n CustomBlocks[`${module}/${blockName}`] = factory;\n}\n\n/**\n * a function to get a factory function for a block.\n * @param blockName the block name to initialize. If the block comes from an external module, the name should be in the format \"module/blockName\"\n * @returns an async factory function that will return the block class when called.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function blockFactory(blockName: FlowGraphBlockNames | string): () => Promise<typeof FlowGraphBlock> {\n switch (blockName) {\n case FlowGraphBlockNames.PlayAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphPlayAnimationBlock\")).FlowGraphPlayAnimationBlock;\n case FlowGraphBlockNames.StopAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphStopAnimationBlock\")).FlowGraphStopAnimationBlock;\n case FlowGraphBlockNames.PauseAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphPauseAnimationBlock\")).FlowGraphPauseAnimationBlock;\n case FlowGraphBlockNames.ValueInterpolation:\n return async () => (await import(\"./Execution/Animation/flowGraphInterpolationBlock\")).FlowGraphInterpolationBlock;\n case FlowGraphBlockNames.SceneReadyEvent:\n return async () => (await import(\"./Event/flowGraphSceneReadyEventBlock\")).FlowGraphSceneReadyEventBlock;\n case FlowGraphBlockNames.SceneTickEvent:\n return async () => (await import(\"./Event/flowGraphSceneTickEventBlock\")).FlowGraphSceneTickEventBlock;\n case FlowGraphBlockNames.SendCustomEvent:\n return async () => (await import(\"./Event/flowGraphSendCustomEventBlock\")).FlowGraphSendCustomEventBlock;\n case FlowGraphBlockNames.ReceiveCustomEvent:\n return async () => (await import(\"./Event/flowGraphReceiveCustomEventBlock\")).FlowGraphReceiveCustomEventBlock;\n case FlowGraphBlockNames.MeshPickEvent:\n return async () => (await import(\"./Event/flowGraphMeshPickEventBlock\")).FlowGraphMeshPickEventBlock;\n case FlowGraphBlockNames.E:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphEBlock;\n case FlowGraphBlockNames.PI:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphPiBlock;\n case FlowGraphBlockNames.Inf:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphInfBlock;\n case FlowGraphBlockNames.NaN:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphNaNBlock;\n case FlowGraphBlockNames.Random:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRandomBlock;\n case FlowGraphBlockNames.Add:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAddBlock;\n case FlowGraphBlockNames.Subtract:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSubtractBlock;\n case FlowGraphBlockNames.Multiply:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMultiplyBlock;\n case FlowGraphBlockNames.Divide:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphDivideBlock;\n case FlowGraphBlockNames.Abs:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAbsBlock;\n case FlowGraphBlockNames.Sign:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSignBlock;\n case FlowGraphBlockNames.Trunc:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTruncBlock;\n case FlowGraphBlockNames.Floor:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphFloorBlock;\n case FlowGraphBlockNames.Ceil:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCeilBlock;\n case FlowGraphBlockNames.Round:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRoundBlock;\n case FlowGraphBlockNames.Fraction:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphFractionBlock;\n case FlowGraphBlockNames.Negation:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphNegationBlock;\n case FlowGraphBlockNames.Modulo:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphModuloBlock;\n case FlowGraphBlockNames.Min:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMinBlock;\n case FlowGraphBlockNames.Max:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMaxBlock;\n case FlowGraphBlockNames.Clamp:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphClampBlock;\n case FlowGraphBlockNames.Saturate:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSaturateBlock;\n case FlowGraphBlockNames.MathInterpolation:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMathInterpolationBlock;\n case FlowGraphBlockNames.Equality:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphEqualityBlock;\n case FlowGraphBlockNames.LessThan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLessThanBlock;\n case FlowGraphBlockNames.LessThanOrEqual:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLessThanOrEqualBlock;\n case FlowGraphBlockNames.GreaterThan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphGreaterThanBlock;\n case FlowGraphBlockNames.GreaterThanOrEqual:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphGreaterThanOrEqualBlock;\n case FlowGraphBlockNames.IsNaN:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphIsNanBlock;\n case FlowGraphBlockNames.IsInfinity:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphIsInfinityBlock;\n case FlowGraphBlockNames.DegToRad:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphDegToRadBlock;\n case FlowGraphBlockNames.RadToDeg:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRadToDegBlock;\n case FlowGraphBlockNames.Sin:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSinBlock;\n case FlowGraphBlockNames.Cos:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCosBlock;\n case FlowGraphBlockNames.Tan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTanBlock;\n case FlowGraphBlockNames.Asin:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAsinBlock;\n case FlowGraphBlockNames.Acos:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAcosBlock;\n case FlowGraphBlockNames.Atan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtanBlock;\n case FlowGraphBlockNames.Atan2:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtan2Block;\n case FlowGraphBlockNames.Sinh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSinhBlock;\n case FlowGraphBlockNames.Cosh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCoshBlock;\n case FlowGraphBlockNames.Tanh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTanhBlock;\n case FlowGraphBlockNames.Asinh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAsinhBlock;\n case FlowGraphBlockNames.Acosh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAcoshBlock;\n case FlowGraphBlockNames.Atanh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtanhBlock;\n case FlowGraphBlockNames.Exponential:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphExpBlock;\n case FlowGraphBlockNames.Log:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLogBlock;\n case FlowGraphBlockNames.Log2:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLog2Block;\n case FlowGraphBlockNames.Log10:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLog10Block;\n case FlowGraphBlockNames.SquareRoot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSquareRootBlock;\n case FlowGraphBlockNames.Power:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphPowerBlock;\n case FlowGraphBlockNames.CubeRoot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCubeRootBlock;\n case FlowGraphBlockNames.BitwiseAnd:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseAndBlock;\n case FlowGraphBlockNames.BitwiseOr:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseOrBlock;\n case FlowGraphBlockNames.BitwiseNot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseNotBlock;\n case FlowGraphBlockNames.BitwiseXor:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseXorBlock;\n case FlowGraphBlockNames.BitwiseLeftShift:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseLeftShiftBlock;\n case FlowGraphBlockNames.BitwiseRightShift:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseRightShiftBlock;\n case FlowGraphBlockNames.Length:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphLengthBlock;\n case FlowGraphBlockNames.Normalize:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphNormalizeBlock;\n case FlowGraphBlockNames.Dot:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphDotBlock;\n case FlowGraphBlockNames.Cross:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphCrossBlock;\n case FlowGraphBlockNames.Rotate2D:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphRotate2DBlock;\n case FlowGraphBlockNames.Rotate3D:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphRotate3DBlock;\n case FlowGraphBlockNames.Transpose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphTransposeBlock;\n case FlowGraphBlockNames.Determinant:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphDeterminantBlock;\n case FlowGraphBlockNames.InvertMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphInvertMatrixBlock;\n case FlowGraphBlockNames.MatrixMultiplication:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixMultiplicationBlock;\n case FlowGraphBlockNames.Branch:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphBranchBlock\")).FlowGraphBranchBlock;\n case FlowGraphBlockNames.SetDelay:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSetDelayBlock\")).FlowGraphSetDelayBlock;\n case FlowGraphBlockNames.CancelDelay:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphCancelDelayBlock\")).FlowGraphCancelDelayBlock;\n case FlowGraphBlockNames.CallCounter:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphCounterBlock\")).FlowGraphCallCounterBlock;\n case FlowGraphBlockNames.Debounce:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphDebounceBlock\")).FlowGraphDebounceBlock;\n case FlowGraphBlockNames.Throttle:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphThrottleBlock\")).FlowGraphThrottleBlock;\n case FlowGraphBlockNames.DoN:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphDoNBlock\")).FlowGraphDoNBlock;\n case FlowGraphBlockNames.FlipFlop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphFlipFlopBlock\")).FlowGraphFlipFlopBlock;\n case FlowGraphBlockNames.ForLoop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphForLoopBlock\")).FlowGraphForLoopBlock;\n case FlowGraphBlockNames.MultiGate:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphMultiGateBlock\")).FlowGraphMultiGateBlock;\n case FlowGraphBlockNames.Sequence:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSequenceBlock\")).FlowGraphSequenceBlock;\n case FlowGraphBlockNames.Switch:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSwitchBlock\")).FlowGraphSwitchBlock;\n case FlowGraphBlockNames.WaitAll:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphWaitAllBlock\")).FlowGraphWaitAllBlock;\n case FlowGraphBlockNames.WhileLoop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphWhileLoopBlock\")).FlowGraphWhileLoopBlock;\n case FlowGraphBlockNames.ConsoleLog:\n return async () => (await import(\"./Execution/flowGraphConsoleLogBlock\")).FlowGraphConsoleLogBlock;\n case FlowGraphBlockNames.Conditional:\n return async () => (await import(\"./Data/flowGraphConditionalDataBlock\")).FlowGraphConditionalDataBlock;\n case FlowGraphBlockNames.Constant:\n return async () => (await import(\"./Data/flowGraphConstantBlock\")).FlowGraphConstantBlock;\n case FlowGraphBlockNames.TransformCoordinatesSystem:\n return async () => (await import(\"./Data/flowGraphTransformCoordinatesSystemBlock\")).FlowGraphTransformCoordinatesSystemBlock;\n case FlowGraphBlockNames.GetAsset:\n return async () => (await import(\"./Data/flowGraphGetAssetBlock\")).FlowGraphGetAssetBlock;\n case FlowGraphBlockNames.GetProperty:\n return async () => (await import(\"./Data/flowGraphGetPropertyBlock\")).FlowGraphGetPropertyBlock;\n case FlowGraphBlockNames.SetProperty:\n return async () => (await import(\"./Execution/flowGraphSetPropertyBlock\")).FlowGraphSetPropertyBlock;\n case FlowGraphBlockNames.GetVariable:\n return async () => (await import(\"./Data/flowGraphGetVariableBlock\")).FlowGraphGetVariableBlock;\n case FlowGraphBlockNames.SetVariable:\n return async () => (await import(\"./Execution/flowGraphSetVariableBlock\")).FlowGraphSetVariableBlock;\n case FlowGraphBlockNames.JsonPointerParser:\n return async () => (await import(\"./Data/Transformers/flowGraphJsonPointerParserBlock\")).FlowGraphJsonPointerParserBlock;\n case FlowGraphBlockNames.LeadingZeros:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLeadingZerosBlock;\n case FlowGraphBlockNames.TrailingZeros:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTrailingZerosBlock;\n case FlowGraphBlockNames.OneBitsCounter:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphOneBitsCounterBlock;\n case FlowGraphBlockNames.CombineVector2:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector2Block;\n case FlowGraphBlockNames.CombineVector3:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector3Block;\n case FlowGraphBlockNames.CombineVector4:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector4Block;\n case FlowGraphBlockNames.CombineMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrixBlock;\n case FlowGraphBlockNames.ExtractVector2:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector2Block;\n case FlowGraphBlockNames.ExtractVector3:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector3Block;\n case FlowGraphBlockNames.ExtractVector4:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector4Block;\n case FlowGraphBlockNames.ExtractMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrixBlock;\n case FlowGraphBlockNames.TransformVector:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphTransformBlock;\n case FlowGraphBlockNames.TransformCoordinates:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphTransformCoordinatesBlock;\n case FlowGraphBlockNames.MatrixDecompose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixDecomposeBlock;\n case FlowGraphBlockNames.MatrixCompose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixComposeBlock;\n case FlowGraphBlockNames.BooleanToFloat:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphBooleanToFloat;\n case FlowGraphBlockNames.BooleanToInt:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphBooleanToInt;\n case FlowGraphBlockNames.FloatToBoolean:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphFloatToBoolean;\n case FlowGraphBlockNames.IntToBoolean:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphIntToBoolean;\n case FlowGraphBlockNames.IntToFloat:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphIntToFloat;\n case FlowGraphBlockNames.FloatToInt:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphFloatToInt;\n case FlowGraphBlockNames.Easing:\n return async () => (await import(\"./Execution/Animation/flowGraphEasingBlock\")).FlowGraphEasingBlock;\n case FlowGraphBlockNames.BezierCurveEasing:\n return async () => (await import(\"./Execution/Animation/flowGraphBezierCurveEasingBlock\")).FlowGraphBezierCurveEasingBlock;\n case FlowGraphBlockNames.PointerOverEvent:\n return async () => (await import(\"./Event/flowGraphPointerOverEventBlock\")).FlowGraphPointerOverEventBlock;\n case FlowGraphBlockNames.PointerOutEvent:\n return async () => (await import(\"./Event/flowGraphPointerOutEventBlock\")).FlowGraphPointerOutEventBlock;\n case FlowGraphBlockNames.Context:\n return async () => (await import(\"./Data/Utils/flowGraphContextBlock\")).FlowGraphContextBlock;\n case FlowGraphBlockNames.ArrayIndex:\n return async () => (await import(\"./Data/Utils/flowGraphArrayIndexBlock\")).FlowGraphArrayIndexBlock;\n case FlowGraphBlockNames.CodeExecution:\n return async () => (await import(\"./Data/Utils/flowGraphCodeExecutionBlock\")).FlowGraphCodeExecutionBlock;\n case FlowGraphBlockNames.IndexOf:\n return async () => (await import(\"./Data/Utils/flowGraphIndexOfBlock\")).FlowGraphIndexOfBlock;\n case FlowGraphBlockNames.FunctionReference:\n return async () => (await import(\"./Data/Utils/flowGraphFunctionReferenceBlock\")).FlowGraphFunctionReferenceBlock;\n case FlowGraphBlockNames.DataSwitch:\n return async () => (await import(\"./Data/flowGraphDataSwitchBlock\")).FlowGraphDataSwitchBlock;\n default:\n // check if the block is a custom block\n if (CustomBlocks[blockName]) {\n return CustomBlocks[blockName];\n }\n throw new Error(`Unknown block name ${blockName}`);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"flowGraphBlockFactory.js","sourceRoot":"","sources":["../../../../../dev/core/src/FlowGraph/Blocks/flowGraphBlockFactory.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,YAAY,GAAyD,EAAE,CAAC;AAE9E;;;;;;GAMG;AACH,gEAAgE;AAChE,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,SAAiB,EAAE,OAA6C;IAC9G,YAAY,CAAC,GAAG,MAAM,IAAI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AAE,CAAC;gBAC1B,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;YACnC,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,sBAAsB,SAAS,EAAE,CAAC,CAAC;IAC3D,CAAC;AACL,CAAC","sourcesContent":["import type { FlowGraphBlock } from \"../flowGraphBlock\";\nimport { FlowGraphBlockNames } from \"./flowGraphBlockNames\";\n\n/**\n * Any external module that wishes to add a new block to the flow graph can add to this object using the helper function.\n */\nconst CustomBlocks: Record<string, () => Promise<typeof FlowGraphBlock>> = {};\n\n/**\n * If you want to add a new block to the block factory, you should use this function.\n * Please be sure to choose a unique name and define the responsible module.\n * @param module the name of the module that is responsible for the block\n * @param blockName the name of the block. This should be unique.\n * @param factory an async factory function to generate the block\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function addToBlockFactory(module: string, blockName: string, factory: () => Promise<typeof FlowGraphBlock>): void {\n CustomBlocks[`${module}/${blockName}`] = factory;\n}\n\n/**\n * a function to get a factory function for a block.\n * @param blockName the block name to initialize. If the block comes from an external module, the name should be in the format \"module/blockName\"\n * @returns an async factory function that will return the block class when called.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function blockFactory(blockName: FlowGraphBlockNames | string): () => Promise<typeof FlowGraphBlock> {\n switch (blockName) {\n case FlowGraphBlockNames.PlayAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphPlayAnimationBlock\")).FlowGraphPlayAnimationBlock;\n case FlowGraphBlockNames.StopAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphStopAnimationBlock\")).FlowGraphStopAnimationBlock;\n case FlowGraphBlockNames.PauseAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphPauseAnimationBlock\")).FlowGraphPauseAnimationBlock;\n case FlowGraphBlockNames.ValueInterpolation:\n return async () => (await import(\"./Execution/Animation/flowGraphInterpolationBlock\")).FlowGraphInterpolationBlock;\n case FlowGraphBlockNames.SceneReadyEvent:\n return async () => (await import(\"./Event/flowGraphSceneReadyEventBlock\")).FlowGraphSceneReadyEventBlock;\n case FlowGraphBlockNames.SceneTickEvent:\n return async () => (await import(\"./Event/flowGraphSceneTickEventBlock\")).FlowGraphSceneTickEventBlock;\n case FlowGraphBlockNames.SendCustomEvent:\n return async () => (await import(\"./Event/flowGraphSendCustomEventBlock\")).FlowGraphSendCustomEventBlock;\n case FlowGraphBlockNames.ReceiveCustomEvent:\n return async () => (await import(\"./Event/flowGraphReceiveCustomEventBlock\")).FlowGraphReceiveCustomEventBlock;\n case FlowGraphBlockNames.MeshPickEvent:\n return async () => (await import(\"./Event/flowGraphMeshPickEventBlock\")).FlowGraphMeshPickEventBlock;\n case FlowGraphBlockNames.E:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphEBlock;\n case FlowGraphBlockNames.PI:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphPiBlock;\n case FlowGraphBlockNames.Inf:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphInfBlock;\n case FlowGraphBlockNames.NaN:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphNaNBlock;\n case FlowGraphBlockNames.Random:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRandomBlock;\n case FlowGraphBlockNames.Add:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAddBlock;\n case FlowGraphBlockNames.Subtract:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSubtractBlock;\n case FlowGraphBlockNames.Multiply:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMultiplyBlock;\n case FlowGraphBlockNames.Divide:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphDivideBlock;\n case FlowGraphBlockNames.Abs:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAbsBlock;\n case FlowGraphBlockNames.Sign:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSignBlock;\n case FlowGraphBlockNames.Trunc:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTruncBlock;\n case FlowGraphBlockNames.Floor:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphFloorBlock;\n case FlowGraphBlockNames.Ceil:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCeilBlock;\n case FlowGraphBlockNames.Round:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRoundBlock;\n case FlowGraphBlockNames.Fraction:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphFractionBlock;\n case FlowGraphBlockNames.Negation:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphNegationBlock;\n case FlowGraphBlockNames.Modulo:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphModuloBlock;\n case FlowGraphBlockNames.Min:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMinBlock;\n case FlowGraphBlockNames.Max:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMaxBlock;\n case FlowGraphBlockNames.Clamp:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphClampBlock;\n case FlowGraphBlockNames.Saturate:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSaturateBlock;\n case FlowGraphBlockNames.MathInterpolation:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMathInterpolationBlock;\n case FlowGraphBlockNames.Equality:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphEqualityBlock;\n case FlowGraphBlockNames.LessThan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLessThanBlock;\n case FlowGraphBlockNames.LessThanOrEqual:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLessThanOrEqualBlock;\n case FlowGraphBlockNames.GreaterThan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphGreaterThanBlock;\n case FlowGraphBlockNames.GreaterThanOrEqual:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphGreaterThanOrEqualBlock;\n case FlowGraphBlockNames.IsNaN:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphIsNanBlock;\n case FlowGraphBlockNames.IsInfinity:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphIsInfinityBlock;\n case FlowGraphBlockNames.DegToRad:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphDegToRadBlock;\n case FlowGraphBlockNames.RadToDeg:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRadToDegBlock;\n case FlowGraphBlockNames.Sin:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSinBlock;\n case FlowGraphBlockNames.Cos:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCosBlock;\n case FlowGraphBlockNames.Tan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTanBlock;\n case FlowGraphBlockNames.Asin:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAsinBlock;\n case FlowGraphBlockNames.Acos:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAcosBlock;\n case FlowGraphBlockNames.Atan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtanBlock;\n case FlowGraphBlockNames.Atan2:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtan2Block;\n case FlowGraphBlockNames.Sinh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSinhBlock;\n case FlowGraphBlockNames.Cosh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCoshBlock;\n case FlowGraphBlockNames.Tanh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTanhBlock;\n case FlowGraphBlockNames.Asinh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAsinhBlock;\n case FlowGraphBlockNames.Acosh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAcoshBlock;\n case FlowGraphBlockNames.Atanh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtanhBlock;\n case FlowGraphBlockNames.Exponential:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphExpBlock;\n case FlowGraphBlockNames.Log:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLogBlock;\n case FlowGraphBlockNames.Log2:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLog2Block;\n case FlowGraphBlockNames.Log10:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLog10Block;\n case FlowGraphBlockNames.SquareRoot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSquareRootBlock;\n case FlowGraphBlockNames.Power:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphPowerBlock;\n case FlowGraphBlockNames.CubeRoot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCubeRootBlock;\n case FlowGraphBlockNames.BitwiseAnd:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseAndBlock;\n case FlowGraphBlockNames.BitwiseOr:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseOrBlock;\n case FlowGraphBlockNames.BitwiseNot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseNotBlock;\n case FlowGraphBlockNames.BitwiseXor:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseXorBlock;\n case FlowGraphBlockNames.BitwiseLeftShift:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseLeftShiftBlock;\n case FlowGraphBlockNames.BitwiseRightShift:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseRightShiftBlock;\n case FlowGraphBlockNames.Length:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphLengthBlock;\n case FlowGraphBlockNames.Normalize:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphNormalizeBlock;\n case FlowGraphBlockNames.Dot:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphDotBlock;\n case FlowGraphBlockNames.Cross:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphCrossBlock;\n case FlowGraphBlockNames.Rotate2D:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphRotate2DBlock;\n case FlowGraphBlockNames.Rotate3D:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphRotate3DBlock;\n case FlowGraphBlockNames.Transpose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphTransposeBlock;\n case FlowGraphBlockNames.Determinant:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphDeterminantBlock;\n case FlowGraphBlockNames.InvertMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphInvertMatrixBlock;\n case FlowGraphBlockNames.MatrixMultiplication:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixMultiplicationBlock;\n case FlowGraphBlockNames.Branch:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphBranchBlock\")).FlowGraphBranchBlock;\n case FlowGraphBlockNames.SetDelay:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSetDelayBlock\")).FlowGraphSetDelayBlock;\n case FlowGraphBlockNames.CancelDelay:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphCancelDelayBlock\")).FlowGraphCancelDelayBlock;\n case FlowGraphBlockNames.CallCounter:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphCounterBlock\")).FlowGraphCallCounterBlock;\n case FlowGraphBlockNames.Debounce:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphDebounceBlock\")).FlowGraphDebounceBlock;\n case FlowGraphBlockNames.Throttle:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphThrottleBlock\")).FlowGraphThrottleBlock;\n case FlowGraphBlockNames.DoN:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphDoNBlock\")).FlowGraphDoNBlock;\n case FlowGraphBlockNames.FlipFlop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphFlipFlopBlock\")).FlowGraphFlipFlopBlock;\n case FlowGraphBlockNames.ForLoop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphForLoopBlock\")).FlowGraphForLoopBlock;\n case FlowGraphBlockNames.MultiGate:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphMultiGateBlock\")).FlowGraphMultiGateBlock;\n case FlowGraphBlockNames.Sequence:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSequenceBlock\")).FlowGraphSequenceBlock;\n case FlowGraphBlockNames.Switch:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSwitchBlock\")).FlowGraphSwitchBlock;\n case FlowGraphBlockNames.WaitAll:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphWaitAllBlock\")).FlowGraphWaitAllBlock;\n case FlowGraphBlockNames.WhileLoop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphWhileLoopBlock\")).FlowGraphWhileLoopBlock;\n case FlowGraphBlockNames.ConsoleLog:\n return async () => (await import(\"./Execution/flowGraphConsoleLogBlock\")).FlowGraphConsoleLogBlock;\n case FlowGraphBlockNames.Conditional:\n return async () => (await import(\"./Data/flowGraphConditionalDataBlock\")).FlowGraphConditionalDataBlock;\n case FlowGraphBlockNames.Constant:\n return async () => (await import(\"./Data/flowGraphConstantBlock\")).FlowGraphConstantBlock;\n case FlowGraphBlockNames.TransformCoordinatesSystem:\n return async () => (await import(\"./Data/flowGraphTransformCoordinatesSystemBlock\")).FlowGraphTransformCoordinatesSystemBlock;\n case FlowGraphBlockNames.GetAsset:\n return async () => (await import(\"./Data/flowGraphGetAssetBlock\")).FlowGraphGetAssetBlock;\n case FlowGraphBlockNames.GetProperty:\n return async () => (await import(\"./Data/flowGraphGetPropertyBlock\")).FlowGraphGetPropertyBlock;\n case FlowGraphBlockNames.SetProperty:\n return async () => (await import(\"./Execution/flowGraphSetPropertyBlock\")).FlowGraphSetPropertyBlock;\n case FlowGraphBlockNames.GetVariable:\n return async () => (await import(\"./Data/flowGraphGetVariableBlock\")).FlowGraphGetVariableBlock;\n case FlowGraphBlockNames.SetVariable:\n return async () => (await import(\"./Execution/flowGraphSetVariableBlock\")).FlowGraphSetVariableBlock;\n case FlowGraphBlockNames.JsonPointerParser:\n return async () => (await import(\"./Data/Transformers/flowGraphJsonPointerParserBlock\")).FlowGraphJsonPointerParserBlock;\n case FlowGraphBlockNames.LeadingZeros:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLeadingZerosBlock;\n case FlowGraphBlockNames.TrailingZeros:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTrailingZerosBlock;\n case FlowGraphBlockNames.OneBitsCounter:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphOneBitsCounterBlock;\n case FlowGraphBlockNames.CombineVector2:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector2Block;\n case FlowGraphBlockNames.CombineVector3:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector3Block;\n case FlowGraphBlockNames.CombineVector4:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector4Block;\n case FlowGraphBlockNames.CombineMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrixBlock;\n case FlowGraphBlockNames.ExtractVector2:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector2Block;\n case FlowGraphBlockNames.ExtractVector3:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector3Block;\n case FlowGraphBlockNames.ExtractVector4:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector4Block;\n case FlowGraphBlockNames.ExtractMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrixBlock;\n case FlowGraphBlockNames.TransformVector:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphTransformBlock;\n case FlowGraphBlockNames.TransformCoordinates:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphTransformCoordinatesBlock;\n case FlowGraphBlockNames.Conjugate:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphConjugateBlock;\n case FlowGraphBlockNames.AngleBetween:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphAngleBetweenBlock;\n case FlowGraphBlockNames.QuaternionFromAxisAngle:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphQuaternionFromAxisAngleBlock;\n case FlowGraphBlockNames.AxisAngleFromQuaternion:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphAxisAngleFromQuaternionBlock;\n case FlowGraphBlockNames.QuaternionFromDirections:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphQuaternionFromDirectionsBlock;\n case FlowGraphBlockNames.MatrixDecompose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixDecomposeBlock;\n case FlowGraphBlockNames.MatrixCompose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixComposeBlock;\n case FlowGraphBlockNames.BooleanToFloat:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphBooleanToFloat;\n case FlowGraphBlockNames.BooleanToInt:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphBooleanToInt;\n case FlowGraphBlockNames.FloatToBoolean:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphFloatToBoolean;\n case FlowGraphBlockNames.IntToBoolean:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphIntToBoolean;\n case FlowGraphBlockNames.IntToFloat:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphIntToFloat;\n case FlowGraphBlockNames.FloatToInt:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphFloatToInt;\n case FlowGraphBlockNames.Easing:\n return async () => (await import(\"./Execution/Animation/flowGraphEasingBlock\")).FlowGraphEasingBlock;\n case FlowGraphBlockNames.BezierCurveEasing:\n return async () => (await import(\"./Execution/Animation/flowGraphBezierCurveEasingBlock\")).FlowGraphBezierCurveEasingBlock;\n case FlowGraphBlockNames.PointerOverEvent:\n return async () => (await import(\"./Event/flowGraphPointerOverEventBlock\")).FlowGraphPointerOverEventBlock;\n case FlowGraphBlockNames.PointerOutEvent:\n return async () => (await import(\"./Event/flowGraphPointerOutEventBlock\")).FlowGraphPointerOutEventBlock;\n case FlowGraphBlockNames.Context:\n return async () => (await import(\"./Data/Utils/flowGraphContextBlock\")).FlowGraphContextBlock;\n case FlowGraphBlockNames.ArrayIndex:\n return async () => (await import(\"./Data/Utils/flowGraphArrayIndexBlock\")).FlowGraphArrayIndexBlock;\n case FlowGraphBlockNames.CodeExecution:\n return async () => (await import(\"./Data/Utils/flowGraphCodeExecutionBlock\")).FlowGraphCodeExecutionBlock;\n case FlowGraphBlockNames.IndexOf:\n return async () => (await import(\"./Data/Utils/flowGraphIndexOfBlock\")).FlowGraphIndexOfBlock;\n case FlowGraphBlockNames.FunctionReference:\n return async () => (await import(\"./Data/Utils/flowGraphFunctionReferenceBlock\")).FlowGraphFunctionReferenceBlock;\n case FlowGraphBlockNames.DataSwitch:\n return async () => (await import(\"./Data/flowGraphDataSwitchBlock\")).FlowGraphDataSwitchBlock;\n default:\n // check if the block is a custom block\n if (CustomBlocks[blockName]) {\n return CustomBlocks[blockName];\n }\n throw new Error(`Unknown block name ${blockName}`);\n }\n}\n"]}
|
|
@@ -127,6 +127,11 @@ export declare enum FlowGraphBlockNames {
|
|
|
127
127
|
ExtractMatrix3D = "FlowGraphExtractMatrix3DBlock",
|
|
128
128
|
TransformVector = "FlowGraphTransformVectorBlock",
|
|
129
129
|
TransformCoordinates = "FlowGraphTransformCoordinatesBlock",
|
|
130
|
+
Conjugate = "FlowGraphConjugateBlock",
|
|
131
|
+
AngleBetween = "FlowGraphAngleBetweenBlock",
|
|
132
|
+
QuaternionFromAxisAngle = "FlowGraphQuaternionFromAxisAngleBlock",
|
|
133
|
+
AxisAngleFromQuaternion = "FlowGraphAxisAngleFromQuaternionBlock",
|
|
134
|
+
QuaternionFromDirections = "FlowGraphQuaternionFromDirectionsBlock",
|
|
130
135
|
MatrixDecompose = "FlowGraphMatrixDecompose",
|
|
131
136
|
MatrixCompose = "FlowGraphMatrixCompose",
|
|
132
137
|
BooleanToFloat = "FlowGraphBooleanToFloat",
|
|
@@ -128,6 +128,11 @@ export var FlowGraphBlockNames;
|
|
|
128
128
|
FlowGraphBlockNames["ExtractMatrix3D"] = "FlowGraphExtractMatrix3DBlock";
|
|
129
129
|
FlowGraphBlockNames["TransformVector"] = "FlowGraphTransformVectorBlock";
|
|
130
130
|
FlowGraphBlockNames["TransformCoordinates"] = "FlowGraphTransformCoordinatesBlock";
|
|
131
|
+
FlowGraphBlockNames["Conjugate"] = "FlowGraphConjugateBlock";
|
|
132
|
+
FlowGraphBlockNames["AngleBetween"] = "FlowGraphAngleBetweenBlock";
|
|
133
|
+
FlowGraphBlockNames["QuaternionFromAxisAngle"] = "FlowGraphQuaternionFromAxisAngleBlock";
|
|
134
|
+
FlowGraphBlockNames["AxisAngleFromQuaternion"] = "FlowGraphAxisAngleFromQuaternionBlock";
|
|
135
|
+
FlowGraphBlockNames["QuaternionFromDirections"] = "FlowGraphQuaternionFromDirectionsBlock";
|
|
131
136
|
FlowGraphBlockNames["MatrixDecompose"] = "FlowGraphMatrixDecompose";
|
|
132
137
|
FlowGraphBlockNames["MatrixCompose"] = "FlowGraphMatrixCompose";
|
|
133
138
|
FlowGraphBlockNames["BooleanToFloat"] = "FlowGraphBooleanToFloat";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphBlockNames.js","sourceRoot":"","sources":["../../../../../dev/core/src/FlowGraph/Blocks/flowGraphBlockNames.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAN,IAAkB,
|
|
1
|
+
{"version":3,"file":"flowGraphBlockNames.js","sourceRoot":"","sources":["../../../../../dev/core/src/FlowGraph/Blocks/flowGraphBlockNames.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAN,IAAkB,mBAkJjB;AAlJD,WAAkB,mBAAmB;IACjC,oEAA6C,CAAA;IAC7C,oEAA6C,CAAA;IAC7C,sEAA+C,CAAA;IAC/C,yEAAkD,CAAA;IAClD,wEAAiD,CAAA;IACjD,sEAA+C,CAAA;IAC/C,wEAAiD,CAAA;IACjD,8EAAuD,CAAA;IACvD,oEAA6C,CAAA;IAC7C,kEAA2C,CAAA;IAC3C,0EAAmD,CAAA;IACnD,sEAA+C,CAAA;IAC/C,0EAAmD,CAAA;IACnD,0EAAmD,CAAA;IACnD,wEAAiD,CAAA;IACjD,4CAAqB,CAAA;IACrB,8CAAuB,CAAA;IACvB,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tC,yDAAkC,CAAA;IAClC,yDAAkC,CAAA;IAClC,sDAA+B,CAAA;IAC/B,wDAAiC,CAAA;IACjC,8DAAuC,CAAA;IACvC,oEAA6C,CAAA;IAC7C,wDAAiC,CAAA;IACjC,uEAAgD,CAAA;IAChD,uEAAgD,CAAA;IAChD,8DAAuC,CAAA;AAC3C,CAAC,EAlJiB,mBAAmB,KAAnB,mBAAmB,QAkJpC","sourcesContent":["/**\n * Enum of all block names.\n * Note - if you add a new block, you must add it here, and must add it in the block factory!\n */\nexport const enum FlowGraphBlockNames {\n PlayAnimation = \"FlowGraphPlayAnimationBlock\",\n StopAnimation = \"FlowGraphStopAnimationBlock\",\n PauseAnimation = \"FlowGraphPauseAnimationBlock\",\n ValueInterpolation = \"FlowGraphInterpolationBlock\",\n SceneReadyEvent = \"FlowGraphSceneReadyEventBlock\",\n SceneTickEvent = \"FlowGraphSceneTickEventBlock\",\n SendCustomEvent = \"FlowGraphSendCustomEventBlock\",\n ReceiveCustomEvent = \"FlowGraphReceiveCustomEventBlock\",\n MeshPickEvent = \"FlowGraphMeshPickEventBlock\",\n PointerEvent = \"FlowGraphPointerEventBlock\",\n PointerDownEvent = \"FlowGraphPointerDownEventBlock\",\n PointerUpEvent = \"FlowGraphPointerUpEventBlock\",\n PointerMoveEvent = \"FlowGraphPointerMoveEventBlock\",\n PointerOverEvent = \"FlowGraphPointerOverEventBlock\",\n PointerOutEvent = \"FlowGraphPointerOutEventBlock\",\n E = \"FlowGraphEBlock\",\n PI = \"FlowGraphPIBlock\",\n Inf = \"FlowGraphInfBlock\",\n NaN = \"FlowGraphNaNBlock\",\n Random = \"FlowGraphRandomBlock\",\n Add = \"FlowGraphAddBlock\",\n Subtract = \"FlowGraphSubtractBlock\",\n Multiply = \"FlowGraphMultiplyBlock\",\n Divide = \"FlowGraphDivideBlock\",\n Abs = \"FlowGraphAbsBlock\",\n Sign = \"FlowGraphSignBlock\",\n Trunc = \"FlowGraphTruncBlock\",\n Floor = \"FlowGraphFloorBlock\",\n Ceil = \"FlowGraphCeilBlock\",\n Round = \"FlowGraphRoundBlock\",\n Fraction = \"FlowGraphFractBlock\",\n Negation = \"FlowGraphNegationBlock\",\n Modulo = \"FlowGraphModuloBlock\",\n Min = \"FlowGraphMinBlock\",\n Max = \"FlowGraphMaxBlock\",\n Clamp = \"FlowGraphClampBlock\",\n Saturate = \"FlowGraphSaturateBlock\",\n MathInterpolation = \"FlowGraphMathInterpolationBlock\",\n Equality = \"FlowGraphEqualityBlock\",\n LessThan = \"FlowGraphLessThanBlock\",\n LessThanOrEqual = \"FlowGraphLessThanOrEqualBlock\",\n GreaterThan = \"FlowGraphGreaterThanBlock\",\n GreaterThanOrEqual = \"FlowGraphGreaterThanOrEqualBlock\",\n IsNaN = \"FlowGraphIsNaNBlock\",\n IsInfinity = \"FlowGraphIsInfBlock\",\n DegToRad = \"FlowGraphDegToRadBlock\",\n RadToDeg = \"FlowGraphRadToDegBlock\",\n Sin = \"FlowGraphSinBlock\",\n Cos = \"FlowGraphCosBlock\",\n Tan = \"FlowGraphTanBlock\",\n Asin = \"FlowGraphASinBlock\",\n Acos = \"FlowGraphACosBlock\",\n Atan = \"FlowGraphATanBlock\",\n Atan2 = \"FlowGraphATan2Block\",\n Sinh = \"FlowGraphSinhBlock\",\n Cosh = \"FlowGraphCoshBlock\",\n Tanh = \"FlowGraphTanhBlock\",\n Asinh = \"FlowGraphASinhBlock\",\n Acosh = \"FlowGraphACoshBlock\",\n Atanh = \"FlowGraphATanhBlock\",\n Exponential = \"FlowGraphExponentialBlock\",\n Log = \"FlowGraphLogBlock\",\n Log2 = \"FlowGraphLog2Block\",\n Log10 = \"FlowGraphLog10Block\",\n SquareRoot = \"FlowGraphSquareRootBlock\",\n CubeRoot = \"FlowGraphCubeRootBlock\",\n Power = \"FlowGraphPowerBlock\",\n Length = \"FlowGraphLengthBlock\",\n Normalize = \"FlowGraphNormalizeBlock\",\n Dot = \"FlowGraphDotBlock\",\n Cross = \"FlowGraphCrossBlock\",\n Rotate2D = \"FlowGraphRotate2DBlock\",\n Rotate3D = \"FlowGraphRotate3DBlock\",\n Transpose = \"FlowGraphTransposeBlock\",\n Determinant = \"FlowGraphDeterminantBlock\",\n InvertMatrix = \"FlowGraphInvertMatrixBlock\",\n MatrixMultiplication = \"FlowGraphMatrixMultiplicationBlock\",\n BitwiseAnd = \"FlowGraphBitwiseAndBlock\",\n BitwiseOr = \"FlowGraphBitwiseOrBlock\",\n BitwiseXor = \"FlowGraphBitwiseXorBlock\",\n BitwiseNot = \"FlowGraphBitwiseNotBlock\",\n BitwiseLeftShift = \"FlowGraphBitwiseLeftShiftBlock\",\n BitwiseRightShift = \"FlowGraphBitwiseRightShiftBlock\",\n LeadingZeros = \"FlowGraphLeadingZerosBlock\",\n TrailingZeros = \"FlowGraphTrailingZerosBlock\",\n OneBitsCounter = \"FlowGraphOneBitsCounterBlock\",\n Branch = \"FlowGraphBranchBlock\",\n SetDelay = \"FlowGraphSetDelayBlock\",\n CancelDelay = \"FlowGraphCancelDelayBlock\",\n CallCounter = \"FlowGraphCallCounterBlock\",\n Debounce = \"FlowGraphDebounceBlock\",\n Throttle = \"FlowGraphThrottleBlock\",\n DoN = \"FlowGraphDoNBlock\",\n FlipFlop = \"FlowGraphFlipFlopBlock\",\n ForLoop = \"FlowGraphForLoopBlock\",\n MultiGate = \"FlowGraphMultiGateBlock\",\n Sequence = \"FlowGraphSequenceBlock\",\n Switch = \"FlowGraphSwitchBlock\",\n WaitAll = \"FlowGraphWaitAllBlock\",\n WhileLoop = \"FlowGraphWhileLoopBlock\",\n ConsoleLog = \"FlowGraphConsoleLogBlock\",\n Conditional = \"FlowGraphConditionalBlock\",\n Constant = \"FlowGraphConstantBlock\",\n TransformCoordinatesSystem = \"FlowGraphTransformCoordinatesSystemBlock\",\n GetAsset = \"FlowGraphGetAssetBlock\",\n GetProperty = \"FlowGraphGetPropertyBlock\",\n SetProperty = \"FlowGraphSetPropertyBlock\",\n GetVariable = \"FlowGraphGetVariableBlock\",\n SetVariable = \"FlowGraphSetVariableBlock\",\n JsonPointerParser = \"FlowGraphJsonPointerParserBlock\",\n CombineVector2 = \"FlowGraphCombineVector2Block\",\n CombineVector3 = \"FlowGraphCombineVector3Block\",\n CombineVector4 = \"FlowGraphCombineVector4Block\",\n CombineMatrix = \"FlowGraphCombineMatrixBlock\",\n CombineMatrix2D = \"FlowGraphCombineMatrix2DBlock\",\n CombineMatrix3D = \"FlowGraphCombineMatrix3DBlock\",\n ExtractVector2 = \"FlowGraphExtractVector2Block\",\n ExtractVector3 = \"FlowGraphExtractVector3Block\",\n ExtractVector4 = \"FlowGraphExtractVector4Block\",\n ExtractMatrix = \"FlowGraphExtractMatrixBlock\",\n ExtractMatrix2D = \"FlowGraphExtractMatrix2DBlock\",\n ExtractMatrix3D = \"FlowGraphExtractMatrix3DBlock\",\n TransformVector = \"FlowGraphTransformVectorBlock\",\n TransformCoordinates = \"FlowGraphTransformCoordinatesBlock\",\n Conjugate = \"FlowGraphConjugateBlock\",\n AngleBetween = \"FlowGraphAngleBetweenBlock\",\n QuaternionFromAxisAngle = \"FlowGraphQuaternionFromAxisAngleBlock\",\n AxisAngleFromQuaternion = \"FlowGraphAxisAngleFromQuaternionBlock\",\n QuaternionFromDirections = \"FlowGraphQuaternionFromDirectionsBlock\",\n MatrixDecompose = \"FlowGraphMatrixDecompose\",\n MatrixCompose = \"FlowGraphMatrixCompose\",\n BooleanToFloat = \"FlowGraphBooleanToFloat\",\n BooleanToInt = \"FlowGraphBooleanToInt\",\n FloatToBoolean = \"FlowGraphFloatToBoolean\",\n IntToBoolean = \"FlowGraphIntToBoolean\",\n IntToFloat = \"FlowGraphIntToFloat\",\n FloatToInt = \"FlowGraphFloatToInt\",\n Easing = \"FlowGraphEasingBlock\",\n Context = \"FlowGraphContextBlock\",\n ArrayIndex = \"FlowGraphArrayIndexBlock\",\n CodeExecution = \"FlowGraphCodeExecutionBlock\",\n IndexOf = \"FlowGraphIndexOfBlock\",\n FunctionReference = \"FlowGraphFunctionReference\",\n BezierCurveEasing = \"FlowGraphBezierCurveEasing\",\n DataSwitch = \"FlowGraphDataSwitchBlock\",\n}\n"]}
|
|
@@ -69,14 +69,16 @@ export const RichTypeColor3 = new RichType("Color3" /* FlowGraphTypes.Color3 */,
|
|
|
69
69
|
export const RichTypeColor4 = new RichType("Color4" /* FlowGraphTypes.Color4 */, new Color4(0, 0, 0, 0), 7);
|
|
70
70
|
export const RichTypeQuaternion = new RichType("Quaternion" /* FlowGraphTypes.Quaternion */, Quaternion.Identity(), 2);
|
|
71
71
|
RichTypeQuaternion.typeTransformer = (value) => {
|
|
72
|
-
if (value.getClassName
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
if (value.getClassName) {
|
|
73
|
+
if (value.getClassName() === "Vector4" /* FlowGraphTypes.Vector4 */) {
|
|
74
|
+
return Quaternion.FromArray(value.asArray());
|
|
75
|
+
}
|
|
76
|
+
else if (value.getClassName() === "Vector3" /* FlowGraphTypes.Vector3 */) {
|
|
77
|
+
return Quaternion.FromEulerVector(value);
|
|
78
|
+
}
|
|
79
|
+
else if (value.getClassName() === "Matrix" /* FlowGraphTypes.Matrix */) {
|
|
80
|
+
return Quaternion.FromRotationMatrix(value);
|
|
81
|
+
}
|
|
80
82
|
}
|
|
81
83
|
return value;
|
|
82
84
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphRichTypes.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraphRichTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,E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E,CAAC;QACpB,KAAK,SAAS,CAAC,mBAAmB;YAC9B,OAAO,cAAc,CAAC;QAC1B,KAAK,SAAS,CAAC,qBAAqB;YAChC,OAAO,eAAe,CAAC;QAC3B,KAAK,SAAS,CAAC,qBAAqB;YAChC,OAAO,eAAe,CAAC;QAC3B,KAAK,SAAS,CAAC,oBAAoB;YAC/B,OAAO,cAAc,CAAC;QAC1B,KAAK,SAAS,CAAC,oBAAoB;YAC/B,OAAO,cAAc,CAAC;QAC1B,KAAK,SAAS,CAAC,oBAAoB;YAC/B,OAAO,cAAc,CAAC;QAC1B,KAAK,SAAS,CAAC,wBAAwB;YACnC,OAAO,kBAAkB,CAAC;QAC9B;YACI,OAAO,WAAW,CAAC;IAC3B,CAAC;AACL,CAAC","sourcesContent":["import { Vector2, Vector3, Vector4, Matrix, Quaternion } from \"../Maths/math.vector\";\r\nimport { Color3, Color4 } from \"../Maths/math.color\";\r\nimport { FlowGraphInteger } from \"./CustomTypes/flowGraphInteger\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport { FlowGraphMatrix2D, FlowGraphMatrix3D } from \"./CustomTypes/flowGraphMatrix\";\r\n\r\n/**\r\n * The types supported by the flow graph.\r\n */\r\nexport const enum FlowGraphTypes {\r\n Any = \"any\",\r\n String = \"string\",\r\n Number = \"number\",\r\n Boolean = \"boolean\",\r\n Object = \"object\",\r\n Integer = \"FlowGraphInteger\",\r\n Vector2 = \"Vector2\",\r\n Vector3 = \"Vector3\",\r\n Vector4 = \"Vector4\",\r\n Quaternion = \"Quaternion\",\r\n Matrix = \"Matrix\",\r\n Matrix2D = \"Matrix2D\",\r\n Matrix3D = \"Matrix3D\",\r\n Color3 = \"Color3\",\r\n Color4 = \"Color4\",\r\n}\r\n\r\n/**\r\n * A rich type represents extra information about a type,\r\n * such as its name and a default value constructor.\r\n */\r\nexport class RichType<T> {\r\n /**\r\n * A function that can be used to transform a value of any type into a value of this rich type.\r\n * This can be used, for example, between vector4 and quaternion.\r\n */\r\n public typeTransformer: (value: any) => T;\r\n\r\n constructor(\r\n /**\r\n * The name given to the type.\r\n */\r\n public typeName: string,\r\n /**\r\n * The default value of the type.\r\n */\r\n public defaultValue: T,\r\n\r\n /**\r\n * [-1] The ANIMATIONTYPE of the type, if available\r\n */\r\n public animationType: number = -1\r\n ) {}\r\n\r\n /**\r\n * Serializes this rich type into a serialization object.\r\n * @param serializationObject the object to serialize to\r\n */\r\n serialize(serializationObject: any) {\r\n serializationObject.typeName = this.typeName;\r\n serializationObject.defaultValue = this.defaultValue;\r\n }\r\n}\r\n\r\nexport const RichTypeAny: RichType<any> = new RichType(FlowGraphTypes.Any, undefined);\r\n\r\nexport const RichTypeString: RichType<string> = new RichType(FlowGraphTypes.String, \"\");\r\n\r\nexport const RichTypeNumber: RichType<number> = new RichType(FlowGraphTypes.Number, 0, Constants.ANIMATIONTYPE_FLOAT);\r\n\r\nexport const RichTypeBoolean: RichType<boolean> = new RichType(FlowGraphTypes.Boolean, false);\r\n\r\nexport const RichTypeVector2: RichType<Vector2> = new RichType(FlowGraphTypes.Vector2, Vector2.Zero(), Constants.ANIMATIONTYPE_VECTOR2);\r\n\r\nexport const RichTypeVector3: RichType<Vector3> = new RichType(FlowGraphTypes.Vector3, Vector3.Zero(), Constants.ANIMATIONTYPE_VECTOR3);\r\n\r\nexport const RichTypeVector4: RichType<Vector4> = new RichType(FlowGraphTypes.Vector4, Vector4.Zero());\r\n\r\nexport const RichTypeMatrix: RichType<Matrix> = new RichType(FlowGraphTypes.Matrix, Matrix.Identity(), Constants.ANIMATIONTYPE_MATRIX);\r\n\r\nexport const RichTypeMatrix2D: RichType<FlowGraphMatrix2D> = new RichType(FlowGraphTypes.Matrix2D, new FlowGraphMatrix2D());\r\n\r\nexport const RichTypeMatrix3D: RichType<FlowGraphMatrix3D> = new RichType(FlowGraphTypes.Matrix3D, new FlowGraphMatrix3D());\r\n\r\nexport const RichTypeColor3: RichType<Color3> = new RichType(FlowGraphTypes.Color3, Color3.Black(), Constants.ANIMATIONTYPE_COLOR3);\r\n\r\nexport const RichTypeColor4: RichType<Color4> = new RichType(FlowGraphTypes.Color4, new Color4(0, 0, 0, 0), Constants.ANIMATIONTYPE_COLOR4);\r\n\r\nexport const RichTypeQuaternion: RichType<Quaternion> = new RichType(FlowGraphTypes.Quaternion, Quaternion.Identity(), Constants.ANIMATIONTYPE_QUATERNION);\r\nRichTypeQuaternion.typeTransformer = (value: any) => {\r\n if (value.getClassName && value.getClassName() === FlowGraphTypes.Vector4) {\r\n return Quaternion.FromArray(value.asArray());\r\n } else if (value.getClassName && value.getClassName() === FlowGraphTypes.Vector3) {\r\n return Quaternion.FromEulerVector(value);\r\n } else if (value.getClassName && value.getClassName() === FlowGraphTypes.Matrix) {\r\n return Quaternion.FromRotationMatrix(value);\r\n }\r\n return value;\r\n};\r\nexport const RichTypeFlowGraphInteger: RichType<FlowGraphInteger> = new RichType(FlowGraphTypes.Integer, new FlowGraphInteger(0), Constants.ANIMATIONTYPE_FLOAT);\r\n\r\n/**\r\n * Given a value, try to deduce its rich type.\r\n * @param value the value to deduce the rich type from\r\n * @returns the value's rich type, or RichTypeAny if the type could not be deduced.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function getRichTypeFromValue<T>(value: T): RichType<T> {\r\n const anyValue = value as any;\r\n switch (typeof value) {\r\n case FlowGraphTypes.String:\r\n return RichTypeString as RichType<T>;\r\n case FlowGraphTypes.Number:\r\n return RichTypeNumber as RichType<T>;\r\n case FlowGraphTypes.Boolean:\r\n return RichTypeBoolean as RichType<T>;\r\n case FlowGraphTypes.Object:\r\n if (anyValue.getClassName) {\r\n switch (anyValue.getClassName() as string) {\r\n case FlowGraphTypes.Vector2:\r\n return RichTypeVector2 as RichType<T>;\r\n case FlowGraphTypes.Vector3:\r\n return RichTypeVector3 as RichType<T>;\r\n case FlowGraphTypes.Vector4:\r\n return RichTypeVector4 as RichType<T>;\r\n case FlowGraphTypes.Matrix:\r\n return RichTypeMatrix as RichType<T>;\r\n case FlowGraphTypes.Color3:\r\n return RichTypeColor3 as RichType<T>;\r\n case FlowGraphTypes.Color4:\r\n return RichTypeColor4 as RichType<T>;\r\n case FlowGraphTypes.Quaternion:\r\n return RichTypeQuaternion as RichType<T>;\r\n case FlowGraphTypes.Integer:\r\n return RichTypeFlowGraphInteger as RichType<T>;\r\n case FlowGraphTypes.Matrix2D:\r\n return RichTypeMatrix2D as RichType<T>;\r\n case FlowGraphTypes.Matrix3D:\r\n return RichTypeMatrix3D as RichType<T>;\r\n }\r\n }\r\n return RichTypeAny as RichType<T>;\r\n default:\r\n return RichTypeAny as RichType<T>;\r\n }\r\n}\r\n\r\n/**\r\n * Given a flow graph type, return the rich type that corresponds to it.\r\n * @param flowGraphType the flow graph type\r\n * @returns the rich type that corresponds to the flow graph type\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function getRichTypeByFlowGraphType(flowGraphType?: string): RichType<any> {\r\n switch (flowGraphType) {\r\n case FlowGraphTypes.String:\r\n return RichTypeString;\r\n case FlowGraphTypes.Number:\r\n return RichTypeNumber;\r\n case FlowGraphTypes.Boolean:\r\n return RichTypeBoolean;\r\n case FlowGraphTypes.Vector2:\r\n return RichTypeVector2;\r\n case FlowGraphTypes.Vector3:\r\n return RichTypeVector3;\r\n case FlowGraphTypes.Vector4:\r\n return RichTypeVector4;\r\n case FlowGraphTypes.Matrix:\r\n return RichTypeMatrix;\r\n case FlowGraphTypes.Color3:\r\n return RichTypeColor3;\r\n case FlowGraphTypes.Color4:\r\n return RichTypeColor4;\r\n case FlowGraphTypes.Quaternion:\r\n return RichTypeQuaternion;\r\n case FlowGraphTypes.Integer:\r\n return RichTypeFlowGraphInteger;\r\n case FlowGraphTypes.Matrix2D:\r\n return RichTypeMatrix2D;\r\n case FlowGraphTypes.Matrix3D:\r\n return RichTypeMatrix3D;\r\n default:\r\n return RichTypeAny;\r\n }\r\n}\r\n\r\n/**\r\n * get the animation type for a given flow graph type\r\n * @param flowGraphType the flow graph type\r\n * @returns the animation type for this flow graph type\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function getAnimationTypeByFlowGraphType(flowGraphType: FlowGraphTypes): number {\r\n switch (flowGraphType) {\r\n case FlowGraphTypes.Number:\r\n return Constants.ANIMATIONTYPE_FLOAT;\r\n case FlowGraphTypes.Vector2:\r\n return Constants.ANIMATIONTYPE_VECTOR2;\r\n case FlowGraphTypes.Vector3:\r\n return Constants.ANIMATIONTYPE_VECTOR3;\r\n case FlowGraphTypes.Matrix:\r\n return Constants.ANIMATIONTYPE_MATRIX;\r\n case FlowGraphTypes.Color3:\r\n return Constants.ANIMATIONTYPE_COLOR3;\r\n case FlowGraphTypes.Color4:\r\n return Constants.ANIMATIONTYPE_COLOR4;\r\n case FlowGraphTypes.Quaternion:\r\n return Constants.ANIMATIONTYPE_QUATERNION;\r\n default:\r\n return Constants.ANIMATIONTYPE_FLOAT;\r\n }\r\n}\r\n\r\n/**\r\n * Given an animation type, return the rich type that corresponds to it.\r\n * @param animationType the animation type\r\n * @returns the rich type that corresponds to the animation type\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function getRichTypeByAnimationType(animationType: number): RichType<any> {\r\n switch (animationType) {\r\n case Constants.ANIMATIONTYPE_FLOAT:\r\n return RichTypeNumber;\r\n case Constants.ANIMATIONTYPE_VECTOR2:\r\n return RichTypeVector2;\r\n case Constants.ANIMATIONTYPE_VECTOR3:\r\n return RichTypeVector3;\r\n case Constants.ANIMATIONTYPE_MATRIX:\r\n return RichTypeMatrix;\r\n case Constants.ANIMATIONTYPE_COLOR3:\r\n return RichTypeColor3;\r\n case Constants.ANIMATIONTYPE_COLOR4:\r\n return RichTypeColor4;\r\n case Constants.ANIMATIONTYPE_QUATERNION:\r\n return RichTypeQuaternion;\r\n default:\r\n return RichTypeAny;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"flowGraphRichTypes.js","sourceRoot":"","sources":["../../../../dev/core/src/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1C;YACI,OAAO,SAAS,CAAC,oBAAoB,CAAC;QAC1C;YACI,OAAO,SAAS,CAAC,wBAAwB,CAAC;QAC9C;YACI,OAAO,SAAS,CAAC,mBAAmB,CAAC;IAC7C,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,gEAAgE;AAChE,MAAM,UAAU,0BAA0B,CAAC,aAAqB;IAC5D,QAAQ,aAAa,EAAE,CAAC;QACpB,KAAK,SAAS,CAAC,mBAAmB;YAC9B,OAAO,cAAc,CAAC;QAC1B,KAAK,SAAS,CAAC,qBAAqB;YAChC,OAAO,eAAe,CAAC;QAC3B,KAAK,SAAS,CAAC,qBAAqB;YAChC,OAAO,eAAe,CAAC;QAC3B,KAAK,SAAS,CAAC,oBAAoB;YAC/B,OAAO,cAAc,CAAC;QAC1B,KAAK,SAAS,CAAC,oBAAoB;YAC/B,OAAO,cAAc,CAAC;QAC1B,KAAK,SAAS,CAAC,oBAAoB;YAC/B,OAAO,cAAc,CAAC;QAC1B,KAAK,SAAS,CAAC,wBAAwB;YACnC,OAAO,kBAAkB,CAAC;QAC9B;YACI,OAAO,WAAW,CAAC;IAC3B,CAAC;AACL,CAAC","sourcesContent":["import { Vector2, Vector3, Vector4, Matrix, Quaternion } from \"../Maths/math.vector\";\r\nimport { Color3, Color4 } from \"../Maths/math.color\";\r\nimport { FlowGraphInteger } from \"./CustomTypes/flowGraphInteger\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport { FlowGraphMatrix2D, FlowGraphMatrix3D } from \"./CustomTypes/flowGraphMatrix\";\r\n\r\n/**\r\n * The types supported by the flow graph.\r\n */\r\nexport const enum FlowGraphTypes {\r\n Any = \"any\",\r\n String = \"string\",\r\n Number = \"number\",\r\n Boolean = \"boolean\",\r\n Object = \"object\",\r\n Integer = \"FlowGraphInteger\",\r\n Vector2 = \"Vector2\",\r\n Vector3 = \"Vector3\",\r\n Vector4 = \"Vector4\",\r\n Quaternion = \"Quaternion\",\r\n Matrix = \"Matrix\",\r\n Matrix2D = \"Matrix2D\",\r\n Matrix3D = \"Matrix3D\",\r\n Color3 = \"Color3\",\r\n Color4 = \"Color4\",\r\n}\r\n\r\n/**\r\n * A rich type represents extra information about a type,\r\n * such as its name and a default value constructor.\r\n */\r\nexport class RichType<T> {\r\n /**\r\n * A function that can be used to transform a value of any type into a value of this rich type.\r\n * This can be used, for example, between vector4 and quaternion.\r\n */\r\n public typeTransformer: (value: any) => T;\r\n\r\n constructor(\r\n /**\r\n * The name given to the type.\r\n */\r\n public typeName: string,\r\n /**\r\n * The default value of the type.\r\n */\r\n public defaultValue: T,\r\n\r\n /**\r\n * [-1] The ANIMATIONTYPE of the type, if available\r\n */\r\n public animationType: number = -1\r\n ) {}\r\n\r\n /**\r\n * Serializes this rich type into a serialization object.\r\n * @param serializationObject the object to serialize to\r\n */\r\n serialize(serializationObject: any) {\r\n serializationObject.typeName = this.typeName;\r\n serializationObject.defaultValue = this.defaultValue;\r\n }\r\n}\r\n\r\nexport const RichTypeAny: RichType<any> = new RichType(FlowGraphTypes.Any, undefined);\r\n\r\nexport const RichTypeString: RichType<string> = new RichType(FlowGraphTypes.String, \"\");\r\n\r\nexport const RichTypeNumber: RichType<number> = new RichType(FlowGraphTypes.Number, 0, Constants.ANIMATIONTYPE_FLOAT);\r\n\r\nexport const RichTypeBoolean: RichType<boolean> = new RichType(FlowGraphTypes.Boolean, false);\r\n\r\nexport const RichTypeVector2: RichType<Vector2> = new RichType(FlowGraphTypes.Vector2, Vector2.Zero(), Constants.ANIMATIONTYPE_VECTOR2);\r\n\r\nexport const RichTypeVector3: RichType<Vector3> = new RichType(FlowGraphTypes.Vector3, Vector3.Zero(), Constants.ANIMATIONTYPE_VECTOR3);\r\n\r\nexport const RichTypeVector4: RichType<Vector4> = new RichType(FlowGraphTypes.Vector4, Vector4.Zero());\r\n\r\nexport const RichTypeMatrix: RichType<Matrix> = new RichType(FlowGraphTypes.Matrix, Matrix.Identity(), Constants.ANIMATIONTYPE_MATRIX);\r\n\r\nexport const RichTypeMatrix2D: RichType<FlowGraphMatrix2D> = new RichType(FlowGraphTypes.Matrix2D, new FlowGraphMatrix2D());\r\n\r\nexport const RichTypeMatrix3D: RichType<FlowGraphMatrix3D> = new RichType(FlowGraphTypes.Matrix3D, new FlowGraphMatrix3D());\r\n\r\nexport const RichTypeColor3: RichType<Color3> = new RichType(FlowGraphTypes.Color3, Color3.Black(), Constants.ANIMATIONTYPE_COLOR3);\r\n\r\nexport const RichTypeColor4: RichType<Color4> = new RichType(FlowGraphTypes.Color4, new Color4(0, 0, 0, 0), Constants.ANIMATIONTYPE_COLOR4);\r\n\r\nexport const RichTypeQuaternion: RichType<Quaternion> = new RichType(FlowGraphTypes.Quaternion, Quaternion.Identity(), Constants.ANIMATIONTYPE_QUATERNION);\r\nRichTypeQuaternion.typeTransformer = (value: any) => {\r\n if (value.getClassName) {\r\n if (value.getClassName() === FlowGraphTypes.Vector4) {\r\n return Quaternion.FromArray(value.asArray());\r\n } else if (value.getClassName() === FlowGraphTypes.Vector3) {\r\n return Quaternion.FromEulerVector(value);\r\n } else if (value.getClassName() === FlowGraphTypes.Matrix) {\r\n return Quaternion.FromRotationMatrix(value);\r\n }\r\n }\r\n return value;\r\n};\r\nexport const RichTypeFlowGraphInteger: RichType<FlowGraphInteger> = new RichType(FlowGraphTypes.Integer, new FlowGraphInteger(0), Constants.ANIMATIONTYPE_FLOAT);\r\n\r\n/**\r\n * Given a value, try to deduce its rich type.\r\n * @param value the value to deduce the rich type from\r\n * @returns the value's rich type, or RichTypeAny if the type could not be deduced.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function getRichTypeFromValue<T>(value: T): RichType<T> {\r\n const anyValue = value as any;\r\n switch (typeof value) {\r\n case FlowGraphTypes.String:\r\n return RichTypeString as RichType<T>;\r\n case FlowGraphTypes.Number:\r\n return RichTypeNumber as RichType<T>;\r\n case FlowGraphTypes.Boolean:\r\n return RichTypeBoolean as RichType<T>;\r\n case FlowGraphTypes.Object:\r\n if (anyValue.getClassName) {\r\n switch (anyValue.getClassName() as string) {\r\n case FlowGraphTypes.Vector2:\r\n return RichTypeVector2 as RichType<T>;\r\n case FlowGraphTypes.Vector3:\r\n return RichTypeVector3 as RichType<T>;\r\n case FlowGraphTypes.Vector4:\r\n return RichTypeVector4 as RichType<T>;\r\n case FlowGraphTypes.Matrix:\r\n return RichTypeMatrix as RichType<T>;\r\n case FlowGraphTypes.Color3:\r\n return RichTypeColor3 as RichType<T>;\r\n case FlowGraphTypes.Color4:\r\n return RichTypeColor4 as RichType<T>;\r\n case FlowGraphTypes.Quaternion:\r\n return RichTypeQuaternion as RichType<T>;\r\n case FlowGraphTypes.Integer:\r\n return RichTypeFlowGraphInteger as RichType<T>;\r\n case FlowGraphTypes.Matrix2D:\r\n return RichTypeMatrix2D as RichType<T>;\r\n case FlowGraphTypes.Matrix3D:\r\n return RichTypeMatrix3D as RichType<T>;\r\n }\r\n }\r\n return RichTypeAny as RichType<T>;\r\n default:\r\n return RichTypeAny as RichType<T>;\r\n }\r\n}\r\n\r\n/**\r\n * Given a flow graph type, return the rich type that corresponds to it.\r\n * @param flowGraphType the flow graph type\r\n * @returns the rich type that corresponds to the flow graph type\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function getRichTypeByFlowGraphType(flowGraphType?: string): RichType<any> {\r\n switch (flowGraphType) {\r\n case FlowGraphTypes.String:\r\n return RichTypeString;\r\n case FlowGraphTypes.Number:\r\n return RichTypeNumber;\r\n case FlowGraphTypes.Boolean:\r\n return RichTypeBoolean;\r\n case FlowGraphTypes.Vector2:\r\n return RichTypeVector2;\r\n case FlowGraphTypes.Vector3:\r\n return RichTypeVector3;\r\n case FlowGraphTypes.Vector4:\r\n return RichTypeVector4;\r\n case FlowGraphTypes.Matrix:\r\n return RichTypeMatrix;\r\n case FlowGraphTypes.Color3:\r\n return RichTypeColor3;\r\n case FlowGraphTypes.Color4:\r\n return RichTypeColor4;\r\n case FlowGraphTypes.Quaternion:\r\n return RichTypeQuaternion;\r\n case FlowGraphTypes.Integer:\r\n return RichTypeFlowGraphInteger;\r\n case FlowGraphTypes.Matrix2D:\r\n return RichTypeMatrix2D;\r\n case FlowGraphTypes.Matrix3D:\r\n return RichTypeMatrix3D;\r\n default:\r\n return RichTypeAny;\r\n }\r\n}\r\n\r\n/**\r\n * get the animation type for a given flow graph type\r\n * @param flowGraphType the flow graph type\r\n * @returns the animation type for this flow graph type\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function getAnimationTypeByFlowGraphType(flowGraphType: FlowGraphTypes): number {\r\n switch (flowGraphType) {\r\n case FlowGraphTypes.Number:\r\n return Constants.ANIMATIONTYPE_FLOAT;\r\n case FlowGraphTypes.Vector2:\r\n return Constants.ANIMATIONTYPE_VECTOR2;\r\n case FlowGraphTypes.Vector3:\r\n return Constants.ANIMATIONTYPE_VECTOR3;\r\n case FlowGraphTypes.Matrix:\r\n return Constants.ANIMATIONTYPE_MATRIX;\r\n case FlowGraphTypes.Color3:\r\n return Constants.ANIMATIONTYPE_COLOR3;\r\n case FlowGraphTypes.Color4:\r\n return Constants.ANIMATIONTYPE_COLOR4;\r\n case FlowGraphTypes.Quaternion:\r\n return Constants.ANIMATIONTYPE_QUATERNION;\r\n default:\r\n return Constants.ANIMATIONTYPE_FLOAT;\r\n }\r\n}\r\n\r\n/**\r\n * Given an animation type, return the rich type that corresponds to it.\r\n * @param animationType the animation type\r\n * @returns the rich type that corresponds to the animation type\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function getRichTypeByAnimationType(animationType: number): RichType<any> {\r\n switch (animationType) {\r\n case Constants.ANIMATIONTYPE_FLOAT:\r\n return RichTypeNumber;\r\n case Constants.ANIMATIONTYPE_VECTOR2:\r\n return RichTypeVector2;\r\n case Constants.ANIMATIONTYPE_VECTOR3:\r\n return RichTypeVector3;\r\n case Constants.ANIMATIONTYPE_MATRIX:\r\n return RichTypeMatrix;\r\n case Constants.ANIMATIONTYPE_COLOR3:\r\n return RichTypeColor3;\r\n case Constants.ANIMATIONTYPE_COLOR4:\r\n return RichTypeColor4;\r\n case Constants.ANIMATIONTYPE_QUATERNION:\r\n return RichTypeQuaternion;\r\n default:\r\n return RichTypeAny;\r\n }\r\n}\r\n"]}
|
package/FlowGraph/utils.d.ts
CHANGED
|
@@ -20,12 +20,12 @@ export type FlowGraphMathOperationType = FlowGraphNumber | FlowGraphVector | Flo
|
|
|
20
20
|
export declare function _GetClassNameOf(v: any): any;
|
|
21
21
|
/**
|
|
22
22
|
* @internal
|
|
23
|
-
* Check if two classname are the same and are vector classes.
|
|
23
|
+
* Check if two classname are the same and are vector or quaternion classes.
|
|
24
24
|
* @param className the first class name
|
|
25
25
|
* @param className2 the second class name
|
|
26
|
-
* @returns whether the two class names are the same and are vector classes.
|
|
26
|
+
* @returns whether the two class names are the same and are vector or quaternion classes.
|
|
27
27
|
*/
|
|
28
|
-
export declare function
|
|
28
|
+
export declare function _AreSameVectorOrQuaternionClass(className: string, className2: string): boolean;
|
|
29
29
|
/**
|
|
30
30
|
* @internal
|
|
31
31
|
* Check if two classname are the same and are matrix classes.
|
package/FlowGraph/utils.js
CHANGED
|
@@ -19,13 +19,14 @@ export function _GetClassNameOf(v) {
|
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* @internal
|
|
22
|
-
* Check if two classname are the same and are vector classes.
|
|
22
|
+
* Check if two classname are the same and are vector or quaternion classes.
|
|
23
23
|
* @param className the first class name
|
|
24
24
|
* @param className2 the second class name
|
|
25
|
-
* @returns whether the two class names are the same and are vector classes.
|
|
25
|
+
* @returns whether the two class names are the same and are vector or quaternion classes.
|
|
26
26
|
*/
|
|
27
|
-
export function
|
|
28
|
-
return className === className2 &&
|
|
27
|
+
export function _AreSameVectorOrQuaternionClass(className, className2) {
|
|
28
|
+
return (className === className2 &&
|
|
29
|
+
(className === "Vector2" /* FlowGraphTypes.Vector2 */ || className === "Vector3" /* FlowGraphTypes.Vector3 */ || className === "Vector4" /* FlowGraphTypes.Vector4 */ || className === "Quaternion" /* FlowGraphTypes.Quaternion */));
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
31
32
|
* @internal
|
package/FlowGraph/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/utils.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,KAAW,EAAE,KAAW;IACpD,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,KAAK,IAAI,eAAe,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;AAChG,CAAC;AAOD;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,CAAM;IAClC,IAAI,CAAC,CAAC,YAAY,EAAE,CAAC;QACjB,OAAO,CAAC,CAAC,YAAY,EAAE,CAAC;IAC5B,CAAC;IACD,OAAO;AACX,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/utils.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,KAAW,EAAE,KAAW;IACpD,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,KAAK,IAAI,eAAe,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;AAChG,CAAC;AAOD;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,CAAM;IAClC,IAAI,CAAC,CAAC,YAAY,EAAE,CAAC;QACjB,OAAO,CAAC,CAAC,YAAY,EAAE,CAAC;IAC5B,CAAC;IACD,OAAO;AACX,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,+BAA+B,CAAC,SAAiB,EAAE,UAAkB;IACjF,OAAO,CACH,SAAS,KAAK,UAAU;QACxB,CAAC,SAAS,2CAA2B,IAAI,SAAS,2CAA2B,IAAI,SAAS,2CAA2B,IAAI,SAAS,iDAA8B,CAAC,CACpK,CAAC;AACN,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAiB,EAAE,UAAkB;IACrE,OAAO,SAAS,KAAK,UAAU,IAAI,CAAC,SAAS,yCAA0B,IAAI,SAAS,6CAA4B,IAAI,SAAS,6CAA4B,CAAC,CAAC;AAC/J,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,SAAiB,EAAE,UAAkB;IACtE,OAAO,SAAS,KAAK,kBAAkB,IAAI,UAAU,KAAK,kBAAkB,CAAC;AACjF,CAAC;AAED;;;;;GAKG;AACH,gEAAgE;AAChE,MAAM,UAAU,SAAS,CAAC,CAA6B,EAAE,UAAoB;IACzE,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAQ,CAAsB,EAAE,KAAK,KAAK,QAAQ,CAAC;IAC9F,IAAI,SAAS,IAAI,CAAC,UAAU,EAAE,CAAC;QAC3B,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAoB,CAAC,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AAED;;;;GAIG;AACH,gEAAgE;AAChE,MAAM,UAAU,eAAe,CAAC,CAAkB;IAC9C,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC/C,CAAC","sourcesContent":["import type { Matrix, Quaternion, Vector2, Vector3, Vector4 } from \"core/Maths/math.vector\";\r\nimport type { Node } from \"../node\";\r\nimport type { FlowGraphInteger } from \"./CustomTypes/flowGraphInteger\";\r\nimport type { FlowGraphMatrix2D, FlowGraphMatrix3D } from \"./CustomTypes/flowGraphMatrix\";\r\nimport { FlowGraphTypes } from \"./flowGraphRichTypes\";\r\n\r\n/**\r\n * @internal\r\n * Returns if mesh1 is a descendant of mesh2\r\n * @param mesh1\r\n * @param mesh2\r\n * @returns\r\n */\r\nexport function _IsDescendantOf(mesh1: Node, mesh2: Node): boolean {\r\n return !!(mesh1.parent && (mesh1.parent === mesh2 || _IsDescendantOf(mesh1.parent, mesh2)));\r\n}\r\n\r\nexport type FlowGraphNumber = number | FlowGraphInteger;\r\nexport type FlowGraphVector = Vector2 | Vector3 | Vector4 | Quaternion;\r\nexport type FlowGraphMatrix = Matrix | FlowGraphMatrix2D | FlowGraphMatrix3D;\r\nexport type FlowGraphMathOperationType = FlowGraphNumber | FlowGraphVector | FlowGraphMatrix | boolean;\r\n\r\n/**\r\n * @internal\r\n */\r\nexport function _GetClassNameOf(v: any) {\r\n if (v.getClassName) {\r\n return v.getClassName();\r\n }\r\n return;\r\n}\r\n\r\n/**\r\n * @internal\r\n * Check if two classname are the same and are vector or quaternion classes.\r\n * @param className the first class name\r\n * @param className2 the second class name\r\n * @returns whether the two class names are the same and are vector or quaternion classes.\r\n */\r\nexport function _AreSameVectorOrQuaternionClass(className: string, className2: string) {\r\n return (\r\n className === className2 &&\r\n (className === FlowGraphTypes.Vector2 || className === FlowGraphTypes.Vector3 || className === FlowGraphTypes.Vector4 || className === FlowGraphTypes.Quaternion)\r\n );\r\n}\r\n\r\n/**\r\n * @internal\r\n * Check if two classname are the same and are matrix classes.\r\n * @param className the first class name\r\n * @param className2 the second class name\r\n * @returns whether the two class names are the same and are matrix classes.\r\n */\r\nexport function _AreSameMatrixClass(className: string, className2: string) {\r\n return className === className2 && (className === FlowGraphTypes.Matrix || className === FlowGraphTypes.Matrix2D || className === FlowGraphTypes.Matrix3D);\r\n}\r\n\r\n/**\r\n * @internal\r\n * Check if two classname are the same and are integer classes.\r\n * @param className the first class name\r\n * @param className2 the second class name\r\n * @returns whether the two class names are the same and are integer classes.\r\n */\r\nexport function _AreSameIntegerClass(className: string, className2: string) {\r\n return className === \"FlowGraphInteger\" && className2 === \"FlowGraphInteger\";\r\n}\r\n\r\n/**\r\n * Check if an object has a numeric value.\r\n * @param a the object to check if it is a number.\r\n * @param validIfNaN whether to consider NaN as a valid number.\r\n * @returns whether a is a FlowGraphNumber (Integer or number).\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function isNumeric(a: FlowGraphMathOperationType, validIfNaN?: boolean): a is FlowGraphNumber {\r\n const isNumeric = typeof a === \"number\" || typeof (a as FlowGraphInteger)?.value === \"number\";\r\n if (isNumeric && !validIfNaN) {\r\n return !isNaN(getNumericValue(a as FlowGraphNumber));\r\n }\r\n return isNumeric;\r\n}\r\n\r\n/**\r\n * Get the numeric value of a FlowGraphNumber.\r\n * @param a the object to get the numeric value from.\r\n * @returns the numeric value.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function getNumericValue(a: FlowGraphNumber): number {\r\n return typeof a === \"number\" ? a : a.value;\r\n}\r\n"]}
|
|
@@ -289,6 +289,12 @@ export declare class BoundingBoxGizmo extends Gizmo implements IBoundingBoxGizmo
|
|
|
289
289
|
*/
|
|
290
290
|
constructor(color?: Color3, gizmoLayer?: UtilityLayerRenderer);
|
|
291
291
|
protected _getCornerMesh(gizmoLayer: UtilityLayerRenderer): Mesh;
|
|
292
|
+
/**
|
|
293
|
+
* returns true if the combination of non uniform scaling and rotation of the attached mesh is not supported
|
|
294
|
+
* In that case, the matrix is skewed and the bounding box gizmo will not work correctly
|
|
295
|
+
* @returns True if the combination is not supported, otherwise false.
|
|
296
|
+
*/
|
|
297
|
+
protected _hasInvalidNonUniformScaling(): boolean;
|
|
292
298
|
protected _attachedNodeChanged(value: Nullable<AbstractMesh>): void;
|
|
293
299
|
protected _selectNode(selectedMesh: Nullable<Mesh>): void;
|
|
294
300
|
protected _unhoverMeshOnTouchUp(pointerInfo: Nullable<PointerInfo>, selectedMesh: AbstractMesh): void;
|
|
@@ -545,8 +545,23 @@ export class BoundingBoxGizmo extends Gizmo {
|
|
|
545
545
|
}
|
|
546
546
|
return this._cornerMesh.clone();
|
|
547
547
|
}
|
|
548
|
+
/**
|
|
549
|
+
* returns true if the combination of non uniform scaling and rotation of the attached mesh is not supported
|
|
550
|
+
* In that case, the matrix is skewed and the bounding box gizmo will not work correctly
|
|
551
|
+
* @returns True if the combination is not supported, otherwise false.
|
|
552
|
+
*/
|
|
553
|
+
_hasInvalidNonUniformScaling() {
|
|
554
|
+
return (this._attachedMesh?.parent instanceof TransformNode &&
|
|
555
|
+
this._attachedMesh?.parent.absoluteScaling.isNonUniformWithinEpsilon(0.001) &&
|
|
556
|
+
((this._attachedMesh?.rotationQuaternion && !this._attachedMesh?.rotationQuaternion.equalsWithEpsilon(Quaternion.Identity(), Epsilon)) ||
|
|
557
|
+
this._attachedMesh?.rotation.equalsWithEpsilon(Vector3.Zero(), Epsilon) === false));
|
|
558
|
+
}
|
|
548
559
|
_attachedNodeChanged(value) {
|
|
549
560
|
if (value) {
|
|
561
|
+
if (this._hasInvalidNonUniformScaling()) {
|
|
562
|
+
Logger.Warn("BoundingBoxGizmo controls are not supported on meshes with non-uniform scaling and rotation");
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
550
565
|
// Reset anchor mesh to match attached mesh's scale
|
|
551
566
|
// This is needed to avoid invalid box/anchor position on first drag
|
|
552
567
|
this._anchorMesh.scaling.setAll(1);
|
|
@@ -589,7 +604,7 @@ export class BoundingBoxGizmo extends Gizmo {
|
|
|
589
604
|
* Updates the bounding box information for the Gizmo
|
|
590
605
|
*/
|
|
591
606
|
updateBoundingBox() {
|
|
592
|
-
if (this.attachedMesh) {
|
|
607
|
+
if (this.attachedMesh && !this._hasInvalidNonUniformScaling()) {
|
|
593
608
|
PivotTools._RemoveAndStorePivotPoint(this.attachedMesh);
|
|
594
609
|
// Store original parent
|
|
595
610
|
const originalParent = this.attachedMesh.parent;
|