@babylonjs/loaders 8.2.0 → 8.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/OBJ/index.d.ts +4 -4
- package/OBJ/objFileLoader.d.ts +2 -2
- package/OBJ/solidParser.d.ts +1 -1
- package/SPLAT/index.d.ts +2 -2
- package/SPLAT/splatFileLoader.d.ts +2 -2
- package/STL/index.d.ts +1 -1
- package/STL/stlFileLoader.d.ts +1 -1
- package/glTF/1.0/glTFBinaryExtension.d.ts +3 -3
- package/glTF/1.0/glTFLoader.d.ts +2 -2
- package/glTF/1.0/glTFLoaderUtils.d.ts +2 -2
- package/glTF/1.0/glTFMaterialsCommonExtension.d.ts +2 -2
- package/glTF/1.0/index.d.ts +5 -5
- package/glTF/2.0/Extensions/EXT_lights_ies.d.ts +4 -4
- package/glTF/2.0/Extensions/EXT_lights_image_based.d.ts +4 -4
- package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.d.ts +4 -4
- package/glTF/2.0/Extensions/EXT_meshopt_compression.d.ts +4 -4
- package/glTF/2.0/Extensions/EXT_texture_avif.d.ts +4 -4
- package/glTF/2.0/Extensions/EXT_texture_webp.d.ts +4 -4
- package/glTF/2.0/Extensions/ExtrasAsMetadata.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_animation_pointer.d.ts +5 -5
- package/glTF/2.0/Extensions/KHR_draco_mesh_compression.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.d.ts +6 -3
- package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.js +46 -24
- package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity/flowGraphGLTFDataProvider.d.ts +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity/index.d.ts +3 -3
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.d.ts +3 -3
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.js +7 -2
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity.d.ts +3 -3
- package/glTF/2.0/Extensions/KHR_lights_punctual.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_materials_anisotropy.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_materials_clearcoat.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_materials_dispersion.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_materials_emissive_strength.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_materials_ior.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_materials_iridescence.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_materials_sheen.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_materials_specular.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_materials_transmission.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_materials_unlit.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_materials_variants.d.ts +5 -5
- package/glTF/2.0/Extensions/KHR_materials_volume.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_mesh_quantization.d.ts +3 -3
- package/glTF/2.0/Extensions/KHR_node_hoverability.d.ts +3 -3
- package/glTF/2.0/Extensions/KHR_node_selectability.d.ts +3 -3
- package/glTF/2.0/Extensions/KHR_node_visibility.d.ts +3 -3
- package/glTF/2.0/Extensions/KHR_texture_basisu.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_texture_transform.d.ts +4 -4
- package/glTF/2.0/Extensions/KHR_xmp_json_ld.d.ts +3 -3
- package/glTF/2.0/Extensions/MSFT_audio_emitter.d.ts +4 -4
- package/glTF/2.0/Extensions/MSFT_lod.d.ts +4 -4
- package/glTF/2.0/Extensions/MSFT_minecraftMesh.d.ts +4 -4
- package/glTF/2.0/Extensions/MSFT_sRGBFactors.d.ts +4 -4
- package/glTF/2.0/Extensions/gltfPathToObjectConverter.d.ts +9 -1
- package/glTF/2.0/Extensions/gltfPathToObjectConverter.js +17 -2
- package/glTF/2.0/Extensions/gltfPathToObjectConverter.js.map +1 -1
- package/glTF/2.0/Extensions/index.d.ts +38 -38
- package/glTF/2.0/Extensions/objectModelMapping.d.ts +2 -2
- package/glTF/2.0/glTFLoader.d.ts +5 -5
- package/glTF/2.0/glTFLoaderAnimation.d.ts +1 -1
- package/glTF/2.0/glTFLoaderExtension.d.ts +2 -2
- package/glTF/2.0/glTFLoaderExtensionRegistry.d.ts +2 -2
- package/glTF/2.0/index.d.ts +6 -6
- package/glTF/glTFFileLoader.d.ts +1 -1
- package/glTF/index.d.ts +4 -4
- package/index.d.ts +4 -4
- package/legacy/legacy-glTF1FileLoader.d.ts +2 -2
- package/legacy/legacy-glTF2FileLoader.d.ts +2 -2
- package/legacy/legacy-glTFFileLoader.d.ts +3 -3
- package/legacy/legacy.d.ts +5 -5
- package/package.json +3 -3
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from "./declarationMapper";
|
2
|
-
export * from "./interactivityGraphParser";
|
3
|
-
export * from "./flowGraphGLTFDataProvider";
|
1
|
+
export * from "./declarationMapper.js";
|
2
|
+
export * from "./interactivityGraphParser.js";
|
3
|
+
export * from "./flowGraphGLTFDataProvider.js";
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { IKHRInteractivity_Graph } from "babylonjs-gltf2interface";
|
2
|
-
import type { IGLTF } from "../../glTFLoaderInterfaces";
|
3
|
-
import type { IGLTFToFlowGraphMapping } from "./declarationMapper";
|
2
|
+
import type { IGLTF } from "../../glTFLoaderInterfaces.js";
|
3
|
+
import type { IGLTFToFlowGraphMapping } from "./declarationMapper.js";
|
4
4
|
import type { ISerializedFlowGraph, ISerializedFlowGraphBlock } from "@babylonjs/core/FlowGraph/typeDefinitions.js";
|
5
5
|
import { FlowGraphTypes } from "@babylonjs/core/FlowGraph/flowGraphRichTypes.js";
|
6
|
-
import type { GLTFLoader } from "../../glTFLoader";
|
6
|
+
import type { GLTFLoader } from "../../glTFLoader.js";
|
7
7
|
export interface InteractivityEvent {
|
8
8
|
eventId: string;
|
9
9
|
eventData?: {
|
@@ -125,6 +125,10 @@ export class InteractivityGraphToFlowGraphParser {
|
|
125
125
|
break;
|
126
126
|
}
|
127
127
|
}
|
128
|
+
// in case of NaN, Infinity, we need to parse the string to the object itself
|
129
|
+
if (type.elementType === "number" && typeof value[0] === "string") {
|
130
|
+
value[0] = parseFloat(value[0]);
|
131
|
+
}
|
128
132
|
return { type: type.flowGraphType, value: dataTransform ? dataTransform(value, this) : value };
|
129
133
|
}
|
130
134
|
_parseEvents() {
|
@@ -175,8 +179,9 @@ export class InteractivityGraphToFlowGraphParser {
|
|
175
179
|
throw new Error("Error parsing nodes");
|
176
180
|
}
|
177
181
|
if (mapping.flowGraphMapping.validation) {
|
178
|
-
|
179
|
-
|
182
|
+
const validationResult = mapping.flowGraphMapping.validation(node, this._interactivityGraph, this._gltf);
|
183
|
+
if (!validationResult.valid) {
|
184
|
+
throw new Error(`Error validating interactivity node ${this._interactivityGraph.declarations?.[node.declaration].op} - ${validationResult.error}`);
|
180
185
|
}
|
181
186
|
}
|
182
187
|
const blocks = [];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"interactivityGraphParser.js","sourceRoot":"","sources":["../../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAAE,MAAM,EAAE,uCAAyB;AAE1C,OAAO,EAAE,UAAU,EAAE,qCAAuB;AAgB5C,MAAM,CAAC,MAAM,qBAAqB,GAE9B;IACA,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,aAAa,sCAAuB,EA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;QACtB,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAClE,gBAAgB,CAAC,iBAAiB,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IACtE,CAAC;IAEM,eAAe,CAAC,KAAa;QAChC,OAAO,iBAAiB,GAAG,KAAK,CAAC;IACrC,CAAC;IAEM,oBAAoB;QACvB,MAAM,OAAO,GAAgC;YACzC,QAAQ,EAAE,UAAU,EAAE;YACtB,cAAc,EAAE,EAAE;YAClB,iBAAiB,EAAE,EAAE;SACxB,CAAC;QACF,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACpD,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;YAC1C,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC;QAC/D,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAiC,CAAC,CAAC;QAE9G,OAAO;YACH,WAAW,EAAE,IAAI;YACjB,SAAS;YACT,iBAAiB,EAAE,CAAC,OAAO,CAAC;SAC/B,CAAC;IACN,CAAC;CACJ","sourcesContent":["import type { IKHRInteractivity_Graph, IKHRInteractivity_Node, IKHRInteractivity_OutputSocketReference, IKHRInteractivity_Variable } from \"babylonjs-gltf2interface\";\nimport type { IGLTF } from \"../../glTFLoaderInterfaces\";\nimport type { IGLTFToFlowGraphMapping } from \"./declarationMapper\";\nimport { getMappingForDeclaration, getMappingForFullOperationName } from \"./declarationMapper\";\nimport { Logger } from \"core/Misc/logger\";\nimport type { ISerializedFlowGraph, ISerializedFlowGraphBlock, ISerializedFlowGraphConnection, ISerializedFlowGraphContext } from \"core/FlowGraph/typeDefinitions\";\nimport { RandomGUID } from \"core/Misc/guid\";\nimport type { IFlowGraphBlockConfiguration } from \"core/FlowGraph/flowGraphBlock\";\nimport type { FlowGraphBlockNames } from \"core/FlowGraph/Blocks/flowGraphBlockNames\";\nimport { FlowGraphConnectionType } from \"core/FlowGraph/flowGraphConnection\";\nimport { FlowGraphTypes } from \"core/FlowGraph/flowGraphRichTypes\";\nimport type { GLTFLoader } from \"../../glTFLoader\";\n\nexport interface InteractivityEvent {\n eventId: string;\n eventData?: {\n eventData: boolean;\n id: string;\n type: string;\n value?: any;\n }[];\n}\nexport const gltfTypeToBabylonType: {\n [key: string]: { length: number; flowGraphType: FlowGraphTypes; elementType: \"number\" | \"boolean\" };\n} = {\n float: { length: 1, flowGraphType: FlowGraphTypes.Number, elementType: \"number\" },\n bool: { length: 1, flowGraphType: FlowGraphTypes.Boolean, elementType: \"boolean\" },\n float2: { length: 2, flowGraphType: FlowGraphTypes.Vector2, elementType: \"number\" },\n float3: { length: 3, flowGraphType: FlowGraphTypes.Vector3, elementType: \"number\" },\n float4: { length: 4, flowGraphType: FlowGraphTypes.Vector4, elementType: \"number\" },\n float4x4: { length: 16, flowGraphType: FlowGraphTypes.Matrix, elementType: \"number\" },\n float2x2: { length: 4, flowGraphType: FlowGraphTypes.Matrix2D, elementType: \"number\" },\n float3x3: { length: 9, flowGraphType: FlowGraphTypes.Matrix3D, elementType: \"number\" },\n int: { length: 1, flowGraphType: FlowGraphTypes.Integer, elementType: \"number\" },\n};\n\nexport class InteractivityGraphToFlowGraphParser {\n /**\n * Note - the graph should be rejected if the same type is defined twice.\n * We currently don't validate that.\n */\n private _types: { length: number; flowGraphType: FlowGraphTypes; elementType: \"number\" | \"boolean\" }[] = [];\n private _mappings: { flowGraphMapping: IGLTFToFlowGraphMapping; fullOperationName: string }[] = [];\n private _staticVariables: { type: FlowGraphTypes; value: any[] }[] = [];\n private _events: InteractivityEvent[] = [];\n private _internalEventsCounter: number = 0;\n private _nodes: { blocks: ISerializedFlowGraphBlock[]; fullOperationName: string }[] = [];\n\n constructor(\n private _interactivityGraph: IKHRInteractivity_Graph,\n private _gltf: IGLTF,\n public _loader: GLTFLoader\n ) {\n // start with types\n this._parseTypes();\n // continue with declarations\n this._parseDeclarations();\n this._parseVariables();\n this._parseEvents();\n this._parseNodes();\n }\n\n public get arrays() {\n return {\n types: this._types,\n mappings: this._mappings,\n staticVariables: this._staticVariables,\n events: this._events,\n nodes: this._nodes,\n };\n }\n\n private _parseTypes() {\n if (!this._interactivityGraph.types) {\n return;\n }\n for (const type of this._interactivityGraph.types) {\n this._types.push(gltfTypeToBabylonType[type.signature]);\n }\n }\n\n private _parseDeclarations() {\n if (!this._interactivityGraph.declarations) {\n return;\n }\n for (const declaration of this._interactivityGraph.declarations) {\n // make sure we have the mapping for this operation\n const mapping = getMappingForDeclaration(declaration);\n // mapping is defined, because we generate an empty mapping if it's not found\n if (!mapping) {\n Logger.Error([\"No mapping found for declaration\", declaration]);\n throw new Error(\"Error parsing declarations\");\n }\n this._mappings.push({\n flowGraphMapping: mapping,\n fullOperationName: declaration.extension ? declaration.op + \":\" + declaration.extension : declaration.op,\n });\n }\n }\n\n private _parseVariables() {\n if (!this._interactivityGraph.variables) {\n return;\n }\n for (const variable of this._interactivityGraph.variables) {\n const parsed = this._parseVariable(variable);\n // set the default values here\n this._staticVariables.push(parsed);\n }\n }\n\n private _parseVariable(variable: IKHRInteractivity_Variable, dataTransform?: (value: any, parser: InteractivityGraphToFlowGraphParser) => any) {\n const type = this._types[variable.type];\n if (!type) {\n Logger.Error([\"No type found for variable\", variable]);\n throw new Error(\"Error parsing variables\");\n }\n if (variable.value) {\n if (variable.value.length !== type.length) {\n Logger.Error([\"Invalid value length for variable\", variable, type]);\n throw new Error(\"Error parsing variables\");\n }\n }\n const value = variable.value || [];\n if (!value.length) {\n switch (type.flowGraphType) {\n case FlowGraphTypes.Boolean:\n value.push(false);\n break;\n case FlowGraphTypes.Integer:\n value.push(0);\n break;\n case FlowGraphTypes.Number:\n value.push(NaN);\n break;\n case FlowGraphTypes.Vector2:\n value.push(NaN, NaN);\n break;\n case FlowGraphTypes.Vector3:\n value.push(NaN, NaN, NaN);\n break;\n case FlowGraphTypes.Vector4:\n case FlowGraphTypes.Matrix2D:\n case FlowGraphTypes.Quaternion:\n value.fill(NaN, 0, 4);\n break;\n case FlowGraphTypes.Matrix:\n value.fill(NaN, 0, 16);\n break;\n case FlowGraphTypes.Matrix3D:\n value.fill(NaN, 0, 9);\n break;\n default:\n break;\n }\n }\n return { type: type.flowGraphType, value: dataTransform ? dataTransform(value, this) : value };\n }\n\n private _parseEvents() {\n if (!this._interactivityGraph.events) {\n return;\n }\n for (const event of this._interactivityGraph.events) {\n const converted: InteractivityEvent = {\n eventId: event.id || \"internalEvent_\" + this._internalEventsCounter++,\n };\n if (event.values) {\n converted.eventData = Object.keys(event.values).map((key) => {\n const eventValue = event.values?.[key];\n if (!eventValue) {\n Logger.Error([\"No value found for event key\", key]);\n throw new Error(\"Error parsing events\");\n }\n const type = this._types[eventValue.type];\n if (!type) {\n Logger.Error([\"No type found for event value\", eventValue]);\n throw new Error(\"Error parsing events\");\n }\n const value = typeof eventValue.value !== \"undefined\" ? this._parseVariable(eventValue) : undefined;\n return {\n id: key,\n type: type.flowGraphType,\n eventData: true,\n value,\n };\n });\n }\n this._events.push(converted);\n }\n }\n\n private _parseNodes() {\n if (!this._interactivityGraph.nodes) {\n return;\n }\n for (const node of this._interactivityGraph.nodes) {\n // some validation\n if (typeof node.declaration !== \"number\") {\n Logger.Error([\"No declaration found for node\", node]);\n throw new Error(\"Error parsing nodes\");\n }\n const mapping = this._mappings[node.declaration];\n if (!mapping) {\n Logger.Error([\"No mapping found for node\", node]);\n throw new Error(\"Error parsing nodes\");\n }\n if (mapping.flowGraphMapping.validation) {\n if (!mapping.flowGraphMapping.validation(node, this._interactivityGraph, this._gltf)) {\n throw new Error(`Error validating interactivity node ${node}`);\n }\n }\n const blocks: ISerializedFlowGraphBlock[] = [];\n // create block(s) for this node using the mapping\n for (const blockType of mapping.flowGraphMapping.blocks) {\n const block = this._getEmptyBlock(blockType, mapping.fullOperationName);\n this._parseNodeConfiguration(node, block, mapping.flowGraphMapping, blockType);\n blocks.push(block);\n }\n this._nodes.push({ blocks, fullOperationName: mapping.fullOperationName });\n }\n }\n\n private _getEmptyBlock(className: string, type: string): ISerializedFlowGraphBlock {\n const uniqueId = RandomGUID();\n const dataInputs: ISerializedFlowGraphConnection[] = [];\n const dataOutputs: ISerializedFlowGraphConnection[] = [];\n const signalInputs: ISerializedFlowGraphConnection[] = [];\n const signalOutputs: ISerializedFlowGraphConnection[] = [];\n const config: IFlowGraphBlockConfiguration = {};\n const metadata = {};\n return {\n uniqueId,\n className,\n dataInputs,\n dataOutputs,\n signalInputs,\n signalOutputs,\n config,\n type,\n metadata,\n };\n }\n\n private _parseNodeConfiguration(node: IKHRInteractivity_Node, block: ISerializedFlowGraphBlock, nodeMapping: IGLTFToFlowGraphMapping, blockType: FlowGraphBlockNames | string) {\n const configuration = block.config;\n if (node.configuration) {\n Object.keys(node.configuration).forEach((key) => {\n const value = node.configuration?.[key];\n // value is always an array, never a number or string\n if (!value) {\n Logger.Error([\"No value found for node configuration\", key]);\n throw new Error(\"Error parsing node configuration\");\n }\n const configMapping = nodeMapping.configuration?.[key];\n const belongsToBlock = configMapping && configMapping.toBlock ? configMapping.toBlock === blockType : nodeMapping.blocks.indexOf(blockType) === 0;\n if (belongsToBlock) {\n // get the right name for the configuration key\n const configKey = configMapping?.name || key;\n if ((!value || typeof value.value === \"undefined\") && typeof configMapping?.defaultValue !== \"undefined\") {\n configuration[configKey] = {\n value: configMapping.defaultValue,\n };\n } else if (value.value.length >= 1) {\n // supporting int[] and int/boolean/string\n configuration[configKey] = {\n value: value.value.length === 1 ? value.value[0] : value.value,\n };\n } else {\n Logger.Warn([\"Invalid value for node configuration\", value]);\n }\n // make sure we transform the data if needed\n if (configMapping && configMapping.dataTransformer) {\n configuration[configKey].value = configMapping.dataTransformer([configuration[configKey].value], this)[0];\n }\n }\n });\n }\n }\n\n private _parseNodeConnections(context: ISerializedFlowGraphContext) {\n for (let i = 0; i < this._nodes.length; i++) {\n // get the corresponding gltf node\n const gltfNode = this._interactivityGraph.nodes?.[i];\n if (!gltfNode) {\n // should never happen but let's still check\n Logger.Error([\"No node found for interactivity node\", this._nodes[i]]);\n throw new Error(\"Error parsing node connections\");\n }\n const flowGraphBlocks = this._nodes[i];\n const outputMapper = this._mappings[gltfNode.declaration];\n // validate\n if (!outputMapper) {\n Logger.Error([\"No mapping found for node\", gltfNode]);\n throw new Error(\"Error parsing node connections\");\n }\n const flowsFromGLTF = gltfNode.flows || {};\n const flowsKeys = Object.keys(flowsFromGLTF).sort(); // sorting as some operations require sorted keys\n // connect the flows\n for (const flowKey of flowsKeys) {\n const flow = flowsFromGLTF[flowKey];\n const flowMapping = outputMapper.flowGraphMapping.outputs?.flows?.[flowKey];\n const socketOutName = flowMapping?.name || flowKey;\n // create a serialized socket\n const socketOut = this._createNewSocketConnection(socketOutName, true);\n const block = (flowMapping && flowMapping.toBlock && flowGraphBlocks.blocks.find((b) => b.className === flowMapping.toBlock)) || flowGraphBlocks.blocks[0];\n block.signalOutputs.push(socketOut);\n // get the input node of this block\n const inputNodeId = flow.node;\n const nodeIn = this._nodes[inputNodeId];\n if (!nodeIn) {\n Logger.Error([\"No node found for input node id\", inputNodeId]);\n throw new Error(\"Error parsing node connections\");\n }\n // get the mapper for the input node - in case it mapped to multiple blocks\n const inputMapper = getMappingForFullOperationName(nodeIn.fullOperationName);\n if (!inputMapper) {\n Logger.Error([\"No mapping found for input node\", nodeIn]);\n throw new Error(\"Error parsing node connections\");\n }\n let flowInMapping = inputMapper.inputs?.flows?.[flow.socket || \"in\"];\n let arrayMapping = false;\n if (!flowInMapping) {\n for (const key in inputMapper.inputs?.flows) {\n if (key.startsWith(\"[\") && key.endsWith(\"]\")) {\n arrayMapping = true;\n flowInMapping = inputMapper.inputs?.flows?.[key];\n }\n }\n }\n const nodeInSocketName = flowInMapping ? (arrayMapping ? flowInMapping.name.replace(\"$1\", flow.socket || \"\") : flowInMapping.name) : flow.socket || \"in\";\n const inputBlock = (flowInMapping && flowInMapping.toBlock && nodeIn.blocks.find((b) => b.className === flowInMapping.toBlock)) || nodeIn.blocks[0];\n // in all of the flow graph input connections, find the one with the same name as the socket\n let socketIn = inputBlock.signalInputs.find((s) => s.name === nodeInSocketName);\n // if the socket doesn't exist, create the input socket for the connection\n if (!socketIn) {\n socketIn = this._createNewSocketConnection(nodeInSocketName);\n inputBlock.signalInputs.push(socketIn);\n }\n // connect the sockets\n socketIn.connectedPointIds.push(socketOut.uniqueId);\n socketOut.connectedPointIds.push(socketIn.uniqueId);\n }\n // connect the values\n const valuesFromGLTF = gltfNode.values || {};\n const valuesKeys = Object.keys(valuesFromGLTF);\n for (const valueKey of valuesKeys) {\n const value = valuesFromGLTF[valueKey];\n let valueMapping = outputMapper.flowGraphMapping.inputs?.values?.[valueKey];\n let arrayMapping = false;\n if (!valueMapping) {\n for (const key in outputMapper.flowGraphMapping.inputs?.values) {\n if (key.startsWith(\"[\") && key.endsWith(\"]\")) {\n arrayMapping = true;\n valueMapping = outputMapper.flowGraphMapping.inputs?.values?.[key];\n }\n }\n }\n const socketInName = valueMapping ? (arrayMapping ? valueMapping.name.replace(\"$1\", valueKey) : valueMapping.name) : valueKey;\n // create a serialized socket\n const socketIn = this._createNewSocketConnection(socketInName);\n const block = (valueMapping && valueMapping.toBlock && flowGraphBlocks.blocks.find((b) => b.className === valueMapping!.toBlock)) || flowGraphBlocks.blocks[0];\n block.dataInputs.push(socketIn);\n if ((value as IKHRInteractivity_Variable).value !== undefined) {\n const convertedValue = this._parseVariable(value as IKHRInteractivity_Variable, valueMapping && valueMapping.dataTransformer);\n context._connectionValues[socketIn.uniqueId] = convertedValue;\n } else if (typeof (value as IKHRInteractivity_OutputSocketReference).node !== \"undefined\") {\n const nodeOutId = (value as IKHRInteractivity_OutputSocketReference).node;\n const nodeOutSocketName = (value as IKHRInteractivity_OutputSocketReference).socket || \"value\";\n const nodeOut = this._nodes[nodeOutId];\n if (!nodeOut) {\n Logger.Error([\"No node found for output socket reference\", value]);\n throw new Error(\"Error parsing node connections\");\n }\n const outputMapper = getMappingForFullOperationName(nodeOut.fullOperationName);\n if (!outputMapper) {\n Logger.Error([\"No mapping found for output socket reference\", value]);\n throw new Error(\"Error parsing node connections\");\n }\n let valueMapping = outputMapper.outputs?.values?.[nodeOutSocketName];\n let arrayMapping = false;\n // check if there is an array mapping defined\n if (!valueMapping) {\n // search for a value mapping that has an array mapping\n for (const key in outputMapper.outputs?.values) {\n if (key.startsWith(\"[\") && key.endsWith(\"]\")) {\n arrayMapping = true;\n valueMapping = outputMapper.outputs?.values?.[key];\n }\n }\n }\n const socketOutName = valueMapping ? (arrayMapping ? valueMapping.name.replace(\"$1\", nodeOutSocketName) : valueMapping?.name) : nodeOutSocketName;\n const outBlock = (valueMapping && valueMapping.toBlock && nodeOut.blocks.find((b) => b.className === valueMapping!.toBlock)) || nodeOut.blocks[0];\n let socketOut = outBlock.dataOutputs.find((s) => s.name === socketOutName);\n // if the socket doesn't exist, create it\n if (!socketOut) {\n socketOut = this._createNewSocketConnection(socketOutName, true);\n outBlock.dataOutputs.push(socketOut);\n }\n // connect the sockets\n socketIn.connectedPointIds.push(socketOut.uniqueId);\n socketOut.connectedPointIds.push(socketIn.uniqueId);\n } else {\n Logger.Error([\"Invalid value for value connection\", value]);\n throw new Error(\"Error parsing node connections\");\n }\n }\n\n // inter block connections\n if (outputMapper.flowGraphMapping.interBlockConnectors) {\n for (const connector of outputMapper.flowGraphMapping.interBlockConnectors) {\n const input = connector.input;\n const output = connector.output;\n const isVariable = connector.isVariable;\n this._connectFlowGraphNodes(input, output, flowGraphBlocks.blocks[connector.inputBlockIndex], flowGraphBlocks.blocks[connector.outputBlockIndex], isVariable);\n }\n }\n\n if (outputMapper.flowGraphMapping.extraProcessor) {\n const declaration = this._interactivityGraph.declarations?.[gltfNode.declaration];\n if (!declaration) {\n Logger.Error([\"No declaration found for extra processor\", gltfNode]);\n throw new Error(\"Error parsing node connections\");\n }\n flowGraphBlocks.blocks = outputMapper.flowGraphMapping.extraProcessor(\n gltfNode,\n declaration,\n outputMapper.flowGraphMapping,\n this,\n flowGraphBlocks.blocks,\n context,\n this._gltf\n );\n }\n }\n }\n\n private _createNewSocketConnection(name: string, isOutput?: boolean): ISerializedFlowGraphConnection {\n return {\n uniqueId: RandomGUID(),\n name,\n _connectionType: isOutput ? FlowGraphConnectionType.Output : FlowGraphConnectionType.Input,\n connectedPointIds: [],\n };\n }\n\n private _connectFlowGraphNodes(input: string, output: string, serializedInput: ISerializedFlowGraphBlock, serializedOutput: ISerializedFlowGraphBlock, isVariable?: boolean) {\n const inputArray = isVariable ? serializedInput.dataInputs : serializedInput.signalInputs;\n const outputArray = isVariable ? serializedOutput.dataOutputs : serializedOutput.signalOutputs;\n const inputConnection = inputArray.find((s) => s.name === input) || this._createNewSocketConnection(input);\n const outputConnection = outputArray.find((s) => s.name === output) || this._createNewSocketConnection(output, true);\n // of not found add it to the array\n if (!inputArray.find((s) => s.name === input)) {\n inputArray.push(inputConnection);\n }\n if (!outputArray.find((s) => s.name === output)) {\n outputArray.push(outputConnection);\n }\n // connect the sockets\n inputConnection.connectedPointIds.push(outputConnection.uniqueId);\n outputConnection.connectedPointIds.push(inputConnection.uniqueId);\n }\n\n public getVariableName(index: number) {\n return \"staticVariable_\" + index;\n }\n\n public serializeToFlowGraph(): ISerializedFlowGraph {\n const context: ISerializedFlowGraphContext = {\n uniqueId: RandomGUID(),\n _userVariables: {},\n _connectionValues: {},\n };\n this._parseNodeConnections(context);\n for (let i = 0; i < this._staticVariables.length; i++) {\n const variable = this._staticVariables[i];\n context._userVariables[this.getVariableName(i)] = variable;\n }\n\n const allBlocks = this._nodes.reduce((acc, val) => acc.concat(val.blocks), [] as ISerializedFlowGraphBlock[]);\n\n return {\n rightHanded: true,\n allBlocks,\n executionContexts: [context],\n };\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"interactivityGraphParser.js","sourceRoot":"","sources":["../../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAAE,MAAM,EAAE,uCAAyB;AAE1C,OAAO,EAAE,UAAU,EAAE,qCAAuB;AAgB5C,MAAM,CAAC,MAAM,qBAAqB,GAE9B;IACA,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,aAAa,sCAAuB,EAAE,WAAW,EAAE,QAAQ,EAAE;IACjF,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,aAAa,wCAAwB,EAAE,WAAW,EAAE,SAAS,EAAE;IAClF,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,aAAa,wCAAwB,EAAE,WAAW,EAAE,QAAQ,EAAE;IACnF,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,aAAa,wCAAwB,EAAE,WAAW,EAAE,QAAQ,EAAE;IACnF,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,aAAa,wCAAwB,EAAE,WAAW,EAAE,QAAQ,EAAE;IACnF,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,aAAa,sCAAuB,EAAE,WAAW,EAAE,QAAQ,EAAE;IACrF,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,aAAa,0CAAyB,EAAE,WAAW,EAAE,QAAQ,EAAE;IACtF,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,aAAa,0CAAyB,EAAE,WAAW,EAAE,QAAQ,EAAE;IACtF,GAAG,EAAE,EA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AE;YAClB,iBAAiB,EAAE,EAAE;SACxB,CAAC;QACF,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACpD,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;YAC1C,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC;QAC/D,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAiC,CAAC,CAAC;QAE9G,OAAO;YACH,WAAW,EAAE,IAAI;YACjB,SAAS;YACT,iBAAiB,EAAE,CAAC,OAAO,CAAC;SAC/B,CAAC;IACN,CAAC;CACJ","sourcesContent":["import type { IKHRInteractivity_Graph, IKHRInteractivity_Node, IKHRInteractivity_OutputSocketReference, IKHRInteractivity_Variable } from \"babylonjs-gltf2interface\";\nimport type { IGLTF } from \"../../glTFLoaderInterfaces\";\nimport type { IGLTFToFlowGraphMapping } from \"./declarationMapper\";\nimport { getMappingForDeclaration, getMappingForFullOperationName } from \"./declarationMapper\";\nimport { Logger } from \"core/Misc/logger\";\nimport type { ISerializedFlowGraph, ISerializedFlowGraphBlock, ISerializedFlowGraphConnection, ISerializedFlowGraphContext } from \"core/FlowGraph/typeDefinitions\";\nimport { RandomGUID } from \"core/Misc/guid\";\nimport type { IFlowGraphBlockConfiguration } from \"core/FlowGraph/flowGraphBlock\";\nimport type { FlowGraphBlockNames } from \"core/FlowGraph/Blocks/flowGraphBlockNames\";\nimport { FlowGraphConnectionType } from \"core/FlowGraph/flowGraphConnection\";\nimport { FlowGraphTypes } from \"core/FlowGraph/flowGraphRichTypes\";\nimport type { GLTFLoader } from \"../../glTFLoader\";\n\nexport interface InteractivityEvent {\n eventId: string;\n eventData?: {\n eventData: boolean;\n id: string;\n type: string;\n value?: any;\n }[];\n}\nexport const gltfTypeToBabylonType: {\n [key: string]: { length: number; flowGraphType: FlowGraphTypes; elementType: \"number\" | \"boolean\" };\n} = {\n float: { length: 1, flowGraphType: FlowGraphTypes.Number, elementType: \"number\" },\n bool: { length: 1, flowGraphType: FlowGraphTypes.Boolean, elementType: \"boolean\" },\n float2: { length: 2, flowGraphType: FlowGraphTypes.Vector2, elementType: \"number\" },\n float3: { length: 3, flowGraphType: FlowGraphTypes.Vector3, elementType: \"number\" },\n float4: { length: 4, flowGraphType: FlowGraphTypes.Vector4, elementType: \"number\" },\n float4x4: { length: 16, flowGraphType: FlowGraphTypes.Matrix, elementType: \"number\" },\n float2x2: { length: 4, flowGraphType: FlowGraphTypes.Matrix2D, elementType: \"number\" },\n float3x3: { length: 9, flowGraphType: FlowGraphTypes.Matrix3D, elementType: \"number\" },\n int: { length: 1, flowGraphType: FlowGraphTypes.Integer, elementType: \"number\" },\n};\n\nexport class InteractivityGraphToFlowGraphParser {\n /**\n * Note - the graph should be rejected if the same type is defined twice.\n * We currently don't validate that.\n */\n private _types: { length: number; flowGraphType: FlowGraphTypes; elementType: \"number\" | \"boolean\" }[] = [];\n private _mappings: { flowGraphMapping: IGLTFToFlowGraphMapping; fullOperationName: string }[] = [];\n private _staticVariables: { type: FlowGraphTypes; value: any[] }[] = [];\n private _events: InteractivityEvent[] = [];\n private _internalEventsCounter: number = 0;\n private _nodes: { blocks: ISerializedFlowGraphBlock[]; fullOperationName: string }[] = [];\n\n constructor(\n private _interactivityGraph: IKHRInteractivity_Graph,\n private _gltf: IGLTF,\n public _loader: GLTFLoader\n ) {\n // start with types\n this._parseTypes();\n // continue with declarations\n this._parseDeclarations();\n this._parseVariables();\n this._parseEvents();\n this._parseNodes();\n }\n\n public get arrays() {\n return {\n types: this._types,\n mappings: this._mappings,\n staticVariables: this._staticVariables,\n events: this._events,\n nodes: this._nodes,\n };\n }\n\n private _parseTypes() {\n if (!this._interactivityGraph.types) {\n return;\n }\n for (const type of this._interactivityGraph.types) {\n this._types.push(gltfTypeToBabylonType[type.signature]);\n }\n }\n\n private _parseDeclarations() {\n if (!this._interactivityGraph.declarations) {\n return;\n }\n for (const declaration of this._interactivityGraph.declarations) {\n // make sure we have the mapping for this operation\n const mapping = getMappingForDeclaration(declaration);\n // mapping is defined, because we generate an empty mapping if it's not found\n if (!mapping) {\n Logger.Error([\"No mapping found for declaration\", declaration]);\n throw new Error(\"Error parsing declarations\");\n }\n this._mappings.push({\n flowGraphMapping: mapping,\n fullOperationName: declaration.extension ? declaration.op + \":\" + declaration.extension : declaration.op,\n });\n }\n }\n\n private _parseVariables() {\n if (!this._interactivityGraph.variables) {\n return;\n }\n for (const variable of this._interactivityGraph.variables) {\n const parsed = this._parseVariable(variable);\n // set the default values here\n this._staticVariables.push(parsed);\n }\n }\n\n private _parseVariable(variable: IKHRInteractivity_Variable, dataTransform?: (value: any, parser: InteractivityGraphToFlowGraphParser) => any) {\n const type = this._types[variable.type];\n if (!type) {\n Logger.Error([\"No type found for variable\", variable]);\n throw new Error(\"Error parsing variables\");\n }\n if (variable.value) {\n if (variable.value.length !== type.length) {\n Logger.Error([\"Invalid value length for variable\", variable, type]);\n throw new Error(\"Error parsing variables\");\n }\n }\n const value = variable.value || [];\n if (!value.length) {\n switch (type.flowGraphType) {\n case FlowGraphTypes.Boolean:\n value.push(false);\n break;\n case FlowGraphTypes.Integer:\n value.push(0);\n break;\n case FlowGraphTypes.Number:\n value.push(NaN);\n break;\n case FlowGraphTypes.Vector2:\n value.push(NaN, NaN);\n break;\n case FlowGraphTypes.Vector3:\n value.push(NaN, NaN, NaN);\n break;\n case FlowGraphTypes.Vector4:\n case FlowGraphTypes.Matrix2D:\n case FlowGraphTypes.Quaternion:\n value.fill(NaN, 0, 4);\n break;\n case FlowGraphTypes.Matrix:\n value.fill(NaN, 0, 16);\n break;\n case FlowGraphTypes.Matrix3D:\n value.fill(NaN, 0, 9);\n break;\n default:\n break;\n }\n }\n // in case of NaN, Infinity, we need to parse the string to the object itself\n if (type.elementType === \"number\" && typeof value[0] === \"string\") {\n value[0] = parseFloat(value[0]);\n }\n return { type: type.flowGraphType, value: dataTransform ? dataTransform(value, this) : value };\n }\n\n private _parseEvents() {\n if (!this._interactivityGraph.events) {\n return;\n }\n for (const event of this._interactivityGraph.events) {\n const converted: InteractivityEvent = {\n eventId: event.id || \"internalEvent_\" + this._internalEventsCounter++,\n };\n if (event.values) {\n converted.eventData = Object.keys(event.values).map((key) => {\n const eventValue = event.values?.[key];\n if (!eventValue) {\n Logger.Error([\"No value found for event key\", key]);\n throw new Error(\"Error parsing events\");\n }\n const type = this._types[eventValue.type];\n if (!type) {\n Logger.Error([\"No type found for event value\", eventValue]);\n throw new Error(\"Error parsing events\");\n }\n const value = typeof eventValue.value !== \"undefined\" ? this._parseVariable(eventValue) : undefined;\n return {\n id: key,\n type: type.flowGraphType,\n eventData: true,\n value,\n };\n });\n }\n this._events.push(converted);\n }\n }\n\n private _parseNodes() {\n if (!this._interactivityGraph.nodes) {\n return;\n }\n for (const node of this._interactivityGraph.nodes) {\n // some validation\n if (typeof node.declaration !== \"number\") {\n Logger.Error([\"No declaration found for node\", node]);\n throw new Error(\"Error parsing nodes\");\n }\n const mapping = this._mappings[node.declaration];\n if (!mapping) {\n Logger.Error([\"No mapping found for node\", node]);\n throw new Error(\"Error parsing nodes\");\n }\n if (mapping.flowGraphMapping.validation) {\n const validationResult = mapping.flowGraphMapping.validation(node, this._interactivityGraph, this._gltf);\n if (!validationResult.valid) {\n throw new Error(`Error validating interactivity node ${this._interactivityGraph.declarations?.[node.declaration].op} - ${validationResult.error}`);\n }\n }\n const blocks: ISerializedFlowGraphBlock[] = [];\n // create block(s) for this node using the mapping\n for (const blockType of mapping.flowGraphMapping.blocks) {\n const block = this._getEmptyBlock(blockType, mapping.fullOperationName);\n this._parseNodeConfiguration(node, block, mapping.flowGraphMapping, blockType);\n blocks.push(block);\n }\n this._nodes.push({ blocks, fullOperationName: mapping.fullOperationName });\n }\n }\n\n private _getEmptyBlock(className: string, type: string): ISerializedFlowGraphBlock {\n const uniqueId = RandomGUID();\n const dataInputs: ISerializedFlowGraphConnection[] = [];\n const dataOutputs: ISerializedFlowGraphConnection[] = [];\n const signalInputs: ISerializedFlowGraphConnection[] = [];\n const signalOutputs: ISerializedFlowGraphConnection[] = [];\n const config: IFlowGraphBlockConfiguration = {};\n const metadata = {};\n return {\n uniqueId,\n className,\n dataInputs,\n dataOutputs,\n signalInputs,\n signalOutputs,\n config,\n type,\n metadata,\n };\n }\n\n private _parseNodeConfiguration(node: IKHRInteractivity_Node, block: ISerializedFlowGraphBlock, nodeMapping: IGLTFToFlowGraphMapping, blockType: FlowGraphBlockNames | string) {\n const configuration = block.config;\n if (node.configuration) {\n Object.keys(node.configuration).forEach((key) => {\n const value = node.configuration?.[key];\n // value is always an array, never a number or string\n if (!value) {\n Logger.Error([\"No value found for node configuration\", key]);\n throw new Error(\"Error parsing node configuration\");\n }\n const configMapping = nodeMapping.configuration?.[key];\n const belongsToBlock = configMapping && configMapping.toBlock ? configMapping.toBlock === blockType : nodeMapping.blocks.indexOf(blockType) === 0;\n if (belongsToBlock) {\n // get the right name for the configuration key\n const configKey = configMapping?.name || key;\n if ((!value || typeof value.value === \"undefined\") && typeof configMapping?.defaultValue !== \"undefined\") {\n configuration[configKey] = {\n value: configMapping.defaultValue,\n };\n } else if (value.value.length >= 1) {\n // supporting int[] and int/boolean/string\n configuration[configKey] = {\n value: value.value.length === 1 ? value.value[0] : value.value,\n };\n } else {\n Logger.Warn([\"Invalid value for node configuration\", value]);\n }\n // make sure we transform the data if needed\n if (configMapping && configMapping.dataTransformer) {\n configuration[configKey].value = configMapping.dataTransformer([configuration[configKey].value], this)[0];\n }\n }\n });\n }\n }\n\n private _parseNodeConnections(context: ISerializedFlowGraphContext) {\n for (let i = 0; i < this._nodes.length; i++) {\n // get the corresponding gltf node\n const gltfNode = this._interactivityGraph.nodes?.[i];\n if (!gltfNode) {\n // should never happen but let's still check\n Logger.Error([\"No node found for interactivity node\", this._nodes[i]]);\n throw new Error(\"Error parsing node connections\");\n }\n const flowGraphBlocks = this._nodes[i];\n const outputMapper = this._mappings[gltfNode.declaration];\n // validate\n if (!outputMapper) {\n Logger.Error([\"No mapping found for node\", gltfNode]);\n throw new Error(\"Error parsing node connections\");\n }\n const flowsFromGLTF = gltfNode.flows || {};\n const flowsKeys = Object.keys(flowsFromGLTF).sort(); // sorting as some operations require sorted keys\n // connect the flows\n for (const flowKey of flowsKeys) {\n const flow = flowsFromGLTF[flowKey];\n const flowMapping = outputMapper.flowGraphMapping.outputs?.flows?.[flowKey];\n const socketOutName = flowMapping?.name || flowKey;\n // create a serialized socket\n const socketOut = this._createNewSocketConnection(socketOutName, true);\n const block = (flowMapping && flowMapping.toBlock && flowGraphBlocks.blocks.find((b) => b.className === flowMapping.toBlock)) || flowGraphBlocks.blocks[0];\n block.signalOutputs.push(socketOut);\n // get the input node of this block\n const inputNodeId = flow.node;\n const nodeIn = this._nodes[inputNodeId];\n if (!nodeIn) {\n Logger.Error([\"No node found for input node id\", inputNodeId]);\n throw new Error(\"Error parsing node connections\");\n }\n // get the mapper for the input node - in case it mapped to multiple blocks\n const inputMapper = getMappingForFullOperationName(nodeIn.fullOperationName);\n if (!inputMapper) {\n Logger.Error([\"No mapping found for input node\", nodeIn]);\n throw new Error(\"Error parsing node connections\");\n }\n let flowInMapping = inputMapper.inputs?.flows?.[flow.socket || \"in\"];\n let arrayMapping = false;\n if (!flowInMapping) {\n for (const key in inputMapper.inputs?.flows) {\n if (key.startsWith(\"[\") && key.endsWith(\"]\")) {\n arrayMapping = true;\n flowInMapping = inputMapper.inputs?.flows?.[key];\n }\n }\n }\n const nodeInSocketName = flowInMapping ? (arrayMapping ? flowInMapping.name.replace(\"$1\", flow.socket || \"\") : flowInMapping.name) : flow.socket || \"in\";\n const inputBlock = (flowInMapping && flowInMapping.toBlock && nodeIn.blocks.find((b) => b.className === flowInMapping.toBlock)) || nodeIn.blocks[0];\n // in all of the flow graph input connections, find the one with the same name as the socket\n let socketIn = inputBlock.signalInputs.find((s) => s.name === nodeInSocketName);\n // if the socket doesn't exist, create the input socket for the connection\n if (!socketIn) {\n socketIn = this._createNewSocketConnection(nodeInSocketName);\n inputBlock.signalInputs.push(socketIn);\n }\n // connect the sockets\n socketIn.connectedPointIds.push(socketOut.uniqueId);\n socketOut.connectedPointIds.push(socketIn.uniqueId);\n }\n // connect the values\n const valuesFromGLTF = gltfNode.values || {};\n const valuesKeys = Object.keys(valuesFromGLTF);\n for (const valueKey of valuesKeys) {\n const value = valuesFromGLTF[valueKey];\n let valueMapping = outputMapper.flowGraphMapping.inputs?.values?.[valueKey];\n let arrayMapping = false;\n if (!valueMapping) {\n for (const key in outputMapper.flowGraphMapping.inputs?.values) {\n if (key.startsWith(\"[\") && key.endsWith(\"]\")) {\n arrayMapping = true;\n valueMapping = outputMapper.flowGraphMapping.inputs?.values?.[key];\n }\n }\n }\n const socketInName = valueMapping ? (arrayMapping ? valueMapping.name.replace(\"$1\", valueKey) : valueMapping.name) : valueKey;\n // create a serialized socket\n const socketIn = this._createNewSocketConnection(socketInName);\n const block = (valueMapping && valueMapping.toBlock && flowGraphBlocks.blocks.find((b) => b.className === valueMapping!.toBlock)) || flowGraphBlocks.blocks[0];\n block.dataInputs.push(socketIn);\n if ((value as IKHRInteractivity_Variable).value !== undefined) {\n const convertedValue = this._parseVariable(value as IKHRInteractivity_Variable, valueMapping && valueMapping.dataTransformer);\n context._connectionValues[socketIn.uniqueId] = convertedValue;\n } else if (typeof (value as IKHRInteractivity_OutputSocketReference).node !== \"undefined\") {\n const nodeOutId = (value as IKHRInteractivity_OutputSocketReference).node;\n const nodeOutSocketName = (value as IKHRInteractivity_OutputSocketReference).socket || \"value\";\n const nodeOut = this._nodes[nodeOutId];\n if (!nodeOut) {\n Logger.Error([\"No node found for output socket reference\", value]);\n throw new Error(\"Error parsing node connections\");\n }\n const outputMapper = getMappingForFullOperationName(nodeOut.fullOperationName);\n if (!outputMapper) {\n Logger.Error([\"No mapping found for output socket reference\", value]);\n throw new Error(\"Error parsing node connections\");\n }\n let valueMapping = outputMapper.outputs?.values?.[nodeOutSocketName];\n let arrayMapping = false;\n // check if there is an array mapping defined\n if (!valueMapping) {\n // search for a value mapping that has an array mapping\n for (const key in outputMapper.outputs?.values) {\n if (key.startsWith(\"[\") && key.endsWith(\"]\")) {\n arrayMapping = true;\n valueMapping = outputMapper.outputs?.values?.[key];\n }\n }\n }\n const socketOutName = valueMapping ? (arrayMapping ? valueMapping.name.replace(\"$1\", nodeOutSocketName) : valueMapping?.name) : nodeOutSocketName;\n const outBlock = (valueMapping && valueMapping.toBlock && nodeOut.blocks.find((b) => b.className === valueMapping!.toBlock)) || nodeOut.blocks[0];\n let socketOut = outBlock.dataOutputs.find((s) => s.name === socketOutName);\n // if the socket doesn't exist, create it\n if (!socketOut) {\n socketOut = this._createNewSocketConnection(socketOutName, true);\n outBlock.dataOutputs.push(socketOut);\n }\n // connect the sockets\n socketIn.connectedPointIds.push(socketOut.uniqueId);\n socketOut.connectedPointIds.push(socketIn.uniqueId);\n } else {\n Logger.Error([\"Invalid value for value connection\", value]);\n throw new Error(\"Error parsing node connections\");\n }\n }\n\n // inter block connections\n if (outputMapper.flowGraphMapping.interBlockConnectors) {\n for (const connector of outputMapper.flowGraphMapping.interBlockConnectors) {\n const input = connector.input;\n const output = connector.output;\n const isVariable = connector.isVariable;\n this._connectFlowGraphNodes(input, output, flowGraphBlocks.blocks[connector.inputBlockIndex], flowGraphBlocks.blocks[connector.outputBlockIndex], isVariable);\n }\n }\n\n if (outputMapper.flowGraphMapping.extraProcessor) {\n const declaration = this._interactivityGraph.declarations?.[gltfNode.declaration];\n if (!declaration) {\n Logger.Error([\"No declaration found for extra processor\", gltfNode]);\n throw new Error(\"Error parsing node connections\");\n }\n flowGraphBlocks.blocks = outputMapper.flowGraphMapping.extraProcessor(\n gltfNode,\n declaration,\n outputMapper.flowGraphMapping,\n this,\n flowGraphBlocks.blocks,\n context,\n this._gltf\n );\n }\n }\n }\n\n private _createNewSocketConnection(name: string, isOutput?: boolean): ISerializedFlowGraphConnection {\n return {\n uniqueId: RandomGUID(),\n name,\n _connectionType: isOutput ? FlowGraphConnectionType.Output : FlowGraphConnectionType.Input,\n connectedPointIds: [],\n };\n }\n\n private _connectFlowGraphNodes(input: string, output: string, serializedInput: ISerializedFlowGraphBlock, serializedOutput: ISerializedFlowGraphBlock, isVariable?: boolean) {\n const inputArray = isVariable ? serializedInput.dataInputs : serializedInput.signalInputs;\n const outputArray = isVariable ? serializedOutput.dataOutputs : serializedOutput.signalOutputs;\n const inputConnection = inputArray.find((s) => s.name === input) || this._createNewSocketConnection(input);\n const outputConnection = outputArray.find((s) => s.name === output) || this._createNewSocketConnection(output, true);\n // of not found add it to the array\n if (!inputArray.find((s) => s.name === input)) {\n inputArray.push(inputConnection);\n }\n if (!outputArray.find((s) => s.name === output)) {\n outputArray.push(outputConnection);\n }\n // connect the sockets\n inputConnection.connectedPointIds.push(outputConnection.uniqueId);\n outputConnection.connectedPointIds.push(inputConnection.uniqueId);\n }\n\n public getVariableName(index: number) {\n return \"staticVariable_\" + index;\n }\n\n public serializeToFlowGraph(): ISerializedFlowGraph {\n const context: ISerializedFlowGraphContext = {\n uniqueId: RandomGUID(),\n _userVariables: {},\n _connectionValues: {},\n };\n this._parseNodeConnections(context);\n for (let i = 0; i < this._staticVariables.length; i++) {\n const variable = this._staticVariables[i];\n context._userVariables[this.getVariableName(i)] = variable;\n }\n\n const allBlocks = this._nodes.reduce((acc, val) => acc.concat(val.blocks), [] as ISerializedFlowGraphBlock[]);\n\n return {\n rightHanded: true,\n allBlocks,\n executionContexts: [context],\n };\n }\n}\n"]}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import type { GLTFLoader } from "../glTFLoader";
|
2
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
1
|
+
import type { GLTFLoader } from "../glTFLoader.js";
|
2
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
3
3
|
import type { Scene } from "@babylonjs/core/scene.js";
|
4
|
-
declare module "../../glTFFileLoader" {
|
4
|
+
declare module "../../glTFFileLoader.js" {
|
5
5
|
interface GLTFLoaderExtensionOptions {
|
6
6
|
/**
|
7
7
|
* Defines options for the KHR_interactivity extension.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
2
|
import type { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
|
3
|
-
import type { INode } from "../glTFLoaderInterfaces";
|
4
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
5
|
-
import { GLTFLoader } from "../glTFLoader";
|
6
|
-
declare module "../../glTFFileLoader" {
|
3
|
+
import type { INode } from "../glTFLoaderInterfaces.js";
|
4
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
5
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
8
8
|
/**
|
9
9
|
* Defines options for the KHR_lights_punctual extension.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
2
|
import type { Material } from "@babylonjs/core/Materials/material.js";
|
3
|
-
import type { IMaterial } from "../glTFLoaderInterfaces";
|
4
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
5
|
-
import { GLTFLoader } from "../glTFLoader";
|
6
|
-
declare module "../../glTFFileLoader" {
|
3
|
+
import type { IMaterial } from "../glTFLoaderInterfaces.js";
|
4
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
5
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
8
8
|
/**
|
9
9
|
* Defines options for the KHR_materials_anisotropy extension.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
2
|
import type { Material } from "@babylonjs/core/Materials/material.js";
|
3
|
-
import type { IMaterial } from "../glTFLoaderInterfaces";
|
4
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
5
|
-
import { GLTFLoader } from "../glTFLoader";
|
6
|
-
declare module "../../glTFFileLoader" {
|
3
|
+
import type { IMaterial } from "../glTFLoaderInterfaces.js";
|
4
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
5
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
8
8
|
/**
|
9
9
|
* Defines options for the KHR_materials_clearcoat extension.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
2
|
import type { Material } from "@babylonjs/core/Materials/material.js";
|
3
|
-
import type { IMaterial } from "../glTFLoaderInterfaces";
|
4
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
5
|
-
import { GLTFLoader } from "../glTFLoader";
|
6
|
-
declare module "../../glTFFileLoader" {
|
3
|
+
import type { IMaterial } from "../glTFLoaderInterfaces.js";
|
4
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
5
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
8
8
|
/**
|
9
9
|
* Defines options for the KHR_materials_diffuse_transmission extension.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
2
|
import type { Material } from "@babylonjs/core/Materials/material.js";
|
3
|
-
import type { IMaterial } from "../glTFLoaderInterfaces";
|
4
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
5
|
-
import { GLTFLoader } from "../glTFLoader";
|
6
|
-
declare module "../../glTFFileLoader" {
|
3
|
+
import type { IMaterial } from "../glTFLoaderInterfaces.js";
|
4
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
5
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
8
8
|
/**
|
9
9
|
* Defines options for the KHR_materials_dispersion extension.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
2
|
import type { Material } from "@babylonjs/core/Materials/material.js";
|
3
|
-
import type { IMaterial } from "../glTFLoaderInterfaces";
|
4
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
5
|
-
import { GLTFLoader } from "../glTFLoader";
|
6
|
-
declare module "../../glTFFileLoader" {
|
3
|
+
import type { IMaterial } from "../glTFLoaderInterfaces.js";
|
4
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
5
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
8
8
|
/**
|
9
9
|
* Defines options for the KHR_materials_emissive_strength extension.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
2
|
import type { Material } from "@babylonjs/core/Materials/material.js";
|
3
|
-
import type { IMaterial } from "../glTFLoaderInterfaces";
|
4
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
5
|
-
import { GLTFLoader } from "../glTFLoader";
|
6
|
-
declare module "../../glTFFileLoader" {
|
3
|
+
import type { IMaterial } from "../glTFLoaderInterfaces.js";
|
4
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
5
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
8
8
|
/**
|
9
9
|
* Defines options for the KHR_materials_ior extension.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
2
|
import type { Material } from "@babylonjs/core/Materials/material.js";
|
3
|
-
import type { IMaterial } from "../glTFLoaderInterfaces";
|
4
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
5
|
-
import { GLTFLoader } from "../glTFLoader";
|
6
|
-
declare module "../../glTFFileLoader" {
|
3
|
+
import type { IMaterial } from "../glTFLoaderInterfaces.js";
|
4
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
5
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
8
8
|
/**
|
9
9
|
* Defines options for the KHR_materials_iridescence extension.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
2
|
import type { Material } from "@babylonjs/core/Materials/material.js";
|
3
|
-
import type { IMaterial } from "../glTFLoaderInterfaces";
|
4
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
5
|
-
import { GLTFLoader } from "../glTFLoader";
|
6
|
-
declare module "../../glTFFileLoader" {
|
3
|
+
import type { IMaterial } from "../glTFLoaderInterfaces.js";
|
4
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
5
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
8
8
|
/**
|
9
9
|
* Defines options for the KHR_materials_pbrSpecularGlossiness extension.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
2
|
import type { Material } from "@babylonjs/core/Materials/material.js";
|
3
|
-
import type { IMaterial } from "../glTFLoaderInterfaces";
|
4
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
5
|
-
import { GLTFLoader } from "../glTFLoader";
|
6
|
-
declare module "../../glTFFileLoader" {
|
3
|
+
import type { IMaterial } from "../glTFLoaderInterfaces.js";
|
4
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
5
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
8
8
|
/**
|
9
9
|
* Defines options for the KHR_materials_sheen extension.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
2
|
import type { Material } from "@babylonjs/core/Materials/material.js";
|
3
|
-
import type { IMaterial } from "../glTFLoaderInterfaces";
|
4
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
5
|
-
import { GLTFLoader } from "../glTFLoader";
|
6
|
-
declare module "../../glTFFileLoader" {
|
3
|
+
import type { IMaterial } from "../glTFLoaderInterfaces.js";
|
4
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
5
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
8
8
|
/**
|
9
9
|
* Defines options for the KHR_materials_specular extension.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
2
|
import type { Material } from "@babylonjs/core/Materials/material.js";
|
3
|
-
import type { IMaterial } from "../glTFLoaderInterfaces";
|
4
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
5
|
-
import { GLTFLoader } from "../glTFLoader";
|
6
|
-
declare module "../../glTFFileLoader" {
|
3
|
+
import type { IMaterial } from "../glTFLoaderInterfaces.js";
|
4
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
5
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
8
8
|
/**
|
9
9
|
* Defines options for the KHR_materials_transmission extension.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
2
|
import type { Material } from "@babylonjs/core/Materials/material.js";
|
3
|
-
import type { IMaterial } from "../glTFLoaderInterfaces";
|
4
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
5
|
-
import { GLTFLoader } from "../glTFLoader";
|
6
|
-
declare module "../../glTFFileLoader" {
|
3
|
+
import type { IMaterial } from "../glTFLoaderInterfaces.js";
|
4
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
5
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
8
8
|
/**
|
9
9
|
* Defines options for the KHR_materials_unlit extension.
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
3
|
-
import { GLTFLoader } from "../glTFLoader";
|
2
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
3
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
4
4
|
import type { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
|
5
|
-
import type { INode, IMeshPrimitive, IMesh } from "../glTFLoaderInterfaces";
|
5
|
+
import type { INode, IMeshPrimitive, IMesh } from "../glTFLoaderInterfaces.js";
|
6
6
|
import type { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
|
7
|
-
import type { MaterialVariantsController } from "../../glTFFileLoader";
|
7
|
+
import type { MaterialVariantsController } from "../../glTFFileLoader.js";
|
8
8
|
export { MaterialVariantsController };
|
9
|
-
declare module "../../glTFFileLoader" {
|
9
|
+
declare module "../../glTFFileLoader.js" {
|
10
10
|
type MaterialVariantsController = {
|
11
11
|
/**
|
12
12
|
* The list of available variant names for this asset.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
2
|
import type { Material } from "@babylonjs/core/Materials/material.js";
|
3
|
-
import type { IMaterial } from "../glTFLoaderInterfaces";
|
4
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
5
|
-
import { GLTFLoader } from "../glTFLoader";
|
6
|
-
declare module "../../glTFFileLoader" {
|
3
|
+
import type { IMaterial } from "../glTFLoaderInterfaces.js";
|
4
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
5
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
8
8
|
/**
|
9
9
|
* Defines options for the KHR_materials_volume extension.
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
2
|
-
import type { GLTFLoader } from "../glTFLoader";
|
3
|
-
declare module "../../glTFFileLoader" {
|
1
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
2
|
+
import type { GLTFLoader } from "../glTFLoader.js";
|
3
|
+
declare module "../../glTFFileLoader.js" {
|
4
4
|
interface GLTFLoaderExtensionOptions {
|
5
5
|
/**
|
6
6
|
* Defines options for the KHR_mesh_quantization extension.
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import type { GLTFLoader } from "../glTFLoader";
|
2
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
3
|
-
declare module "../../glTFFileLoader" {
|
1
|
+
import type { GLTFLoader } from "../glTFLoader.js";
|
2
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
3
|
+
declare module "../../glTFFileLoader.js" {
|
4
4
|
interface GLTFLoaderExtensionOptions {
|
5
5
|
/**
|
6
6
|
* Defines options for the KHR_node_hoverability extension.
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import type { GLTFLoader } from "../glTFLoader";
|
2
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
3
|
-
declare module "../../glTFFileLoader" {
|
1
|
+
import type { GLTFLoader } from "../glTFLoader.js";
|
2
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
3
|
+
declare module "../../glTFFileLoader.js" {
|
4
4
|
interface GLTFLoaderExtensionOptions {
|
5
5
|
/**
|
6
6
|
* Defines options for the KHR_selectability extension.
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import type { GLTFLoader } from "../glTFLoader";
|
2
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
3
|
-
declare module "../../glTFFileLoader" {
|
1
|
+
import type { GLTFLoader } from "../glTFLoader.js";
|
2
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
3
|
+
declare module "../../glTFFileLoader.js" {
|
4
4
|
interface GLTFLoaderExtensionOptions {
|
5
5
|
/**
|
6
6
|
* Defines options for the KHR_node_visibility extension.
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
2
|
-
import { GLTFLoader } from "../glTFLoader";
|
3
|
-
import type { ITexture } from "../glTFLoaderInterfaces";
|
1
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
2
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
3
|
+
import type { ITexture } from "../glTFLoaderInterfaces.js";
|
4
4
|
import type { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
|
5
5
|
import type { Nullable } from "@babylonjs/core/types.js";
|
6
|
-
declare module "../../glTFFileLoader" {
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
8
8
|
/**
|
9
9
|
* Defines options for the KHR_texture_basisu extension.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
2
|
import type { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
|
3
|
-
import type { ITextureInfo } from "../glTFLoaderInterfaces";
|
4
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
5
|
-
import { GLTFLoader } from "../glTFLoader";
|
6
|
-
declare module "../../glTFFileLoader" {
|
3
|
+
import type { ITextureInfo } from "../glTFLoaderInterfaces.js";
|
4
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
5
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
6
|
+
declare module "../../glTFFileLoader.js" {
|
7
7
|
interface GLTFLoaderExtensionOptions {
|
8
8
|
/**
|
9
9
|
* Defines options for the KHR_texture_transform extension.
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
2
|
-
import type { GLTFLoader } from "../glTFLoader";
|
3
|
-
declare module "../../glTFFileLoader" {
|
1
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
2
|
+
import type { GLTFLoader } from "../glTFLoader.js";
|
3
|
+
declare module "../../glTFFileLoader.js" {
|
4
4
|
interface GLTFLoaderExtensionOptions {
|
5
5
|
/**
|
6
6
|
* Defines options for the KHR_xmp_json_ld extension.
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import type { Nullable } from "@babylonjs/core/types.js";
|
2
2
|
import type { AnimationGroup } from "@babylonjs/core/Animations/animationGroup.js";
|
3
3
|
import type { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
|
4
|
-
import type { IScene, INode, IAnimation } from "../glTFLoaderInterfaces";
|
5
|
-
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
|
6
|
-
import { GLTFLoader } from "../glTFLoader";
|
4
|
+
import type { IScene, INode, IAnimation } from "../glTFLoaderInterfaces.js";
|
5
|
+
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension.js";
|
6
|
+
import { GLTFLoader } from "../glTFLoader.js";
|
7
7
|
import "@babylonjs/core/Audio/audioSceneComponent.js";
|
8
|
-
declare module "../../glTFFileLoader" {
|
8
|
+
declare module "../../glTFFileLoader.js" {
|
9
9
|
interface GLTFLoaderExtensionOptions {
|
10
10
|
/**
|
11
11
|
* Defines options for the MSFT_audio_emitter extension.
|