@babylonjs/loaders 7.51.2 → 7.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.js +39 -0
- package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.js +1 -0
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.js.map +1 -1
- package/glTF/2.0/glTFLoader.js +2 -1
- package/glTF/2.0/glTFLoader.js.map +1 -1
- package/package.json +3 -3
@@ -397,6 +397,45 @@ const gltfToFlowGraphMapping = {
|
|
397
397
|
"math/determinant": getSimpleInputMapping("FlowGraphDeterminantBlock" /* FlowGraphBlockNames.Determinant */),
|
398
398
|
"math/inverse": getSimpleInputMapping("FlowGraphInvertMatrixBlock" /* FlowGraphBlockNames.InvertMatrix */),
|
399
399
|
"math/matmul": getSimpleInputMapping("FlowGraphMatrixMultiplicationBlock" /* FlowGraphBlockNames.MatrixMultiplication */, ["a", "b"]),
|
400
|
+
"math/matCompose": {
|
401
|
+
blocks: ["FlowGraphMatrixCompose" /* FlowGraphBlockNames.MatrixCompose */],
|
402
|
+
inputs: {
|
403
|
+
values: {
|
404
|
+
translation: { name: "position", gltfType: "float3" },
|
405
|
+
rotation: { name: "rotationQuaternion", gltfType: "float4" },
|
406
|
+
scale: { name: "scaling", gltfType: "float3" },
|
407
|
+
},
|
408
|
+
},
|
409
|
+
outputs: {
|
410
|
+
values: {
|
411
|
+
value: { name: "value" },
|
412
|
+
},
|
413
|
+
},
|
414
|
+
extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects, context) {
|
415
|
+
// configure it to work the way glTF specifies
|
416
|
+
const d = serializedObjects[0].dataInputs.find((input) => input.name === "rotationQuaternion");
|
417
|
+
if (!d) {
|
418
|
+
throw new Error("Rotation quaternion input not found");
|
419
|
+
}
|
420
|
+
context._connectionValues[d.uniqueId].type = "Quaternion" /* FlowGraphTypes.Quaternion */;
|
421
|
+
return serializedObjects;
|
422
|
+
},
|
423
|
+
},
|
424
|
+
"math/matDecompose": {
|
425
|
+
blocks: ["FlowGraphMatrixDecompose" /* FlowGraphBlockNames.MatrixDecompose */],
|
426
|
+
inputs: {
|
427
|
+
values: {
|
428
|
+
a: { name: "input", gltfType: "number" },
|
429
|
+
},
|
430
|
+
},
|
431
|
+
outputs: {
|
432
|
+
values: {
|
433
|
+
translation: { name: "position" },
|
434
|
+
rotation: { name: "rotationQuaternion" },
|
435
|
+
scale: { name: "scaling" },
|
436
|
+
},
|
437
|
+
},
|
438
|
+
},
|
400
439
|
"math/combine2x2": {
|
401
440
|
blocks: ["FlowGraphCombineMatrix2DBlock" /* FlowGraphBlockNames.CombineMatrix2D */],
|
402
441
|
inputs: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"declarationMapper.js","sourceRoot":"","sources":["../../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,uCAAyB;AAI1C,OAAO,EAAkB,+BAA+B,EAAE,wDAA0C;AA+JpG,MAAM,UAAU,8BAA8B,CAAC,iBAAyB;IACpE,MAAM,CAAC,EAAE,EAAE,SAAS,CAAC,GAAG,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrD,OAAO,wBAAwB,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,WAA0C,EAAE,2BAAoC,IAAI;IACzH,MAAM,OAAO,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,gCAAgC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IAC3J,IAA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,IAAI,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC;oBACd,iBAAiB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,aAAa,CAAC;gBAChF,CAAC;YACL,CAAC;YACD,OAAO,iBAAiB,CAAC;QAC7B,CAAC;KACJ,CAAC;AACN,CAAC;AAED,MAAM,UAAU,8BAA8B;IAC1C,OAAO,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2KG","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport type { IKHRInteractivity_Declaration, IKHRInteractivity_Graph, IKHRInteractivity_Node } from \"babylonjs-gltf2interface\";\nimport { FlowGraphBlockNames } from \"core/FlowGraph/Blocks/flowGraphBlockNames\";\nimport { Logger } from \"core/Misc/logger\";\nimport type { ISerializedFlowGraphBlock, ISerializedFlowGraphContext } from \"core/FlowGraph/typeDefinitions\";\nimport type { InteractivityEvent, InteractivityGraphToFlowGraphParser } from \"./interactivityGraphParser\";\nimport type { IGLTF } from \"../../glTFLoaderInterfaces\";\nimport { FlowGraphTypes, getAnimationTypeByFlowGraphType } from \"core/FlowGraph/flowGraphRichTypes\";\n\ninterface IGLTFToFlowGraphMappingObject<I = any, O = any> {\n /**\n * The name of the property in the FlowGraph block.\n */\n name: string;\n /**\n * The type of the property in the glTF specs.\n * If not provided will be inferred.\n */\n gltfType?: string;\n /**\n * The type of the property in the FlowGraph block.\n * If not defined it equals the glTF type.\n */\n flowGraphType?: string;\n /**\n * A function that transforms the data from the glTF to the FlowGraph block.\n */\n dataTransformer?: (data: I[], parser: InteractivityGraphToFlowGraphParser) => O[];\n /**\n * If the property is in the options passed to the constructor of the block.\n */\n inOptions?: boolean;\n\n /**\n * If the property is a pointer to a value.\n * This will add an extra JsonPointerParser block to the graph.\n */\n isPointer?: boolean;\n\n /**\n * If the property is an index to a value.\n * if defined this will be the name of the array to find the object in.\n */\n isVariable?: boolean;\n\n /**\n * the name of the class type this value will be mapped to.\n * This is used if we generate more than one block for a single glTF node.\n * Defaults to the first block in the mapping.\n */\n toBlock?: FlowGraphBlockNames;\n\n /**\n * Used in configuration values. If defined, this will be the default value, if no value is provided.\n */\n defaultValue?: O;\n}\n\nexport interface IGLTFToFlowGraphMapping {\n /**\n * The type of the FlowGraph block(s).\n * Typically will be a single element in an array.\n * When adding blocks defined in this module use the KHR_interactivity prefix.\n */\n blocks: (FlowGraphBlockNames | string)[];\n /**\n * The inputs of the glTF node mapped to the FlowGraph block.\n */\n inputs?: {\n /**\n * The value inputs of the glTF node mapped to the FlowGraph block.\n */\n values?: { [originName: string]: IGLTFToFlowGraphMappingObject };\n /**\n * The flow inputs of the glTF node mapped to the FlowGraph block.\n */\n flows?: { [originName: string]: IGLTFToFlowGraphMappingObject };\n };\n /**\n * The outputs of the glTF node mapped to the FlowGraph block.\n */\n outputs?: {\n /**\n * The value outputs of the glTF node mapped to the FlowGraph block.\n */\n values?: { [originName: string]: IGLTFToFlowGraphMappingObject };\n /**\n * The flow outputs of the glTF node mapped to the FlowGraph block.\n */\n flows?: { [originName: string]: IGLTFToFlowGraphMappingObject };\n };\n /**\n * The configuration of the glTF node mapped to the FlowGraph block.\n * This information is usually passed to the constructor of the block.\n */\n configuration?: { [originName: string]: IGLTFToFlowGraphMappingObject };\n\n /**\n * If we generate more than one block for a single glTF node, this mapping will be used to map\n * between the flowGraph classes.\n */\n typeToTypeMapping?: { [originName: string]: IGLTFToFlowGraphMappingObject };\n\n /**\n * The connections between two or more blocks.\n * This is used to connect the blocks in the graph\n */\n interBlockConnectors?: {\n /**\n * The name of the input connection in the first block.\n */\n input: string;\n /**\n * The name of the output connection in the second block.\n */\n output: string;\n\n /**\n * The index of the block in the array of blocks that corresponds to the input.\n */\n inputBlockIndex: number;\n /**\n * The index of the block in the array of blocks that corresponds to the output.\n */\n outputBlockIndex: number;\n /**\n * If the connection is a variable connection or a flow connection.\n */\n isVariable?: boolean;\n }[];\n\n /**\n * This optional function will allow to validate the node, according to the glTF specs.\n * For example, if a node has a configuration object, it must be present and correct.\n * This is a basic node-based validation.\n * This function is expected to return false and log the error if the node is not valid.\n * Note that this function can also modify the node, if needed.\n *\n * @param gltfBlock the glTF node to validate\n * @param glTFObject the glTF object\n * @returns true if validated, false if not.\n */\n validation?: (gltfBlock: IKHRInteractivity_Node, interactivityGraph: IKHRInteractivity_Graph, glTFObject?: IGLTF) => boolean;\n\n /**\n * This is used if we need extra information for the constructor/options that is not provided directly by the glTF node.\n * This function can return more than one node, if extra nodes are needed for this block to function correctly.\n * Returning more than one block will usually happen when a json pointer was provided.\n *\n * @param gltfBlock the glTF node\n * @param mapping the mapping object\n * @param arrays the arrays of the interactivity object\n * @param serializedObjects the serialized object\n * @returns an array of serialized nodes that will be added to the graph.\n */\n extraProcessor?: (\n gltfBlock: IKHRInteractivity_Node,\n declaration: IKHRInteractivity_Declaration,\n mapping: IGLTFToFlowGraphMapping,\n parser: InteractivityGraphToFlowGraphParser,\n serializedObjects: ISerializedFlowGraphBlock[],\n context: ISerializedFlowGraphContext,\n globalGLTF?: IGLTF\n ) => ISerializedFlowGraphBlock[];\n}\n\nexport function getMappingForFullOperationName(fullOperationName: string) {\n const [op, extension] = fullOperationName.split(\":\");\n return getMappingForDeclaration({ op, extension });\n}\n\nexport function getMappingForDeclaration(declaration: IKHRInteractivity_Declaration, returnNoOpIfNotAvailable: boolean = true): IGLTFToFlowGraphMapping | undefined {\n const mapping = declaration.extension ? gltfExtensionsToFlowGraphMapping[declaration.extension]?.[declaration.op] : gltfToFlowGraphMapping[declaration.op];\n if (!mapping) {\n Logger.Warn(`No mapping found for operation ${declaration.op} and extension ${declaration.extension || \"KHR_interactivity\"}`);\n if (returnNoOpIfNotAvailable) {\n const inputs: IGLTFToFlowGraphMapping[\"inputs\"] = {};\n const outputs: IGLTFToFlowGraphMapping[\"outputs\"] = {\n flows: {},\n };\n if (declaration.inputValueSockets) {\n inputs.values = {};\n for (const key in declaration.inputValueSockets) {\n inputs.values[key] = {\n name: key,\n };\n }\n }\n if (declaration.outputValueSockets) {\n outputs.values = {};\n Object.keys(declaration.outputValueSockets).forEach((key) => {\n outputs.values![key] = {\n name: key,\n };\n });\n }\n return {\n blocks: [], // no blocks, just mapping\n inputs,\n outputs,\n };\n }\n }\n return mapping;\n}\n\n/**\n * This function will add new mapping to glTF interactivity.\n * Other extensions can define new types of blocks, this is the way to let interactivity know how to parse them.\n * @param key the type of node, i.e. \"variable/get\"\n * @param extension the extension of the interactivity operation, i.e. \"KHR_selectability\"\n * @param mapping The mapping object. See documentation or examples below.\n */\nexport function addNewInteractivityFlowGraphMapping(key: string, extension: string, mapping: IGLTFToFlowGraphMapping) {\n gltfExtensionsToFlowGraphMapping[extension] ||= {};\n gltfExtensionsToFlowGraphMapping[extension][key] = mapping;\n}\n\nconst gltfExtensionsToFlowGraphMapping: { [extension: string]: { [key: string]: IGLTFToFlowGraphMapping } } = {\n /**\n * This is the BABYLON extension for glTF interactivity.\n * It defines babylon-specific blocks and operations.\n */\n BABYLON: {\n /**\n * flow/log is a flow node that logs input to the console.\n * It has \"in\" and \"out\" flows, and takes a message as input.\n * The message can be any type of value.\n * The message is logged to the console when the \"in\" flow is triggered.\n * The \"out\" flow is triggered when the message is logged.\n */\n \"flow/log\": {\n blocks: [FlowGraphBlockNames.ConsoleLog],\n inputs: {\n values: {\n message: { name: \"message\" },\n },\n },\n },\n },\n};\n\n// this mapper is just a way to convert the glTF nodes to FlowGraph nodes in terms of input/output connection names and values.\nconst gltfToFlowGraphMapping: { [key: string]: IGLTFToFlowGraphMapping } = {\n \"event/onStart\": {\n blocks: [FlowGraphBlockNames.SceneReadyEvent],\n outputs: {\n flows: {\n out: { name: \"done\" },\n },\n },\n },\n \"event/onTick\": {\n blocks: [FlowGraphBlockNames.SceneTickEvent],\n inputs: {},\n outputs: {\n values: {\n timeSinceLastTick: { name: \"deltaTime\", gltfType: \"number\" /*, dataTransformer: (time: number) => time / 1000*/ },\n },\n flows: {\n out: { name: \"done\" },\n },\n },\n },\n \"event/send\": {\n blocks: [FlowGraphBlockNames.SendCustomEvent],\n outputs: {\n flows: {\n out: { name: \"done\" },\n },\n },\n extraProcessor(gltfBlock, declaration, _mapping, parser, serializedObjects) {\n // set eventId and eventData. The configuration object of the glTF should have a single object.\n // validate that we are running it on the right block.\n if (declaration.op !== \"event/send\" || !gltfBlock.configuration || Object.keys(gltfBlock.configuration).length !== 1) {\n throw new Error(\"Receive event should have a single configuration object, the event itself\");\n }\n const eventConfiguration = gltfBlock.configuration[\"event\"];\n const eventId = eventConfiguration.value[0];\n if (typeof eventId !== \"number\") {\n throw new Error(\"Event id should be a number\");\n }\n const event: InteractivityEvent = parser.arrays.events[eventId];\n const serializedObject = serializedObjects[0];\n serializedObject.config ||= {};\n serializedObject.config.eventId = event.eventId;\n serializedObject.config.eventData = event.eventData;\n return serializedObjects;\n },\n },\n \"event/receive\": {\n blocks: [FlowGraphBlockNames.ReceiveCustomEvent],\n outputs: {\n flows: {\n out: { name: \"done\" },\n },\n },\n validation(gltfBlock, interactivityGraph) {\n if (!gltfBlock.configuration) {\n Logger.Error(\"Receive event should have a configuration object\");\n return false;\n }\n const eventConfiguration = gltfBlock.configuration[\"event\"];\n if (!eventConfiguration) {\n Logger.Error(\"Receive event should have a single configuration object, the event itself\");\n return false;\n }\n const eventId = eventConfiguration.value[0];\n if (typeof eventId !== \"number\") {\n Logger.Error(\"Event id should be a number\");\n return false;\n }\n const event = interactivityGraph.events?.[eventId];\n if (!event) {\n Logger.Error(`Event with id ${eventId} not found`);\n return false;\n }\n return true;\n },\n extraProcessor(gltfBlock, declaration, _mapping, parser, serializedObjects) {\n // set eventId and eventData. The configuration object of the glTF should have a single object.\n // validate that we are running it on the right block.\n if (declaration.op !== \"event/receive\" || !gltfBlock.configuration || Object.keys(gltfBlock.configuration).length !== 1) {\n throw new Error(\"Receive event should have a single configuration object, the event itself\");\n }\n const eventConfiguration = gltfBlock.configuration[\"event\"];\n const eventId = eventConfiguration.value[0];\n if (typeof eventId !== \"number\") {\n throw new Error(\"Event id should be a number\");\n }\n const event: InteractivityEvent = parser.arrays.events[eventId];\n const serializedObject = serializedObjects[0];\n serializedObject.config ||= {};\n serializedObject.config.eventId = event.eventId;\n serializedObject.config.eventData = event.eventData;\n return serializedObjects;\n },\n },\n \"math/e\": getSimpleInputMapping(FlowGraphBlockNames.E),\n \"math/pi\": getSimpleInputMapping(FlowGraphBlockNames.PI),\n \"math/inf\": getSimpleInputMapping(FlowGraphBlockNames.Inf),\n \"math/nan\": getSimpleInputMapping(FlowGraphBlockNames.NaN),\n \"math/abs\": getSimpleInputMapping(FlowGraphBlockNames.Abs),\n \"math/sign\": getSimpleInputMapping(FlowGraphBlockNames.Sign),\n \"math/trunc\": getSimpleInputMapping(FlowGraphBlockNames.Trunc),\n \"math/floor\": getSimpleInputMapping(FlowGraphBlockNames.Floor),\n \"math/ceil\": getSimpleInputMapping(FlowGraphBlockNames.Ceil),\n \"math/round\": {\n blocks: [FlowGraphBlockNames.Round],\n configuration: {},\n inputs: {\n values: {\n a: { name: \"a\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(gltfBlock, declaration, _mapping, parser, serializedObjects) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n serializedObjects[0].config.roundHalfAwayFromZero = true;\n return serializedObjects;\n },\n },\n \"math/fract\": getSimpleInputMapping(FlowGraphBlockNames.Fraction),\n \"math/neg\": getSimpleInputMapping(FlowGraphBlockNames.Negation),\n \"math/add\": getSimpleInputMapping(FlowGraphBlockNames.Add, [\"a\", \"b\"], true),\n \"math/sub\": getSimpleInputMapping(FlowGraphBlockNames.Subtract, [\"a\", \"b\"], true),\n \"math/mul\": {\n blocks: [FlowGraphBlockNames.Multiply],\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n serializedObjects[0].config.useMatrixPerComponent = true;\n // try to infer the type or fallback to Integer\n // check the gltf block for the inputs, see if they have a type\n let type = -1;\n Object.keys(_gltfBlock.values || {}).find((value) => {\n if (_gltfBlock.values?.[value].type !== undefined) {\n type = _gltfBlock.values[value].type;\n return true;\n }\n return false;\n });\n if (type !== -1) {\n serializedObjects[0].config.type = _parser.arrays.types[type].flowGraphType;\n }\n return serializedObjects;\n },\n },\n \"math/div\": getSimpleInputMapping(FlowGraphBlockNames.Divide, [\"a\", \"b\"], true),\n \"math/rem\": getSimpleInputMapping(FlowGraphBlockNames.Modulo, [\"a\", \"b\"]),\n \"math/min\": getSimpleInputMapping(FlowGraphBlockNames.Min, [\"a\", \"b\"]),\n \"math/max\": getSimpleInputMapping(FlowGraphBlockNames.Max, [\"a\", \"b\"]),\n \"math/clamp\": getSimpleInputMapping(FlowGraphBlockNames.Clamp, [\"a\", \"b\", \"c\"]),\n \"math/saturate\": getSimpleInputMapping(FlowGraphBlockNames.Saturate),\n \"math/mix\": getSimpleInputMapping(FlowGraphBlockNames.MathInterpolation, [\"a\", \"b\", \"c\"]),\n \"math/eq\": getSimpleInputMapping(FlowGraphBlockNames.Equality, [\"a\", \"b\"]),\n \"math/lt\": getSimpleInputMapping(FlowGraphBlockNames.LessThan, [\"a\", \"b\"]),\n \"math/le\": getSimpleInputMapping(FlowGraphBlockNames.LessThanOrEqual, [\"a\", \"b\"]),\n \"math/gt\": getSimpleInputMapping(FlowGraphBlockNames.GreaterThan, [\"a\", \"b\"]),\n \"math/ge\": getSimpleInputMapping(FlowGraphBlockNames.GreaterThanOrEqual, [\"a\", \"b\"]),\n \"math/isnan\": getSimpleInputMapping(FlowGraphBlockNames.IsNaN),\n \"math/isinf\": getSimpleInputMapping(FlowGraphBlockNames.IsInfinity),\n \"math/select\": {\n blocks: [FlowGraphBlockNames.Conditional],\n inputs: {\n values: {\n condition: { name: \"condition\" },\n // Should we validate those have the same type here, or assume it is already validated?\n a: { name: \"onTrue\" },\n b: { name: \"onFalse\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"output\" },\n },\n },\n },\n \"math/random\": {\n blocks: [FlowGraphBlockNames.Random],\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n },\n \"math/sin\": getSimpleInputMapping(FlowGraphBlockNames.Sin),\n \"math/cos\": getSimpleInputMapping(FlowGraphBlockNames.Cos),\n \"math/tan\": getSimpleInputMapping(FlowGraphBlockNames.Tan),\n \"math/asin\": getSimpleInputMapping(FlowGraphBlockNames.Asin),\n \"math/acos\": getSimpleInputMapping(FlowGraphBlockNames.Acos),\n \"math/atan\": getSimpleInputMapping(FlowGraphBlockNames.Atan),\n \"math/atan2\": getSimpleInputMapping(FlowGraphBlockNames.Atan2, [\"a\", \"b\"]),\n \"math/sinh\": getSimpleInputMapping(FlowGraphBlockNames.Sinh),\n \"math/cosh\": getSimpleInputMapping(FlowGraphBlockNames.Cosh),\n \"math/tanh\": getSimpleInputMapping(FlowGraphBlockNames.Tanh),\n \"math/asinh\": getSimpleInputMapping(FlowGraphBlockNames.Asinh),\n \"math/acosh\": getSimpleInputMapping(FlowGraphBlockNames.Acosh),\n \"math/atanh\": getSimpleInputMapping(FlowGraphBlockNames.Atanh),\n \"math/exp\": getSimpleInputMapping(FlowGraphBlockNames.Exponential),\n \"math/log\": getSimpleInputMapping(FlowGraphBlockNames.Log),\n \"math/log2\": getSimpleInputMapping(FlowGraphBlockNames.Log2),\n \"math/log10\": getSimpleInputMapping(FlowGraphBlockNames.Log10),\n \"math/sqrt\": getSimpleInputMapping(FlowGraphBlockNames.SquareRoot),\n \"math/cbrt\": getSimpleInputMapping(FlowGraphBlockNames.CubeRoot),\n \"math/pow\": getSimpleInputMapping(FlowGraphBlockNames.Power, [\"a\", \"b\"]),\n \"math/length\": getSimpleInputMapping(FlowGraphBlockNames.Length),\n \"math/normalize\": getSimpleInputMapping(FlowGraphBlockNames.Normalize),\n \"math/dot\": getSimpleInputMapping(FlowGraphBlockNames.Dot, [\"a\", \"b\"]),\n \"math/cross\": getSimpleInputMapping(FlowGraphBlockNames.Cross, [\"a\", \"b\"]),\n \"math/rotate2d\": getSimpleInputMapping(FlowGraphBlockNames.Rotate2D, [\"a\", \"b\"]),\n \"math/rotate3d\": getSimpleInputMapping(FlowGraphBlockNames.Rotate3D, [\"a\", \"b\", \"c\"]),\n \"math/transform\": {\n // glTF transform is vectorN with matrixN\n blocks: [FlowGraphBlockNames.TransformVector],\n inputs: {\n values: {\n a: { name: \"a\" },\n b: { name: \"b\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n },\n \"math/combine2\": {\n blocks: [FlowGraphBlockNames.CombineVector2],\n inputs: {\n values: {\n a: { name: \"input_0\", gltfType: \"number\" },\n b: { name: \"input_1\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n },\n \"math/combine3\": {\n blocks: [FlowGraphBlockNames.CombineVector3],\n inputs: {\n values: {\n a: { name: \"input_0\", gltfType: \"number\" },\n b: { name: \"input_1\", gltfType: \"number\" },\n c: { name: \"input_2\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n },\n \"math/combine4\": {\n blocks: [FlowGraphBlockNames.CombineVector4],\n inputs: {\n values: {\n a: { name: \"input_0\", gltfType: \"number\" },\n b: { name: \"input_1\", gltfType: \"number\" },\n c: { name: \"input_2\", gltfType: \"number\" },\n d: { name: \"input_3\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n },\n // one input, N outputs! outputs named using numbers.\n \"math/extract2\": {\n blocks: [FlowGraphBlockNames.ExtractVector2],\n inputs: {\n values: {\n a: { name: \"input\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n \"0\": { name: \"output_0\" },\n \"1\": { name: \"output_1\" },\n },\n },\n },\n \"math/extract3\": {\n blocks: [FlowGraphBlockNames.ExtractVector3],\n inputs: {\n values: {\n a: { name: \"input\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n \"0\": { name: \"output_0\" },\n \"1\": { name: \"output_1\" },\n \"2\": { name: \"output_2\" },\n },\n },\n },\n \"math/extract4\": {\n blocks: [FlowGraphBlockNames.ExtractVector4],\n inputs: {\n values: {\n a: { name: \"input\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n \"0\": { name: \"output_0\" },\n \"1\": { name: \"output_1\" },\n \"2\": { name: \"output_2\" },\n \"3\": { name: \"output_3\" },\n },\n },\n },\n \"math/transpose\": getSimpleInputMapping(FlowGraphBlockNames.Transpose),\n \"math/determinant\": getSimpleInputMapping(FlowGraphBlockNames.Determinant),\n \"math/inverse\": getSimpleInputMapping(FlowGraphBlockNames.InvertMatrix),\n \"math/matmul\": getSimpleInputMapping(FlowGraphBlockNames.MatrixMultiplication, [\"a\", \"b\"]),\n \"math/combine2x2\": {\n blocks: [FlowGraphBlockNames.CombineMatrix2D],\n inputs: {\n values: {\n a: { name: \"input_0\", gltfType: \"number\" },\n b: { name: \"input_1\", gltfType: \"number\" },\n c: { name: \"input_2\", gltfType: \"number\" },\n d: { name: \"input_3\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n serializedObjects[0].config.inputIsColumnMajor = true;\n return serializedObjects;\n },\n },\n \"math/extract2x2\": {\n blocks: [FlowGraphBlockNames.ExtractMatrix2D],\n inputs: {\n values: {\n a: { name: \"input\", gltfType: \"float2x2\" },\n },\n },\n outputs: {\n values: {\n \"0\": { name: \"output_0\" },\n \"1\": { name: \"output_1\" },\n \"2\": { name: \"output_2\" },\n \"3\": { name: \"output_3\" },\n },\n },\n },\n \"math/combine3x3\": {\n blocks: [FlowGraphBlockNames.CombineMatrix3D],\n inputs: {\n values: {\n a: { name: \"input_0\", gltfType: \"number\" },\n b: { name: \"input_1\", gltfType: \"number\" },\n c: { name: \"input_2\", gltfType: \"number\" },\n d: { name: \"input_3\", gltfType: \"number\" },\n e: { name: \"input_4\", gltfType: \"number\" },\n f: { name: \"input_5\", gltfType: \"number\" },\n g: { name: \"input_6\", gltfType: \"number\" },\n h: { name: \"input_7\", gltfType: \"number\" },\n i: { name: \"input_8\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n serializedObjects[0].config.inputIsColumnMajor = true;\n return serializedObjects;\n },\n },\n \"math/extract3x3\": {\n blocks: [FlowGraphBlockNames.ExtractMatrix3D],\n inputs: {\n values: {\n a: { name: \"input\", gltfType: \"float3x3\" },\n },\n },\n outputs: {\n values: {\n \"0\": { name: \"output_0\" },\n \"1\": { name: \"output_1\" },\n \"2\": { name: \"output_2\" },\n \"3\": { name: \"output_3\" },\n \"4\": { name: \"output_4\" },\n \"5\": { name: \"output_5\" },\n \"6\": { name: \"output_6\" },\n \"7\": { name: \"output_7\" },\n \"8\": { name: \"output_8\" },\n },\n },\n },\n \"math/combine4x4\": {\n blocks: [FlowGraphBlockNames.CombineMatrix],\n inputs: {\n values: {\n a: { name: \"input_0\", gltfType: \"number\" },\n b: { name: \"input_1\", gltfType: \"number\" },\n c: { name: \"input_2\", gltfType: \"number\" },\n d: { name: \"input_3\", gltfType: \"number\" },\n e: { name: \"input_4\", gltfType: \"number\" },\n f: { name: \"input_5\", gltfType: \"number\" },\n g: { name: \"input_6\", gltfType: \"number\" },\n h: { name: \"input_7\", gltfType: \"number\" },\n i: { name: \"input_8\", gltfType: \"number\" },\n j: { name: \"input_9\", gltfType: \"number\" },\n k: { name: \"input_10\", gltfType: \"number\" },\n l: { name: \"input_11\", gltfType: \"number\" },\n m: { name: \"input_12\", gltfType: \"number\" },\n n: { name: \"input_13\", gltfType: \"number\" },\n o: { name: \"input_14\", gltfType: \"number\" },\n p: { name: \"input_15\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n serializedObjects[0].config.inputIsColumnMajor = true;\n return serializedObjects;\n },\n },\n \"math/extract4x4\": {\n blocks: [FlowGraphBlockNames.ExtractMatrix],\n configuration: {},\n inputs: {\n values: {\n a: { name: \"input\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n \"0\": { name: \"output_0\" },\n \"1\": { name: \"output_1\" },\n \"2\": { name: \"output_2\" },\n \"3\": { name: \"output_3\" },\n \"4\": { name: \"output_4\" },\n \"5\": { name: \"output_5\" },\n \"6\": { name: \"output_6\" },\n \"7\": { name: \"output_7\" },\n \"8\": { name: \"output_8\" },\n \"9\": { name: \"output_9\" },\n \"10\": { name: \"output_10\" },\n \"11\": { name: \"output_11\" },\n \"12\": { name: \"output_12\" },\n \"13\": { name: \"output_13\" },\n \"14\": { name: \"output_14\" },\n \"15\": { name: \"output_15\" },\n },\n },\n },\n \"math/compose\": {\n blocks: [FlowGraphBlockNames.MatrixCompose],\n configuration: {},\n inputs: {\n values: {\n translation: { name: \"position\", gltfType: \"float3\" },\n rotation: { name: \"rotationQuaternion\", gltfType: \"float4\" },\n scale: { name: \"scaling\", gltfType: \"float3\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"output\" },\n },\n },\n },\n \"math/decompose\": {\n blocks: [FlowGraphBlockNames.MatrixDecompose],\n configuration: {},\n inputs: {\n values: {\n a: { name: \"input\" },\n },\n },\n outputs: {\n values: {\n translation: { name: \"position\" },\n rotation: { name: \"rotationQuaternion\" },\n scale: { name: \"scaling\" },\n },\n },\n },\n \"math/not\": {\n blocks: [FlowGraphBlockNames.BitwiseNot],\n inputs: {\n values: {\n a: { name: \"a\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects, context) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n // try to infer the type or fallback to Integer\n const socketIn = serializedObjects[0].dataInputs[0];\n serializedObjects[0].config.valueType = context._connectionValues[socketIn.uniqueId]?.type ?? FlowGraphTypes.Integer;\n return serializedObjects;\n },\n },\n \"math/and\": {\n blocks: [FlowGraphBlockNames.BitwiseAnd],\n inputs: {\n values: {\n a: { name: \"a\" },\n b: { name: \"b\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects, context) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n // try to infer the type or fallback to Integer\n const socketInA = serializedObjects[0].dataInputs[0];\n const socketInB = serializedObjects[0].dataInputs[1];\n serializedObjects[0].config.valueType =\n context._connectionValues[socketInA.uniqueId]?.type ?? context._connectionValues[socketInB.uniqueId]?.type ?? FlowGraphTypes.Integer;\n return serializedObjects;\n },\n },\n \"math/or\": {\n blocks: [FlowGraphBlockNames.BitwiseOr],\n inputs: {\n values: {\n a: { name: \"a\" },\n b: { name: \"b\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects, context) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n // try to infer the type or fallback to Integer\n const socketInA = serializedObjects[0].dataInputs[0];\n const socketInB = serializedObjects[0].dataInputs[1];\n serializedObjects[0].config.valueType =\n context._connectionValues[socketInA.uniqueId]?.type ?? context._connectionValues[socketInB.uniqueId]?.type ?? FlowGraphTypes.Integer;\n return serializedObjects;\n },\n },\n \"math/xor\": {\n blocks: [FlowGraphBlockNames.BitwiseXor],\n inputs: {\n values: {\n a: { name: \"a\" },\n b: { name: \"b\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects, context) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n // try to infer the type or fallback to Integer\n const socketInA = serializedObjects[0].dataInputs[0];\n const socketInB = serializedObjects[0].dataInputs[1];\n serializedObjects[0].config.valueType =\n context._connectionValues[socketInA.uniqueId]?.type ?? context._connectionValues[socketInB.uniqueId]?.type ?? FlowGraphTypes.Integer;\n return serializedObjects;\n },\n },\n \"math/asr\": getSimpleInputMapping(FlowGraphBlockNames.BitwiseRightShift, [\"a\", \"b\"]),\n \"math/lsl\": getSimpleInputMapping(FlowGraphBlockNames.BitwiseLeftShift, [\"a\", \"b\"]),\n \"math/clz\": getSimpleInputMapping(FlowGraphBlockNames.LeadingZeros),\n \"math/ctz\": getSimpleInputMapping(FlowGraphBlockNames.TrailingZeros),\n \"math/popcnt\": getSimpleInputMapping(FlowGraphBlockNames.OneBitsCounter),\n \"math/rad\": getSimpleInputMapping(FlowGraphBlockNames.DegToRad),\n \"math/deg\": getSimpleInputMapping(FlowGraphBlockNames.RadToDeg),\n \"type/boolToInt\": getSimpleInputMapping(FlowGraphBlockNames.BooleanToInt),\n \"type/boolToFloat\": getSimpleInputMapping(FlowGraphBlockNames.BooleanToFloat),\n \"type/intToBool\": getSimpleInputMapping(FlowGraphBlockNames.IntToBoolean),\n \"type/intToFloat\": getSimpleInputMapping(FlowGraphBlockNames.IntToFloat),\n \"type/floatToInt\": getSimpleInputMapping(FlowGraphBlockNames.FloatToInt),\n \"type/floatToBool\": getSimpleInputMapping(FlowGraphBlockNames.FloatToBoolean),\n\n // flows\n \"flow/sequence\": {\n blocks: [FlowGraphBlockNames.Sequence],\n extraProcessor(gltfBlock, _declaration, _mapping, _arrays, serializedObjects) {\n const serializedObject = serializedObjects[0];\n serializedObject.config ||= {};\n serializedObject.config.outputSignalCount = Object.keys(gltfBlock.flows || []).length;\n serializedObject.signalOutputs.forEach((output, index) => {\n output.name = \"out_\" + index;\n });\n return serializedObjects;\n },\n },\n \"flow/branch\": {\n blocks: [FlowGraphBlockNames.Branch],\n outputs: {\n flows: {\n true: { name: \"onTrue\" },\n false: { name: \"onFalse\" },\n },\n },\n },\n \"flow/switch\": {\n blocks: [FlowGraphBlockNames.Switch],\n configuration: {\n cases: { name: \"cases\", inOptions: true, defaultValue: [] },\n },\n inputs: {\n values: {\n selection: { name: \"case\" },\n },\n },\n validation(gltfBlock) {\n if (gltfBlock.configuration && gltfBlock.configuration.cases) {\n const cases = gltfBlock.configuration.cases.value;\n const onlyIntegers = cases.every((caseValue) => {\n // case value should be an integer. Since Number.isInteger(1.0) is true, we need to check if toString has only digits.\n return typeof caseValue === \"number\" && /^\\d+$/.test(caseValue.toString());\n });\n if (!onlyIntegers) {\n gltfBlock.configuration.cases.value = [] as number[];\n return true;\n }\n // check for duplicates\n const uniqueCases = new Set(cases);\n gltfBlock.configuration.cases.value = Array.from(uniqueCases) as number[];\n }\n return true;\n },\n extraProcessor(gltfBlock, declaration, _mapping, _arrays, serializedObjects) {\n // convert all names of output flow to out_$1 apart from \"default\"\n if (declaration.op !== \"flow/switch\" || !gltfBlock.flows || Object.keys(gltfBlock.flows).length === 0) {\n throw new Error(\"Switch should have a single configuration object, the cases array\");\n }\n const serializedObject = serializedObjects[0];\n serializedObject.signalOutputs.forEach((output) => {\n if (output.name !== \"default\") {\n output.name = \"out_\" + output.name;\n }\n });\n return serializedObjects;\n },\n },\n \"flow/while\": {\n blocks: [FlowGraphBlockNames.WhileLoop],\n outputs: {\n flows: {\n loopBody: { name: \"executionFlow\" },\n },\n },\n },\n \"flow/for\": {\n blocks: [FlowGraphBlockNames.ForLoop],\n configuration: {\n initialIndex: { name: \"initialIndex\", gltfType: \"number\", inOptions: true, defaultValue: 0 },\n },\n inputs: {\n values: {\n startIndex: { name: \"startIndex\", gltfType: \"number\" },\n endIndex: { name: \"endIndex\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n index: { name: \"index\" },\n },\n flows: {\n loopBody: { name: \"executionFlow\" },\n },\n },\n },\n \"flow/doN\": {\n blocks: [FlowGraphBlockNames.DoN],\n configuration: {},\n inputs: {\n values: {\n n: { name: \"maxExecutions\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n currentCount: { name: \"executionCount\" },\n },\n },\n },\n \"flow/multiGate\": {\n blocks: [FlowGraphBlockNames.MultiGate],\n configuration: {\n isRandom: { name: \"isRandom\", gltfType: \"boolean\", inOptions: true, defaultValue: false },\n isLoop: { name: \"isLoop\", gltfType: \"boolean\", inOptions: true, defaultValue: false },\n },\n extraProcessor(gltfBlock, declaration, _mapping, _arrays, serializedObjects) {\n if (declaration.op !== \"flow/multiGate\" || !gltfBlock.flows || Object.keys(gltfBlock.flows).length === 0) {\n throw new Error(\"MultiGate should have a single configuration object, the number of output flows\");\n }\n const serializedObject = serializedObjects[0];\n serializedObject.config ||= {};\n serializedObject.config.outputSignalCount = Object.keys(gltfBlock.flows).length;\n serializedObject.signalOutputs.forEach((output, index) => {\n output.name = \"out_\" + index;\n });\n return serializedObjects;\n },\n },\n \"flow/waitAll\": {\n blocks: [FlowGraphBlockNames.WaitAll],\n configuration: {\n inputFlows: { name: \"inputSignalCount\", gltfType: \"number\", inOptions: true, defaultValue: 0 },\n },\n inputs: {\n flows: {\n \"[segment]\": { name: \"in_$1\" },\n },\n },\n validation(gltfBlock) {\n // check that the configuration value is an integer\n if (typeof gltfBlock.configuration?.inputFlows?.value[0] !== \"number\") {\n gltfBlock.configuration = gltfBlock.configuration || {\n inputFlows: { value: [0] },\n };\n gltfBlock.configuration.inputFlows.value = [0];\n }\n return true;\n },\n },\n \"flow/throttle\": {\n blocks: [FlowGraphBlockNames.Throttle],\n outputs: {\n flows: {\n err: { name: \"error\" },\n },\n },\n },\n \"flow/setDelay\": {\n blocks: [FlowGraphBlockNames.SetDelay],\n outputs: {\n flows: {\n err: { name: \"error\" },\n },\n },\n },\n \"flow/cancelDelay\": {\n blocks: [FlowGraphBlockNames.CancelDelay],\n },\n \"variable/get\": {\n blocks: [FlowGraphBlockNames.GetVariable],\n validation(gltfBlock) {\n if (!gltfBlock.configuration?.variable?.value) {\n Logger.Error(\"Variable get block should have a variable configuration\");\n return false;\n }\n return true;\n },\n configuration: {\n variable: {\n name: \"variable\",\n gltfType: \"number\",\n flowGraphType: \"string\",\n inOptions: true,\n isVariable: true,\n dataTransformer(index, parser) {\n return [parser.getVariableName(index[0])];\n },\n },\n },\n },\n \"variable/set\": {\n blocks: [FlowGraphBlockNames.SetVariable],\n configuration: {\n variable: {\n name: \"variable\",\n gltfType: \"number\",\n flowGraphType: \"string\",\n inOptions: true,\n isVariable: true,\n dataTransformer(index, parser) {\n return [parser.getVariableName(index[0])];\n },\n },\n },\n },\n \"variable/interpolate\": {\n blocks: [\n FlowGraphBlockNames.ValueInterpolation,\n FlowGraphBlockNames.Context,\n FlowGraphBlockNames.PlayAnimation,\n FlowGraphBlockNames.BezierCurveEasing,\n FlowGraphBlockNames.GetVariable,\n ],\n configuration: {\n variable: {\n name: \"propertyName\",\n inOptions: true,\n isVariable: true,\n dataTransformer(index, parser) {\n return [parser.getVariableName(index[0])];\n },\n },\n useSlerp: {\n name: \"animationType\",\n inOptions: true,\n defaultValue: false,\n dataTransformer: (value) => {\n if (value[0] === true) {\n return [FlowGraphTypes.Quaternion];\n } else {\n return [undefined];\n }\n },\n },\n },\n inputs: {\n values: {\n value: { name: \"value_1\" },\n duration: { name: \"duration_1\", gltfType: \"number\" },\n p1: { name: \"controlPoint1\", toBlock: FlowGraphBlockNames.BezierCurveEasing },\n p2: { name: \"controlPoint2\", toBlock: FlowGraphBlockNames.BezierCurveEasing },\n },\n flows: {\n in: { name: \"in\", toBlock: FlowGraphBlockNames.PlayAnimation },\n },\n },\n outputs: {\n flows: {\n err: { name: \"error\", toBlock: FlowGraphBlockNames.PlayAnimation },\n out: { name: \"out\", toBlock: FlowGraphBlockNames.PlayAnimation },\n done: { name: \"done\", toBlock: FlowGraphBlockNames.PlayAnimation },\n },\n },\n interBlockConnectors: [\n {\n input: \"object\",\n output: \"userVariables\",\n inputBlockIndex: 2,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"animation\",\n output: \"animation\",\n inputBlockIndex: 2,\n outputBlockIndex: 0,\n isVariable: true,\n },\n {\n input: \"easingFunction\",\n output: \"easingFunction\",\n inputBlockIndex: 0,\n outputBlockIndex: 3,\n isVariable: true,\n },\n {\n input: \"value_0\",\n output: \"value\",\n inputBlockIndex: 0,\n outputBlockIndex: 4,\n isVariable: true,\n },\n ],\n extraProcessor(gltfBlock, _declaration, _mapping, parser, serializedObjects) {\n // is useSlerp is used, animationType should be set to be quaternion!\n const serializedValueInterpolation = serializedObjects[0];\n const propertyIndex = gltfBlock.configuration?.variable.value[0];\n if (typeof propertyIndex !== \"number\") {\n Logger.Error(\"Variable index is not defined for variable interpolation block\");\n throw new Error(\"Variable index is not defined for variable interpolation block\");\n }\n const variable = parser.arrays.staticVariables[propertyIndex];\n // if not set by useSlerp\n if (typeof serializedValueInterpolation.config.animationType.value === \"undefined\") {\n // get the value type\n parser.arrays.staticVariables;\n serializedValueInterpolation.config.animationType.value = getAnimationTypeByFlowGraphType(variable.type);\n }\n\n // variable/get configuration\n const serializedGetVariable = serializedObjects[4];\n serializedGetVariable.config ||= {};\n serializedGetVariable.config.variable ||= {};\n serializedGetVariable.config.variable.value = parser.getVariableName(propertyIndex);\n\n // get the control points from the easing block\n serializedObjects[3].config ||= {};\n\n return serializedObjects;\n },\n },\n \"pointer/get\": {\n blocks: [FlowGraphBlockNames.GetProperty, FlowGraphBlockNames.JsonPointerParser],\n configuration: {\n pointer: { name: \"jsonPointer\", toBlock: FlowGraphBlockNames.JsonPointerParser },\n },\n inputs: {\n values: {\n \"[segment]\": { name: \"$1\", toBlock: FlowGraphBlockNames.JsonPointerParser },\n },\n },\n interBlockConnectors: [\n {\n input: \"object\",\n output: \"object\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"propertyName\",\n output: \"propertyName\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"customGetFunction\",\n output: \"getFunction\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n ],\n extraProcessor(gltfBlock, _declaration, _mapping, parser, serializedObjects) {\n serializedObjects.forEach((serializedObject) => {\n // check if it is the json pointer block\n if (serializedObject.className === FlowGraphBlockNames.JsonPointerParser) {\n serializedObject.config ||= {};\n serializedObject.config.outputValue = true;\n }\n });\n return serializedObjects;\n },\n },\n \"pointer/set\": {\n blocks: [FlowGraphBlockNames.SetProperty, FlowGraphBlockNames.JsonPointerParser],\n configuration: {\n pointer: { name: \"jsonPointer\", toBlock: FlowGraphBlockNames.JsonPointerParser },\n },\n inputs: {\n values: {\n // must be defined due to the array taking over\n value: { name: \"value\" },\n \"[segment]\": { name: \"$1\", toBlock: FlowGraphBlockNames.JsonPointerParser },\n },\n },\n outputs: {\n flows: {\n err: { name: \"error\" },\n },\n },\n interBlockConnectors: [\n {\n input: \"object\",\n output: \"object\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"propertyName\",\n output: \"propertyName\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"customSetFunction\",\n output: \"setFunction\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n ],\n extraProcessor(gltfBlock, _declaration, _mapping, parser, serializedObjects) {\n serializedObjects.forEach((serializedObject) => {\n // check if it is the json pointer block\n if (serializedObject.className === FlowGraphBlockNames.JsonPointerParser) {\n serializedObject.config ||= {};\n serializedObject.config.outputValue = true;\n }\n });\n return serializedObjects;\n },\n },\n \"pointer/interpolate\": {\n // interpolate, parse the pointer and play the animation generated. 3 blocks!\n blocks: [FlowGraphBlockNames.ValueInterpolation, FlowGraphBlockNames.JsonPointerParser, FlowGraphBlockNames.PlayAnimation, FlowGraphBlockNames.Easing],\n configuration: {\n pointer: { name: \"jsonPointer\", toBlock: FlowGraphBlockNames.JsonPointerParser },\n },\n inputs: {\n values: {\n value: { name: \"value_1\" },\n \"[segment]\": { name: \"$1\", toBlock: FlowGraphBlockNames.JsonPointerParser },\n duration: { name: \"duration_1\", gltfType: \"number\" /*, inOptions: true */ },\n p1: { name: \"controlPoint1\", toBlock: FlowGraphBlockNames.Easing },\n p2: { name: \"controlPoint2\", toBlock: FlowGraphBlockNames.Easing },\n },\n flows: {\n in: { name: \"in\", toBlock: FlowGraphBlockNames.PlayAnimation },\n },\n },\n outputs: {\n flows: {\n err: { name: \"error\", toBlock: FlowGraphBlockNames.PlayAnimation },\n out: { name: \"out\", toBlock: FlowGraphBlockNames.PlayAnimation },\n done: { name: \"done\", toBlock: FlowGraphBlockNames.PlayAnimation },\n },\n },\n interBlockConnectors: [\n {\n input: \"object\",\n output: \"object\",\n inputBlockIndex: 2,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"propertyName\",\n output: \"propertyName\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"customBuildAnimation\",\n output: \"generateAnimationsFunction\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"animation\",\n output: \"animation\",\n inputBlockIndex: 2,\n outputBlockIndex: 0,\n isVariable: true,\n },\n {\n input: \"easingFunction\",\n output: \"easingFunction\",\n inputBlockIndex: 0,\n outputBlockIndex: 3,\n isVariable: true,\n },\n {\n input: \"value_0\",\n output: \"value\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n ],\n extraProcessor(gltfBlock, _declaration, _mapping, parser, serializedObjects) {\n serializedObjects.forEach((serializedObject) => {\n // check if it is the json pointer block\n if (serializedObject.className === FlowGraphBlockNames.JsonPointerParser) {\n serializedObject.config ||= {};\n serializedObject.config.outputValue = true;\n } else if (serializedObject.className === FlowGraphBlockNames.ValueInterpolation) {\n serializedObject.config ||= {};\n Object.keys(gltfBlock.values || []).forEach((key) => {\n const value = gltfBlock.values?.[key];\n if (key === \"value\" && value) {\n // get the type of the value\n const type = value.type;\n if (type !== undefined) {\n serializedObject.config.animationType = parser.arrays.types[type].flowGraphType;\n }\n }\n });\n }\n });\n return serializedObjects;\n },\n },\n \"animation/start\": {\n blocks: [FlowGraphBlockNames.PlayAnimation, FlowGraphBlockNames.ArrayIndex, \"KHR_interactivity/FlowGraphGLTFDataProvider\"],\n inputs: {\n values: {\n animation: { name: \"index\", gltfType: \"number\", toBlock: FlowGraphBlockNames.ArrayIndex },\n speed: { name: \"speed\", gltfType: \"number\" },\n // 60 is a const from the glTF loader\n startTime: { name: \"from\", gltfType: \"number\", dataTransformer: (time: number[], parser) => [time[0] * parser._loader.parent.targetFps] },\n endTime: { name: \"to\", gltfType: \"number\", dataTransformer: (time: number[], parser) => [time[0] * parser._loader.parent.targetFps] },\n },\n },\n outputs: {\n flows: {\n err: { name: \"error\" },\n },\n },\n interBlockConnectors: [\n {\n input: \"animationGroup\",\n output: \"value\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"array\",\n output: \"animationGroups\",\n inputBlockIndex: 1,\n outputBlockIndex: 2,\n isVariable: true,\n },\n ],\n extraProcessor(_gltfBlock, _declaration, _mapping, _arrays, serializedObjects, _context, globalGLTF) {\n // add the glTF to the configuration of the last serialized object\n const serializedObject = serializedObjects[serializedObjects.length - 1];\n serializedObject.config ||= {};\n serializedObject.config.glTF = globalGLTF;\n return serializedObjects;\n },\n },\n \"animation/stop\": {\n blocks: [FlowGraphBlockNames.StopAnimation, FlowGraphBlockNames.ArrayIndex, \"KHR_interactivity/FlowGraphGLTFDataProvider\"],\n inputs: {\n values: {\n animation: { name: \"index\", gltfType: \"number\", toBlock: FlowGraphBlockNames.ArrayIndex },\n },\n },\n outputs: {\n flows: {\n err: { name: \"error\" },\n },\n },\n interBlockConnectors: [\n {\n input: \"animationGroup\",\n output: \"value\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"array\",\n output: \"animationGroups\",\n inputBlockIndex: 1,\n outputBlockIndex: 2,\n isVariable: true,\n },\n ],\n extraProcessor(_gltfBlock, _declaration, _mapping, _arrays, serializedObjects, _context, globalGLTF) {\n // add the glTF to the configuration of the last serialized object\n const serializedObject = serializedObjects[serializedObjects.length - 1];\n serializedObject.config ||= {};\n serializedObject.config.glTF = globalGLTF;\n return serializedObjects;\n },\n },\n \"animation/stopAt\": {\n blocks: [FlowGraphBlockNames.StopAnimation, FlowGraphBlockNames.ArrayIndex, \"KHR_interactivity/FlowGraphGLTFDataProvider\"],\n configuration: {},\n inputs: {\n values: {\n animation: { name: \"index\", gltfType: \"number\", toBlock: FlowGraphBlockNames.ArrayIndex },\n stopTime: { name: \"stopAtFrame\", gltfType: \"number\", dataTransformer: (time: number[], parser) => [time[0] * parser._loader.parent.targetFps] },\n },\n },\n outputs: {\n flows: {\n err: { name: \"error\" },\n },\n },\n interBlockConnectors: [\n {\n input: \"animationGroup\",\n output: \"value\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"array\",\n output: \"animationGroups\",\n inputBlockIndex: 1,\n outputBlockIndex: 2,\n isVariable: true,\n },\n ],\n extraProcessor(_gltfBlock, _declaration, _mapping, _arrays, serializedObjects, _context, globalGLTF) {\n // add the glTF to the configuration of the last serialized object\n const serializedObject = serializedObjects[serializedObjects.length - 1];\n serializedObject.config ||= {};\n serializedObject.config.glTF = globalGLTF;\n return serializedObjects;\n },\n },\n};\n\nfunction getSimpleInputMapping(type: FlowGraphBlockNames, inputs: string[] = [\"a\"], inferType?: boolean): IGLTFToFlowGraphMapping {\n return {\n blocks: [type],\n inputs: {\n values: inputs.reduce(\n (acc, input) => {\n acc[input] = { name: input };\n return acc;\n },\n {} as { [key: string]: { name: string } }\n ),\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects) {\n if (inferType) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n // try to infer the type or fallback to Integer\n // check the gltf block for the inputs, see if they have a type\n let type = -1;\n Object.keys(_gltfBlock.values || {}).find((value) => {\n if (_gltfBlock.values?.[value].type !== undefined) {\n type = _gltfBlock.values[value].type;\n return true;\n }\n return false;\n });\n if (type !== -1) {\n serializedObjects[0].config.type = _parser.arrays.types[type].flowGraphType;\n }\n }\n return serializedObjects;\n },\n };\n}\n\nexport function getAllSupportedNativeNodeTypes(): string[] {\n return Object.keys(gltfToFlowGraphMapping);\n}\n\n/**\n * \n * These are the nodes from the specs:\n\n### Math Nodes\n1. **Constants**\n - E (`math/e`) FlowGraphBlockNames.E\n - Pi (`math/pi`) FlowGraphBlockNames.PI\n - Infinity (`math/inf`) FlowGraphBlockNames.Inf\n - Not a Number (`math/nan`) FlowGraphBlockNames.NaN\n2. **Arithmetic Nodes**\n - Absolute Value (`math/abs`) FlowGraphBlockNames.Abs\n - Sign (`math/sign`) FlowGraphBlockNames.Sign\n - Truncate (`math/trunc`) FlowGraphBlockNames.Trunc\n - Floor (`math/floor`) FlowGraphBlockNames.Floor\n - Ceil (`math/ceil`) FlowGraphBlockNames.Ceil\n - Round (`math/round`) FlowGraphBlockNames.Round\n - Fraction (`math/fract`) FlowGraphBlockNames.Fract\n - Negation (`math/neg`) FlowGraphBlockNames.Negation\n - Addition (`math/add`) FlowGraphBlockNames.Add\n - Subtraction (`math/sub`) FlowGraphBlockNames.Subtract\n - Multiplication (`math/mul`) FlowGraphBlockNames.Multiply\n - Division (`math/div`) FlowGraphBlockNames.Divide\n - Remainder (`math/rem`) FlowGraphBlockNames.Modulo\n - Minimum (`math/min`) FlowGraphBlockNames.Min\n - Maximum (`math/max`) FlowGraphBlockNames.Max\n - Clamp (`math/clamp`) FlowGraphBlockNames.Clamp\n - Saturate (`math/saturate`) FlowGraphBlockNames.Saturate\n - Interpolate (`math/mix`) FlowGraphBlockNames.MathInterpolation\n3. **Comparison Nodes**\n - Equality (`math/eq`) FlowGraphBlockNames.Equality\n - Less Than (`math/lt`) FlowGraphBlockNames.LessThan\n - Less Than Or Equal To (`math/le`) FlowGraphBlockNames.LessThanOrEqual\n - Greater Than (`math/gt`) FlowGraphBlockNames.GreaterThan\n - Greater Than Or Equal To (`math/ge`) FlowGraphBlockNames.GreaterThanOrEqual\n4. **Special Nodes**\n - Is Not a Number (`math/isnan`) FlowGraphBlockNames.IsNaN\n - Is Infinity (`math/isinf`) FlowGraphBlockNames.IsInfinity\n - Select (`math/select`) FlowGraphBlockNames.Conditional\n - Random (`math/random`) FlowGraphBlockNames.Random\n5. **Angle and Trigonometry Nodes**\n - Degrees-To-Radians (`math/rad`) FlowGraphBlockNames.DegToRad\n - Radians-To-Degrees (`math/deg`) FlowGraphBlockNames.RadToDeg\n - Sine (`math/sin`) FlowGraphBlockNames.Sin\n - Cosine (`math/cos`) FlowGraphBlockNames.Cos\n - Tangent (`math/tan`) FlowGraphBlockNames.Tan\n - Arcsine (`math/asin`) FlowGraphBlockNames.Asin\n - Arccosine (`math/acos`) FlowGraphBlockNames.Acos\n - Arctangent (`math/atan`) FlowGraphBlockNames.Atan\n - Arctangent 2 (`math/atan2`) FlowGraphBlockNames.Atan2\n6. **Hyperbolic Nodes**\n - Hyperbolic Sine (`math/sinh`) FlowGraphBlockNames.Sinh\n - Hyperbolic Cosine (`math/cosh`) FlowGraphBlockNames.Cosh\n - Hyperbolic Tangent (`math/tanh`) FlowGraphBlockNames.Tanh\n - Inverse Hyperbolic Sine (`math/asinh`) FlowGraphBlockNames.Asinh\n - Inverse Hyperbolic Cosine (`math/acosh`) FlowGraphBlockNames.Acosh\n - Inverse Hyperbolic Tangent (`math/atanh`) FlowGraphBlockNames.Atanh\n7. **Exponential Nodes**\n - Exponent (`math/exp`) FlowGraphBlockNames.Exponential\n - Natural Logarithm (`math/log`) FlowGraphBlockNames.Log\n - Base-2 Logarithm (`math/log2`) FlowGraphBlockNames.Log2\n - Base-10 Logarithm (`math/log10`) FlowGraphBlockNames.Log10\n - Square Root (`math/sqrt`) FlowGraphBlockNames.SquareRoot\n - Cube Root (`math/cbrt`) FlowGraphBlockNames.CubeRoot\n - Power (`math/pow`) FlowGraphBlockNames.Power\n8. **Vector Nodes**\n - Length (`math/length`) FlowGraphBlockNames.Length\n - Normalize (`math/normalize`) FlowGraphBlockNames.Normalize\n - Dot Product (`math/dot`) FlowGraphBlockNames.Dot\n - Cross Product (`math/cross`) FlowGraphBlockNames.Cross\n - Rotate 2D (`math/rotate2d`) FlowGraphBlockNames.Rotate2D\n - Rotate 3D (`math/rotate3d`) FlowGraphBlockNames.Rotate3D\n - Transform (`math/transform`) FlowGraphBlockNames.TransformVector\n9. **Matrix Nodes**\n - Transpose (`math/transpose`) FlowGraphBlockNames.Transpose\n - Determinant (`math/determinant`) FlowGraphBlockNames.Determinant\n - Inverse (`math/inverse`) FlowGraphBlockNames.InvertMatrix\n - Multiplication (`math/matmul`) FlowGraphBlockNames.MatrixMultiplication\n10. **Swizzle Nodes**\n - Combine (`math/combine2`, `math/combine3`, `math/combine4`, `math/combine2x2`, `math/combine3x3`, `math/combine4x4`)\n FlowGraphBlockNames.CombineVector2, FlowGraphBlockNames.CombineVector3, FlowGraphBlockNames.CombineVector4\n FlowGraphBlockNames.CombineMatrix2D, FlowGraphBlockNames.CombineMatrix3D, FlowGraphBlockNames.CombineMatrix\n - Extract (`math/extract2`, `math/extract3`, `math/extract4`, `math/extract2x2`, `math/extract3x3`, `math/extract4x4`)\n FlowGraphBlockNames.ExtractVector2, FlowGraphBlockNames.ExtractVector3, FlowGraphBlockNames.ExtractVector4\n FlowGraphBlockNames.ExtractMatrix2D, FlowGraphBlockNames.ExtractMatrix3D, FlowGraphBlockNames.ExtractMatrix\n11. **Integer Arithmetic Nodes**\n - Absolute Value (`math/abs`) FlowGraphBlockNames.Abs\n - Sign (`math/sign`) FlowGraphBlockNames.Sign\n - Negation (`math/neg`) FlowGraphBlockNames.Negation\n - Addition (`math/add`) FlowGraphBlockNames.Add\n - Subtraction (`math/sub`) FlowGraphBlockNames.Subtract\n - Multiplication (`math/mul`) FlowGraphBlockNames.Multiply\n - Division (`math/div`) FlowGraphBlockNames.Divide\n - Remainder (`math/rem`) FlowGraphBlockNames.Modulo\n - Minimum (`math/min`) FlowGraphBlockNames.Min\n - Maximum (`math/max`) FlowGraphBlockNames.Max\n - Clamp (`math/clamp`) FlowGraphBlockNames.Clamp\n12. **Integer Comparison Nodes**\n - Equality (`math/eq`) FlowGraphBlockNames.Equality\n - Less Than (`math/lt`) FlowGraphBlockNames.LessThan\n - Less Than Or Equal To (`math/le`) FlowGraphBlockNames.LessThanOrEqual\n - Greater Than (`math/gt`) FlowGraphBlockNames.GreaterThan\n - Greater Than Or Equal To (`math/ge`) FlowGraphBlockNames.GreaterThanOrEqual\n13. **Integer Bitwise Nodes**\n - Bitwise NOT (`math/not`) FlowGraphBlockNames.BitwiseNot\n - Bitwise AND (`math/and`) FlowGraphBlockNames.BitwiseAnd\n - Bitwise OR (`math/or`) FlowGraphBlockNames.BitwiseOr\n - Bitwise XOR (`math/xor`) FlowGraphBlockNames.BitwiseXor\n - Right Shift (`math/asr`) FlowGraphBlockNames.BitwiseRightShift\n - Left Shift (`math/lsl`) FlowGraphBlockNames.BitwiseLeftShift\n - Count Leading Zeros (`math/clz`) FlowGraphBlockNames.LeadingZeros\n - Count Trailing Zeros (`math/ctz`) FlowGraphBlockNames.TrailingZeros\n - Count One Bits (`math/popcnt`) FlowGraphBlockNames.OneBitsCounter\n14. **Boolean Arithmetic Nodes**\n - Equality (`math/eq`) FlowGraphBlockNames.Equality\n - Boolean NOT (`math/not`) FlowGraphBlockNames.BitwiseNot\n - Boolean AND (`math/and`) FlowGraphBlockNames.BitwiseAnd\n - Boolean OR (`math/or`) FlowGraphBlockNames.BitwiseOr\n - Boolean XOR (`math/xor`) FlowGraphBlockNames.BitwiseXor\n\n### Type Conversion Nodes\n1. **Boolean Conversion Nodes**\n - Boolean to Integer (`type/boolToInt`) FlowGraphBlockNames.BooleanToInt\n - Boolean to Float (`type/boolToFloat`) FlowGraphBlockNames.BooleanToFloat\n2. **Integer Conversion Nodes**\n - Integer to Boolean (`type/intToBool`) FlowGraphBlockNames.IntToBoolean\n - Integer to Float (`type/intToFloat`) FlowGraphBlockNames.IntToFloat\n3. **Float Conversion Nodes**\n - Float to Boolean (`type/floatToBool`) FlowGraphBlockNames.FloatToBoolean\n - Float to Integer (`type/floatToInt`) FlowGraphBlockNames.FloatToInt\n\n### Control Flow Nodes\n1. **Sync Nodes**\n - Sequence (`flow/sequence`) FlowGraphBlockNames.Sequence\n - Branch (`flow/branch`) FlowGraphBlockNames.Branch\n - Switch (`flow/switch`) FlowGraphBlockNames.Switch\n - While Loop (`flow/while`) FlowGraphBlockNames.WhileLoop\n - For Loop (`flow/for`) FlowGraphBlockNames.ForLoop\n - Do N (`flow/doN`) FlowGraphBlockNames.DoN\n - Multi Gate (`flow/multiGate`) FlowGraphBlockNames.MultiGate\n - Wait All (`flow/waitAll`) FlowGraphBlockNames.WaitAll\n - Throttle (`flow/throttle`) FlowGraphBlockNames.Throttle\n2. **Delay Nodes**\n - Set Delay (`flow/setDelay`) FlowGraphBlockNames.SetDelay\n - Cancel Delay (`flow/cancelDelay`) FlowGraphBlockNames.CancelDelay\n\n### State Manipulation Nodes\n1. **Custom Variable Access**\n - Variable Get (`variable/get`) FlowGraphBlockNames.GetVariable\n - Variable Set (`variable/set`) FlowGraphBlockNames.SetVariable\n - Variable Interpolate (`variable/interpolate`)\n2. **Object Model Access** // TODO fully test this!!!\n - JSON Pointer Template Parsing (`pointer/get`) [FlowGraphBlockNames.GetProperty, FlowGraphBlockNames.JsonPointerParser]\n - Effective JSON Pointer Generation (`pointer/set`) [FlowGraphBlockNames.SetProperty, FlowGraphBlockNames.JsonPointerParser]\n - Pointer Get (`pointer/get`) [FlowGraphBlockNames.GetProperty, FlowGraphBlockNames.JsonPointerParser]\n - Pointer Set (`pointer/set`) [FlowGraphBlockNames.SetProperty, FlowGraphBlockNames.JsonPointerParser]\n - Pointer Interpolate (`pointer/interpolate`) [FlowGraphBlockNames.ValueInterpolation, FlowGraphBlockNames.JsonPointerParser, FlowGraphBlockNames.PlayAnimation, FlowGraphBlockNames.Easing]\n\n### Animation Control Nodes\n1. **Animation Play** (`animation/start`) FlowGraphBlockNames.PlayAnimation\n2. **Animation Stop** (`animation/stop`) FlowGraphBlockNames.StopAnimation \n3. **Animation Stop At** (`animation/stopAt`) FlowGraphBlockNames.StopAnimation \n\n### Event Nodes\n1. **Lifecycle Event Nodes**\n - On Start (`event/onStart`) FlowGraphBlockNames.SceneReadyEvent\n - On Tick (`event/onTick`) FlowGraphBlockNames.SceneTickEvent\n2. **Custom Event Nodes**\n - Receive (`event/receive`) FlowGraphBlockNames.ReceiveCustomEvent\n - Send (`event/send`) FlowGraphBlockNames.SendCustomEvent\n\n */\n"]}
|
1
|
+
{"version":3,"file":"declarationMapper.js","sourceRoot":"","sources":["../../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,uCAAyB;AAI1C,OAAO,EAAkB,+BAA+B,EAAE,wDAA0C;AA+JpG,MAAM,UAAU,8BAA8B,CAAC,iBAAyB;IACpE,MAAM,CAAC,EAAE,EAAE,SAAS,CAAC,GAAG,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrD,OAAO,wBAAwB,CAA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CAAC,CAAC;gBACd,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;oBAChD,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;wBAChD,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;wBACrC,OAAO,IAAI,CAAC;oBAChB,CAAC;oBACD,OAAO,KAAK,CAAC;gBACjB,CAAC,CAAC,CAAC;gBACH,IAAI,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC;oBACd,iBAAiB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,aAAa,CAAC;gBAChF,CAAC;YACL,CAAC;YACD,OAAO,iBAAiB,CAAC;QAC7B,CAAC;KACJ,CAAC;AACN,CAAC;AAED,MAAM,UAAU,8BAA8B;IAC1C,OAAO,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2KG","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport type { IKHRInteractivity_Declaration, IKHRInteractivity_Graph, IKHRInteractivity_Node } from \"babylonjs-gltf2interface\";\nimport { FlowGraphBlockNames } from \"core/FlowGraph/Blocks/flowGraphBlockNames\";\nimport { Logger } from \"core/Misc/logger\";\nimport type { ISerializedFlowGraphBlock, ISerializedFlowGraphContext } from \"core/FlowGraph/typeDefinitions\";\nimport type { InteractivityEvent, InteractivityGraphToFlowGraphParser } from \"./interactivityGraphParser\";\nimport type { IGLTF } from \"../../glTFLoaderInterfaces\";\nimport { FlowGraphTypes, getAnimationTypeByFlowGraphType } from \"core/FlowGraph/flowGraphRichTypes\";\n\ninterface IGLTFToFlowGraphMappingObject<I = any, O = any> {\n /**\n * The name of the property in the FlowGraph block.\n */\n name: string;\n /**\n * The type of the property in the glTF specs.\n * If not provided will be inferred.\n */\n gltfType?: string;\n /**\n * The type of the property in the FlowGraph block.\n * If not defined it equals the glTF type.\n */\n flowGraphType?: string;\n /**\n * A function that transforms the data from the glTF to the FlowGraph block.\n */\n dataTransformer?: (data: I[], parser: InteractivityGraphToFlowGraphParser) => O[];\n /**\n * If the property is in the options passed to the constructor of the block.\n */\n inOptions?: boolean;\n\n /**\n * If the property is a pointer to a value.\n * This will add an extra JsonPointerParser block to the graph.\n */\n isPointer?: boolean;\n\n /**\n * If the property is an index to a value.\n * if defined this will be the name of the array to find the object in.\n */\n isVariable?: boolean;\n\n /**\n * the name of the class type this value will be mapped to.\n * This is used if we generate more than one block for a single glTF node.\n * Defaults to the first block in the mapping.\n */\n toBlock?: FlowGraphBlockNames;\n\n /**\n * Used in configuration values. If defined, this will be the default value, if no value is provided.\n */\n defaultValue?: O;\n}\n\nexport interface IGLTFToFlowGraphMapping {\n /**\n * The type of the FlowGraph block(s).\n * Typically will be a single element in an array.\n * When adding blocks defined in this module use the KHR_interactivity prefix.\n */\n blocks: (FlowGraphBlockNames | string)[];\n /**\n * The inputs of the glTF node mapped to the FlowGraph block.\n */\n inputs?: {\n /**\n * The value inputs of the glTF node mapped to the FlowGraph block.\n */\n values?: { [originName: string]: IGLTFToFlowGraphMappingObject };\n /**\n * The flow inputs of the glTF node mapped to the FlowGraph block.\n */\n flows?: { [originName: string]: IGLTFToFlowGraphMappingObject };\n };\n /**\n * The outputs of the glTF node mapped to the FlowGraph block.\n */\n outputs?: {\n /**\n * The value outputs of the glTF node mapped to the FlowGraph block.\n */\n values?: { [originName: string]: IGLTFToFlowGraphMappingObject };\n /**\n * The flow outputs of the glTF node mapped to the FlowGraph block.\n */\n flows?: { [originName: string]: IGLTFToFlowGraphMappingObject };\n };\n /**\n * The configuration of the glTF node mapped to the FlowGraph block.\n * This information is usually passed to the constructor of the block.\n */\n configuration?: { [originName: string]: IGLTFToFlowGraphMappingObject };\n\n /**\n * If we generate more than one block for a single glTF node, this mapping will be used to map\n * between the flowGraph classes.\n */\n typeToTypeMapping?: { [originName: string]: IGLTFToFlowGraphMappingObject };\n\n /**\n * The connections between two or more blocks.\n * This is used to connect the blocks in the graph\n */\n interBlockConnectors?: {\n /**\n * The name of the input connection in the first block.\n */\n input: string;\n /**\n * The name of the output connection in the second block.\n */\n output: string;\n\n /**\n * The index of the block in the array of blocks that corresponds to the input.\n */\n inputBlockIndex: number;\n /**\n * The index of the block in the array of blocks that corresponds to the output.\n */\n outputBlockIndex: number;\n /**\n * If the connection is a variable connection or a flow connection.\n */\n isVariable?: boolean;\n }[];\n\n /**\n * This optional function will allow to validate the node, according to the glTF specs.\n * For example, if a node has a configuration object, it must be present and correct.\n * This is a basic node-based validation.\n * This function is expected to return false and log the error if the node is not valid.\n * Note that this function can also modify the node, if needed.\n *\n * @param gltfBlock the glTF node to validate\n * @param glTFObject the glTF object\n * @returns true if validated, false if not.\n */\n validation?: (gltfBlock: IKHRInteractivity_Node, interactivityGraph: IKHRInteractivity_Graph, glTFObject?: IGLTF) => boolean;\n\n /**\n * This is used if we need extra information for the constructor/options that is not provided directly by the glTF node.\n * This function can return more than one node, if extra nodes are needed for this block to function correctly.\n * Returning more than one block will usually happen when a json pointer was provided.\n *\n * @param gltfBlock the glTF node\n * @param mapping the mapping object\n * @param arrays the arrays of the interactivity object\n * @param serializedObjects the serialized object\n * @returns an array of serialized nodes that will be added to the graph.\n */\n extraProcessor?: (\n gltfBlock: IKHRInteractivity_Node,\n declaration: IKHRInteractivity_Declaration,\n mapping: IGLTFToFlowGraphMapping,\n parser: InteractivityGraphToFlowGraphParser,\n serializedObjects: ISerializedFlowGraphBlock[],\n context: ISerializedFlowGraphContext,\n globalGLTF?: IGLTF\n ) => ISerializedFlowGraphBlock[];\n}\n\nexport function getMappingForFullOperationName(fullOperationName: string) {\n const [op, extension] = fullOperationName.split(\":\");\n return getMappingForDeclaration({ op, extension });\n}\n\nexport function getMappingForDeclaration(declaration: IKHRInteractivity_Declaration, returnNoOpIfNotAvailable: boolean = true): IGLTFToFlowGraphMapping | undefined {\n const mapping = declaration.extension ? gltfExtensionsToFlowGraphMapping[declaration.extension]?.[declaration.op] : gltfToFlowGraphMapping[declaration.op];\n if (!mapping) {\n Logger.Warn(`No mapping found for operation ${declaration.op} and extension ${declaration.extension || \"KHR_interactivity\"}`);\n if (returnNoOpIfNotAvailable) {\n const inputs: IGLTFToFlowGraphMapping[\"inputs\"] = {};\n const outputs: IGLTFToFlowGraphMapping[\"outputs\"] = {\n flows: {},\n };\n if (declaration.inputValueSockets) {\n inputs.values = {};\n for (const key in declaration.inputValueSockets) {\n inputs.values[key] = {\n name: key,\n };\n }\n }\n if (declaration.outputValueSockets) {\n outputs.values = {};\n Object.keys(declaration.outputValueSockets).forEach((key) => {\n outputs.values![key] = {\n name: key,\n };\n });\n }\n return {\n blocks: [], // no blocks, just mapping\n inputs,\n outputs,\n };\n }\n }\n return mapping;\n}\n\n/**\n * This function will add new mapping to glTF interactivity.\n * Other extensions can define new types of blocks, this is the way to let interactivity know how to parse them.\n * @param key the type of node, i.e. \"variable/get\"\n * @param extension the extension of the interactivity operation, i.e. \"KHR_selectability\"\n * @param mapping The mapping object. See documentation or examples below.\n */\nexport function addNewInteractivityFlowGraphMapping(key: string, extension: string, mapping: IGLTFToFlowGraphMapping) {\n gltfExtensionsToFlowGraphMapping[extension] ||= {};\n gltfExtensionsToFlowGraphMapping[extension][key] = mapping;\n}\n\nconst gltfExtensionsToFlowGraphMapping: { [extension: string]: { [key: string]: IGLTFToFlowGraphMapping } } = {\n /**\n * This is the BABYLON extension for glTF interactivity.\n * It defines babylon-specific blocks and operations.\n */\n BABYLON: {\n /**\n * flow/log is a flow node that logs input to the console.\n * It has \"in\" and \"out\" flows, and takes a message as input.\n * The message can be any type of value.\n * The message is logged to the console when the \"in\" flow is triggered.\n * The \"out\" flow is triggered when the message is logged.\n */\n \"flow/log\": {\n blocks: [FlowGraphBlockNames.ConsoleLog],\n inputs: {\n values: {\n message: { name: \"message\" },\n },\n },\n },\n },\n};\n\n// this mapper is just a way to convert the glTF nodes to FlowGraph nodes in terms of input/output connection names and values.\nconst gltfToFlowGraphMapping: { [key: string]: IGLTFToFlowGraphMapping } = {\n \"event/onStart\": {\n blocks: [FlowGraphBlockNames.SceneReadyEvent],\n outputs: {\n flows: {\n out: { name: \"done\" },\n },\n },\n },\n \"event/onTick\": {\n blocks: [FlowGraphBlockNames.SceneTickEvent],\n inputs: {},\n outputs: {\n values: {\n timeSinceLastTick: { name: \"deltaTime\", gltfType: \"number\" /*, dataTransformer: (time: number) => time / 1000*/ },\n },\n flows: {\n out: { name: \"done\" },\n },\n },\n },\n \"event/send\": {\n blocks: [FlowGraphBlockNames.SendCustomEvent],\n outputs: {\n flows: {\n out: { name: \"done\" },\n },\n },\n extraProcessor(gltfBlock, declaration, _mapping, parser, serializedObjects) {\n // set eventId and eventData. The configuration object of the glTF should have a single object.\n // validate that we are running it on the right block.\n if (declaration.op !== \"event/send\" || !gltfBlock.configuration || Object.keys(gltfBlock.configuration).length !== 1) {\n throw new Error(\"Receive event should have a single configuration object, the event itself\");\n }\n const eventConfiguration = gltfBlock.configuration[\"event\"];\n const eventId = eventConfiguration.value[0];\n if (typeof eventId !== \"number\") {\n throw new Error(\"Event id should be a number\");\n }\n const event: InteractivityEvent = parser.arrays.events[eventId];\n const serializedObject = serializedObjects[0];\n serializedObject.config ||= {};\n serializedObject.config.eventId = event.eventId;\n serializedObject.config.eventData = event.eventData;\n return serializedObjects;\n },\n },\n \"event/receive\": {\n blocks: [FlowGraphBlockNames.ReceiveCustomEvent],\n outputs: {\n flows: {\n out: { name: \"done\" },\n },\n },\n validation(gltfBlock, interactivityGraph) {\n if (!gltfBlock.configuration) {\n Logger.Error(\"Receive event should have a configuration object\");\n return false;\n }\n const eventConfiguration = gltfBlock.configuration[\"event\"];\n if (!eventConfiguration) {\n Logger.Error(\"Receive event should have a single configuration object, the event itself\");\n return false;\n }\n const eventId = eventConfiguration.value[0];\n if (typeof eventId !== \"number\") {\n Logger.Error(\"Event id should be a number\");\n return false;\n }\n const event = interactivityGraph.events?.[eventId];\n if (!event) {\n Logger.Error(`Event with id ${eventId} not found`);\n return false;\n }\n return true;\n },\n extraProcessor(gltfBlock, declaration, _mapping, parser, serializedObjects) {\n // set eventId and eventData. The configuration object of the glTF should have a single object.\n // validate that we are running it on the right block.\n if (declaration.op !== \"event/receive\" || !gltfBlock.configuration || Object.keys(gltfBlock.configuration).length !== 1) {\n throw new Error(\"Receive event should have a single configuration object, the event itself\");\n }\n const eventConfiguration = gltfBlock.configuration[\"event\"];\n const eventId = eventConfiguration.value[0];\n if (typeof eventId !== \"number\") {\n throw new Error(\"Event id should be a number\");\n }\n const event: InteractivityEvent = parser.arrays.events[eventId];\n const serializedObject = serializedObjects[0];\n serializedObject.config ||= {};\n serializedObject.config.eventId = event.eventId;\n serializedObject.config.eventData = event.eventData;\n return serializedObjects;\n },\n },\n \"math/e\": getSimpleInputMapping(FlowGraphBlockNames.E),\n \"math/pi\": getSimpleInputMapping(FlowGraphBlockNames.PI),\n \"math/inf\": getSimpleInputMapping(FlowGraphBlockNames.Inf),\n \"math/nan\": getSimpleInputMapping(FlowGraphBlockNames.NaN),\n \"math/abs\": getSimpleInputMapping(FlowGraphBlockNames.Abs),\n \"math/sign\": getSimpleInputMapping(FlowGraphBlockNames.Sign),\n \"math/trunc\": getSimpleInputMapping(FlowGraphBlockNames.Trunc),\n \"math/floor\": getSimpleInputMapping(FlowGraphBlockNames.Floor),\n \"math/ceil\": getSimpleInputMapping(FlowGraphBlockNames.Ceil),\n \"math/round\": {\n blocks: [FlowGraphBlockNames.Round],\n configuration: {},\n inputs: {\n values: {\n a: { name: \"a\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(gltfBlock, declaration, _mapping, parser, serializedObjects) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n serializedObjects[0].config.roundHalfAwayFromZero = true;\n return serializedObjects;\n },\n },\n \"math/fract\": getSimpleInputMapping(FlowGraphBlockNames.Fraction),\n \"math/neg\": getSimpleInputMapping(FlowGraphBlockNames.Negation),\n \"math/add\": getSimpleInputMapping(FlowGraphBlockNames.Add, [\"a\", \"b\"], true),\n \"math/sub\": getSimpleInputMapping(FlowGraphBlockNames.Subtract, [\"a\", \"b\"], true),\n \"math/mul\": {\n blocks: [FlowGraphBlockNames.Multiply],\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n serializedObjects[0].config.useMatrixPerComponent = true;\n // try to infer the type or fallback to Integer\n // check the gltf block for the inputs, see if they have a type\n let type = -1;\n Object.keys(_gltfBlock.values || {}).find((value) => {\n if (_gltfBlock.values?.[value].type !== undefined) {\n type = _gltfBlock.values[value].type;\n return true;\n }\n return false;\n });\n if (type !== -1) {\n serializedObjects[0].config.type = _parser.arrays.types[type].flowGraphType;\n }\n return serializedObjects;\n },\n },\n \"math/div\": getSimpleInputMapping(FlowGraphBlockNames.Divide, [\"a\", \"b\"], true),\n \"math/rem\": getSimpleInputMapping(FlowGraphBlockNames.Modulo, [\"a\", \"b\"]),\n \"math/min\": getSimpleInputMapping(FlowGraphBlockNames.Min, [\"a\", \"b\"]),\n \"math/max\": getSimpleInputMapping(FlowGraphBlockNames.Max, [\"a\", \"b\"]),\n \"math/clamp\": getSimpleInputMapping(FlowGraphBlockNames.Clamp, [\"a\", \"b\", \"c\"]),\n \"math/saturate\": getSimpleInputMapping(FlowGraphBlockNames.Saturate),\n \"math/mix\": getSimpleInputMapping(FlowGraphBlockNames.MathInterpolation, [\"a\", \"b\", \"c\"]),\n \"math/eq\": getSimpleInputMapping(FlowGraphBlockNames.Equality, [\"a\", \"b\"]),\n \"math/lt\": getSimpleInputMapping(FlowGraphBlockNames.LessThan, [\"a\", \"b\"]),\n \"math/le\": getSimpleInputMapping(FlowGraphBlockNames.LessThanOrEqual, [\"a\", \"b\"]),\n \"math/gt\": getSimpleInputMapping(FlowGraphBlockNames.GreaterThan, [\"a\", \"b\"]),\n \"math/ge\": getSimpleInputMapping(FlowGraphBlockNames.GreaterThanOrEqual, [\"a\", \"b\"]),\n \"math/isnan\": getSimpleInputMapping(FlowGraphBlockNames.IsNaN),\n \"math/isinf\": getSimpleInputMapping(FlowGraphBlockNames.IsInfinity),\n \"math/select\": {\n blocks: [FlowGraphBlockNames.Conditional],\n inputs: {\n values: {\n condition: { name: \"condition\" },\n // Should we validate those have the same type here, or assume it is already validated?\n a: { name: \"onTrue\" },\n b: { name: \"onFalse\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"output\" },\n },\n },\n },\n \"math/random\": {\n blocks: [FlowGraphBlockNames.Random],\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n },\n \"math/sin\": getSimpleInputMapping(FlowGraphBlockNames.Sin),\n \"math/cos\": getSimpleInputMapping(FlowGraphBlockNames.Cos),\n \"math/tan\": getSimpleInputMapping(FlowGraphBlockNames.Tan),\n \"math/asin\": getSimpleInputMapping(FlowGraphBlockNames.Asin),\n \"math/acos\": getSimpleInputMapping(FlowGraphBlockNames.Acos),\n \"math/atan\": getSimpleInputMapping(FlowGraphBlockNames.Atan),\n \"math/atan2\": getSimpleInputMapping(FlowGraphBlockNames.Atan2, [\"a\", \"b\"]),\n \"math/sinh\": getSimpleInputMapping(FlowGraphBlockNames.Sinh),\n \"math/cosh\": getSimpleInputMapping(FlowGraphBlockNames.Cosh),\n \"math/tanh\": getSimpleInputMapping(FlowGraphBlockNames.Tanh),\n \"math/asinh\": getSimpleInputMapping(FlowGraphBlockNames.Asinh),\n \"math/acosh\": getSimpleInputMapping(FlowGraphBlockNames.Acosh),\n \"math/atanh\": getSimpleInputMapping(FlowGraphBlockNames.Atanh),\n \"math/exp\": getSimpleInputMapping(FlowGraphBlockNames.Exponential),\n \"math/log\": getSimpleInputMapping(FlowGraphBlockNames.Log),\n \"math/log2\": getSimpleInputMapping(FlowGraphBlockNames.Log2),\n \"math/log10\": getSimpleInputMapping(FlowGraphBlockNames.Log10),\n \"math/sqrt\": getSimpleInputMapping(FlowGraphBlockNames.SquareRoot),\n \"math/cbrt\": getSimpleInputMapping(FlowGraphBlockNames.CubeRoot),\n \"math/pow\": getSimpleInputMapping(FlowGraphBlockNames.Power, [\"a\", \"b\"]),\n \"math/length\": getSimpleInputMapping(FlowGraphBlockNames.Length),\n \"math/normalize\": getSimpleInputMapping(FlowGraphBlockNames.Normalize),\n \"math/dot\": getSimpleInputMapping(FlowGraphBlockNames.Dot, [\"a\", \"b\"]),\n \"math/cross\": getSimpleInputMapping(FlowGraphBlockNames.Cross, [\"a\", \"b\"]),\n \"math/rotate2d\": getSimpleInputMapping(FlowGraphBlockNames.Rotate2D, [\"a\", \"b\"]),\n \"math/rotate3d\": getSimpleInputMapping(FlowGraphBlockNames.Rotate3D, [\"a\", \"b\", \"c\"]),\n \"math/transform\": {\n // glTF transform is vectorN with matrixN\n blocks: [FlowGraphBlockNames.TransformVector],\n inputs: {\n values: {\n a: { name: \"a\" },\n b: { name: \"b\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n },\n \"math/combine2\": {\n blocks: [FlowGraphBlockNames.CombineVector2],\n inputs: {\n values: {\n a: { name: \"input_0\", gltfType: \"number\" },\n b: { name: \"input_1\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n },\n \"math/combine3\": {\n blocks: [FlowGraphBlockNames.CombineVector3],\n inputs: {\n values: {\n a: { name: \"input_0\", gltfType: \"number\" },\n b: { name: \"input_1\", gltfType: \"number\" },\n c: { name: \"input_2\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n },\n \"math/combine4\": {\n blocks: [FlowGraphBlockNames.CombineVector4],\n inputs: {\n values: {\n a: { name: \"input_0\", gltfType: \"number\" },\n b: { name: \"input_1\", gltfType: \"number\" },\n c: { name: \"input_2\", gltfType: \"number\" },\n d: { name: \"input_3\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n },\n // one input, N outputs! outputs named using numbers.\n \"math/extract2\": {\n blocks: [FlowGraphBlockNames.ExtractVector2],\n inputs: {\n values: {\n a: { name: \"input\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n \"0\": { name: \"output_0\" },\n \"1\": { name: \"output_1\" },\n },\n },\n },\n \"math/extract3\": {\n blocks: [FlowGraphBlockNames.ExtractVector3],\n inputs: {\n values: {\n a: { name: \"input\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n \"0\": { name: \"output_0\" },\n \"1\": { name: \"output_1\" },\n \"2\": { name: \"output_2\" },\n },\n },\n },\n \"math/extract4\": {\n blocks: [FlowGraphBlockNames.ExtractVector4],\n inputs: {\n values: {\n a: { name: \"input\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n \"0\": { name: \"output_0\" },\n \"1\": { name: \"output_1\" },\n \"2\": { name: \"output_2\" },\n \"3\": { name: \"output_3\" },\n },\n },\n },\n \"math/transpose\": getSimpleInputMapping(FlowGraphBlockNames.Transpose),\n \"math/determinant\": getSimpleInputMapping(FlowGraphBlockNames.Determinant),\n \"math/inverse\": getSimpleInputMapping(FlowGraphBlockNames.InvertMatrix),\n \"math/matmul\": getSimpleInputMapping(FlowGraphBlockNames.MatrixMultiplication, [\"a\", \"b\"]),\n \"math/matCompose\": {\n blocks: [FlowGraphBlockNames.MatrixCompose],\n inputs: {\n values: {\n translation: { name: \"position\", gltfType: \"float3\" },\n rotation: { name: \"rotationQuaternion\", gltfType: \"float4\" },\n scale: { name: \"scaling\", gltfType: \"float3\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects, context) {\n // configure it to work the way glTF specifies\n const d = serializedObjects[0].dataInputs.find((input) => input.name === \"rotationQuaternion\");\n if (!d) {\n throw new Error(\"Rotation quaternion input not found\");\n }\n context._connectionValues[d.uniqueId].type = FlowGraphTypes.Quaternion;\n return serializedObjects;\n },\n },\n \"math/matDecompose\": {\n blocks: [FlowGraphBlockNames.MatrixDecompose],\n inputs: {\n values: {\n a: { name: \"input\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n translation: { name: \"position\" },\n rotation: { name: \"rotationQuaternion\" },\n scale: { name: \"scaling\" },\n },\n },\n },\n \"math/combine2x2\": {\n blocks: [FlowGraphBlockNames.CombineMatrix2D],\n inputs: {\n values: {\n a: { name: \"input_0\", gltfType: \"number\" },\n b: { name: \"input_1\", gltfType: \"number\" },\n c: { name: \"input_2\", gltfType: \"number\" },\n d: { name: \"input_3\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n serializedObjects[0].config.inputIsColumnMajor = true;\n return serializedObjects;\n },\n },\n \"math/extract2x2\": {\n blocks: [FlowGraphBlockNames.ExtractMatrix2D],\n inputs: {\n values: {\n a: { name: \"input\", gltfType: \"float2x2\" },\n },\n },\n outputs: {\n values: {\n \"0\": { name: \"output_0\" },\n \"1\": { name: \"output_1\" },\n \"2\": { name: \"output_2\" },\n \"3\": { name: \"output_3\" },\n },\n },\n },\n \"math/combine3x3\": {\n blocks: [FlowGraphBlockNames.CombineMatrix3D],\n inputs: {\n values: {\n a: { name: \"input_0\", gltfType: \"number\" },\n b: { name: \"input_1\", gltfType: \"number\" },\n c: { name: \"input_2\", gltfType: \"number\" },\n d: { name: \"input_3\", gltfType: \"number\" },\n e: { name: \"input_4\", gltfType: \"number\" },\n f: { name: \"input_5\", gltfType: \"number\" },\n g: { name: \"input_6\", gltfType: \"number\" },\n h: { name: \"input_7\", gltfType: \"number\" },\n i: { name: \"input_8\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n serializedObjects[0].config.inputIsColumnMajor = true;\n return serializedObjects;\n },\n },\n \"math/extract3x3\": {\n blocks: [FlowGraphBlockNames.ExtractMatrix3D],\n inputs: {\n values: {\n a: { name: \"input\", gltfType: \"float3x3\" },\n },\n },\n outputs: {\n values: {\n \"0\": { name: \"output_0\" },\n \"1\": { name: \"output_1\" },\n \"2\": { name: \"output_2\" },\n \"3\": { name: \"output_3\" },\n \"4\": { name: \"output_4\" },\n \"5\": { name: \"output_5\" },\n \"6\": { name: \"output_6\" },\n \"7\": { name: \"output_7\" },\n \"8\": { name: \"output_8\" },\n },\n },\n },\n \"math/combine4x4\": {\n blocks: [FlowGraphBlockNames.CombineMatrix],\n inputs: {\n values: {\n a: { name: \"input_0\", gltfType: \"number\" },\n b: { name: \"input_1\", gltfType: \"number\" },\n c: { name: \"input_2\", gltfType: \"number\" },\n d: { name: \"input_3\", gltfType: \"number\" },\n e: { name: \"input_4\", gltfType: \"number\" },\n f: { name: \"input_5\", gltfType: \"number\" },\n g: { name: \"input_6\", gltfType: \"number\" },\n h: { name: \"input_7\", gltfType: \"number\" },\n i: { name: \"input_8\", gltfType: \"number\" },\n j: { name: \"input_9\", gltfType: \"number\" },\n k: { name: \"input_10\", gltfType: \"number\" },\n l: { name: \"input_11\", gltfType: \"number\" },\n m: { name: \"input_12\", gltfType: \"number\" },\n n: { name: \"input_13\", gltfType: \"number\" },\n o: { name: \"input_14\", gltfType: \"number\" },\n p: { name: \"input_15\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n serializedObjects[0].config.inputIsColumnMajor = true;\n return serializedObjects;\n },\n },\n \"math/extract4x4\": {\n blocks: [FlowGraphBlockNames.ExtractMatrix],\n configuration: {},\n inputs: {\n values: {\n a: { name: \"input\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n \"0\": { name: \"output_0\" },\n \"1\": { name: \"output_1\" },\n \"2\": { name: \"output_2\" },\n \"3\": { name: \"output_3\" },\n \"4\": { name: \"output_4\" },\n \"5\": { name: \"output_5\" },\n \"6\": { name: \"output_6\" },\n \"7\": { name: \"output_7\" },\n \"8\": { name: \"output_8\" },\n \"9\": { name: \"output_9\" },\n \"10\": { name: \"output_10\" },\n \"11\": { name: \"output_11\" },\n \"12\": { name: \"output_12\" },\n \"13\": { name: \"output_13\" },\n \"14\": { name: \"output_14\" },\n \"15\": { name: \"output_15\" },\n },\n },\n },\n \"math/compose\": {\n blocks: [FlowGraphBlockNames.MatrixCompose],\n configuration: {},\n inputs: {\n values: {\n translation: { name: \"position\", gltfType: \"float3\" },\n rotation: { name: \"rotationQuaternion\", gltfType: \"float4\" },\n scale: { name: \"scaling\", gltfType: \"float3\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"output\" },\n },\n },\n },\n \"math/decompose\": {\n blocks: [FlowGraphBlockNames.MatrixDecompose],\n configuration: {},\n inputs: {\n values: {\n a: { name: \"input\" },\n },\n },\n outputs: {\n values: {\n translation: { name: \"position\" },\n rotation: { name: \"rotationQuaternion\" },\n scale: { name: \"scaling\" },\n },\n },\n },\n \"math/not\": {\n blocks: [FlowGraphBlockNames.BitwiseNot],\n inputs: {\n values: {\n a: { name: \"a\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects, context) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n // try to infer the type or fallback to Integer\n const socketIn = serializedObjects[0].dataInputs[0];\n serializedObjects[0].config.valueType = context._connectionValues[socketIn.uniqueId]?.type ?? FlowGraphTypes.Integer;\n return serializedObjects;\n },\n },\n \"math/and\": {\n blocks: [FlowGraphBlockNames.BitwiseAnd],\n inputs: {\n values: {\n a: { name: \"a\" },\n b: { name: \"b\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects, context) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n // try to infer the type or fallback to Integer\n const socketInA = serializedObjects[0].dataInputs[0];\n const socketInB = serializedObjects[0].dataInputs[1];\n serializedObjects[0].config.valueType =\n context._connectionValues[socketInA.uniqueId]?.type ?? context._connectionValues[socketInB.uniqueId]?.type ?? FlowGraphTypes.Integer;\n return serializedObjects;\n },\n },\n \"math/or\": {\n blocks: [FlowGraphBlockNames.BitwiseOr],\n inputs: {\n values: {\n a: { name: \"a\" },\n b: { name: \"b\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects, context) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n // try to infer the type or fallback to Integer\n const socketInA = serializedObjects[0].dataInputs[0];\n const socketInB = serializedObjects[0].dataInputs[1];\n serializedObjects[0].config.valueType =\n context._connectionValues[socketInA.uniqueId]?.type ?? context._connectionValues[socketInB.uniqueId]?.type ?? FlowGraphTypes.Integer;\n return serializedObjects;\n },\n },\n \"math/xor\": {\n blocks: [FlowGraphBlockNames.BitwiseXor],\n inputs: {\n values: {\n a: { name: \"a\" },\n b: { name: \"b\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects, context) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n // try to infer the type or fallback to Integer\n const socketInA = serializedObjects[0].dataInputs[0];\n const socketInB = serializedObjects[0].dataInputs[1];\n serializedObjects[0].config.valueType =\n context._connectionValues[socketInA.uniqueId]?.type ?? context._connectionValues[socketInB.uniqueId]?.type ?? FlowGraphTypes.Integer;\n return serializedObjects;\n },\n },\n \"math/asr\": getSimpleInputMapping(FlowGraphBlockNames.BitwiseRightShift, [\"a\", \"b\"]),\n \"math/lsl\": getSimpleInputMapping(FlowGraphBlockNames.BitwiseLeftShift, [\"a\", \"b\"]),\n \"math/clz\": getSimpleInputMapping(FlowGraphBlockNames.LeadingZeros),\n \"math/ctz\": getSimpleInputMapping(FlowGraphBlockNames.TrailingZeros),\n \"math/popcnt\": getSimpleInputMapping(FlowGraphBlockNames.OneBitsCounter),\n \"math/rad\": getSimpleInputMapping(FlowGraphBlockNames.DegToRad),\n \"math/deg\": getSimpleInputMapping(FlowGraphBlockNames.RadToDeg),\n \"type/boolToInt\": getSimpleInputMapping(FlowGraphBlockNames.BooleanToInt),\n \"type/boolToFloat\": getSimpleInputMapping(FlowGraphBlockNames.BooleanToFloat),\n \"type/intToBool\": getSimpleInputMapping(FlowGraphBlockNames.IntToBoolean),\n \"type/intToFloat\": getSimpleInputMapping(FlowGraphBlockNames.IntToFloat),\n \"type/floatToInt\": getSimpleInputMapping(FlowGraphBlockNames.FloatToInt),\n \"type/floatToBool\": getSimpleInputMapping(FlowGraphBlockNames.FloatToBoolean),\n\n // flows\n \"flow/sequence\": {\n blocks: [FlowGraphBlockNames.Sequence],\n extraProcessor(gltfBlock, _declaration, _mapping, _arrays, serializedObjects) {\n const serializedObject = serializedObjects[0];\n serializedObject.config ||= {};\n serializedObject.config.outputSignalCount = Object.keys(gltfBlock.flows || []).length;\n serializedObject.signalOutputs.forEach((output, index) => {\n output.name = \"out_\" + index;\n });\n return serializedObjects;\n },\n },\n \"flow/branch\": {\n blocks: [FlowGraphBlockNames.Branch],\n outputs: {\n flows: {\n true: { name: \"onTrue\" },\n false: { name: \"onFalse\" },\n },\n },\n },\n \"flow/switch\": {\n blocks: [FlowGraphBlockNames.Switch],\n configuration: {\n cases: { name: \"cases\", inOptions: true, defaultValue: [] },\n },\n inputs: {\n values: {\n selection: { name: \"case\" },\n },\n },\n validation(gltfBlock) {\n if (gltfBlock.configuration && gltfBlock.configuration.cases) {\n const cases = gltfBlock.configuration.cases.value;\n const onlyIntegers = cases.every((caseValue) => {\n // case value should be an integer. Since Number.isInteger(1.0) is true, we need to check if toString has only digits.\n return typeof caseValue === \"number\" && /^\\d+$/.test(caseValue.toString());\n });\n if (!onlyIntegers) {\n gltfBlock.configuration.cases.value = [] as number[];\n return true;\n }\n // check for duplicates\n const uniqueCases = new Set(cases);\n gltfBlock.configuration.cases.value = Array.from(uniqueCases) as number[];\n }\n return true;\n },\n extraProcessor(gltfBlock, declaration, _mapping, _arrays, serializedObjects) {\n // convert all names of output flow to out_$1 apart from \"default\"\n if (declaration.op !== \"flow/switch\" || !gltfBlock.flows || Object.keys(gltfBlock.flows).length === 0) {\n throw new Error(\"Switch should have a single configuration object, the cases array\");\n }\n const serializedObject = serializedObjects[0];\n serializedObject.signalOutputs.forEach((output) => {\n if (output.name !== \"default\") {\n output.name = \"out_\" + output.name;\n }\n });\n return serializedObjects;\n },\n },\n \"flow/while\": {\n blocks: [FlowGraphBlockNames.WhileLoop],\n outputs: {\n flows: {\n loopBody: { name: \"executionFlow\" },\n },\n },\n },\n \"flow/for\": {\n blocks: [FlowGraphBlockNames.ForLoop],\n configuration: {\n initialIndex: { name: \"initialIndex\", gltfType: \"number\", inOptions: true, defaultValue: 0 },\n },\n inputs: {\n values: {\n startIndex: { name: \"startIndex\", gltfType: \"number\" },\n endIndex: { name: \"endIndex\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n index: { name: \"index\" },\n },\n flows: {\n loopBody: { name: \"executionFlow\" },\n },\n },\n },\n \"flow/doN\": {\n blocks: [FlowGraphBlockNames.DoN],\n configuration: {},\n inputs: {\n values: {\n n: { name: \"maxExecutions\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n currentCount: { name: \"executionCount\" },\n },\n },\n },\n \"flow/multiGate\": {\n blocks: [FlowGraphBlockNames.MultiGate],\n configuration: {\n isRandom: { name: \"isRandom\", gltfType: \"boolean\", inOptions: true, defaultValue: false },\n isLoop: { name: \"isLoop\", gltfType: \"boolean\", inOptions: true, defaultValue: false },\n },\n extraProcessor(gltfBlock, declaration, _mapping, _arrays, serializedObjects) {\n if (declaration.op !== \"flow/multiGate\" || !gltfBlock.flows || Object.keys(gltfBlock.flows).length === 0) {\n throw new Error(\"MultiGate should have a single configuration object, the number of output flows\");\n }\n const serializedObject = serializedObjects[0];\n serializedObject.config ||= {};\n serializedObject.config.outputSignalCount = Object.keys(gltfBlock.flows).length;\n serializedObject.signalOutputs.forEach((output, index) => {\n output.name = \"out_\" + index;\n });\n return serializedObjects;\n },\n },\n \"flow/waitAll\": {\n blocks: [FlowGraphBlockNames.WaitAll],\n configuration: {\n inputFlows: { name: \"inputSignalCount\", gltfType: \"number\", inOptions: true, defaultValue: 0 },\n },\n inputs: {\n flows: {\n \"[segment]\": { name: \"in_$1\" },\n },\n },\n validation(gltfBlock) {\n // check that the configuration value is an integer\n if (typeof gltfBlock.configuration?.inputFlows?.value[0] !== \"number\") {\n gltfBlock.configuration = gltfBlock.configuration || {\n inputFlows: { value: [0] },\n };\n gltfBlock.configuration.inputFlows.value = [0];\n }\n return true;\n },\n },\n \"flow/throttle\": {\n blocks: [FlowGraphBlockNames.Throttle],\n outputs: {\n flows: {\n err: { name: \"error\" },\n },\n },\n },\n \"flow/setDelay\": {\n blocks: [FlowGraphBlockNames.SetDelay],\n outputs: {\n flows: {\n err: { name: \"error\" },\n },\n },\n },\n \"flow/cancelDelay\": {\n blocks: [FlowGraphBlockNames.CancelDelay],\n },\n \"variable/get\": {\n blocks: [FlowGraphBlockNames.GetVariable],\n validation(gltfBlock) {\n if (!gltfBlock.configuration?.variable?.value) {\n Logger.Error(\"Variable get block should have a variable configuration\");\n return false;\n }\n return true;\n },\n configuration: {\n variable: {\n name: \"variable\",\n gltfType: \"number\",\n flowGraphType: \"string\",\n inOptions: true,\n isVariable: true,\n dataTransformer(index, parser) {\n return [parser.getVariableName(index[0])];\n },\n },\n },\n },\n \"variable/set\": {\n blocks: [FlowGraphBlockNames.SetVariable],\n configuration: {\n variable: {\n name: \"variable\",\n gltfType: \"number\",\n flowGraphType: \"string\",\n inOptions: true,\n isVariable: true,\n dataTransformer(index, parser) {\n return [parser.getVariableName(index[0])];\n },\n },\n },\n },\n \"variable/interpolate\": {\n blocks: [\n FlowGraphBlockNames.ValueInterpolation,\n FlowGraphBlockNames.Context,\n FlowGraphBlockNames.PlayAnimation,\n FlowGraphBlockNames.BezierCurveEasing,\n FlowGraphBlockNames.GetVariable,\n ],\n configuration: {\n variable: {\n name: \"propertyName\",\n inOptions: true,\n isVariable: true,\n dataTransformer(index, parser) {\n return [parser.getVariableName(index[0])];\n },\n },\n useSlerp: {\n name: \"animationType\",\n inOptions: true,\n defaultValue: false,\n dataTransformer: (value) => {\n if (value[0] === true) {\n return [FlowGraphTypes.Quaternion];\n } else {\n return [undefined];\n }\n },\n },\n },\n inputs: {\n values: {\n value: { name: \"value_1\" },\n duration: { name: \"duration_1\", gltfType: \"number\" },\n p1: { name: \"controlPoint1\", toBlock: FlowGraphBlockNames.BezierCurveEasing },\n p2: { name: \"controlPoint2\", toBlock: FlowGraphBlockNames.BezierCurveEasing },\n },\n flows: {\n in: { name: \"in\", toBlock: FlowGraphBlockNames.PlayAnimation },\n },\n },\n outputs: {\n flows: {\n err: { name: \"error\", toBlock: FlowGraphBlockNames.PlayAnimation },\n out: { name: \"out\", toBlock: FlowGraphBlockNames.PlayAnimation },\n done: { name: \"done\", toBlock: FlowGraphBlockNames.PlayAnimation },\n },\n },\n interBlockConnectors: [\n {\n input: \"object\",\n output: \"userVariables\",\n inputBlockIndex: 2,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"animation\",\n output: \"animation\",\n inputBlockIndex: 2,\n outputBlockIndex: 0,\n isVariable: true,\n },\n {\n input: \"easingFunction\",\n output: \"easingFunction\",\n inputBlockIndex: 0,\n outputBlockIndex: 3,\n isVariable: true,\n },\n {\n input: \"value_0\",\n output: \"value\",\n inputBlockIndex: 0,\n outputBlockIndex: 4,\n isVariable: true,\n },\n ],\n extraProcessor(gltfBlock, _declaration, _mapping, parser, serializedObjects) {\n // is useSlerp is used, animationType should be set to be quaternion!\n const serializedValueInterpolation = serializedObjects[0];\n const propertyIndex = gltfBlock.configuration?.variable.value[0];\n if (typeof propertyIndex !== \"number\") {\n Logger.Error(\"Variable index is not defined for variable interpolation block\");\n throw new Error(\"Variable index is not defined for variable interpolation block\");\n }\n const variable = parser.arrays.staticVariables[propertyIndex];\n // if not set by useSlerp\n if (typeof serializedValueInterpolation.config.animationType.value === \"undefined\") {\n // get the value type\n parser.arrays.staticVariables;\n serializedValueInterpolation.config.animationType.value = getAnimationTypeByFlowGraphType(variable.type);\n }\n\n // variable/get configuration\n const serializedGetVariable = serializedObjects[4];\n serializedGetVariable.config ||= {};\n serializedGetVariable.config.variable ||= {};\n serializedGetVariable.config.variable.value = parser.getVariableName(propertyIndex);\n\n // get the control points from the easing block\n serializedObjects[3].config ||= {};\n\n return serializedObjects;\n },\n },\n \"pointer/get\": {\n blocks: [FlowGraphBlockNames.GetProperty, FlowGraphBlockNames.JsonPointerParser],\n configuration: {\n pointer: { name: \"jsonPointer\", toBlock: FlowGraphBlockNames.JsonPointerParser },\n },\n inputs: {\n values: {\n \"[segment]\": { name: \"$1\", toBlock: FlowGraphBlockNames.JsonPointerParser },\n },\n },\n interBlockConnectors: [\n {\n input: \"object\",\n output: \"object\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"propertyName\",\n output: \"propertyName\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"customGetFunction\",\n output: \"getFunction\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n ],\n extraProcessor(gltfBlock, _declaration, _mapping, parser, serializedObjects) {\n serializedObjects.forEach((serializedObject) => {\n // check if it is the json pointer block\n if (serializedObject.className === FlowGraphBlockNames.JsonPointerParser) {\n serializedObject.config ||= {};\n serializedObject.config.outputValue = true;\n }\n });\n return serializedObjects;\n },\n },\n \"pointer/set\": {\n blocks: [FlowGraphBlockNames.SetProperty, FlowGraphBlockNames.JsonPointerParser],\n configuration: {\n pointer: { name: \"jsonPointer\", toBlock: FlowGraphBlockNames.JsonPointerParser },\n },\n inputs: {\n values: {\n // must be defined due to the array taking over\n value: { name: \"value\" },\n \"[segment]\": { name: \"$1\", toBlock: FlowGraphBlockNames.JsonPointerParser },\n },\n },\n outputs: {\n flows: {\n err: { name: \"error\" },\n },\n },\n interBlockConnectors: [\n {\n input: \"object\",\n output: \"object\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"propertyName\",\n output: \"propertyName\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"customSetFunction\",\n output: \"setFunction\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n ],\n extraProcessor(gltfBlock, _declaration, _mapping, parser, serializedObjects) {\n serializedObjects.forEach((serializedObject) => {\n // check if it is the json pointer block\n if (serializedObject.className === FlowGraphBlockNames.JsonPointerParser) {\n serializedObject.config ||= {};\n serializedObject.config.outputValue = true;\n }\n });\n return serializedObjects;\n },\n },\n \"pointer/interpolate\": {\n // interpolate, parse the pointer and play the animation generated. 3 blocks!\n blocks: [FlowGraphBlockNames.ValueInterpolation, FlowGraphBlockNames.JsonPointerParser, FlowGraphBlockNames.PlayAnimation, FlowGraphBlockNames.Easing],\n configuration: {\n pointer: { name: \"jsonPointer\", toBlock: FlowGraphBlockNames.JsonPointerParser },\n },\n inputs: {\n values: {\n value: { name: \"value_1\" },\n \"[segment]\": { name: \"$1\", toBlock: FlowGraphBlockNames.JsonPointerParser },\n duration: { name: \"duration_1\", gltfType: \"number\" /*, inOptions: true */ },\n p1: { name: \"controlPoint1\", toBlock: FlowGraphBlockNames.Easing },\n p2: { name: \"controlPoint2\", toBlock: FlowGraphBlockNames.Easing },\n },\n flows: {\n in: { name: \"in\", toBlock: FlowGraphBlockNames.PlayAnimation },\n },\n },\n outputs: {\n flows: {\n err: { name: \"error\", toBlock: FlowGraphBlockNames.PlayAnimation },\n out: { name: \"out\", toBlock: FlowGraphBlockNames.PlayAnimation },\n done: { name: \"done\", toBlock: FlowGraphBlockNames.PlayAnimation },\n },\n },\n interBlockConnectors: [\n {\n input: \"object\",\n output: \"object\",\n inputBlockIndex: 2,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"propertyName\",\n output: \"propertyName\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"customBuildAnimation\",\n output: \"generateAnimationsFunction\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"animation\",\n output: \"animation\",\n inputBlockIndex: 2,\n outputBlockIndex: 0,\n isVariable: true,\n },\n {\n input: \"easingFunction\",\n output: \"easingFunction\",\n inputBlockIndex: 0,\n outputBlockIndex: 3,\n isVariable: true,\n },\n {\n input: \"value_0\",\n output: \"value\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n ],\n extraProcessor(gltfBlock, _declaration, _mapping, parser, serializedObjects) {\n serializedObjects.forEach((serializedObject) => {\n // check if it is the json pointer block\n if (serializedObject.className === FlowGraphBlockNames.JsonPointerParser) {\n serializedObject.config ||= {};\n serializedObject.config.outputValue = true;\n } else if (serializedObject.className === FlowGraphBlockNames.ValueInterpolation) {\n serializedObject.config ||= {};\n Object.keys(gltfBlock.values || []).forEach((key) => {\n const value = gltfBlock.values?.[key];\n if (key === \"value\" && value) {\n // get the type of the value\n const type = value.type;\n if (type !== undefined) {\n serializedObject.config.animationType = parser.arrays.types[type].flowGraphType;\n }\n }\n });\n }\n });\n return serializedObjects;\n },\n },\n \"animation/start\": {\n blocks: [FlowGraphBlockNames.PlayAnimation, FlowGraphBlockNames.ArrayIndex, \"KHR_interactivity/FlowGraphGLTFDataProvider\"],\n inputs: {\n values: {\n animation: { name: \"index\", gltfType: \"number\", toBlock: FlowGraphBlockNames.ArrayIndex },\n speed: { name: \"speed\", gltfType: \"number\" },\n // 60 is a const from the glTF loader\n startTime: { name: \"from\", gltfType: \"number\", dataTransformer: (time: number[], parser) => [time[0] * parser._loader.parent.targetFps] },\n endTime: { name: \"to\", gltfType: \"number\", dataTransformer: (time: number[], parser) => [time[0] * parser._loader.parent.targetFps] },\n },\n },\n outputs: {\n flows: {\n err: { name: \"error\" },\n },\n },\n interBlockConnectors: [\n {\n input: \"animationGroup\",\n output: \"value\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"array\",\n output: \"animationGroups\",\n inputBlockIndex: 1,\n outputBlockIndex: 2,\n isVariable: true,\n },\n ],\n extraProcessor(_gltfBlock, _declaration, _mapping, _arrays, serializedObjects, _context, globalGLTF) {\n // add the glTF to the configuration of the last serialized object\n const serializedObject = serializedObjects[serializedObjects.length - 1];\n serializedObject.config ||= {};\n serializedObject.config.glTF = globalGLTF;\n return serializedObjects;\n },\n },\n \"animation/stop\": {\n blocks: [FlowGraphBlockNames.StopAnimation, FlowGraphBlockNames.ArrayIndex, \"KHR_interactivity/FlowGraphGLTFDataProvider\"],\n inputs: {\n values: {\n animation: { name: \"index\", gltfType: \"number\", toBlock: FlowGraphBlockNames.ArrayIndex },\n },\n },\n outputs: {\n flows: {\n err: { name: \"error\" },\n },\n },\n interBlockConnectors: [\n {\n input: \"animationGroup\",\n output: \"value\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"array\",\n output: \"animationGroups\",\n inputBlockIndex: 1,\n outputBlockIndex: 2,\n isVariable: true,\n },\n ],\n extraProcessor(_gltfBlock, _declaration, _mapping, _arrays, serializedObjects, _context, globalGLTF) {\n // add the glTF to the configuration of the last serialized object\n const serializedObject = serializedObjects[serializedObjects.length - 1];\n serializedObject.config ||= {};\n serializedObject.config.glTF = globalGLTF;\n return serializedObjects;\n },\n },\n \"animation/stopAt\": {\n blocks: [FlowGraphBlockNames.StopAnimation, FlowGraphBlockNames.ArrayIndex, \"KHR_interactivity/FlowGraphGLTFDataProvider\"],\n configuration: {},\n inputs: {\n values: {\n animation: { name: \"index\", gltfType: \"number\", toBlock: FlowGraphBlockNames.ArrayIndex },\n stopTime: { name: \"stopAtFrame\", gltfType: \"number\", dataTransformer: (time: number[], parser) => [time[0] * parser._loader.parent.targetFps] },\n },\n },\n outputs: {\n flows: {\n err: { name: \"error\" },\n },\n },\n interBlockConnectors: [\n {\n input: \"animationGroup\",\n output: \"value\",\n inputBlockIndex: 0,\n outputBlockIndex: 1,\n isVariable: true,\n },\n {\n input: \"array\",\n output: \"animationGroups\",\n inputBlockIndex: 1,\n outputBlockIndex: 2,\n isVariable: true,\n },\n ],\n extraProcessor(_gltfBlock, _declaration, _mapping, _arrays, serializedObjects, _context, globalGLTF) {\n // add the glTF to the configuration of the last serialized object\n const serializedObject = serializedObjects[serializedObjects.length - 1];\n serializedObject.config ||= {};\n serializedObject.config.glTF = globalGLTF;\n return serializedObjects;\n },\n },\n};\n\nfunction getSimpleInputMapping(type: FlowGraphBlockNames, inputs: string[] = [\"a\"], inferType?: boolean): IGLTFToFlowGraphMapping {\n return {\n blocks: [type],\n inputs: {\n values: inputs.reduce(\n (acc, input) => {\n acc[input] = { name: input };\n return acc;\n },\n {} as { [key: string]: { name: string } }\n ),\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects) {\n if (inferType) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config = serializedObjects[0].config || {};\n // try to infer the type or fallback to Integer\n // check the gltf block for the inputs, see if they have a type\n let type = -1;\n Object.keys(_gltfBlock.values || {}).find((value) => {\n if (_gltfBlock.values?.[value].type !== undefined) {\n type = _gltfBlock.values[value].type;\n return true;\n }\n return false;\n });\n if (type !== -1) {\n serializedObjects[0].config.type = _parser.arrays.types[type].flowGraphType;\n }\n }\n return serializedObjects;\n },\n };\n}\n\nexport function getAllSupportedNativeNodeTypes(): string[] {\n return Object.keys(gltfToFlowGraphMapping);\n}\n\n/**\n * \n * These are the nodes from the specs:\n\n### Math Nodes\n1. **Constants**\n - E (`math/e`) FlowGraphBlockNames.E\n - Pi (`math/pi`) FlowGraphBlockNames.PI\n - Infinity (`math/inf`) FlowGraphBlockNames.Inf\n - Not a Number (`math/nan`) FlowGraphBlockNames.NaN\n2. **Arithmetic Nodes**\n - Absolute Value (`math/abs`) FlowGraphBlockNames.Abs\n - Sign (`math/sign`) FlowGraphBlockNames.Sign\n - Truncate (`math/trunc`) FlowGraphBlockNames.Trunc\n - Floor (`math/floor`) FlowGraphBlockNames.Floor\n - Ceil (`math/ceil`) FlowGraphBlockNames.Ceil\n - Round (`math/round`) FlowGraphBlockNames.Round\n - Fraction (`math/fract`) FlowGraphBlockNames.Fract\n - Negation (`math/neg`) FlowGraphBlockNames.Negation\n - Addition (`math/add`) FlowGraphBlockNames.Add\n - Subtraction (`math/sub`) FlowGraphBlockNames.Subtract\n - Multiplication (`math/mul`) FlowGraphBlockNames.Multiply\n - Division (`math/div`) FlowGraphBlockNames.Divide\n - Remainder (`math/rem`) FlowGraphBlockNames.Modulo\n - Minimum (`math/min`) FlowGraphBlockNames.Min\n - Maximum (`math/max`) FlowGraphBlockNames.Max\n - Clamp (`math/clamp`) FlowGraphBlockNames.Clamp\n - Saturate (`math/saturate`) FlowGraphBlockNames.Saturate\n - Interpolate (`math/mix`) FlowGraphBlockNames.MathInterpolation\n3. **Comparison Nodes**\n - Equality (`math/eq`) FlowGraphBlockNames.Equality\n - Less Than (`math/lt`) FlowGraphBlockNames.LessThan\n - Less Than Or Equal To (`math/le`) FlowGraphBlockNames.LessThanOrEqual\n - Greater Than (`math/gt`) FlowGraphBlockNames.GreaterThan\n - Greater Than Or Equal To (`math/ge`) FlowGraphBlockNames.GreaterThanOrEqual\n4. **Special Nodes**\n - Is Not a Number (`math/isnan`) FlowGraphBlockNames.IsNaN\n - Is Infinity (`math/isinf`) FlowGraphBlockNames.IsInfinity\n - Select (`math/select`) FlowGraphBlockNames.Conditional\n - Random (`math/random`) FlowGraphBlockNames.Random\n5. **Angle and Trigonometry Nodes**\n - Degrees-To-Radians (`math/rad`) FlowGraphBlockNames.DegToRad\n - Radians-To-Degrees (`math/deg`) FlowGraphBlockNames.RadToDeg\n - Sine (`math/sin`) FlowGraphBlockNames.Sin\n - Cosine (`math/cos`) FlowGraphBlockNames.Cos\n - Tangent (`math/tan`) FlowGraphBlockNames.Tan\n - Arcsine (`math/asin`) FlowGraphBlockNames.Asin\n - Arccosine (`math/acos`) FlowGraphBlockNames.Acos\n - Arctangent (`math/atan`) FlowGraphBlockNames.Atan\n - Arctangent 2 (`math/atan2`) FlowGraphBlockNames.Atan2\n6. **Hyperbolic Nodes**\n - Hyperbolic Sine (`math/sinh`) FlowGraphBlockNames.Sinh\n - Hyperbolic Cosine (`math/cosh`) FlowGraphBlockNames.Cosh\n - Hyperbolic Tangent (`math/tanh`) FlowGraphBlockNames.Tanh\n - Inverse Hyperbolic Sine (`math/asinh`) FlowGraphBlockNames.Asinh\n - Inverse Hyperbolic Cosine (`math/acosh`) FlowGraphBlockNames.Acosh\n - Inverse Hyperbolic Tangent (`math/atanh`) FlowGraphBlockNames.Atanh\n7. **Exponential Nodes**\n - Exponent (`math/exp`) FlowGraphBlockNames.Exponential\n - Natural Logarithm (`math/log`) FlowGraphBlockNames.Log\n - Base-2 Logarithm (`math/log2`) FlowGraphBlockNames.Log2\n - Base-10 Logarithm (`math/log10`) FlowGraphBlockNames.Log10\n - Square Root (`math/sqrt`) FlowGraphBlockNames.SquareRoot\n - Cube Root (`math/cbrt`) FlowGraphBlockNames.CubeRoot\n - Power (`math/pow`) FlowGraphBlockNames.Power\n8. **Vector Nodes**\n - Length (`math/length`) FlowGraphBlockNames.Length\n - Normalize (`math/normalize`) FlowGraphBlockNames.Normalize\n - Dot Product (`math/dot`) FlowGraphBlockNames.Dot\n - Cross Product (`math/cross`) FlowGraphBlockNames.Cross\n - Rotate 2D (`math/rotate2d`) FlowGraphBlockNames.Rotate2D\n - Rotate 3D (`math/rotate3d`) FlowGraphBlockNames.Rotate3D\n - Transform (`math/transform`) FlowGraphBlockNames.TransformVector\n9. **Matrix Nodes**\n - Transpose (`math/transpose`) FlowGraphBlockNames.Transpose\n - Determinant (`math/determinant`) FlowGraphBlockNames.Determinant\n - Inverse (`math/inverse`) FlowGraphBlockNames.InvertMatrix\n - Multiplication (`math/matmul`) FlowGraphBlockNames.MatrixMultiplication\n10. **Swizzle Nodes**\n - Combine (`math/combine2`, `math/combine3`, `math/combine4`, `math/combine2x2`, `math/combine3x3`, `math/combine4x4`)\n FlowGraphBlockNames.CombineVector2, FlowGraphBlockNames.CombineVector3, FlowGraphBlockNames.CombineVector4\n FlowGraphBlockNames.CombineMatrix2D, FlowGraphBlockNames.CombineMatrix3D, FlowGraphBlockNames.CombineMatrix\n - Extract (`math/extract2`, `math/extract3`, `math/extract4`, `math/extract2x2`, `math/extract3x3`, `math/extract4x4`)\n FlowGraphBlockNames.ExtractVector2, FlowGraphBlockNames.ExtractVector3, FlowGraphBlockNames.ExtractVector4\n FlowGraphBlockNames.ExtractMatrix2D, FlowGraphBlockNames.ExtractMatrix3D, FlowGraphBlockNames.ExtractMatrix\n11. **Integer Arithmetic Nodes**\n - Absolute Value (`math/abs`) FlowGraphBlockNames.Abs\n - Sign (`math/sign`) FlowGraphBlockNames.Sign\n - Negation (`math/neg`) FlowGraphBlockNames.Negation\n - Addition (`math/add`) FlowGraphBlockNames.Add\n - Subtraction (`math/sub`) FlowGraphBlockNames.Subtract\n - Multiplication (`math/mul`) FlowGraphBlockNames.Multiply\n - Division (`math/div`) FlowGraphBlockNames.Divide\n - Remainder (`math/rem`) FlowGraphBlockNames.Modulo\n - Minimum (`math/min`) FlowGraphBlockNames.Min\n - Maximum (`math/max`) FlowGraphBlockNames.Max\n - Clamp (`math/clamp`) FlowGraphBlockNames.Clamp\n12. **Integer Comparison Nodes**\n - Equality (`math/eq`) FlowGraphBlockNames.Equality\n - Less Than (`math/lt`) FlowGraphBlockNames.LessThan\n - Less Than Or Equal To (`math/le`) FlowGraphBlockNames.LessThanOrEqual\n - Greater Than (`math/gt`) FlowGraphBlockNames.GreaterThan\n - Greater Than Or Equal To (`math/ge`) FlowGraphBlockNames.GreaterThanOrEqual\n13. **Integer Bitwise Nodes**\n - Bitwise NOT (`math/not`) FlowGraphBlockNames.BitwiseNot\n - Bitwise AND (`math/and`) FlowGraphBlockNames.BitwiseAnd\n - Bitwise OR (`math/or`) FlowGraphBlockNames.BitwiseOr\n - Bitwise XOR (`math/xor`) FlowGraphBlockNames.BitwiseXor\n - Right Shift (`math/asr`) FlowGraphBlockNames.BitwiseRightShift\n - Left Shift (`math/lsl`) FlowGraphBlockNames.BitwiseLeftShift\n - Count Leading Zeros (`math/clz`) FlowGraphBlockNames.LeadingZeros\n - Count Trailing Zeros (`math/ctz`) FlowGraphBlockNames.TrailingZeros\n - Count One Bits (`math/popcnt`) FlowGraphBlockNames.OneBitsCounter\n14. **Boolean Arithmetic Nodes**\n - Equality (`math/eq`) FlowGraphBlockNames.Equality\n - Boolean NOT (`math/not`) FlowGraphBlockNames.BitwiseNot\n - Boolean AND (`math/and`) FlowGraphBlockNames.BitwiseAnd\n - Boolean OR (`math/or`) FlowGraphBlockNames.BitwiseOr\n - Boolean XOR (`math/xor`) FlowGraphBlockNames.BitwiseXor\n\n### Type Conversion Nodes\n1. **Boolean Conversion Nodes**\n - Boolean to Integer (`type/boolToInt`) FlowGraphBlockNames.BooleanToInt\n - Boolean to Float (`type/boolToFloat`) FlowGraphBlockNames.BooleanToFloat\n2. **Integer Conversion Nodes**\n - Integer to Boolean (`type/intToBool`) FlowGraphBlockNames.IntToBoolean\n - Integer to Float (`type/intToFloat`) FlowGraphBlockNames.IntToFloat\n3. **Float Conversion Nodes**\n - Float to Boolean (`type/floatToBool`) FlowGraphBlockNames.FloatToBoolean\n - Float to Integer (`type/floatToInt`) FlowGraphBlockNames.FloatToInt\n\n### Control Flow Nodes\n1. **Sync Nodes**\n - Sequence (`flow/sequence`) FlowGraphBlockNames.Sequence\n - Branch (`flow/branch`) FlowGraphBlockNames.Branch\n - Switch (`flow/switch`) FlowGraphBlockNames.Switch\n - While Loop (`flow/while`) FlowGraphBlockNames.WhileLoop\n - For Loop (`flow/for`) FlowGraphBlockNames.ForLoop\n - Do N (`flow/doN`) FlowGraphBlockNames.DoN\n - Multi Gate (`flow/multiGate`) FlowGraphBlockNames.MultiGate\n - Wait All (`flow/waitAll`) FlowGraphBlockNames.WaitAll\n - Throttle (`flow/throttle`) FlowGraphBlockNames.Throttle\n2. **Delay Nodes**\n - Set Delay (`flow/setDelay`) FlowGraphBlockNames.SetDelay\n - Cancel Delay (`flow/cancelDelay`) FlowGraphBlockNames.CancelDelay\n\n### State Manipulation Nodes\n1. **Custom Variable Access**\n - Variable Get (`variable/get`) FlowGraphBlockNames.GetVariable\n - Variable Set (`variable/set`) FlowGraphBlockNames.SetVariable\n - Variable Interpolate (`variable/interpolate`)\n2. **Object Model Access** // TODO fully test this!!!\n - JSON Pointer Template Parsing (`pointer/get`) [FlowGraphBlockNames.GetProperty, FlowGraphBlockNames.JsonPointerParser]\n - Effective JSON Pointer Generation (`pointer/set`) [FlowGraphBlockNames.SetProperty, FlowGraphBlockNames.JsonPointerParser]\n - Pointer Get (`pointer/get`) [FlowGraphBlockNames.GetProperty, FlowGraphBlockNames.JsonPointerParser]\n - Pointer Set (`pointer/set`) [FlowGraphBlockNames.SetProperty, FlowGraphBlockNames.JsonPointerParser]\n - Pointer Interpolate (`pointer/interpolate`) [FlowGraphBlockNames.ValueInterpolation, FlowGraphBlockNames.JsonPointerParser, FlowGraphBlockNames.PlayAnimation, FlowGraphBlockNames.Easing]\n\n### Animation Control Nodes\n1. **Animation Play** (`animation/start`) FlowGraphBlockNames.PlayAnimation\n2. **Animation Stop** (`animation/stop`) FlowGraphBlockNames.StopAnimation \n3. **Animation Stop At** (`animation/stopAt`) FlowGraphBlockNames.StopAnimation \n\n### Event Nodes\n1. **Lifecycle Event Nodes**\n - On Start (`event/onStart`) FlowGraphBlockNames.SceneReadyEvent\n - On Tick (`event/onTick`) FlowGraphBlockNames.SceneTickEvent\n2. **Custom Event Nodes**\n - Receive (`event/receive`) FlowGraphBlockNames.ReceiveCustomEvent\n - Send (`event/send`) FlowGraphBlockNames.SendCustomEvent\n\n */\n"]}
|