@babylonjs/loaders 7.52.2 → 7.52.3

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.
@@ -417,7 +417,10 @@ const gltfToFlowGraphMapping = {
417
417
  if (!d) {
418
418
  throw new Error("Rotation quaternion input not found");
419
419
  }
420
- context._connectionValues[d.uniqueId].type = "Quaternion" /* FlowGraphTypes.Quaternion */;
420
+ // if value is defined, set the type to quaternion
421
+ if (context._connectionValues[d.uniqueId]) {
422
+ context._connectionValues[d.uniqueId].type = "Quaternion" /* FlowGraphTypes.Quaternion */;
423
+ }
421
424
  return serializedObjects;
422
425
  },
423
426
  },
@@ -1331,6 +1334,43 @@ const gltfToFlowGraphMapping = {
1331
1334
  return serializedObjects;
1332
1335
  },
1333
1336
  },
1337
+ "math/switch": {
1338
+ blocks: ["FlowGraphDataSwitchBlock" /* FlowGraphBlockNames.DataSwitch */],
1339
+ configuration: {
1340
+ cases: { name: "cases", inOptions: true, defaultValue: [] },
1341
+ },
1342
+ inputs: {
1343
+ values: {
1344
+ selection: { name: "case" },
1345
+ },
1346
+ },
1347
+ validation(gltfBlock) {
1348
+ if (gltfBlock.configuration && gltfBlock.configuration.cases) {
1349
+ const cases = gltfBlock.configuration.cases.value;
1350
+ const onlyIntegers = cases.every((caseValue) => {
1351
+ // case value should be an integer. Since Number.isInteger(1.0) is true, we need to check if toString has only digits.
1352
+ return typeof caseValue === "number" && /^\d+$/.test(caseValue.toString());
1353
+ });
1354
+ if (!onlyIntegers) {
1355
+ gltfBlock.configuration.cases.value = [];
1356
+ return true;
1357
+ }
1358
+ // check for duplicates
1359
+ const uniqueCases = new Set(cases);
1360
+ gltfBlock.configuration.cases.value = Array.from(uniqueCases);
1361
+ }
1362
+ return true;
1363
+ },
1364
+ extraProcessor(_gltfBlock, _declaration, _mapping, _arrays, serializedObjects) {
1365
+ const serializedObject = serializedObjects[0];
1366
+ serializedObject.signalInputs.forEach((input) => {
1367
+ if (input.name !== "default" && input.name !== "case") {
1368
+ input.name = "in_" + input.name;
1369
+ }
1370
+ });
1371
+ return serializedObjects;
1372
+ },
1373
+ },
1334
1374
  };
1335
1375
  function getSimpleInputMapping(type, inputs = ["a"], inferType) {
1336
1376
  return {
@@ -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,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,CAAC,IAAI,CAAC,kCAAkC,WAAW,CAAC,EAAE,kBAAkB,WAAW,CAAC,SAAS,IAAI,mBAAmB,EAAE,CAAC,CAAC;QAC9H,IAAI,wBAAwB,EAAE,CAAC;YAC3B,MAAM,MAAM,GAAsC,EAAE,CAAC;YACrD,MAAM,OAAO,GAAuC;gBAChD,KAAK,EAAE,EAAE;aACZ,CAAC;YACF,IAAI,WAAW,CAAC,iBAAiB,EAAE,CAAC;gBAChC,MAAM,CAAC,MAAM,GAAG,EAAE,CAAC;gBACnB,KAAK,MAAM,G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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"]}
1
+ {"version":3,"file":"declarationMapper.js","sourceRoot":"","sources":["../../../../../../../dev/loaders/src/glTF/2.0/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C;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 // if value is defined, set the type to quaternion\n if (context._connectionValues[d.uniqueId]) {\n context._connectionValues[d.uniqueId].type = FlowGraphTypes.Quaternion;\n }\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 \"math/switch\": {\n blocks: [FlowGraphBlockNames.DataSwitch],\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 const serializedObject = serializedObjects[0];\n serializedObject.signalInputs.forEach((input) => {\n if (input.name !== \"default\" && input.name !== \"case\") {\n input.name = \"in_\" + input.name;\n }\n });\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"]}
@@ -58,15 +58,14 @@ const nodesTree = {
58
58
  // readonly!
59
59
  matrix: {
60
60
  type: "Matrix",
61
- get: (node) => node._babylonTransformNode?.getWorldMatrix(),
61
+ get: (node) => Matrix.Compose(node._babylonTransformNode?.scaling, node._babylonTransformNode?.rotationQuaternion, node._babylonTransformNode?.position),
62
62
  getTarget: (node) => node._babylonTransformNode,
63
- getPropertyName: [() => "worldMatrix"],
64
63
  },
65
64
  globalMatrix: {
66
65
  type: "Matrix",
67
66
  get: (node) => node._babylonTransformNode?.getWorldMatrix(),
68
67
  getTarget: (node) => node._babylonTransformNode,
69
- getPropertyName: [() => "_worldMatrix"],
68
+ getPropertyName: [() => "worldMatrixFromCache"],
70
69
  isReadOnly: true,
71
70
  },
72
71
  extensions: {
@@ -1 +1 @@
1
- {"version":3,"file":"objectModelMap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AAI,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QACxC,OAA2B,CAAC,aAAa,GAAG,aAAa,CAAC;IAC/D,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAClC,GAAW,EACX,QAA8E;IAE9E,qEAAqE;IACrE,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;IAChF,IAAI,OAAO,GAAG,kBAAyB,CAAC;IACxC,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;QAC1B,8BAA8B;QAC9B,IAAI,CAAC,IAAI,EAAE,CAAC;YACR,SAAS;QACb,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACjB,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;gBACf,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;gBACpC,SAAS;YACb,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;YACnB,4DAA4D;YAC5D,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;gBACvB,OAAO,CAAC,IAAI,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC;YACpC,CAAC;QACL,CAAC;QACD,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACD,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AACrC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\n\nimport type { TransformNode } from \"core/Meshes/transformNode\";\nimport type { IAnimation, ICamera, IGLTF, IKHRLightsPunctual_Light, IMaterial, IMesh, INode } from \"../glTFLoaderInterfaces\";\nimport type { Vector3 } from \"core/Maths/math.vector\";\nimport { Matrix, Quaternion, Vector2 } from \"core/Maths/math.vector\";\nimport { Constants } from \"core/Engines/constants\";\nimport type { Color3 } from \"core/Maths/math.color\";\nimport { Color4 } from \"core/Maths/math.color\";\nimport type { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport type { Light } from \"core/Lights/light\";\nimport type { Nullable } from \"core/types\";\nimport { SpotLight } from \"core/Lights/spotLight\";\nimport type { IEXTLightsImageBased_LightImageBased } from \"babylonjs-gltf2interface\";\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\nimport type { IInterpolationPropertyInfo, IObjectAccessor } from \"core/FlowGraph/typeDefinitions\";\nimport { GLTFPathToObjectConverter } from \"./gltfPathToObjectConverter\";\nimport type { AnimationGroup } from \"core/Animations/animationGroup\";\nimport type { Mesh } from \"core/Meshes/mesh\";\n\nexport interface IGLTFObjectModelTree {\n cameras: IGLTFObjectModelTreeCamerasObject;\n nodes: IGLTFObjectModelTreeNodesObject;\n materials: IGLTFObjectModelTreeMaterialsObject;\n extensions: IGLTFObjectModelTreeExtensionsObject;\n animations: {\n length: IObjectAccessor<IAnimation[], AnimationGroup[], number>;\n __array__: {};\n };\n meshes: {\n length: IObjectAccessor<IMesh[], (Mesh | undefined)[], number>;\n __array__: {};\n };\n}\n\nexport interface IGLTFObjectModelTreeNodesObject<GLTFTargetType = INode, BabylonTargetType = TransformNode> {\n length: IObjectAccessor<GLTFTargetType[], BabylonTargetType[], number>;\n __array__: {\n __target__: boolean;\n translation: IObjectAccessor<GLTFTargetType, BabylonTargetType, Vector3>;\n rotation: IObjectAccessor<GLTFTargetType, BabylonTargetType, Quaternion>;\n scale: IObjectAccessor<GLTFTargetType, BabylonTargetType, Vector3>;\n matrix: IObjectAccessor<GLTFTargetType, BabylonTargetType, Matrix>;\n globalMatrix: IObjectAccessor<GLTFTargetType, BabylonTargetType, Matrix>;\n weights: {\n length: IObjectAccessor<GLTFTargetType, BabylonTargetType, number>;\n __array__: { __target__: boolean } & IObjectAccessor<GLTFTargetType, BabylonTargetType, number>;\n } & IObjectAccessor<GLTFTargetType, BabylonTargetType, number[]>;\n extensions: {\n EXT_lights_ies?: {\n multiplier: IObjectAccessor<INode, Light, number>;\n color: IObjectAccessor<INode, Light, Color3>;\n };\n };\n };\n}\n\nexport interface IGLTFObjectModelTreeCamerasObject {\n __array__: {\n __target__: boolean;\n orthographic: {\n xmag: IObjectAccessor<ICamera, ICamera, Vector2>;\n ymag: IObjectAccessor<ICamera, ICamera, Vector2>;\n zfar: IObjectAccessor<ICamera, ICamera, number>;\n znear: IObjectAccessor<ICamera, ICamera, number>;\n };\n perspective: {\n yfov: IObjectAccessor<ICamera, ICamera, number>;\n zfar: IObjectAccessor<ICamera, ICamera, number>;\n znear: IObjectAccessor<ICamera, ICamera, number>;\n aspectRatio: IObjectAccessor<ICamera, ICamera, Nullable<number>>;\n };\n };\n}\n\nexport interface IGLTFObjectModelTreeMaterialsObject {\n __array__: {\n __target__: boolean;\n pbrMetallicRoughness: {\n baseColorFactor: IObjectAccessor<IMaterial, PBRMaterial, Color4>;\n metallicFactor: IObjectAccessor<IMaterial, PBRMaterial, Nullable<number>>;\n roughnessFactor: IObjectAccessor<IMaterial, PBRMaterial, Nullable<number>>;\n baseColorTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n metallicRoughnessTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n emissiveFactor: IObjectAccessor<IMaterial, PBRMaterial, Color3>;\n normalTexture: {\n scale: IObjectAccessor<IMaterial, PBRMaterial, number>;\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n occlusionTexture: {\n strength: IObjectAccessor<IMaterial, PBRMaterial, number>;\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n emissiveTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n extensions: {\n KHR_materials_anisotropy: {\n anisotropyStrength: IObjectAccessor<IMaterial, PBRMaterial, number>;\n anisotropyRotation: IObjectAccessor<IMaterial, PBRMaterial, number>;\n anisotropyTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n KHR_materials_clearcoat: {\n clearcoatFactor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n clearcoatRoughnessFactor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n clearcoatTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n clearcoatNormalTexture: {\n scale: IObjectAccessor<IMaterial, PBRMaterial, number>;\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n clearcoatRoughnessTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n KHR_materials_dispersion: {\n dispersion: IObjectAccessor<IMaterial, PBRMaterial, number>;\n };\n KHR_materials_emissive_strength: {\n emissiveStrength: IObjectAccessor<IMaterial, PBRMaterial, number>;\n };\n KHR_materials_ior: {\n ior: IObjectAccessor<IMaterial, PBRMaterial, number>;\n };\n KHR_materials_iridescence: {\n iridescenceFactor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n iridescenceIor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n iridescenceThicknessMinimum: IObjectAccessor<IMaterial, PBRMaterial, number>;\n iridescenceThicknessMaximum: IObjectAccessor<IMaterial, PBRMaterial, number>;\n iridescenceTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n iridescenceThicknessTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n KHR_materials_sheen: {\n sheenColorFactor: IObjectAccessor<IMaterial, PBRMaterial, Color3>;\n sheenRoughnessFactor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n sheenColorTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n sheenRoughnessTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n KHR_materials_specular: {\n specularFactor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n specularColorFactor: IObjectAccessor<IMaterial, PBRMaterial, Color3>;\n specularTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n specularColorTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n KHR_materials_transmission: {\n transmissionFactor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n transmissionTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n KHR_materials_diffuse_transmission: {\n diffuseTransmissionFactor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n diffuseTransmissionTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n diffuseTransmissionColorFactor: IObjectAccessor<IMaterial, PBRMaterial, Nullable<Color3>>;\n diffuseTransmissionColorTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n KHR_materials_volume: {\n thicknessFactor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n attenuationColor: IObjectAccessor<IMaterial, PBRMaterial, Color3>;\n attenuationDistance: IObjectAccessor<IMaterial, PBRMaterial, number>;\n thicknessTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n };\n };\n}\n\ninterface ITextureDefinition {\n offset: IObjectAccessor<IMaterial, PBRMaterial, Vector2>;\n rotation: IObjectAccessor<IMaterial, PBRMaterial, number>;\n scale: IObjectAccessor<IMaterial, PBRMaterial, Vector2>;\n}\n\nexport interface IGLTFObjectModelTreeMeshesObject {}\n\nexport interface IGLTFObjectModelTreeExtensionsObject {\n KHR_lights_punctual: {\n lights: {\n length: IObjectAccessor<IKHRLightsPunctual_Light[], Light[], number>;\n __array__: {\n __target__: boolean;\n color: IObjectAccessor<IKHRLightsPunctual_Light, Light, Color3>;\n intensity: IObjectAccessor<IKHRLightsPunctual_Light, Light, number>;\n range: IObjectAccessor<IKHRLightsPunctual_Light, Light, number>;\n spot: {\n innerConeAngle: IObjectAccessor<IKHRLightsPunctual_Light, Light, number>;\n outerConeAngle: IObjectAccessor<IKHRLightsPunctual_Light, Light, number>;\n };\n };\n };\n };\n EXT_lights_ies: {\n lights: {\n length: IObjectAccessor<IKHRLightsPunctual_Light[], Light[], number>;\n };\n };\n EXT_lights_image_based: {\n lights: {\n __array__: {\n __target__: boolean;\n intensity: IObjectAccessor<IEXTLightsImageBased_LightImageBased, BaseTexture, number>;\n rotation: IObjectAccessor<IEXTLightsImageBased_LightImageBased, BaseTexture, Quaternion>;\n };\n length: IObjectAccessor<IEXTLightsImageBased_LightImageBased[], BaseTexture[], number>;\n };\n };\n}\n\nconst nodesTree: IGLTFObjectModelTreeNodesObject = {\n length: {\n type: \"number\",\n get: (nodes: INode[]) => nodes.length,\n getTarget: (nodes: INode[]) => nodes.map((node) => node._babylonTransformNode!),\n getPropertyName: [() => \"length\"],\n },\n __array__: {\n __target__: true,\n translation: {\n type: \"Vector3\",\n get: (node: INode) => node._babylonTransformNode?.position,\n set: (value: Vector3, node: INode) => node._babylonTransformNode?.position.copyFrom(value),\n getTarget: (node: INode) => node._babylonTransformNode,\n getPropertyName: [() => \"position\"],\n },\n rotation: {\n type: \"Quaternion\",\n get: (node: INode) => node._babylonTransformNode?.rotationQuaternion!,\n set: (value: Quaternion, node: INode) => node._babylonTransformNode?.rotationQuaternion?.copyFrom(value),\n getTarget: (node: INode) => node._babylonTransformNode,\n getPropertyName: [() => \"rotationQuaternion\"],\n },\n scale: {\n type: \"Vector3\",\n get: (node: INode) => node._babylonTransformNode?.scaling,\n set: (value: Vector3, node: INode) => node._babylonTransformNode?.scaling.copyFrom(value),\n getTarget: (node: INode) => node._babylonTransformNode,\n getPropertyName: [() => \"scaling\"],\n },\n weights: {\n length: {\n type: \"number\",\n get: (node: INode) => node._numMorphTargets,\n getTarget: (node: INode) => node._babylonTransformNode,\n getPropertyName: [() => \"influence\"],\n },\n __array__: {\n __target__: true,\n type: \"number\",\n get: (node: INode, index?: number) => (index !== undefined ? node._primitiveBabylonMeshes?.[0].morphTargetManager?.getTarget(index).influence : undefined),\n // set: (value: number, node: INode, index?: number) => node._babylonTransformNode?.getMorphTargetManager()?.getTarget(index)?.setInfluence(value),\n getTarget: (node: INode) => node._babylonTransformNode,\n getPropertyName: [() => \"influence\"],\n },\n type: \"number[]\",\n get: (node: INode, index?: number) => [0], // TODO: get the weights correctly\n // set: (value: number, node: INode, index?: number) => node._babylonTransformNode?.getMorphTargetManager()?.getTarget(index)?.setInfluence(value),\n getTarget: (node: INode) => node._babylonTransformNode,\n getPropertyName: [() => \"influence\"],\n },\n // readonly!\n matrix: {\n type: \"Matrix\",\n get: (node: INode) => node._babylonTransformNode?.getWorldMatrix(),\n getTarget: (node: INode) => node._babylonTransformNode,\n getPropertyName: [() => \"worldMatrix\"],\n },\n globalMatrix: {\n type: \"Matrix\",\n get: (node: INode) => node._babylonTransformNode?.getWorldMatrix(),\n getTarget: (node: INode) => node._babylonTransformNode,\n getPropertyName: [() => \"_worldMatrix\"],\n isReadOnly: true,\n },\n extensions: {\n EXT_lights_ies: {\n multiplier: {\n type: \"number\",\n get: (node: INode) => {\n return node._babylonTransformNode?.getChildren((child) => child instanceof SpotLight, true)[0]?.intensity;\n },\n getTarget: (node: INode) => node._babylonTransformNode?.getChildren((child) => child instanceof SpotLight, true)[0],\n set: (value, node) => {\n if (node._babylonTransformNode) {\n const light = node._babylonTransformNode.getChildren((child) => child instanceof SpotLight, true)[0];\n if (light) {\n light.intensity = value;\n }\n }\n },\n },\n color: {\n type: \"Color3\",\n get: (node: INode) => {\n return node._babylonTransformNode?.getChildren((child) => child instanceof SpotLight, true)[0]?.diffuse;\n },\n getTarget: (node: INode) => node._babylonTransformNode?.getChildren((child) => child instanceof SpotLight, true)[0],\n set: (value, node: INode) => {\n if (node._babylonTransformNode) {\n const light = node._babylonTransformNode.getChildren((child) => child instanceof SpotLight, true)[0];\n if (light) {\n light.diffuse = value;\n }\n }\n },\n },\n },\n },\n },\n};\n\nconst animationsTree = {\n length: {\n type: \"number\",\n get: (animations: IAnimation[]) => animations.length,\n getTarget: (animations: IAnimation[]) => animations.map((animation) => animation._babylonAnimationGroup!),\n getPropertyName: [() => \"length\"],\n },\n __array__: {},\n};\n\nconst meshesTree = {\n length: {\n type: \"number\",\n get: (meshes: IMesh[]) => meshes.length,\n getTarget: (meshes: IMesh[]) => meshes.map((mesh) => mesh.primitives[0]._instanceData?.babylonSourceMesh),\n getPropertyName: [() => \"length\"],\n },\n __array__: {},\n};\n\nconst camerasTree: IGLTFObjectModelTreeCamerasObject = {\n __array__: {\n __target__: true,\n orthographic: {\n xmag: {\n componentsCount: 2,\n type: \"Vector2\",\n get: (camera) => new Vector2(camera._babylonCamera?.orthoLeft ?? 0, camera._babylonCamera?.orthoRight ?? 0),\n set: (value, camera) => {\n if (camera._babylonCamera) {\n camera._babylonCamera.orthoLeft = value.x;\n camera._babylonCamera.orthoRight = value.y;\n }\n },\n getTarget: (camera) => camera,\n getPropertyName: [() => \"orthoLeft\", () => \"orthoRight\"],\n },\n ymag: {\n componentsCount: 2,\n type: \"Vector2\",\n get: (camera: ICamera) => new Vector2(camera._babylonCamera?.orthoBottom ?? 0, camera._babylonCamera?.orthoTop ?? 0),\n set: (value: Vector2, camera: ICamera) => {\n if (camera._babylonCamera) {\n camera._babylonCamera.orthoBottom = value.x;\n camera._babylonCamera.orthoTop = value.y;\n }\n },\n getTarget: (camera) => camera,\n getPropertyName: [() => \"orthoBottom\", () => \"orthoTop\"],\n },\n zfar: {\n type: \"number\",\n get: (camera: ICamera) => camera._babylonCamera?.maxZ,\n set: (value: number, camera: ICamera) => {\n if (camera._babylonCamera) {\n camera._babylonCamera.maxZ = value;\n }\n },\n getTarget: (camera: ICamera) => camera,\n getPropertyName: [() => \"maxZ\"],\n },\n znear: {\n type: \"number\",\n get: (camera: ICamera) => camera._babylonCamera?.minZ,\n set: (value: number, camera: ICamera) => {\n if (camera._babylonCamera) {\n camera._babylonCamera.minZ = value;\n }\n },\n getTarget: (camera: ICamera) => camera,\n getPropertyName: [() => \"minZ\"],\n },\n },\n perspective: {\n aspectRatio: {\n type: \"number\",\n get: (camera: ICamera) => camera._babylonCamera?.getEngine().getAspectRatio(camera._babylonCamera),\n getTarget: (camera: ICamera) => camera,\n getPropertyName: [() => \"aspectRatio\"],\n isReadOnly: true, // might not be the case for glTF?\n },\n yfov: {\n type: \"number\",\n get: (camera: ICamera) => camera._babylonCamera?.fov,\n set: (value: number, camera: ICamera) => {\n if (camera._babylonCamera) {\n camera._babylonCamera.fov = value;\n }\n },\n getTarget: (camera: ICamera) => camera,\n getPropertyName: [() => \"fov\"],\n },\n zfar: {\n type: \"number\",\n get: (camera: ICamera) => camera._babylonCamera?.maxZ,\n set: (value: number, camera: ICamera) => {\n if (camera._babylonCamera) {\n camera._babylonCamera.maxZ = value;\n }\n },\n getTarget: (camera: ICamera) => camera,\n getPropertyName: [() => \"maxZ\"],\n },\n znear: {\n type: \"number\",\n get: (camera: ICamera) => camera._babylonCamera?.minZ,\n set: (value: number, camera: ICamera) => {\n if (camera._babylonCamera) {\n camera._babylonCamera.minZ = value;\n }\n },\n getTarget: (camera: ICamera) => camera,\n getPropertyName: [() => \"minZ\"],\n },\n },\n },\n};\n\nconst materialsTree: IGLTFObjectModelTreeMaterialsObject = {\n __array__: {\n __target__: true,\n emissiveFactor: {\n type: \"Color3\",\n get: (material, index?, payload?) => _GetMaterial(material, index, payload).emissiveColor,\n set: (value: Color3, material, index?, payload?) => _GetMaterial(material, index, payload).emissiveColor.copyFrom(value),\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"emissiveColor\"],\n },\n emissiveTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"emissiveTexture\"),\n },\n },\n normalTexture: {\n scale: {\n type: \"number\",\n get: (material, index?, payload?) => _GetTexture(material, payload, \"bumpTexture\")?.level,\n set: (value: number, material, index?, payload?) => {\n const texture = _GetTexture(material, payload, \"bumpTexture\");\n if (texture) {\n texture.level = value;\n }\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"level\"],\n },\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"bumpTexture\"),\n },\n },\n occlusionTexture: {\n strength: {\n type: \"number\",\n get: (material, index?, payload?) => _GetMaterial(material, index, payload).ambientTextureStrength,\n set: (value: number, material, index?, payload?) => {\n const mat = _GetMaterial(material, index, payload);\n if (mat) {\n mat.ambientTextureStrength = value;\n }\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"ambientTextureStrength\"],\n },\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"ambientTexture\"),\n },\n },\n pbrMetallicRoughness: {\n baseColorFactor: {\n type: \"Color4\",\n get: (material, index?, payload?) => {\n const mat = _GetMaterial(material, index, payload);\n return Color4.FromColor3(mat.albedoColor, mat.alpha);\n },\n set: (value: Color4, material, index?, payload?) => {\n const mat = _GetMaterial(material, index, payload);\n mat.albedoColor.set(value.r, value.g, value.b);\n mat.alpha = value.a;\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n // This is correct on the animation level, but incorrect as a single property of a type Color4\n getPropertyName: [() => \"albedoColor\", () => \"alpha\"],\n },\n baseColorTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"albedoTexture\"),\n },\n },\n metallicFactor: {\n type: \"number\",\n get: (material, index?, payload?) => _GetMaterial(material, index, payload).metallic,\n set: (value, material, index?, payload?) => {\n const mat = _GetMaterial(material, index, payload);\n if (mat) {\n mat.metallic = value;\n }\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"metallic\"],\n },\n roughnessFactor: {\n type: \"number\",\n get: (material, index?, payload?) => _GetMaterial(material, index, payload).roughness,\n set: (value, material, index?, payload?) => {\n const mat = _GetMaterial(material, index, payload);\n if (mat) {\n mat.roughness = value;\n }\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"roughness\"],\n },\n metallicRoughnessTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"metallicTexture\"),\n },\n },\n },\n extensions: {\n KHR_materials_anisotropy: {\n anisotropyStrength: {\n type: \"number\",\n get: (material, index?, payload?) => _GetMaterial(material, index, payload).anisotropy.intensity,\n set: (value: number, material, index?, payload?) => {\n _GetMaterial(material, index, payload).anisotropy.intensity = value;\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"anisotropy.intensity\"],\n },\n anisotropyRotation: {\n type: \"number\",\n get: (material, index?, payload?) => _GetMaterial(material, index, payload).anisotropy.angle,\n set: (value: number, material, index?, payload?) => {\n _GetMaterial(material, index, payload).anisotropy.angle = value;\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"anisotropy.angle\"],\n },\n anisotropyTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"anisotropy\", \"texture\"),\n },\n },\n },\n KHR_materials_clearcoat: {\n clearcoatFactor: {\n type: \"number\",\n get: (material, index?, payload?) => _GetMaterial(material, index, payload).clearCoat.intensity,\n set: (value, material, index?, payload?) => {\n _GetMaterial(material, index, payload).clearCoat.intensity = value;\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"clearCoat.intensity\"],\n },\n clearcoatRoughnessFactor: {\n type: \"number\",\n get: (material, index?, payload?) => _GetMaterial(material, index, payload).clearCoat.roughness,\n set: (value, material, index?, payload?) => {\n _GetMaterial(material, index, payload).clearCoat.roughness = value;\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"clearCoat.roughness\"],\n },\n clearcoatTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"clearCoat\", \"texture\"),\n },\n },\n clearcoatNormalTexture: {\n scale: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).clearCoat.bumpTexture?.level,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).clearCoat.bumpTexture!.level = value),\n },\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"clearCoat\", \"bumpTexture\"),\n },\n },\n clearcoatRoughnessTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"clearCoat\", \"textureRoughness\"),\n },\n },\n },\n KHR_materials_dispersion: {\n dispersion: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).subSurface.dispersion,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).subSurface.dispersion = value),\n },\n },\n KHR_materials_emissive_strength: {\n emissiveStrength: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).emissiveIntensity,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).emissiveIntensity = value),\n },\n },\n KHR_materials_ior: {\n ior: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).indexOfRefraction,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).indexOfRefraction = value),\n },\n },\n KHR_materials_iridescence: {\n iridescenceFactor: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).iridescence.intensity,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).iridescence.intensity = value),\n },\n iridescenceIor: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).iridescence.indexOfRefraction,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).iridescence.indexOfRefraction = value),\n },\n iridescenceTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"iridescence\", \"texture\"),\n },\n },\n iridescenceThicknessMaximum: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).iridescence.maximumThickness,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).iridescence.maximumThickness = value),\n },\n iridescenceThicknessMinimum: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).iridescence.minimumThickness,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).iridescence.minimumThickness = value),\n },\n iridescenceThicknessTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"iridescence\", \"thicknessTexture\"),\n },\n },\n },\n KHR_materials_sheen: {\n sheenColorFactor: {\n type: \"Color3\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).sheen.color,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => _GetMaterial(material, index, payload).sheen.color.copyFrom(value),\n },\n sheenColorTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"sheen\", \"texture\"),\n },\n },\n sheenRoughnessFactor: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).sheen.intensity,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).sheen.intensity = value),\n },\n sheenRoughnessTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"sheen\", \"thicknessTexture\"),\n },\n },\n },\n KHR_materials_specular: {\n specularFactor: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).metallicF0Factor,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).metallicF0Factor = value),\n getPropertyName: [() => \"metallicF0Factor\"],\n },\n specularColorFactor: {\n type: \"Color3\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).metallicReflectanceColor,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => _GetMaterial(material, index, payload).metallicReflectanceColor.copyFrom(value),\n getPropertyName: [() => \"metallicReflectanceColor\"],\n },\n specularTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"metallicReflectanceTexture\"),\n },\n },\n specularColorTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"reflectanceTexture\"),\n },\n },\n },\n KHR_materials_transmission: {\n transmissionFactor: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).subSurface.refractionIntensity,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).subSurface.refractionIntensity = value),\n getPropertyName: [() => \"subSurface.refractionIntensity\"],\n },\n transmissionTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"subSurface\", \"refractionIntensityTexture\"),\n },\n },\n },\n KHR_materials_diffuse_transmission: {\n diffuseTransmissionFactor: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).subSurface.translucencyIntensity,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).subSurface.translucencyIntensity = value),\n },\n diffuseTransmissionTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"subSurface\", \"translucencyIntensityTexture\"),\n },\n },\n diffuseTransmissionColorFactor: {\n type: \"Color3\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).subSurface.translucencyColor,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => value && _GetMaterial(material, index, payload).subSurface.translucencyColor?.copyFrom(value),\n },\n diffuseTransmissionColorTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"subSurface\", \"translucencyColorTexture\"),\n },\n },\n },\n KHR_materials_volume: {\n attenuationColor: {\n type: \"Color3\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).subSurface.tintColor,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => _GetMaterial(material, index, payload).subSurface.tintColor.copyFrom(value),\n },\n attenuationDistance: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).subSurface.tintColorAtDistance,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).subSurface.tintColorAtDistance = value),\n },\n thicknessFactor: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).subSurface.maximumThickness,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).subSurface.maximumThickness = value),\n },\n thicknessTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"subSurface\", \"thicknessTexture\"),\n },\n },\n },\n },\n },\n};\n\nconst extensionsTree: IGLTFObjectModelTreeExtensionsObject = {\n KHR_lights_punctual: {\n lights: {\n length: {\n type: \"number\",\n get: (lights: IKHRLightsPunctual_Light[]) => lights.length,\n getTarget: (lights: IKHRLightsPunctual_Light[]) => lights.map((light) => light._babylonLight!),\n getPropertyName: [(_lights: IKHRLightsPunctual_Light[]) => \"length\"],\n },\n __array__: {\n __target__: true,\n color: {\n type: \"Color3\",\n get: (light: IKHRLightsPunctual_Light) => light._babylonLight?.diffuse,\n set: (value: Color3, light: IKHRLightsPunctual_Light) => light._babylonLight?.diffuse.copyFrom(value),\n getTarget: (light: IKHRLightsPunctual_Light) => light._babylonLight,\n getPropertyName: [(_light: IKHRLightsPunctual_Light) => \"diffuse\"],\n },\n intensity: {\n type: \"number\",\n get: (light: IKHRLightsPunctual_Light) => light._babylonLight?.intensity,\n set: (value: number, light: IKHRLightsPunctual_Light) => (light._babylonLight ? (light._babylonLight.intensity = value) : undefined),\n getTarget: (light: IKHRLightsPunctual_Light) => light._babylonLight,\n getPropertyName: [(_light: IKHRLightsPunctual_Light) => \"intensity\"],\n },\n range: {\n type: \"number\",\n get: (light: IKHRLightsPunctual_Light) => light._babylonLight?.range,\n set: (value: number, light: IKHRLightsPunctual_Light) => (light._babylonLight ? (light._babylonLight.range = value) : undefined),\n getTarget: (light: IKHRLightsPunctual_Light) => light._babylonLight,\n getPropertyName: [(_light: IKHRLightsPunctual_Light) => \"range\"],\n },\n spot: {\n innerConeAngle: {\n type: \"number\",\n get: (light: IKHRLightsPunctual_Light) => (light._babylonLight as SpotLight)?.innerAngle,\n set: (value: number, light: IKHRLightsPunctual_Light) => (light._babylonLight ? ((light._babylonLight as SpotLight).innerAngle = value) : undefined),\n getTarget: (light: IKHRLightsPunctual_Light) => light._babylonLight,\n getPropertyName: [(_light: IKHRLightsPunctual_Light) => \"innerConeAngle\"],\n },\n outerConeAngle: {\n type: \"number\",\n get: (light: IKHRLightsPunctual_Light) => (light._babylonLight as SpotLight)?.angle,\n set: (value: number, light: IKHRLightsPunctual_Light) => (light._babylonLight ? ((light._babylonLight as SpotLight).angle = value) : undefined),\n getTarget: (light: IKHRLightsPunctual_Light) => light._babylonLight,\n getPropertyName: [(_light: IKHRLightsPunctual_Light) => \"outerConeAngle\"],\n },\n },\n },\n },\n },\n EXT_lights_ies: {\n lights: {\n length: {\n type: \"number\",\n get: (lights: IKHRLightsPunctual_Light[]) => lights.length,\n getTarget: (lights: IKHRLightsPunctual_Light[]) => lights.map((light) => light._babylonLight!),\n getPropertyName: [(_lights: IKHRLightsPunctual_Light[]) => \"length\"],\n },\n },\n },\n EXT_lights_image_based: {\n lights: {\n length: {\n type: \"number\",\n get: (lights) => lights.length,\n getTarget: (lights) => lights.map((light) => light._babylonTexture!),\n getPropertyName: [(_lights) => \"length\"],\n },\n __array__: {\n __target__: true,\n intensity: {\n type: \"number\",\n get: (light) => light._babylonTexture?.level,\n set: (value, light) => {\n if (light._babylonTexture) light._babylonTexture.level = value;\n },\n\n getTarget: (light) => light._babylonTexture,\n },\n rotation: {\n type: \"Quaternion\",\n get: (light) => light._babylonTexture && Quaternion.FromRotationMatrix(light._babylonTexture?.getReflectionTextureMatrix()),\n set: (value, light) => {\n if (!light._babylonTexture) return;\n // Invert the rotation so that positive rotation is counter-clockwise.\n if (!light._babylonTexture.getScene()?.useRightHandedSystem) {\n value = Quaternion.Inverse(value);\n }\n\n Matrix.FromQuaternionToRef(value, light._babylonTexture.getReflectionTextureMatrix());\n },\n getTarget: (light) => light._babylonTexture,\n },\n },\n },\n },\n};\n\nfunction _GetTexture(material: IMaterial, payload: any, textureType: keyof PBRMaterial, textureInObject?: string) {\n const babylonMaterial = _GetMaterial(material, payload);\n return textureInObject ? babylonMaterial[textureType][textureInObject] : babylonMaterial[textureType];\n}\nfunction _GetMaterial(material: IMaterial, _index?: number, payload?: any) {\n return material._data?.[payload?.fillMode ?? Constants.MATERIAL_TriangleFillMode]?.babylonMaterial as PBRMaterial;\n}\nfunction _GenerateTextureMap(textureType: keyof PBRMaterial, textureInObject?: string): ITextureDefinition {\n return {\n offset: {\n componentsCount: 2,\n // assuming two independent values for u and v, and NOT a Vector2\n type: \"Vector2\",\n get: (material, _index?, payload?) => {\n const texture = _GetTexture(material, payload, textureType, textureInObject);\n return new Vector2(texture?.uOffset, texture?.vOffset);\n },\n getTarget: _GetMaterial,\n set: (value, material, _index?, payload?) => {\n const texture = _GetTexture(material, payload, textureType, textureInObject);\n (texture.uOffset = value.x), (texture.vOffset = value.y);\n },\n getPropertyName: [() => `${textureType}.${textureInObject}.uOffset`, () => `${textureType}.${textureInObject}.vOffset`],\n },\n rotation: {\n type: \"number\",\n get: (material, _index?, payload?) => _GetTexture(material, payload, textureType, textureInObject)?.wAng,\n getTarget: _GetMaterial,\n set: (value, material, _index?, payload?) => (_GetTexture(material, payload, textureType, textureInObject).wAng = value),\n getPropertyName: [() => `${textureType}.${textureInObject}.wAng`],\n },\n scale: {\n componentsCount: 2,\n type: \"Vector2\",\n get: (material, _index?, payload?) => {\n const texture = _GetTexture(material, payload, textureType, textureInObject);\n return new Vector2(texture?.uScale, texture?.vScale);\n },\n getTarget: _GetMaterial,\n set: (value, material, index?, payload?) => {\n const texture = _GetTexture(material, payload, textureType, textureInObject);\n (texture.uScale = value.x), (texture.vScale = value.y);\n },\n getPropertyName: [() => `${textureType}.${textureInObject}.uScale`, () => `${textureType}.${textureInObject}.vScale`],\n },\n };\n}\n\nconst objectModelMapping: IGLTFObjectModelTree = {\n cameras: camerasTree,\n nodes: nodesTree,\n materials: materialsTree,\n extensions: extensionsTree,\n animations: animationsTree,\n meshes: meshesTree,\n};\n\n/**\n * get a path-to-object converter for the given glTF tree\n * @param gltf the glTF tree to use\n * @returns a path-to-object converter for the given glTF tree\n */\nexport function GetPathToObjectConverter(gltf: IGLTF) {\n return new GLTFPathToObjectConverter(gltf, objectModelMapping);\n}\n\n/**\n * This function will return the object accessor for the given key in the object model\n * If the key is not found, it will return undefined\n * @param key the key to get the mapping for, for example /materials/\\{\\}/emissiveFactor\n * @returns an object accessor for the given key, or undefined if the key is not found\n */\nexport function GetMappingForKey(key: string): IObjectAccessor | undefined {\n // replace every `{}` in key with __array__ to match the object model\n const keyParts = key.split(\"/\").map((part) => part.replace(/{}/g, \"__array__\"));\n let current = objectModelMapping as any;\n for (const part of keyParts) {\n // make sure part is not empty\n if (!part) {\n continue;\n }\n current = current[part];\n }\n // validate that current is an object accessor\n if (current && current.type && current.get) {\n return current;\n }\n return undefined;\n}\n\n/**\n * Set interpolation for a specific key in the object model\n * @param key the key to set, for example /materials/\\{\\}/emissiveFactor\n * @param interpolation the interpolation elements array\n */\nexport function SetInterpolationForKey(key: string, interpolation?: IInterpolationPropertyInfo[]): void {\n // replace every `{}` in key with __array__ to match the object model\n const keyParts = key.split(\"/\").map((part) => part.replace(/{}/g, \"__array__\"));\n let current = objectModelMapping as any;\n for (const part of keyParts) {\n // make sure part is not empty\n if (!part) {\n continue;\n }\n current = current[part];\n }\n // validate that the current object is an object accessor\n if (current && current.type && current.get) {\n (current as IObjectAccessor).interpolation = interpolation;\n }\n}\n\n/**\n * This will ad a new object accessor in the object model at the given key.\n * Note that this will NOT change the typescript types. To do that you will need to change the interface itself (extending it in the module that uses it)\n * @param key the key to add the object accessor at. For example /cameras/\\{\\}/perspective/aspectRatio\n * @param accessor the object accessor to add\n */\nexport function AddObjectAccessorToKey<GLTFTargetType = any, BabylonTargetType = any, BabylonValueType = any>(\n key: string,\n accessor: IObjectAccessor<GLTFTargetType, BabylonTargetType, BabylonValueType>\n): void {\n // replace every `{}` in key with __array__ to match the object model\n const keyParts = key.split(\"/\").map((part) => part.replace(/{}/g, \"__array__\"));\n let current = objectModelMapping as any;\n for (const part of keyParts) {\n // make sure part is not empty\n if (!part) {\n continue;\n }\n if (!current[part]) {\n if (part === \"?\") {\n current.__ignoreObjectTree__ = true;\n continue;\n }\n current[part] = {};\n // if the part is __array__ then add the __target__ property\n if (part === \"__array__\") {\n current[part].__target__ = true;\n }\n }\n current = current[part];\n }\n Object.assign(current, accessor);\n}\n"]}
1
+ {"version":3,"file":"objectModelMapping.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/objectModelMapping.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAKzD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,6CAA+B;AACrE,OAAO,EAAE,SAAS,EAAE,6CAA+B;AAEnD,OAAO,EAAE,MAAM,EAAE,4CAA8B;AAI/C,OAAO,EAAE,SAAS,EAAE,4CAA8B;AAIlD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AA+PxE,MAAM,SAAS,GAAoC;IAC/C,MAAM,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,GAAG,EAAE,CAAC,KAAc,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM;QACrC,SAAS,EAAE,CAAC,KAAc,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,qBAAsB,CAAC;QAC/E,eAAe,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC;KACpC;IACD,SAAS,EAAE;QACP,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE;YACT,IAAI,EAAE,SAAS;YACf,GAAG,EAAE,CAAC,IAAW,EAAE,EAAE,CAAC,IAAI,CAAC,qBAAqB,EAAE,QAAQ;YAC1D,GAAG,EAAE,CAAC,KAAc,EAAE,IAAW,EAAE,EAAE,CAAC,IAAI,CAAC,qBAAqB,EAAE,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;YAC1F,SAAS,EAAE,CAAC,IAAW,EAAE,EAAE,CAAC,IAAI,CAAC,qBAAqB;YACtD,e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AM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AACrC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\n\nimport type { TransformNode } from \"core/Meshes/transformNode\";\nimport type { IAnimation, ICamera, IGLTF, IKHRLightsPunctual_Light, IMaterial, IMesh, INode } from \"../glTFLoaderInterfaces\";\nimport type { Vector3 } from \"core/Maths/math.vector\";\nimport { Matrix, Quaternion, Vector2 } from \"core/Maths/math.vector\";\nimport { Constants } from \"core/Engines/constants\";\nimport type { Color3 } from \"core/Maths/math.color\";\nimport { Color4 } from \"core/Maths/math.color\";\nimport type { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport type { Light } from \"core/Lights/light\";\nimport type { Nullable } from \"core/types\";\nimport { SpotLight } from \"core/Lights/spotLight\";\nimport type { IEXTLightsImageBased_LightImageBased } from \"babylonjs-gltf2interface\";\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\nimport type { IInterpolationPropertyInfo, IObjectAccessor } from \"core/FlowGraph/typeDefinitions\";\nimport { GLTFPathToObjectConverter } from \"./gltfPathToObjectConverter\";\nimport type { AnimationGroup } from \"core/Animations/animationGroup\";\nimport type { Mesh } from \"core/Meshes/mesh\";\n\nexport interface IGLTFObjectModelTree {\n cameras: IGLTFObjectModelTreeCamerasObject;\n nodes: IGLTFObjectModelTreeNodesObject;\n materials: IGLTFObjectModelTreeMaterialsObject;\n extensions: IGLTFObjectModelTreeExtensionsObject;\n animations: {\n length: IObjectAccessor<IAnimation[], AnimationGroup[], number>;\n __array__: {};\n };\n meshes: {\n length: IObjectAccessor<IMesh[], (Mesh | undefined)[], number>;\n __array__: {};\n };\n}\n\nexport interface IGLTFObjectModelTreeNodesObject<GLTFTargetType = INode, BabylonTargetType = TransformNode> {\n length: IObjectAccessor<GLTFTargetType[], BabylonTargetType[], number>;\n __array__: {\n __target__: boolean;\n translation: IObjectAccessor<GLTFTargetType, BabylonTargetType, Vector3>;\n rotation: IObjectAccessor<GLTFTargetType, BabylonTargetType, Quaternion>;\n scale: IObjectAccessor<GLTFTargetType, BabylonTargetType, Vector3>;\n matrix: IObjectAccessor<GLTFTargetType, BabylonTargetType, Matrix>;\n globalMatrix: IObjectAccessor<GLTFTargetType, BabylonTargetType, Matrix>;\n weights: {\n length: IObjectAccessor<GLTFTargetType, BabylonTargetType, number>;\n __array__: { __target__: boolean } & IObjectAccessor<GLTFTargetType, BabylonTargetType, number>;\n } & IObjectAccessor<GLTFTargetType, BabylonTargetType, number[]>;\n extensions: {\n EXT_lights_ies?: {\n multiplier: IObjectAccessor<INode, Light, number>;\n color: IObjectAccessor<INode, Light, Color3>;\n };\n };\n };\n}\n\nexport interface IGLTFObjectModelTreeCamerasObject {\n __array__: {\n __target__: boolean;\n orthographic: {\n xmag: IObjectAccessor<ICamera, ICamera, Vector2>;\n ymag: IObjectAccessor<ICamera, ICamera, Vector2>;\n zfar: IObjectAccessor<ICamera, ICamera, number>;\n znear: IObjectAccessor<ICamera, ICamera, number>;\n };\n perspective: {\n yfov: IObjectAccessor<ICamera, ICamera, number>;\n zfar: IObjectAccessor<ICamera, ICamera, number>;\n znear: IObjectAccessor<ICamera, ICamera, number>;\n aspectRatio: IObjectAccessor<ICamera, ICamera, Nullable<number>>;\n };\n };\n}\n\nexport interface IGLTFObjectModelTreeMaterialsObject {\n __array__: {\n __target__: boolean;\n pbrMetallicRoughness: {\n baseColorFactor: IObjectAccessor<IMaterial, PBRMaterial, Color4>;\n metallicFactor: IObjectAccessor<IMaterial, PBRMaterial, Nullable<number>>;\n roughnessFactor: IObjectAccessor<IMaterial, PBRMaterial, Nullable<number>>;\n baseColorTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n metallicRoughnessTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n emissiveFactor: IObjectAccessor<IMaterial, PBRMaterial, Color3>;\n normalTexture: {\n scale: IObjectAccessor<IMaterial, PBRMaterial, number>;\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n occlusionTexture: {\n strength: IObjectAccessor<IMaterial, PBRMaterial, number>;\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n emissiveTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n extensions: {\n KHR_materials_anisotropy: {\n anisotropyStrength: IObjectAccessor<IMaterial, PBRMaterial, number>;\n anisotropyRotation: IObjectAccessor<IMaterial, PBRMaterial, number>;\n anisotropyTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n KHR_materials_clearcoat: {\n clearcoatFactor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n clearcoatRoughnessFactor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n clearcoatTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n clearcoatNormalTexture: {\n scale: IObjectAccessor<IMaterial, PBRMaterial, number>;\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n clearcoatRoughnessTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n KHR_materials_dispersion: {\n dispersion: IObjectAccessor<IMaterial, PBRMaterial, number>;\n };\n KHR_materials_emissive_strength: {\n emissiveStrength: IObjectAccessor<IMaterial, PBRMaterial, number>;\n };\n KHR_materials_ior: {\n ior: IObjectAccessor<IMaterial, PBRMaterial, number>;\n };\n KHR_materials_iridescence: {\n iridescenceFactor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n iridescenceIor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n iridescenceThicknessMinimum: IObjectAccessor<IMaterial, PBRMaterial, number>;\n iridescenceThicknessMaximum: IObjectAccessor<IMaterial, PBRMaterial, number>;\n iridescenceTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n iridescenceThicknessTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n KHR_materials_sheen: {\n sheenColorFactor: IObjectAccessor<IMaterial, PBRMaterial, Color3>;\n sheenRoughnessFactor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n sheenColorTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n sheenRoughnessTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n KHR_materials_specular: {\n specularFactor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n specularColorFactor: IObjectAccessor<IMaterial, PBRMaterial, Color3>;\n specularTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n specularColorTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n KHR_materials_transmission: {\n transmissionFactor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n transmissionTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n KHR_materials_diffuse_transmission: {\n diffuseTransmissionFactor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n diffuseTransmissionTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n diffuseTransmissionColorFactor: IObjectAccessor<IMaterial, PBRMaterial, Nullable<Color3>>;\n diffuseTransmissionColorTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n KHR_materials_volume: {\n thicknessFactor: IObjectAccessor<IMaterial, PBRMaterial, number>;\n attenuationColor: IObjectAccessor<IMaterial, PBRMaterial, Color3>;\n attenuationDistance: IObjectAccessor<IMaterial, PBRMaterial, number>;\n thicknessTexture: {\n extensions: {\n KHR_texture_transform: ITextureDefinition;\n };\n };\n };\n };\n };\n}\n\ninterface ITextureDefinition {\n offset: IObjectAccessor<IMaterial, PBRMaterial, Vector2>;\n rotation: IObjectAccessor<IMaterial, PBRMaterial, number>;\n scale: IObjectAccessor<IMaterial, PBRMaterial, Vector2>;\n}\n\nexport interface IGLTFObjectModelTreeMeshesObject {}\n\nexport interface IGLTFObjectModelTreeExtensionsObject {\n KHR_lights_punctual: {\n lights: {\n length: IObjectAccessor<IKHRLightsPunctual_Light[], Light[], number>;\n __array__: {\n __target__: boolean;\n color: IObjectAccessor<IKHRLightsPunctual_Light, Light, Color3>;\n intensity: IObjectAccessor<IKHRLightsPunctual_Light, Light, number>;\n range: IObjectAccessor<IKHRLightsPunctual_Light, Light, number>;\n spot: {\n innerConeAngle: IObjectAccessor<IKHRLightsPunctual_Light, Light, number>;\n outerConeAngle: IObjectAccessor<IKHRLightsPunctual_Light, Light, number>;\n };\n };\n };\n };\n EXT_lights_ies: {\n lights: {\n length: IObjectAccessor<IKHRLightsPunctual_Light[], Light[], number>;\n };\n };\n EXT_lights_image_based: {\n lights: {\n __array__: {\n __target__: boolean;\n intensity: IObjectAccessor<IEXTLightsImageBased_LightImageBased, BaseTexture, number>;\n rotation: IObjectAccessor<IEXTLightsImageBased_LightImageBased, BaseTexture, Quaternion>;\n };\n length: IObjectAccessor<IEXTLightsImageBased_LightImageBased[], BaseTexture[], number>;\n };\n };\n}\n\nconst nodesTree: IGLTFObjectModelTreeNodesObject = {\n length: {\n type: \"number\",\n get: (nodes: INode[]) => nodes.length,\n getTarget: (nodes: INode[]) => nodes.map((node) => node._babylonTransformNode!),\n getPropertyName: [() => \"length\"],\n },\n __array__: {\n __target__: true,\n translation: {\n type: \"Vector3\",\n get: (node: INode) => node._babylonTransformNode?.position,\n set: (value: Vector3, node: INode) => node._babylonTransformNode?.position.copyFrom(value),\n getTarget: (node: INode) => node._babylonTransformNode,\n getPropertyName: [() => \"position\"],\n },\n rotation: {\n type: \"Quaternion\",\n get: (node: INode) => node._babylonTransformNode?.rotationQuaternion!,\n set: (value: Quaternion, node: INode) => node._babylonTransformNode?.rotationQuaternion?.copyFrom(value),\n getTarget: (node: INode) => node._babylonTransformNode,\n getPropertyName: [() => \"rotationQuaternion\"],\n },\n scale: {\n type: \"Vector3\",\n get: (node: INode) => node._babylonTransformNode?.scaling,\n set: (value: Vector3, node: INode) => node._babylonTransformNode?.scaling.copyFrom(value),\n getTarget: (node: INode) => node._babylonTransformNode,\n getPropertyName: [() => \"scaling\"],\n },\n weights: {\n length: {\n type: \"number\",\n get: (node: INode) => node._numMorphTargets,\n getTarget: (node: INode) => node._babylonTransformNode,\n getPropertyName: [() => \"influence\"],\n },\n __array__: {\n __target__: true,\n type: \"number\",\n get: (node: INode, index?: number) => (index !== undefined ? node._primitiveBabylonMeshes?.[0].morphTargetManager?.getTarget(index).influence : undefined),\n // set: (value: number, node: INode, index?: number) => node._babylonTransformNode?.getMorphTargetManager()?.getTarget(index)?.setInfluence(value),\n getTarget: (node: INode) => node._babylonTransformNode,\n getPropertyName: [() => \"influence\"],\n },\n type: \"number[]\",\n get: (node: INode, index?: number) => [0], // TODO: get the weights correctly\n // set: (value: number, node: INode, index?: number) => node._babylonTransformNode?.getMorphTargetManager()?.getTarget(index)?.setInfluence(value),\n getTarget: (node: INode) => node._babylonTransformNode,\n getPropertyName: [() => \"influence\"],\n },\n // readonly!\n matrix: {\n type: \"Matrix\",\n get: (node: INode) => Matrix.Compose(node._babylonTransformNode?.scaling!, node._babylonTransformNode?.rotationQuaternion!, node._babylonTransformNode?.position!),\n getTarget: (node: INode) => node._babylonTransformNode,\n },\n globalMatrix: {\n type: \"Matrix\",\n get: (node: INode) => node._babylonTransformNode?.getWorldMatrix(),\n getTarget: (node: INode) => node._babylonTransformNode,\n getPropertyName: [() => \"worldMatrixFromCache\"],\n isReadOnly: true,\n },\n extensions: {\n EXT_lights_ies: {\n multiplier: {\n type: \"number\",\n get: (node: INode) => {\n return node._babylonTransformNode?.getChildren((child) => child instanceof SpotLight, true)[0]?.intensity;\n },\n getTarget: (node: INode) => node._babylonTransformNode?.getChildren((child) => child instanceof SpotLight, true)[0],\n set: (value, node) => {\n if (node._babylonTransformNode) {\n const light = node._babylonTransformNode.getChildren((child) => child instanceof SpotLight, true)[0];\n if (light) {\n light.intensity = value;\n }\n }\n },\n },\n color: {\n type: \"Color3\",\n get: (node: INode) => {\n return node._babylonTransformNode?.getChildren((child) => child instanceof SpotLight, true)[0]?.diffuse;\n },\n getTarget: (node: INode) => node._babylonTransformNode?.getChildren((child) => child instanceof SpotLight, true)[0],\n set: (value, node: INode) => {\n if (node._babylonTransformNode) {\n const light = node._babylonTransformNode.getChildren((child) => child instanceof SpotLight, true)[0];\n if (light) {\n light.diffuse = value;\n }\n }\n },\n },\n },\n },\n },\n};\n\nconst animationsTree = {\n length: {\n type: \"number\",\n get: (animations: IAnimation[]) => animations.length,\n getTarget: (animations: IAnimation[]) => animations.map((animation) => animation._babylonAnimationGroup!),\n getPropertyName: [() => \"length\"],\n },\n __array__: {},\n};\n\nconst meshesTree = {\n length: {\n type: \"number\",\n get: (meshes: IMesh[]) => meshes.length,\n getTarget: (meshes: IMesh[]) => meshes.map((mesh) => mesh.primitives[0]._instanceData?.babylonSourceMesh),\n getPropertyName: [() => \"length\"],\n },\n __array__: {},\n};\n\nconst camerasTree: IGLTFObjectModelTreeCamerasObject = {\n __array__: {\n __target__: true,\n orthographic: {\n xmag: {\n componentsCount: 2,\n type: \"Vector2\",\n get: (camera) => new Vector2(camera._babylonCamera?.orthoLeft ?? 0, camera._babylonCamera?.orthoRight ?? 0),\n set: (value, camera) => {\n if (camera._babylonCamera) {\n camera._babylonCamera.orthoLeft = value.x;\n camera._babylonCamera.orthoRight = value.y;\n }\n },\n getTarget: (camera) => camera,\n getPropertyName: [() => \"orthoLeft\", () => \"orthoRight\"],\n },\n ymag: {\n componentsCount: 2,\n type: \"Vector2\",\n get: (camera: ICamera) => new Vector2(camera._babylonCamera?.orthoBottom ?? 0, camera._babylonCamera?.orthoTop ?? 0),\n set: (value: Vector2, camera: ICamera) => {\n if (camera._babylonCamera) {\n camera._babylonCamera.orthoBottom = value.x;\n camera._babylonCamera.orthoTop = value.y;\n }\n },\n getTarget: (camera) => camera,\n getPropertyName: [() => \"orthoBottom\", () => \"orthoTop\"],\n },\n zfar: {\n type: \"number\",\n get: (camera: ICamera) => camera._babylonCamera?.maxZ,\n set: (value: number, camera: ICamera) => {\n if (camera._babylonCamera) {\n camera._babylonCamera.maxZ = value;\n }\n },\n getTarget: (camera: ICamera) => camera,\n getPropertyName: [() => \"maxZ\"],\n },\n znear: {\n type: \"number\",\n get: (camera: ICamera) => camera._babylonCamera?.minZ,\n set: (value: number, camera: ICamera) => {\n if (camera._babylonCamera) {\n camera._babylonCamera.minZ = value;\n }\n },\n getTarget: (camera: ICamera) => camera,\n getPropertyName: [() => \"minZ\"],\n },\n },\n perspective: {\n aspectRatio: {\n type: \"number\",\n get: (camera: ICamera) => camera._babylonCamera?.getEngine().getAspectRatio(camera._babylonCamera),\n getTarget: (camera: ICamera) => camera,\n getPropertyName: [() => \"aspectRatio\"],\n isReadOnly: true, // might not be the case for glTF?\n },\n yfov: {\n type: \"number\",\n get: (camera: ICamera) => camera._babylonCamera?.fov,\n set: (value: number, camera: ICamera) => {\n if (camera._babylonCamera) {\n camera._babylonCamera.fov = value;\n }\n },\n getTarget: (camera: ICamera) => camera,\n getPropertyName: [() => \"fov\"],\n },\n zfar: {\n type: \"number\",\n get: (camera: ICamera) => camera._babylonCamera?.maxZ,\n set: (value: number, camera: ICamera) => {\n if (camera._babylonCamera) {\n camera._babylonCamera.maxZ = value;\n }\n },\n getTarget: (camera: ICamera) => camera,\n getPropertyName: [() => \"maxZ\"],\n },\n znear: {\n type: \"number\",\n get: (camera: ICamera) => camera._babylonCamera?.minZ,\n set: (value: number, camera: ICamera) => {\n if (camera._babylonCamera) {\n camera._babylonCamera.minZ = value;\n }\n },\n getTarget: (camera: ICamera) => camera,\n getPropertyName: [() => \"minZ\"],\n },\n },\n },\n};\n\nconst materialsTree: IGLTFObjectModelTreeMaterialsObject = {\n __array__: {\n __target__: true,\n emissiveFactor: {\n type: \"Color3\",\n get: (material, index?, payload?) => _GetMaterial(material, index, payload).emissiveColor,\n set: (value: Color3, material, index?, payload?) => _GetMaterial(material, index, payload).emissiveColor.copyFrom(value),\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"emissiveColor\"],\n },\n emissiveTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"emissiveTexture\"),\n },\n },\n normalTexture: {\n scale: {\n type: \"number\",\n get: (material, index?, payload?) => _GetTexture(material, payload, \"bumpTexture\")?.level,\n set: (value: number, material, index?, payload?) => {\n const texture = _GetTexture(material, payload, \"bumpTexture\");\n if (texture) {\n texture.level = value;\n }\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"level\"],\n },\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"bumpTexture\"),\n },\n },\n occlusionTexture: {\n strength: {\n type: \"number\",\n get: (material, index?, payload?) => _GetMaterial(material, index, payload).ambientTextureStrength,\n set: (value: number, material, index?, payload?) => {\n const mat = _GetMaterial(material, index, payload);\n if (mat) {\n mat.ambientTextureStrength = value;\n }\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"ambientTextureStrength\"],\n },\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"ambientTexture\"),\n },\n },\n pbrMetallicRoughness: {\n baseColorFactor: {\n type: \"Color4\",\n get: (material, index?, payload?) => {\n const mat = _GetMaterial(material, index, payload);\n return Color4.FromColor3(mat.albedoColor, mat.alpha);\n },\n set: (value: Color4, material, index?, payload?) => {\n const mat = _GetMaterial(material, index, payload);\n mat.albedoColor.set(value.r, value.g, value.b);\n mat.alpha = value.a;\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n // This is correct on the animation level, but incorrect as a single property of a type Color4\n getPropertyName: [() => \"albedoColor\", () => \"alpha\"],\n },\n baseColorTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"albedoTexture\"),\n },\n },\n metallicFactor: {\n type: \"number\",\n get: (material, index?, payload?) => _GetMaterial(material, index, payload).metallic,\n set: (value, material, index?, payload?) => {\n const mat = _GetMaterial(material, index, payload);\n if (mat) {\n mat.metallic = value;\n }\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"metallic\"],\n },\n roughnessFactor: {\n type: \"number\",\n get: (material, index?, payload?) => _GetMaterial(material, index, payload).roughness,\n set: (value, material, index?, payload?) => {\n const mat = _GetMaterial(material, index, payload);\n if (mat) {\n mat.roughness = value;\n }\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"roughness\"],\n },\n metallicRoughnessTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"metallicTexture\"),\n },\n },\n },\n extensions: {\n KHR_materials_anisotropy: {\n anisotropyStrength: {\n type: \"number\",\n get: (material, index?, payload?) => _GetMaterial(material, index, payload).anisotropy.intensity,\n set: (value: number, material, index?, payload?) => {\n _GetMaterial(material, index, payload).anisotropy.intensity = value;\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"anisotropy.intensity\"],\n },\n anisotropyRotation: {\n type: \"number\",\n get: (material, index?, payload?) => _GetMaterial(material, index, payload).anisotropy.angle,\n set: (value: number, material, index?, payload?) => {\n _GetMaterial(material, index, payload).anisotropy.angle = value;\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"anisotropy.angle\"],\n },\n anisotropyTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"anisotropy\", \"texture\"),\n },\n },\n },\n KHR_materials_clearcoat: {\n clearcoatFactor: {\n type: \"number\",\n get: (material, index?, payload?) => _GetMaterial(material, index, payload).clearCoat.intensity,\n set: (value, material, index?, payload?) => {\n _GetMaterial(material, index, payload).clearCoat.intensity = value;\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"clearCoat.intensity\"],\n },\n clearcoatRoughnessFactor: {\n type: \"number\",\n get: (material, index?, payload?) => _GetMaterial(material, index, payload).clearCoat.roughness,\n set: (value, material, index?, payload?) => {\n _GetMaterial(material, index, payload).clearCoat.roughness = value;\n },\n getTarget: (material, index?, payload?) => _GetMaterial(material, index, payload),\n getPropertyName: [() => \"clearCoat.roughness\"],\n },\n clearcoatTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"clearCoat\", \"texture\"),\n },\n },\n clearcoatNormalTexture: {\n scale: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).clearCoat.bumpTexture?.level,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).clearCoat.bumpTexture!.level = value),\n },\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"clearCoat\", \"bumpTexture\"),\n },\n },\n clearcoatRoughnessTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"clearCoat\", \"textureRoughness\"),\n },\n },\n },\n KHR_materials_dispersion: {\n dispersion: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).subSurface.dispersion,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).subSurface.dispersion = value),\n },\n },\n KHR_materials_emissive_strength: {\n emissiveStrength: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).emissiveIntensity,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).emissiveIntensity = value),\n },\n },\n KHR_materials_ior: {\n ior: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).indexOfRefraction,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).indexOfRefraction = value),\n },\n },\n KHR_materials_iridescence: {\n iridescenceFactor: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).iridescence.intensity,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).iridescence.intensity = value),\n },\n iridescenceIor: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).iridescence.indexOfRefraction,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).iridescence.indexOfRefraction = value),\n },\n iridescenceTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"iridescence\", \"texture\"),\n },\n },\n iridescenceThicknessMaximum: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).iridescence.maximumThickness,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).iridescence.maximumThickness = value),\n },\n iridescenceThicknessMinimum: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).iridescence.minimumThickness,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).iridescence.minimumThickness = value),\n },\n iridescenceThicknessTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"iridescence\", \"thicknessTexture\"),\n },\n },\n },\n KHR_materials_sheen: {\n sheenColorFactor: {\n type: \"Color3\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).sheen.color,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => _GetMaterial(material, index, payload).sheen.color.copyFrom(value),\n },\n sheenColorTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"sheen\", \"texture\"),\n },\n },\n sheenRoughnessFactor: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).sheen.intensity,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).sheen.intensity = value),\n },\n sheenRoughnessTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"sheen\", \"thicknessTexture\"),\n },\n },\n },\n KHR_materials_specular: {\n specularFactor: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).metallicF0Factor,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).metallicF0Factor = value),\n getPropertyName: [() => \"metallicF0Factor\"],\n },\n specularColorFactor: {\n type: \"Color3\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).metallicReflectanceColor,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => _GetMaterial(material, index, payload).metallicReflectanceColor.copyFrom(value),\n getPropertyName: [() => \"metallicReflectanceColor\"],\n },\n specularTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"metallicReflectanceTexture\"),\n },\n },\n specularColorTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"reflectanceTexture\"),\n },\n },\n },\n KHR_materials_transmission: {\n transmissionFactor: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).subSurface.refractionIntensity,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).subSurface.refractionIntensity = value),\n getPropertyName: [() => \"subSurface.refractionIntensity\"],\n },\n transmissionTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"subSurface\", \"refractionIntensityTexture\"),\n },\n },\n },\n KHR_materials_diffuse_transmission: {\n diffuseTransmissionFactor: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).subSurface.translucencyIntensity,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).subSurface.translucencyIntensity = value),\n },\n diffuseTransmissionTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"subSurface\", \"translucencyIntensityTexture\"),\n },\n },\n diffuseTransmissionColorFactor: {\n type: \"Color3\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).subSurface.translucencyColor,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => value && _GetMaterial(material, index, payload).subSurface.translucencyColor?.copyFrom(value),\n },\n diffuseTransmissionColorTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"subSurface\", \"translucencyColorTexture\"),\n },\n },\n },\n KHR_materials_volume: {\n attenuationColor: {\n type: \"Color3\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).subSurface.tintColor,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => _GetMaterial(material, index, payload).subSurface.tintColor.copyFrom(value),\n },\n attenuationDistance: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).subSurface.tintColorAtDistance,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).subSurface.tintColorAtDistance = value),\n },\n thicknessFactor: {\n type: \"number\",\n get: (material, index, payload) => _GetMaterial(material, index, payload).subSurface.maximumThickness,\n getTarget: _GetMaterial,\n set: (value, material, index, payload) => (_GetMaterial(material, index, payload).subSurface.maximumThickness = value),\n },\n thicknessTexture: {\n extensions: {\n KHR_texture_transform: _GenerateTextureMap(\"subSurface\", \"thicknessTexture\"),\n },\n },\n },\n },\n },\n};\n\nconst extensionsTree: IGLTFObjectModelTreeExtensionsObject = {\n KHR_lights_punctual: {\n lights: {\n length: {\n type: \"number\",\n get: (lights: IKHRLightsPunctual_Light[]) => lights.length,\n getTarget: (lights: IKHRLightsPunctual_Light[]) => lights.map((light) => light._babylonLight!),\n getPropertyName: [(_lights: IKHRLightsPunctual_Light[]) => \"length\"],\n },\n __array__: {\n __target__: true,\n color: {\n type: \"Color3\",\n get: (light: IKHRLightsPunctual_Light) => light._babylonLight?.diffuse,\n set: (value: Color3, light: IKHRLightsPunctual_Light) => light._babylonLight?.diffuse.copyFrom(value),\n getTarget: (light: IKHRLightsPunctual_Light) => light._babylonLight,\n getPropertyName: [(_light: IKHRLightsPunctual_Light) => \"diffuse\"],\n },\n intensity: {\n type: \"number\",\n get: (light: IKHRLightsPunctual_Light) => light._babylonLight?.intensity,\n set: (value: number, light: IKHRLightsPunctual_Light) => (light._babylonLight ? (light._babylonLight.intensity = value) : undefined),\n getTarget: (light: IKHRLightsPunctual_Light) => light._babylonLight,\n getPropertyName: [(_light: IKHRLightsPunctual_Light) => \"intensity\"],\n },\n range: {\n type: \"number\",\n get: (light: IKHRLightsPunctual_Light) => light._babylonLight?.range,\n set: (value: number, light: IKHRLightsPunctual_Light) => (light._babylonLight ? (light._babylonLight.range = value) : undefined),\n getTarget: (light: IKHRLightsPunctual_Light) => light._babylonLight,\n getPropertyName: [(_light: IKHRLightsPunctual_Light) => \"range\"],\n },\n spot: {\n innerConeAngle: {\n type: \"number\",\n get: (light: IKHRLightsPunctual_Light) => (light._babylonLight as SpotLight)?.innerAngle,\n set: (value: number, light: IKHRLightsPunctual_Light) => (light._babylonLight ? ((light._babylonLight as SpotLight).innerAngle = value) : undefined),\n getTarget: (light: IKHRLightsPunctual_Light) => light._babylonLight,\n getPropertyName: [(_light: IKHRLightsPunctual_Light) => \"innerConeAngle\"],\n },\n outerConeAngle: {\n type: \"number\",\n get: (light: IKHRLightsPunctual_Light) => (light._babylonLight as SpotLight)?.angle,\n set: (value: number, light: IKHRLightsPunctual_Light) => (light._babylonLight ? ((light._babylonLight as SpotLight).angle = value) : undefined),\n getTarget: (light: IKHRLightsPunctual_Light) => light._babylonLight,\n getPropertyName: [(_light: IKHRLightsPunctual_Light) => \"outerConeAngle\"],\n },\n },\n },\n },\n },\n EXT_lights_ies: {\n lights: {\n length: {\n type: \"number\",\n get: (lights: IKHRLightsPunctual_Light[]) => lights.length,\n getTarget: (lights: IKHRLightsPunctual_Light[]) => lights.map((light) => light._babylonLight!),\n getPropertyName: [(_lights: IKHRLightsPunctual_Light[]) => \"length\"],\n },\n },\n },\n EXT_lights_image_based: {\n lights: {\n length: {\n type: \"number\",\n get: (lights) => lights.length,\n getTarget: (lights) => lights.map((light) => light._babylonTexture!),\n getPropertyName: [(_lights) => \"length\"],\n },\n __array__: {\n __target__: true,\n intensity: {\n type: \"number\",\n get: (light) => light._babylonTexture?.level,\n set: (value, light) => {\n if (light._babylonTexture) light._babylonTexture.level = value;\n },\n\n getTarget: (light) => light._babylonTexture,\n },\n rotation: {\n type: \"Quaternion\",\n get: (light) => light._babylonTexture && Quaternion.FromRotationMatrix(light._babylonTexture?.getReflectionTextureMatrix()),\n set: (value, light) => {\n if (!light._babylonTexture) return;\n // Invert the rotation so that positive rotation is counter-clockwise.\n if (!light._babylonTexture.getScene()?.useRightHandedSystem) {\n value = Quaternion.Inverse(value);\n }\n\n Matrix.FromQuaternionToRef(value, light._babylonTexture.getReflectionTextureMatrix());\n },\n getTarget: (light) => light._babylonTexture,\n },\n },\n },\n },\n};\n\nfunction _GetTexture(material: IMaterial, payload: any, textureType: keyof PBRMaterial, textureInObject?: string) {\n const babylonMaterial = _GetMaterial(material, payload);\n return textureInObject ? babylonMaterial[textureType][textureInObject] : babylonMaterial[textureType];\n}\nfunction _GetMaterial(material: IMaterial, _index?: number, payload?: any) {\n return material._data?.[payload?.fillMode ?? Constants.MATERIAL_TriangleFillMode]?.babylonMaterial as PBRMaterial;\n}\nfunction _GenerateTextureMap(textureType: keyof PBRMaterial, textureInObject?: string): ITextureDefinition {\n return {\n offset: {\n componentsCount: 2,\n // assuming two independent values for u and v, and NOT a Vector2\n type: \"Vector2\",\n get: (material, _index?, payload?) => {\n const texture = _GetTexture(material, payload, textureType, textureInObject);\n return new Vector2(texture?.uOffset, texture?.vOffset);\n },\n getTarget: _GetMaterial,\n set: (value, material, _index?, payload?) => {\n const texture = _GetTexture(material, payload, textureType, textureInObject);\n (texture.uOffset = value.x), (texture.vOffset = value.y);\n },\n getPropertyName: [() => `${textureType}.${textureInObject}.uOffset`, () => `${textureType}.${textureInObject}.vOffset`],\n },\n rotation: {\n type: \"number\",\n get: (material, _index?, payload?) => _GetTexture(material, payload, textureType, textureInObject)?.wAng,\n getTarget: _GetMaterial,\n set: (value, material, _index?, payload?) => (_GetTexture(material, payload, textureType, textureInObject).wAng = value),\n getPropertyName: [() => `${textureType}.${textureInObject}.wAng`],\n },\n scale: {\n componentsCount: 2,\n type: \"Vector2\",\n get: (material, _index?, payload?) => {\n const texture = _GetTexture(material, payload, textureType, textureInObject);\n return new Vector2(texture?.uScale, texture?.vScale);\n },\n getTarget: _GetMaterial,\n set: (value, material, index?, payload?) => {\n const texture = _GetTexture(material, payload, textureType, textureInObject);\n (texture.uScale = value.x), (texture.vScale = value.y);\n },\n getPropertyName: [() => `${textureType}.${textureInObject}.uScale`, () => `${textureType}.${textureInObject}.vScale`],\n },\n };\n}\n\nconst objectModelMapping: IGLTFObjectModelTree = {\n cameras: camerasTree,\n nodes: nodesTree,\n materials: materialsTree,\n extensions: extensionsTree,\n animations: animationsTree,\n meshes: meshesTree,\n};\n\n/**\n * get a path-to-object converter for the given glTF tree\n * @param gltf the glTF tree to use\n * @returns a path-to-object converter for the given glTF tree\n */\nexport function GetPathToObjectConverter(gltf: IGLTF) {\n return new GLTFPathToObjectConverter(gltf, objectModelMapping);\n}\n\n/**\n * This function will return the object accessor for the given key in the object model\n * If the key is not found, it will return undefined\n * @param key the key to get the mapping for, for example /materials/\\{\\}/emissiveFactor\n * @returns an object accessor for the given key, or undefined if the key is not found\n */\nexport function GetMappingForKey(key: string): IObjectAccessor | undefined {\n // replace every `{}` in key with __array__ to match the object model\n const keyParts = key.split(\"/\").map((part) => part.replace(/{}/g, \"__array__\"));\n let current = objectModelMapping as any;\n for (const part of keyParts) {\n // make sure part is not empty\n if (!part) {\n continue;\n }\n current = current[part];\n }\n // validate that current is an object accessor\n if (current && current.type && current.get) {\n return current;\n }\n return undefined;\n}\n\n/**\n * Set interpolation for a specific key in the object model\n * @param key the key to set, for example /materials/\\{\\}/emissiveFactor\n * @param interpolation the interpolation elements array\n */\nexport function SetInterpolationForKey(key: string, interpolation?: IInterpolationPropertyInfo[]): void {\n // replace every `{}` in key with __array__ to match the object model\n const keyParts = key.split(\"/\").map((part) => part.replace(/{}/g, \"__array__\"));\n let current = objectModelMapping as any;\n for (const part of keyParts) {\n // make sure part is not empty\n if (!part) {\n continue;\n }\n current = current[part];\n }\n // validate that the current object is an object accessor\n if (current && current.type && current.get) {\n (current as IObjectAccessor).interpolation = interpolation;\n }\n}\n\n/**\n * This will ad a new object accessor in the object model at the given key.\n * Note that this will NOT change the typescript types. To do that you will need to change the interface itself (extending it in the module that uses it)\n * @param key the key to add the object accessor at. For example /cameras/\\{\\}/perspective/aspectRatio\n * @param accessor the object accessor to add\n */\nexport function AddObjectAccessorToKey<GLTFTargetType = any, BabylonTargetType = any, BabylonValueType = any>(\n key: string,\n accessor: IObjectAccessor<GLTFTargetType, BabylonTargetType, BabylonValueType>\n): void {\n // replace every `{}` in key with __array__ to match the object model\n const keyParts = key.split(\"/\").map((part) => part.replace(/{}/g, \"__array__\"));\n let current = objectModelMapping as any;\n for (const part of keyParts) {\n // make sure part is not empty\n if (!part) {\n continue;\n }\n if (!current[part]) {\n if (part === \"?\") {\n current.__ignoreObjectTree__ = true;\n continue;\n }\n current[part] = {};\n // if the part is __array__ then add the __target__ property\n if (part === \"__array__\") {\n current[part].__target__ = true;\n }\n }\n current = current[part];\n }\n Object.assign(current, accessor);\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/loaders",
3
- "version": "7.52.2",
3
+ "version": "7.52.3",
4
4
  "main": "index.js",
5
5
  "module": "index.js",
6
6
  "types": "index.d.ts",
@@ -18,10 +18,10 @@
18
18
  "postcompile": "build-tools -c add-js-to-es6"
19
19
  },
20
20
  "devDependencies": {
21
- "@babylonjs/core": "^7.52.2",
21
+ "@babylonjs/core": "^7.52.3",
22
22
  "@dev/build-tools": "^1.0.0",
23
23
  "@lts/loaders": "^1.0.0",
24
- "babylonjs-gltf2interface": "^7.52.2"
24
+ "babylonjs-gltf2interface": "^7.52.3"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "@babylonjs/core": "^7.0.0",