@babylonjs/loaders 8.22.0 → 8.22.2

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.
@@ -135,8 +135,9 @@ export class SPLATFileLoader {
135
135
  const fractionalBits = ubuf[13];
136
136
  const flags = ubuf[14];
137
137
  const reserved = ubuf[15];
138
+ const version = ubufu32[1];
138
139
  // check magic and version
139
- if (reserved || ubufu32[0] != 0x5053474e || ubufu32[1] != 2) {
140
+ if (reserved || ubufu32[0] != 0x5053474e || (version != 2 && version != 3)) {
140
141
  // reserved must be 0
141
142
  return new Promise((resolve) => {
142
143
  resolve({ mode: 3 /* Mode.Reject */, data: buffer, hasVertexColors: false });
@@ -195,19 +196,65 @@ export class SPLATFileLoader {
195
196
  byteOffset += 3;
196
197
  }
197
198
  // convert quaternion
198
- for (let i = 0; i < splatCount; i++) {
199
- const x = ubuf[byteOffset + 0];
200
- const y = ubuf[byteOffset + 1] * coordinateSign + quaternionOffset;
201
- const z = ubuf[byteOffset + 2] * coordinateSign + quaternionOffset;
202
- const nx = x / 127.5 - 1;
203
- const ny = y / 127.5 - 1;
204
- const nz = z / 127.5 - 1;
205
- rot[i * 32 + 28 + 1] = x;
206
- rot[i * 32 + 28 + 2] = y;
207
- rot[i * 32 + 28 + 3] = z;
208
- const v = 1 - (nx * nx + ny * ny + nz * nz);
209
- rot[i * 32 + 28 + 0] = 127.5 + Math.sqrt(v < 0 ? 0 : v) * 127.5;
210
- byteOffset += 3;
199
+ if (version >= 3) {
200
+ /*
201
+ In version 3, rotations are represented as the smallest three components of the normalized rotation quaternion, for optimal rotation accuracy.
202
+ The largest component can be derived from the others and is not stored. Its index is stored on 2 bits
203
+ and each of the smallest three components is encoded as a 10-bit signed integer.
204
+ */
205
+ const sqrt12 = Math.SQRT1_2;
206
+ for (let i = 0; i < splatCount; i++) {
207
+ const r = [ubuf[byteOffset + 0], ubuf[byteOffset + 1], ubuf[byteOffset + 2], ubuf[byteOffset + 3]];
208
+ const comp = r[0] + (r[1] << 8) + (r[2] << 16) + (r[3] << 24);
209
+ const cmask = (1 << 9) - 1;
210
+ const rotation = [];
211
+ const iLargest = comp >>> 30;
212
+ let remaining = comp;
213
+ let sumSquares = 0;
214
+ for (let i = 3; i >= 0; --i) {
215
+ if (i !== iLargest) {
216
+ const mag = remaining & cmask;
217
+ const negbit = (remaining >>> 9) & 0x1;
218
+ remaining = remaining >>> 10;
219
+ rotation[i] = sqrt12 * (mag / cmask);
220
+ if (negbit === 1) {
221
+ rotation[i] = -rotation[i];
222
+ }
223
+ // accumulate the sum of squares
224
+ sumSquares += rotation[i] * rotation[i];
225
+ }
226
+ }
227
+ const square = 1 - sumSquares;
228
+ rotation[iLargest] = Math.sqrt(Math.max(square, 0));
229
+ rotation[1] *= coordinateSign;
230
+ rotation[2] *= coordinateSign;
231
+ const shuffle = [3, 0, 1, 2]; // shuffle to match the order of the quaternion components in the splat file
232
+ for (let j = 0; j < 4; j++) {
233
+ rot[i * 32 + 28 + j] = Math.round(127.5 + rotation[shuffle[j]] * 127.5);
234
+ }
235
+ byteOffset += 4;
236
+ }
237
+ }
238
+ else {
239
+ /*
240
+ In version 2, rotations are represented as the `(x, y, z)` components of the normalized rotation quaternion. The
241
+ `w` component can be derived from the others and is not stored. Each component is encoded as an
242
+ 8-bit signed integer.
243
+ */
244
+ for (let i = 0; i < splatCount; i++) {
245
+ const x = ubuf[byteOffset + 0];
246
+ const y = ubuf[byteOffset + 1] * coordinateSign + quaternionOffset;
247
+ const z = ubuf[byteOffset + 2] * coordinateSign + quaternionOffset;
248
+ const nx = x / 127.5 - 1;
249
+ const ny = y / 127.5 - 1;
250
+ const nz = z / 127.5 - 1;
251
+ rot[i * 32 + 28 + 1] = x;
252
+ rot[i * 32 + 28 + 2] = y;
253
+ rot[i * 32 + 28 + 3] = z;
254
+ const v = 1 - (nx * nx + ny * ny + nz * nz);
255
+ rot[i * 32 + 28 + 0] = 127.5 + Math.sqrt(v < 0 ? 0 : v) * 127.5;
256
+ byteOffset += 3;
257
+ }
211
258
  }
212
259
  //SH
213
260
  if (shDegree) {
@@ -1 +1 @@
1
- {"version":3,"file":"splatFileLoader.js","sourceRoot":"","sources":["../../../../dev/loaders/src/SPLAT/splatFileLoader.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,+CAAiC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,0EAA4D;AAC5F,OAAO,EAAE,cAAc,EAAE,0CAA4B;AAIrD,OAAO,EAAE,IAAI,EAAE,uCAAyB;AACxC,OAAO,EAAE,MAAM,EAAE,uCAAyB;AAC1C,OAAO,EAAE,OAAO,EAAE,6CAA+B;AACjD,OAAO,EAAE,iBAAiB,EAAE,uDAAyC;AACrE,OAAO,EAAE,MAAM,EAAE,4CAA8B;AAC/C,OAAO,EAAE,UAAU,EAAE,kDAAoC;AAEzD,OAAO,EAAE,MAAM,EAAE,6CAA+B;AAahD;;GAEG;AACH,IAAW,IAKV;AALD,WAAW,IAAI;IACX,iCAAS,CAAA;IACT,2CAAc,CAAA;IACd,+BAAQ,CAAA;IACR,mCAAU,CAAA;AACd,CAAC,EALU,IAAI,KAAJ,IAAI,QAKd;AAgBD;;;;GAIG;AACH,MAAM,OAAO,eAAe;IAexB;;;OAGG;IACH,YAAY,iBAAyD,eAAe,CAAC,sBAAsB;QAlB3G;;WAEG;QACa,SAAI,GAAG,uBAAuB,CAAC,IAAI,CAAC;QAE5C,oBAAe,GAA6B,IAAI,CAAC;QAGzD;;;WAGG;QACa,eAAU,GAAG,uBAAuB,CAAC,UAAU,CAAC;QAO5D,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IAC1C,CAAC;IAOD,gBAAgB;IAChB,YAAY,CAAC,OAAiC;QAC1C,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;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AAkB,EAAE,CAAC;gBACzB,CAAC;YACL,CAAC;YACD,MAAM,sBAAsB,GAAG,aAAa,IAAI,eAAe,CAAC,MAAM,IAAI,kBAAkB,IAAI,CAAC,CAAC;YAClG,MAAM,WAAW,GAAG,SAAS,CAAC,CAAC,mBAAW,CAAC,CAAC,sBAAsB,CAAC,CAAC,oBAAY,CAAC,wBAAgB,CAAC;YAClG,2CAA2C;YAC3C,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBACjC,OAAO,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,UAAU,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC,kBAAkB,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;YACxK,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;;AAhhBuB,sCAAsB,GAAG;IAC7C,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,KAAK;CACwB,AAHM,CAGL;AAghB7C,2CAA2C;AAC3C,yBAAyB,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/promise-function-async */\r\nimport type { ISceneLoaderPluginAsync, ISceneLoaderPluginFactory, ISceneLoaderAsyncResult, ISceneLoaderProgressEvent, SceneLoaderPluginOptions } from \"core/Loading/sceneLoader\";\r\nimport { RegisterSceneLoaderPlugin } from \"core/Loading/sceneLoader\";\r\nimport { SPLATFileLoaderMetadata } from \"./splatFileLoader.metadata\";\r\nimport { GaussianSplattingMesh } from \"core/Meshes/GaussianSplatting/gaussianSplattingMesh\";\r\nimport { AssetContainer } from \"core/assetContainer\";\r\nimport type { Scene } from \"core/scene\";\r\nimport type { Nullable } from \"core/types\";\r\nimport type { AbstractMesh } from \"core/Meshes/abstractMesh\";\r\nimport { Mesh } from \"core/Meshes/mesh\";\r\nimport { Logger } from \"core/Misc/logger\";\r\nimport { Vector3 } from \"core/Maths/math.vector\";\r\nimport { PointsCloudSystem } from \"core/Particles/pointsCloudSystem\";\r\nimport { Color4 } from \"core/Maths/math.color\";\r\nimport { VertexData } from \"core/Meshes/mesh.vertexData\";\r\nimport type { SPLATLoadingOptions } from \"./splatLoadingOptions\";\r\nimport { Scalar } from \"core/Maths/math.scalar\";\r\nimport type { GaussianSplattingMaterial } from \"core/Materials/GaussianSplatting/gaussianSplattingMaterial\";\r\n\r\ndeclare module \"core/Loading/sceneLoader\" {\r\n // eslint-disable-next-line jsdoc/require-jsdoc, @typescript-eslint/naming-convention\r\n export interface SceneLoaderPluginOptions {\r\n /**\r\n * Defines options for the splat loader.\r\n */\r\n [SPLATFileLoaderMetadata.name]: Partial<SPLATLoadingOptions>;\r\n }\r\n}\r\n\r\n/**\r\n * Indicator of the parsed ply buffer. A standard ready to use splat or an array of positions for a point cloud\r\n */\r\nconst enum Mode {\r\n Splat = 0,\r\n PointCloud = 1,\r\n Mesh = 2,\r\n Reject = 3,\r\n}\r\n\r\n/**\r\n * A parsed buffer and how to use it\r\n */\r\ninterface IParsedPLY {\r\n data: ArrayBuffer;\r\n mode: Mode;\r\n faces?: number[];\r\n hasVertexColors?: boolean;\r\n sh?: Uint8Array[];\r\n trainedWithAntialiasing?: boolean;\r\n compressed?: boolean;\r\n rawSplat?: boolean;\r\n}\r\n\r\n/**\r\n * @experimental\r\n * SPLAT file type loader.\r\n * This is a babylon scene loader plugin.\r\n */\r\nexport class SPLATFileLoader implements ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {\r\n /**\r\n * Defines the name of the plugin.\r\n */\r\n public readonly name = SPLATFileLoaderMetadata.name;\r\n\r\n private _assetContainer: Nullable<AssetContainer> = null;\r\n\r\n private readonly _loadingOptions: Readonly<SPLATLoadingOptions>;\r\n /**\r\n * Defines the extensions the splat loader is able to load.\r\n * force data to come in as an ArrayBuffer\r\n */\r\n public readonly extensions = SPLATFileLoaderMetadata.extensions;\r\n\r\n /**\r\n * Creates loader for gaussian splatting files\r\n * @param loadingOptions options for loading and parsing splat and PLY files.\r\n */\r\n constructor(loadingOptions: Partial<Readonly<SPLATLoadingOptions>> = SPLATFileLoader._DefaultLoadingOptions) {\r\n this._loadingOptions = loadingOptions;\r\n }\r\n\r\n private static readonly _DefaultLoadingOptions = {\r\n keepInRam: false,\r\n flipY: false,\r\n } as const satisfies SPLATLoadingOptions;\r\n\r\n /** @internal */\r\n createPlugin(options: SceneLoaderPluginOptions): ISceneLoaderPluginAsync {\r\n return new SPLATFileLoader(options[SPLATFileLoaderMetadata.name]);\r\n }\r\n\r\n /**\r\n * Imports from the loaded gaussian splatting data and adds them to the scene\r\n * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file\r\n * @param scene the scene the meshes should be added to\r\n * @param data the gaussian splatting data to load\r\n * @param rootUrl root url to load from\r\n * @param _onProgress callback called while file is loading\r\n * @param _fileName Defines the name of the file to load\r\n * @returns a promise containing the loaded meshes, particles, skeletons and animations\r\n */\r\n public async importMeshAsync(\r\n meshesNames: any,\r\n scene: Scene,\r\n data: any,\r\n rootUrl: string,\r\n _onProgress?: (event: ISceneLoaderProgressEvent) => void,\r\n _fileName?: string\r\n ): Promise<ISceneLoaderAsyncResult> {\r\n // eslint-disable-next-line github/no-then\r\n return await this._parseAsync(meshesNames, scene, data, rootUrl).then((meshes) => {\r\n return {\r\n meshes: meshes,\r\n particleSystems: [],\r\n skeletons: [],\r\n animationGroups: [],\r\n transformNodes: [],\r\n geometries: [],\r\n lights: [],\r\n spriteManagers: [],\r\n };\r\n });\r\n }\r\n\r\n private static _BuildPointCloud(pointcloud: PointsCloudSystem, data: ArrayBuffer): boolean {\r\n if (!data.byteLength) {\r\n return false;\r\n }\r\n const uBuffer = new Uint8Array(data);\r\n const fBuffer = new Float32Array(data);\r\n\r\n // parsed array contains room for position(3floats), normal(3floats), color (4b), quantized quaternion (4b)\r\n const rowLength = 3 * 4 + 3 * 4 + 4 + 4;\r\n const vertexCount = uBuffer.length / rowLength;\r\n\r\n const pointcloudfunc = function (particle: any, i: number) {\r\n const x = fBuffer[8 * i + 0];\r\n const y = fBuffer[8 * i + 1];\r\n const z = fBuffer[8 * i + 2];\r\n particle.position = new Vector3(x, y, z);\r\n\r\n const r = uBuffer[rowLength * i + 24 + 0] / 255;\r\n const g = uBuffer[rowLength * i + 24 + 1] / 255;\r\n const b = uBuffer[rowLength * i + 24 + 2] / 255;\r\n particle.color = new Color4(r, g, b, 1);\r\n };\r\n\r\n pointcloud.addPoints(vertexCount, pointcloudfunc);\r\n return true;\r\n }\r\n\r\n private static _BuildMesh(scene: Scene, parsedPLY: IParsedPLY): Mesh {\r\n const mesh = new Mesh(\"PLYMesh\", scene);\r\n\r\n const uBuffer = new Uint8Array(parsedPLY.data);\r\n const fBuffer = new Float32Array(parsedPLY.data);\r\n\r\n const rowLength = 3 * 4 + 3 * 4 + 4 + 4;\r\n const vertexCount = uBuffer.length / rowLength;\r\n\r\n const positions = [];\r\n\r\n const vertexData = new VertexData();\r\n for (let i = 0; i < vertexCount; i++) {\r\n const x = fBuffer[8 * i + 0];\r\n const y = fBuffer[8 * i + 1];\r\n const z = fBuffer[8 * i + 2];\r\n positions.push(x, y, z);\r\n }\r\n\r\n if (parsedPLY.hasVertexColors) {\r\n const colors = new Float32Array(vertexCount * 4);\r\n for (let i = 0; i < vertexCount; i++) {\r\n const r = uBuffer[rowLength * i + 24 + 0] / 255;\r\n const g = uBuffer[rowLength * i + 24 + 1] / 255;\r\n const b = uBuffer[rowLength * i + 24 + 2] / 255;\r\n colors[i * 4 + 0] = r;\r\n colors[i * 4 + 1] = g;\r\n colors[i * 4 + 2] = b;\r\n colors[i * 4 + 3] = 1;\r\n }\r\n vertexData.colors = colors;\r\n }\r\n\r\n vertexData.positions = positions;\r\n vertexData.indices = parsedPLY.faces!;\r\n\r\n vertexData.applyToMesh(mesh);\r\n return mesh;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax\r\n private _parseSPZAsync(data: ArrayBuffer, scene: Scene): Promise<IParsedPLY> {\r\n const ubuf = new Uint8Array(data);\r\n const ubufu32 = new Uint32Array(data.slice(0, 12)); // Only need ubufu32[0] to [2]\r\n // debug infos\r\n const splatCount = ubufu32[2];\r\n\r\n const shDegree = ubuf[12];\r\n const fractionalBits = ubuf[13];\r\n const flags = ubuf[14];\r\n const reserved = ubuf[15];\r\n\r\n // check magic and version\r\n if (reserved || ubufu32[0] != 0x5053474e || ubufu32[1] != 2) {\r\n // reserved must be 0\r\n return new Promise((resolve) => {\r\n resolve({ mode: Mode.Reject, data: buffer, hasVertexColors: false });\r\n });\r\n }\r\n\r\n const rowOutputLength = 3 * 4 + 3 * 4 + 4 + 4; // 32\r\n const buffer = new ArrayBuffer(rowOutputLength * splatCount);\r\n\r\n const positionScale = 1.0 / (1 << fractionalBits);\r\n\r\n const int32View = new Int32Array(1);\r\n const uint8View = new Uint8Array(int32View.buffer);\r\n const read24bComponent = function (u8: Uint8Array, offset: number) {\r\n uint8View[0] = u8[offset + 0];\r\n uint8View[1] = u8[offset + 1];\r\n uint8View[2] = u8[offset + 2];\r\n uint8View[3] = u8[offset + 2] & 0x80 ? 0xff : 0x00;\r\n return int32View[0] * positionScale;\r\n };\r\n\r\n let byteOffset = 16;\r\n\r\n const position = new Float32Array(buffer);\r\n const scale = new Float32Array(buffer);\r\n const rgba = new Uint8ClampedArray(buffer);\r\n const rot = new Uint8ClampedArray(buffer);\r\n\r\n let coordinateSign = 1;\r\n let quaternionOffset = 0;\r\n if (!this._loadingOptions.flipY) {\r\n coordinateSign = -1;\r\n quaternionOffset = 255;\r\n }\r\n // positions\r\n for (let i = 0; i < splatCount; i++) {\r\n position[i * 8 + 0] = read24bComponent(ubuf, byteOffset + 0);\r\n position[i * 8 + 1] = coordinateSign * read24bComponent(ubuf, byteOffset + 3);\r\n position[i * 8 + 2] = coordinateSign * read24bComponent(ubuf, byteOffset + 6);\r\n byteOffset += 9;\r\n }\r\n\r\n // colors\r\n const shC0 = 0.282;\r\n for (let i = 0; i < splatCount; i++) {\r\n for (let component = 0; component < 3; component++) {\r\n const byteValue = ubuf[byteOffset + splatCount + i * 3 + component];\r\n // 0.15 is hard coded value from spz\r\n // Scale factor for DC color components. To convert to RGB, we should multiply by 0.282, but it can\r\n // be useful to represent base colors that are out of range if the higher spherical harmonics bands\r\n // bring them back into range so we multiply by a smaller value.\r\n const value = (byteValue - 127.5) / (0.15 * 255);\r\n rgba[i * 32 + 24 + component] = Scalar.Clamp((0.5 + shC0 * value) * 255, 0, 255);\r\n }\r\n\r\n rgba[i * 32 + 24 + 3] = ubuf[byteOffset + i];\r\n }\r\n byteOffset += splatCount * 4;\r\n\r\n // scales\r\n for (let i = 0; i < splatCount; i++) {\r\n scale[i * 8 + 3 + 0] = Math.exp(ubuf[byteOffset + 0] / 16.0 - 10.0);\r\n scale[i * 8 + 3 + 1] = Math.exp(ubuf[byteOffset + 1] / 16.0 - 10.0);\r\n scale[i * 8 + 3 + 2] = Math.exp(ubuf[byteOffset + 2] / 16.0 - 10.0);\r\n byteOffset += 3;\r\n }\r\n\r\n // convert quaternion\r\n for (let i = 0; i < splatCount; i++) {\r\n const x = ubuf[byteOffset + 0];\r\n const y = ubuf[byteOffset + 1] * coordinateSign + quaternionOffset;\r\n const z = ubuf[byteOffset + 2] * coordinateSign + quaternionOffset;\r\n const nx = x / 127.5 - 1;\r\n const ny = y / 127.5 - 1;\r\n const nz = z / 127.5 - 1;\r\n rot[i * 32 + 28 + 1] = x;\r\n rot[i * 32 + 28 + 2] = y;\r\n rot[i * 32 + 28 + 3] = z;\r\n const v = 1 - (nx * nx + ny * ny + nz * nz);\r\n rot[i * 32 + 28 + 0] = 127.5 + Math.sqrt(v < 0 ? 0 : v) * 127.5;\r\n\r\n byteOffset += 3;\r\n }\r\n\r\n //SH\r\n if (shDegree) {\r\n // shVectorCount is : 3 for dim = 1, 8 for dim = 2 and 15 for dim = 3\r\n // number of vec3 vector needed per splat\r\n const shVectorCount = (shDegree + 1) * (shDegree + 1) - 1; // minus 1 because sh0 is color\r\n // number of component values : 3 per vector3 (45)\r\n const shComponentCount = shVectorCount * 3;\r\n\r\n const textureCount = Math.ceil(shComponentCount / 16); // 4 components can be stored per texture, 4 sh per component\r\n let shIndexRead = byteOffset;\r\n\r\n // sh is an array of uint8array that will be used to create sh textures\r\n const sh: Uint8Array[] = [];\r\n\r\n const engine = scene.getEngine();\r\n const width = engine.getCaps().maxTextureSize;\r\n const height = Math.ceil(splatCount / width);\r\n // create array for the number of textures needed.\r\n for (let textureIndex = 0; textureIndex < textureCount; textureIndex++) {\r\n const texture = new Uint8Array(height * width * 4 * 4); // 4 components per texture, 4 sh per component\r\n sh.push(texture);\r\n }\r\n\r\n for (let i = 0; i < splatCount; i++) {\r\n for (let shIndexWrite = 0; shIndexWrite < shComponentCount; shIndexWrite++) {\r\n const shValue = ubuf[shIndexRead++];\r\n\r\n const textureIndex = Math.floor(shIndexWrite / 16);\r\n const shArray = sh[textureIndex];\r\n\r\n const byteIndexInTexture = shIndexWrite % 16; // [0..15]\r\n const offsetPerSplat = i * 16; // 16 sh values per texture per splat.\r\n shArray[byteIndexInTexture + offsetPerSplat] = shValue;\r\n }\r\n }\r\n\r\n return new Promise((resolve) => {\r\n resolve({ mode: Mode.Splat, data: buffer, hasVertexColors: false, sh: sh, trainedWithAntialiasing: !!flags });\r\n });\r\n }\r\n\r\n return new Promise((resolve) => {\r\n resolve({ mode: Mode.Splat, data: buffer, hasVertexColors: false, trainedWithAntialiasing: !!flags });\r\n });\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax\r\n private _parseAsync(meshesNames: any, scene: Scene, data: any, _rootUrl: string): Promise<Array<AbstractMesh>> {\r\n const babylonMeshesArray: Array<Mesh> = []; //The mesh for babylon\r\n\r\n const readableStream = new ReadableStream({\r\n start(controller) {\r\n controller.enqueue(new Uint8Array(data)); // Enqueue the ArrayBuffer as a Uint8Array\r\n controller.close();\r\n },\r\n });\r\n\r\n // Use GZip DecompressionStream\r\n const decompressionStream = new DecompressionStream(\"gzip\");\r\n const decompressedStream = readableStream.pipeThrough(decompressionStream);\r\n\r\n return new Promise((resolve) => {\r\n new Response(decompressedStream)\r\n .arrayBuffer()\r\n // eslint-disable-next-line github/no-then\r\n .then((buffer) => {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises, github/no-then\r\n this._parseSPZAsync(buffer, scene).then((parsedSPZ) => {\r\n scene._blockEntityCollection = !!this._assetContainer;\r\n const gaussianSplatting = new GaussianSplattingMesh(\"GaussianSplatting\", null, scene, this._loadingOptions.keepInRam);\r\n if (parsedSPZ.trainedWithAntialiasing) {\r\n const gsMaterial = gaussianSplatting.material as GaussianSplattingMaterial;\r\n gsMaterial.kernelSize = 0.1;\r\n gsMaterial.compensation = true;\r\n }\r\n gaussianSplatting._parentContainer = this._assetContainer;\r\n babylonMeshesArray.push(gaussianSplatting);\r\n gaussianSplatting.updateData(parsedSPZ.data, parsedSPZ.sh);\r\n scene._blockEntityCollection = false;\r\n resolve(babylonMeshesArray);\r\n });\r\n })\r\n // eslint-disable-next-line github/no-then\r\n .catch(() => {\r\n // Catch any decompression errors\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises, github/no-then\r\n SPLATFileLoader._ConvertPLYToSplat(data as ArrayBuffer).then(async (parsedPLY) => {\r\n scene._blockEntityCollection = !!this._assetContainer;\r\n switch (parsedPLY.mode) {\r\n case Mode.Splat:\r\n {\r\n const gaussianSplatting = new GaussianSplattingMesh(\"GaussianSplatting\", null, scene, this._loadingOptions.keepInRam);\r\n gaussianSplatting._parentContainer = this._assetContainer;\r\n babylonMeshesArray.push(gaussianSplatting);\r\n gaussianSplatting.updateData(parsedPLY.data, parsedPLY.sh);\r\n if (parsedPLY.compressed || !parsedPLY.rawSplat) {\r\n gaussianSplatting.viewDirectionFactor.set(-1, -1, 1);\r\n }\r\n }\r\n break;\r\n case Mode.PointCloud:\r\n {\r\n const pointcloud = new PointsCloudSystem(\"PointCloud\", 1, scene);\r\n if (SPLATFileLoader._BuildPointCloud(pointcloud, parsedPLY.data)) {\r\n // eslint-disable-next-line github/no-then\r\n await pointcloud.buildMeshAsync().then((mesh) => {\r\n babylonMeshesArray.push(mesh);\r\n });\r\n } else {\r\n pointcloud.dispose();\r\n }\r\n }\r\n break;\r\n case Mode.Mesh:\r\n {\r\n if (parsedPLY.faces) {\r\n babylonMeshesArray.push(SPLATFileLoader._BuildMesh(scene, parsedPLY));\r\n } else {\r\n throw new Error(\"PLY mesh doesn't contain face informations.\");\r\n }\r\n }\r\n break;\r\n default:\r\n throw new Error(\"Unsupported Splat mode\");\r\n }\r\n scene._blockEntityCollection = false;\r\n resolve(babylonMeshesArray);\r\n });\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Load into an asset container.\r\n * @param scene The scene to load into\r\n * @param data The data to import\r\n * @param rootUrl The root url for scene and resources\r\n * @returns The loaded asset container\r\n */\r\n // eslint-disable-next-line no-restricted-syntax\r\n public loadAssetContainerAsync(scene: Scene, data: string, rootUrl: string): Promise<AssetContainer> {\r\n const container = new AssetContainer(scene);\r\n this._assetContainer = container;\r\n\r\n return (\r\n this.importMeshAsync(null, scene, data, rootUrl)\r\n // eslint-disable-next-line github/no-then\r\n .then((result) => {\r\n for (const mesh of result.meshes) {\r\n container.meshes.push(mesh);\r\n }\r\n // mesh material will be null before 1st rendered frame.\r\n this._assetContainer = null;\r\n return container;\r\n })\r\n // eslint-disable-next-line github/no-then\r\n .catch((ex) => {\r\n this._assetContainer = null;\r\n throw ex;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Imports all objects from the loaded OBJ data and adds them to the scene\r\n * @param scene the scene the objects should be added to\r\n * @param data the OBJ data to load\r\n * @param rootUrl root url to load from\r\n * @returns a promise which completes when objects have been loaded to the scene\r\n */\r\n // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax\r\n public loadAsync(scene: Scene, data: string, rootUrl: string): Promise<void> {\r\n //Get the 3D model\r\n // eslint-disable-next-line github/no-then\r\n return this.importMeshAsync(null, scene, data, rootUrl).then(() => {\r\n // return void\r\n });\r\n }\r\n\r\n /**\r\n * Code from https://github.com/dylanebert/gsplat.js/blob/main/src/loaders/PLYLoader.ts Under MIT license\r\n * Converts a .ply data array buffer to splat\r\n * if data array buffer is not ply, returns the original buffer\r\n * @param data the .ply data to load\r\n * @returns the loaded splat buffer\r\n */\r\n private static _ConvertPLYToSplat(data: ArrayBuffer): Promise<IParsedPLY> {\r\n const ubuf = new Uint8Array(data);\r\n const header = new TextDecoder().decode(ubuf.slice(0, 1024 * 10));\r\n const headerEnd = \"end_header\\n\";\r\n const headerEndIndex = header.indexOf(headerEnd);\r\n if (headerEndIndex < 0 || !header) {\r\n // standard splat\r\n return new Promise((resolve) => {\r\n resolve({ mode: Mode.Splat, data: data, rawSplat: true });\r\n });\r\n }\r\n\r\n const vertexCount = parseInt(/element vertex (\\d+)\\n/.exec(header)![1]);\r\n const faceElement = /element face (\\d+)\\n/.exec(header);\r\n let faceCount = 0;\r\n if (faceElement) {\r\n faceCount = parseInt(faceElement[1]);\r\n }\r\n const chunkElement = /element chunk (\\d+)\\n/.exec(header);\r\n let chunkCount = 0;\r\n if (chunkElement) {\r\n chunkCount = parseInt(chunkElement[1]);\r\n }\r\n\r\n let rowVertexOffset = 0;\r\n let rowChunkOffset = 0;\r\n const offsets: Record<string, number> = {\r\n double: 8,\r\n int: 4,\r\n uint: 4,\r\n float: 4,\r\n short: 2,\r\n ushort: 2,\r\n uchar: 1,\r\n list: 0,\r\n };\r\n\r\n type PlyProperty = {\r\n name: string;\r\n type: string;\r\n offset: number;\r\n };\r\n\r\n const enum ElementMode {\r\n Vertex = 0,\r\n Chunk = 1,\r\n SH = 2,\r\n }\r\n\r\n let chunkMode = ElementMode.Chunk;\r\n const vertexProperties: PlyProperty[] = [];\r\n const chunkProperties: PlyProperty[] = [];\r\n const filtered = header.slice(0, headerEndIndex).split(\"\\n\");\r\n for (const prop of filtered) {\r\n if (prop.startsWith(\"property \")) {\r\n const [, type, name] = prop.split(\" \");\r\n\r\n if (chunkMode == ElementMode.Chunk) {\r\n chunkProperties.push({ name, type, offset: rowChunkOffset });\r\n rowChunkOffset += offsets[type];\r\n } else if (chunkMode == ElementMode.Vertex) {\r\n vertexProperties.push({ name, type, offset: rowVertexOffset });\r\n rowVertexOffset += offsets[type];\r\n } else if (chunkMode == ElementMode.SH) {\r\n vertexProperties.push({ name, type, offset: rowVertexOffset });\r\n }\r\n if (!offsets[type]) {\r\n Logger.Warn(`Unsupported property type: ${type}.`);\r\n }\r\n } else if (prop.startsWith(\"element \")) {\r\n const [, type] = prop.split(\" \");\r\n if (type == \"chunk\") {\r\n chunkMode = ElementMode.Chunk;\r\n } else if (type == \"vertex\") {\r\n chunkMode = ElementMode.Vertex;\r\n } else if (type == \"sh\") {\r\n chunkMode = ElementMode.SH;\r\n }\r\n }\r\n }\r\n\r\n const rowVertexLength = rowVertexOffset;\r\n const rowChunkLength = rowChunkOffset;\r\n\r\n // eslint-disable-next-line github/no-then\r\n return (GaussianSplattingMesh.ConvertPLYWithSHToSplatAsync(data) as any).then(async (splatsData: any) => {\r\n const dataView = new DataView(data, headerEndIndex + headerEnd.length);\r\n let offset = rowChunkLength * chunkCount + rowVertexLength * vertexCount;\r\n // faces\r\n const faces: number[] = [];\r\n if (faceCount) {\r\n for (let i = 0; i < faceCount; i++) {\r\n const faceVertexCount = dataView.getUint8(offset);\r\n if (faceVertexCount != 3) {\r\n continue; // only support triangles\r\n }\r\n offset += 1;\r\n\r\n for (let j = 0; j < faceVertexCount; j++) {\r\n const vertexIndex = dataView.getUint32(offset + (2 - j) * 4, true); // change face winding\r\n faces.push(vertexIndex);\r\n }\r\n offset += 12;\r\n }\r\n }\r\n\r\n // early exit for chunked/quantized ply\r\n if (chunkCount) {\r\n return await new Promise((resolve) => {\r\n resolve({ mode: Mode.Splat, data: splatsData.buffer, sh: splatsData.sh, faces: faces, hasVertexColors: false, compressed: true, rawSplat: false });\r\n });\r\n }\r\n // count available properties. if all necessary are present then it's a splat. Otherwise, it's a point cloud\r\n // if faces are found, then it's a standard mesh\r\n let propertyCount = 0;\r\n let propertyColorCount = 0;\r\n const splatProperties = [\"x\", \"y\", \"z\", \"scale_0\", \"scale_1\", \"scale_2\", \"opacity\", \"rot_0\", \"rot_1\", \"rot_2\", \"rot_3\"];\r\n const splatColorProperties = [\"red\", \"green\", \"blue\", \"f_dc_0\", \"f_dc_1\", \"f_dc_2\"];\r\n for (let propertyIndex = 0; propertyIndex < vertexProperties.length; propertyIndex++) {\r\n const property = vertexProperties[propertyIndex];\r\n if (splatProperties.includes(property.name)) {\r\n propertyCount++;\r\n }\r\n if (splatColorProperties.includes(property.name)) {\r\n propertyColorCount++;\r\n }\r\n }\r\n const hasMandatoryProperties = propertyCount == splatProperties.length && propertyColorCount == 3;\r\n const currentMode = faceCount ? Mode.Mesh : hasMandatoryProperties ? Mode.Splat : Mode.PointCloud;\r\n // parsed ready ready to be used as a splat\r\n return await new Promise((resolve) => {\r\n resolve({ mode: currentMode, data: splatsData.buffer, sh: splatsData.sh, faces: faces, hasVertexColors: !!propertyColorCount, compressed: false, rawSplat: false });\r\n });\r\n });\r\n }\r\n}\r\n\r\n// Add this loader into the register plugin\r\nRegisterSceneLoaderPlugin(new SPLATFileLoader());\r\n"]}
1
+ {"version":3,"file":"splatFileLoader.js","sourceRoot":"","sources":["../../../../dev/loaders/src/SPLAT/splatFileLoader.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,+CAAiC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,0EAA4D;AAC5F,OAAO,EAAE,cAAc,EAAE,0CAA4B;AAIrD,OAAO,EAAE,IAAI,EAAE,uCAAyB;AACxC,OAAO,EAAE,MAAM,EAAE,uCAAyB;AAC1C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CAAC,CAAC;YACxK,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;;AAvkBuB,sCAAsB,GAAG;IAC7C,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,KAAK;CACwB,AAHM,CAGL;AAukB7C,2CAA2C;AAC3C,yBAAyB,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/promise-function-async */\r\nimport type { ISceneLoaderPluginAsync, ISceneLoaderPluginFactory, ISceneLoaderAsyncResult, ISceneLoaderProgressEvent, SceneLoaderPluginOptions } from \"core/Loading/sceneLoader\";\r\nimport { RegisterSceneLoaderPlugin } from \"core/Loading/sceneLoader\";\r\nimport { SPLATFileLoaderMetadata } from \"./splatFileLoader.metadata\";\r\nimport { GaussianSplattingMesh } from \"core/Meshes/GaussianSplatting/gaussianSplattingMesh\";\r\nimport { AssetContainer } from \"core/assetContainer\";\r\nimport type { Scene } from \"core/scene\";\r\nimport type { Nullable } from \"core/types\";\r\nimport type { AbstractMesh } from \"core/Meshes/abstractMesh\";\r\nimport { Mesh } from \"core/Meshes/mesh\";\r\nimport { Logger } from \"core/Misc/logger\";\r\nimport { Vector3 } from \"core/Maths/math.vector\";\r\nimport { PointsCloudSystem } from \"core/Particles/pointsCloudSystem\";\r\nimport { Color4 } from \"core/Maths/math.color\";\r\nimport { VertexData } from \"core/Meshes/mesh.vertexData\";\r\nimport type { SPLATLoadingOptions } from \"./splatLoadingOptions\";\r\nimport { Scalar } from \"core/Maths/math.scalar\";\r\nimport type { GaussianSplattingMaterial } from \"core/Materials/GaussianSplatting/gaussianSplattingMaterial\";\r\n\r\ndeclare module \"core/Loading/sceneLoader\" {\r\n // eslint-disable-next-line jsdoc/require-jsdoc, @typescript-eslint/naming-convention\r\n export interface SceneLoaderPluginOptions {\r\n /**\r\n * Defines options for the splat loader.\r\n */\r\n [SPLATFileLoaderMetadata.name]: Partial<SPLATLoadingOptions>;\r\n }\r\n}\r\n\r\n/**\r\n * Indicator of the parsed ply buffer. A standard ready to use splat or an array of positions for a point cloud\r\n */\r\nconst enum Mode {\r\n Splat = 0,\r\n PointCloud = 1,\r\n Mesh = 2,\r\n Reject = 3,\r\n}\r\n\r\n/**\r\n * A parsed buffer and how to use it\r\n */\r\ninterface IParsedPLY {\r\n data: ArrayBuffer;\r\n mode: Mode;\r\n faces?: number[];\r\n hasVertexColors?: boolean;\r\n sh?: Uint8Array[];\r\n trainedWithAntialiasing?: boolean;\r\n compressed?: boolean;\r\n rawSplat?: boolean;\r\n}\r\n\r\n/**\r\n * @experimental\r\n * SPLAT file type loader.\r\n * This is a babylon scene loader plugin.\r\n */\r\nexport class SPLATFileLoader implements ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {\r\n /**\r\n * Defines the name of the plugin.\r\n */\r\n public readonly name = SPLATFileLoaderMetadata.name;\r\n\r\n private _assetContainer: Nullable<AssetContainer> = null;\r\n\r\n private readonly _loadingOptions: Readonly<SPLATLoadingOptions>;\r\n /**\r\n * Defines the extensions the splat loader is able to load.\r\n * force data to come in as an ArrayBuffer\r\n */\r\n public readonly extensions = SPLATFileLoaderMetadata.extensions;\r\n\r\n /**\r\n * Creates loader for gaussian splatting files\r\n * @param loadingOptions options for loading and parsing splat and PLY files.\r\n */\r\n constructor(loadingOptions: Partial<Readonly<SPLATLoadingOptions>> = SPLATFileLoader._DefaultLoadingOptions) {\r\n this._loadingOptions = loadingOptions;\r\n }\r\n\r\n private static readonly _DefaultLoadingOptions = {\r\n keepInRam: false,\r\n flipY: false,\r\n } as const satisfies SPLATLoadingOptions;\r\n\r\n /** @internal */\r\n createPlugin(options: SceneLoaderPluginOptions): ISceneLoaderPluginAsync {\r\n return new SPLATFileLoader(options[SPLATFileLoaderMetadata.name]);\r\n }\r\n\r\n /**\r\n * Imports from the loaded gaussian splatting data and adds them to the scene\r\n * @param meshesNames a string or array of strings of the mesh names that should be loaded from the file\r\n * @param scene the scene the meshes should be added to\r\n * @param data the gaussian splatting data to load\r\n * @param rootUrl root url to load from\r\n * @param _onProgress callback called while file is loading\r\n * @param _fileName Defines the name of the file to load\r\n * @returns a promise containing the loaded meshes, particles, skeletons and animations\r\n */\r\n public async importMeshAsync(\r\n meshesNames: any,\r\n scene: Scene,\r\n data: any,\r\n rootUrl: string,\r\n _onProgress?: (event: ISceneLoaderProgressEvent) => void,\r\n _fileName?: string\r\n ): Promise<ISceneLoaderAsyncResult> {\r\n // eslint-disable-next-line github/no-then\r\n return await this._parseAsync(meshesNames, scene, data, rootUrl).then((meshes) => {\r\n return {\r\n meshes: meshes,\r\n particleSystems: [],\r\n skeletons: [],\r\n animationGroups: [],\r\n transformNodes: [],\r\n geometries: [],\r\n lights: [],\r\n spriteManagers: [],\r\n };\r\n });\r\n }\r\n\r\n private static _BuildPointCloud(pointcloud: PointsCloudSystem, data: ArrayBuffer): boolean {\r\n if (!data.byteLength) {\r\n return false;\r\n }\r\n const uBuffer = new Uint8Array(data);\r\n const fBuffer = new Float32Array(data);\r\n\r\n // parsed array contains room for position(3floats), normal(3floats), color (4b), quantized quaternion (4b)\r\n const rowLength = 3 * 4 + 3 * 4 + 4 + 4;\r\n const vertexCount = uBuffer.length / rowLength;\r\n\r\n const pointcloudfunc = function (particle: any, i: number) {\r\n const x = fBuffer[8 * i + 0];\r\n const y = fBuffer[8 * i + 1];\r\n const z = fBuffer[8 * i + 2];\r\n particle.position = new Vector3(x, y, z);\r\n\r\n const r = uBuffer[rowLength * i + 24 + 0] / 255;\r\n const g = uBuffer[rowLength * i + 24 + 1] / 255;\r\n const b = uBuffer[rowLength * i + 24 + 2] / 255;\r\n particle.color = new Color4(r, g, b, 1);\r\n };\r\n\r\n pointcloud.addPoints(vertexCount, pointcloudfunc);\r\n return true;\r\n }\r\n\r\n private static _BuildMesh(scene: Scene, parsedPLY: IParsedPLY): Mesh {\r\n const mesh = new Mesh(\"PLYMesh\", scene);\r\n\r\n const uBuffer = new Uint8Array(parsedPLY.data);\r\n const fBuffer = new Float32Array(parsedPLY.data);\r\n\r\n const rowLength = 3 * 4 + 3 * 4 + 4 + 4;\r\n const vertexCount = uBuffer.length / rowLength;\r\n\r\n const positions = [];\r\n\r\n const vertexData = new VertexData();\r\n for (let i = 0; i < vertexCount; i++) {\r\n const x = fBuffer[8 * i + 0];\r\n const y = fBuffer[8 * i + 1];\r\n const z = fBuffer[8 * i + 2];\r\n positions.push(x, y, z);\r\n }\r\n\r\n if (parsedPLY.hasVertexColors) {\r\n const colors = new Float32Array(vertexCount * 4);\r\n for (let i = 0; i < vertexCount; i++) {\r\n const r = uBuffer[rowLength * i + 24 + 0] / 255;\r\n const g = uBuffer[rowLength * i + 24 + 1] / 255;\r\n const b = uBuffer[rowLength * i + 24 + 2] / 255;\r\n colors[i * 4 + 0] = r;\r\n colors[i * 4 + 1] = g;\r\n colors[i * 4 + 2] = b;\r\n colors[i * 4 + 3] = 1;\r\n }\r\n vertexData.colors = colors;\r\n }\r\n\r\n vertexData.positions = positions;\r\n vertexData.indices = parsedPLY.faces!;\r\n\r\n vertexData.applyToMesh(mesh);\r\n return mesh;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax\r\n private _parseSPZAsync(data: ArrayBuffer, scene: Scene): Promise<IParsedPLY> {\r\n const ubuf = new Uint8Array(data);\r\n const ubufu32 = new Uint32Array(data.slice(0, 12)); // Only need ubufu32[0] to [2]\r\n // debug infos\r\n const splatCount = ubufu32[2];\r\n\r\n const shDegree = ubuf[12];\r\n const fractionalBits = ubuf[13];\r\n const flags = ubuf[14];\r\n const reserved = ubuf[15];\r\n const version = ubufu32[1];\r\n\r\n // check magic and version\r\n if (reserved || ubufu32[0] != 0x5053474e || (version != 2 && version != 3)) {\r\n // reserved must be 0\r\n return new Promise((resolve) => {\r\n resolve({ mode: Mode.Reject, data: buffer, hasVertexColors: false });\r\n });\r\n }\r\n\r\n const rowOutputLength = 3 * 4 + 3 * 4 + 4 + 4; // 32\r\n const buffer = new ArrayBuffer(rowOutputLength * splatCount);\r\n\r\n const positionScale = 1.0 / (1 << fractionalBits);\r\n\r\n const int32View = new Int32Array(1);\r\n const uint8View = new Uint8Array(int32View.buffer);\r\n const read24bComponent = function (u8: Uint8Array, offset: number) {\r\n uint8View[0] = u8[offset + 0];\r\n uint8View[1] = u8[offset + 1];\r\n uint8View[2] = u8[offset + 2];\r\n uint8View[3] = u8[offset + 2] & 0x80 ? 0xff : 0x00;\r\n return int32View[0] * positionScale;\r\n };\r\n\r\n let byteOffset = 16;\r\n\r\n const position = new Float32Array(buffer);\r\n const scale = new Float32Array(buffer);\r\n const rgba = new Uint8ClampedArray(buffer);\r\n const rot = new Uint8ClampedArray(buffer);\r\n\r\n let coordinateSign = 1;\r\n let quaternionOffset = 0;\r\n if (!this._loadingOptions.flipY) {\r\n coordinateSign = -1;\r\n quaternionOffset = 255;\r\n }\r\n // positions\r\n for (let i = 0; i < splatCount; i++) {\r\n position[i * 8 + 0] = read24bComponent(ubuf, byteOffset + 0);\r\n position[i * 8 + 1] = coordinateSign * read24bComponent(ubuf, byteOffset + 3);\r\n position[i * 8 + 2] = coordinateSign * read24bComponent(ubuf, byteOffset + 6);\r\n byteOffset += 9;\r\n }\r\n\r\n // colors\r\n const shC0 = 0.282;\r\n for (let i = 0; i < splatCount; i++) {\r\n for (let component = 0; component < 3; component++) {\r\n const byteValue = ubuf[byteOffset + splatCount + i * 3 + component];\r\n // 0.15 is hard coded value from spz\r\n // Scale factor for DC color components. To convert to RGB, we should multiply by 0.282, but it can\r\n // be useful to represent base colors that are out of range if the higher spherical harmonics bands\r\n // bring them back into range so we multiply by a smaller value.\r\n const value = (byteValue - 127.5) / (0.15 * 255);\r\n rgba[i * 32 + 24 + component] = Scalar.Clamp((0.5 + shC0 * value) * 255, 0, 255);\r\n }\r\n\r\n rgba[i * 32 + 24 + 3] = ubuf[byteOffset + i];\r\n }\r\n byteOffset += splatCount * 4;\r\n\r\n // scales\r\n for (let i = 0; i < splatCount; i++) {\r\n scale[i * 8 + 3 + 0] = Math.exp(ubuf[byteOffset + 0] / 16.0 - 10.0);\r\n scale[i * 8 + 3 + 1] = Math.exp(ubuf[byteOffset + 1] / 16.0 - 10.0);\r\n scale[i * 8 + 3 + 2] = Math.exp(ubuf[byteOffset + 2] / 16.0 - 10.0);\r\n byteOffset += 3;\r\n }\r\n\r\n // convert quaternion\r\n if (version >= 3) {\r\n /*\r\n In version 3, rotations are represented as the smallest three components of the normalized rotation quaternion, for optimal rotation accuracy.\r\n The largest component can be derived from the others and is not stored. Its index is stored on 2 bits\r\n and each of the smallest three components is encoded as a 10-bit signed integer.\r\n */\r\n const sqrt12 = Math.SQRT1_2;\r\n for (let i = 0; i < splatCount; i++) {\r\n const r = [ubuf[byteOffset + 0], ubuf[byteOffset + 1], ubuf[byteOffset + 2], ubuf[byteOffset + 3]];\r\n\r\n const comp = r[0] + (r[1] << 8) + (r[2] << 16) + (r[3] << 24);\r\n\r\n const cmask = (1 << 9) - 1;\r\n const rotation = [];\r\n const iLargest = comp >>> 30;\r\n let remaining = comp;\r\n let sumSquares = 0;\r\n\r\n for (let i = 3; i >= 0; --i) {\r\n if (i !== iLargest) {\r\n const mag = remaining & cmask;\r\n const negbit = (remaining >>> 9) & 0x1;\r\n remaining = remaining >>> 10;\r\n\r\n rotation[i] = sqrt12 * (mag / cmask);\r\n if (negbit === 1) {\r\n rotation[i] = -rotation[i];\r\n }\r\n\r\n // accumulate the sum of squares\r\n sumSquares += rotation[i] * rotation[i];\r\n }\r\n }\r\n\r\n const square = 1 - sumSquares;\r\n rotation[iLargest] = Math.sqrt(Math.max(square, 0));\r\n\r\n rotation[1] *= coordinateSign;\r\n rotation[2] *= coordinateSign;\r\n\r\n const shuffle = [3, 0, 1, 2]; // shuffle to match the order of the quaternion components in the splat file\r\n for (let j = 0; j < 4; j++) {\r\n rot[i * 32 + 28 + j] = Math.round(127.5 + rotation[shuffle[j]] * 127.5);\r\n }\r\n\r\n byteOffset += 4;\r\n }\r\n } else {\r\n /*\r\n In version 2, rotations are represented as the `(x, y, z)` components of the normalized rotation quaternion. The\r\n `w` component can be derived from the others and is not stored. Each component is encoded as an\r\n 8-bit signed integer.\r\n */\r\n for (let i = 0; i < splatCount; i++) {\r\n const x = ubuf[byteOffset + 0];\r\n const y = ubuf[byteOffset + 1] * coordinateSign + quaternionOffset;\r\n const z = ubuf[byteOffset + 2] * coordinateSign + quaternionOffset;\r\n const nx = x / 127.5 - 1;\r\n const ny = y / 127.5 - 1;\r\n const nz = z / 127.5 - 1;\r\n rot[i * 32 + 28 + 1] = x;\r\n rot[i * 32 + 28 + 2] = y;\r\n rot[i * 32 + 28 + 3] = z;\r\n const v = 1 - (nx * nx + ny * ny + nz * nz);\r\n rot[i * 32 + 28 + 0] = 127.5 + Math.sqrt(v < 0 ? 0 : v) * 127.5;\r\n\r\n byteOffset += 3;\r\n }\r\n }\r\n\r\n //SH\r\n if (shDegree) {\r\n // shVectorCount is : 3 for dim = 1, 8 for dim = 2 and 15 for dim = 3\r\n // number of vec3 vector needed per splat\r\n const shVectorCount = (shDegree + 1) * (shDegree + 1) - 1; // minus 1 because sh0 is color\r\n // number of component values : 3 per vector3 (45)\r\n const shComponentCount = shVectorCount * 3;\r\n\r\n const textureCount = Math.ceil(shComponentCount / 16); // 4 components can be stored per texture, 4 sh per component\r\n let shIndexRead = byteOffset;\r\n\r\n // sh is an array of uint8array that will be used to create sh textures\r\n const sh: Uint8Array[] = [];\r\n\r\n const engine = scene.getEngine();\r\n const width = engine.getCaps().maxTextureSize;\r\n const height = Math.ceil(splatCount / width);\r\n // create array for the number of textures needed.\r\n for (let textureIndex = 0; textureIndex < textureCount; textureIndex++) {\r\n const texture = new Uint8Array(height * width * 4 * 4); // 4 components per texture, 4 sh per component\r\n sh.push(texture);\r\n }\r\n\r\n for (let i = 0; i < splatCount; i++) {\r\n for (let shIndexWrite = 0; shIndexWrite < shComponentCount; shIndexWrite++) {\r\n const shValue = ubuf[shIndexRead++];\r\n\r\n const textureIndex = Math.floor(shIndexWrite / 16);\r\n const shArray = sh[textureIndex];\r\n\r\n const byteIndexInTexture = shIndexWrite % 16; // [0..15]\r\n const offsetPerSplat = i * 16; // 16 sh values per texture per splat.\r\n shArray[byteIndexInTexture + offsetPerSplat] = shValue;\r\n }\r\n }\r\n\r\n return new Promise((resolve) => {\r\n resolve({ mode: Mode.Splat, data: buffer, hasVertexColors: false, sh: sh, trainedWithAntialiasing: !!flags });\r\n });\r\n }\r\n\r\n return new Promise((resolve) => {\r\n resolve({ mode: Mode.Splat, data: buffer, hasVertexColors: false, trainedWithAntialiasing: !!flags });\r\n });\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax\r\n private _parseAsync(meshesNames: any, scene: Scene, data: any, _rootUrl: string): Promise<Array<AbstractMesh>> {\r\n const babylonMeshesArray: Array<Mesh> = []; //The mesh for babylon\r\n\r\n const readableStream = new ReadableStream({\r\n start(controller) {\r\n controller.enqueue(new Uint8Array(data)); // Enqueue the ArrayBuffer as a Uint8Array\r\n controller.close();\r\n },\r\n });\r\n\r\n // Use GZip DecompressionStream\r\n const decompressionStream = new DecompressionStream(\"gzip\");\r\n const decompressedStream = readableStream.pipeThrough(decompressionStream);\r\n\r\n return new Promise((resolve) => {\r\n new Response(decompressedStream)\r\n .arrayBuffer()\r\n // eslint-disable-next-line github/no-then\r\n .then((buffer) => {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises, github/no-then\r\n this._parseSPZAsync(buffer, scene).then((parsedSPZ) => {\r\n scene._blockEntityCollection = !!this._assetContainer;\r\n const gaussianSplatting = new GaussianSplattingMesh(\"GaussianSplatting\", null, scene, this._loadingOptions.keepInRam);\r\n if (parsedSPZ.trainedWithAntialiasing) {\r\n const gsMaterial = gaussianSplatting.material as GaussianSplattingMaterial;\r\n gsMaterial.kernelSize = 0.1;\r\n gsMaterial.compensation = true;\r\n }\r\n gaussianSplatting._parentContainer = this._assetContainer;\r\n babylonMeshesArray.push(gaussianSplatting);\r\n gaussianSplatting.updateData(parsedSPZ.data, parsedSPZ.sh);\r\n scene._blockEntityCollection = false;\r\n resolve(babylonMeshesArray);\r\n });\r\n })\r\n // eslint-disable-next-line github/no-then\r\n .catch(() => {\r\n // Catch any decompression errors\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises, github/no-then\r\n SPLATFileLoader._ConvertPLYToSplat(data as ArrayBuffer).then(async (parsedPLY) => {\r\n scene._blockEntityCollection = !!this._assetContainer;\r\n switch (parsedPLY.mode) {\r\n case Mode.Splat:\r\n {\r\n const gaussianSplatting = new GaussianSplattingMesh(\"GaussianSplatting\", null, scene, this._loadingOptions.keepInRam);\r\n gaussianSplatting._parentContainer = this._assetContainer;\r\n babylonMeshesArray.push(gaussianSplatting);\r\n gaussianSplatting.updateData(parsedPLY.data, parsedPLY.sh);\r\n if (parsedPLY.compressed || !parsedPLY.rawSplat) {\r\n gaussianSplatting.viewDirectionFactor.set(-1, -1, 1);\r\n }\r\n }\r\n break;\r\n case Mode.PointCloud:\r\n {\r\n const pointcloud = new PointsCloudSystem(\"PointCloud\", 1, scene);\r\n if (SPLATFileLoader._BuildPointCloud(pointcloud, parsedPLY.data)) {\r\n // eslint-disable-next-line github/no-then\r\n await pointcloud.buildMeshAsync().then((mesh) => {\r\n babylonMeshesArray.push(mesh);\r\n });\r\n } else {\r\n pointcloud.dispose();\r\n }\r\n }\r\n break;\r\n case Mode.Mesh:\r\n {\r\n if (parsedPLY.faces) {\r\n babylonMeshesArray.push(SPLATFileLoader._BuildMesh(scene, parsedPLY));\r\n } else {\r\n throw new Error(\"PLY mesh doesn't contain face informations.\");\r\n }\r\n }\r\n break;\r\n default:\r\n throw new Error(\"Unsupported Splat mode\");\r\n }\r\n scene._blockEntityCollection = false;\r\n resolve(babylonMeshesArray);\r\n });\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Load into an asset container.\r\n * @param scene The scene to load into\r\n * @param data The data to import\r\n * @param rootUrl The root url for scene and resources\r\n * @returns The loaded asset container\r\n */\r\n // eslint-disable-next-line no-restricted-syntax\r\n public loadAssetContainerAsync(scene: Scene, data: string, rootUrl: string): Promise<AssetContainer> {\r\n const container = new AssetContainer(scene);\r\n this._assetContainer = container;\r\n\r\n return (\r\n this.importMeshAsync(null, scene, data, rootUrl)\r\n // eslint-disable-next-line github/no-then\r\n .then((result) => {\r\n for (const mesh of result.meshes) {\r\n container.meshes.push(mesh);\r\n }\r\n // mesh material will be null before 1st rendered frame.\r\n this._assetContainer = null;\r\n return container;\r\n })\r\n // eslint-disable-next-line github/no-then\r\n .catch((ex) => {\r\n this._assetContainer = null;\r\n throw ex;\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Imports all objects from the loaded OBJ data and adds them to the scene\r\n * @param scene the scene the objects should be added to\r\n * @param data the OBJ data to load\r\n * @param rootUrl root url to load from\r\n * @returns a promise which completes when objects have been loaded to the scene\r\n */\r\n // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax\r\n public loadAsync(scene: Scene, data: string, rootUrl: string): Promise<void> {\r\n //Get the 3D model\r\n // eslint-disable-next-line github/no-then\r\n return this.importMeshAsync(null, scene, data, rootUrl).then(() => {\r\n // return void\r\n });\r\n }\r\n\r\n /**\r\n * Code from https://github.com/dylanebert/gsplat.js/blob/main/src/loaders/PLYLoader.ts Under MIT license\r\n * Converts a .ply data array buffer to splat\r\n * if data array buffer is not ply, returns the original buffer\r\n * @param data the .ply data to load\r\n * @returns the loaded splat buffer\r\n */\r\n private static _ConvertPLYToSplat(data: ArrayBuffer): Promise<IParsedPLY> {\r\n const ubuf = new Uint8Array(data);\r\n const header = new TextDecoder().decode(ubuf.slice(0, 1024 * 10));\r\n const headerEnd = \"end_header\\n\";\r\n const headerEndIndex = header.indexOf(headerEnd);\r\n if (headerEndIndex < 0 || !header) {\r\n // standard splat\r\n return new Promise((resolve) => {\r\n resolve({ mode: Mode.Splat, data: data, rawSplat: true });\r\n });\r\n }\r\n\r\n const vertexCount = parseInt(/element vertex (\\d+)\\n/.exec(header)![1]);\r\n const faceElement = /element face (\\d+)\\n/.exec(header);\r\n let faceCount = 0;\r\n if (faceElement) {\r\n faceCount = parseInt(faceElement[1]);\r\n }\r\n const chunkElement = /element chunk (\\d+)\\n/.exec(header);\r\n let chunkCount = 0;\r\n if (chunkElement) {\r\n chunkCount = parseInt(chunkElement[1]);\r\n }\r\n\r\n let rowVertexOffset = 0;\r\n let rowChunkOffset = 0;\r\n const offsets: Record<string, number> = {\r\n double: 8,\r\n int: 4,\r\n uint: 4,\r\n float: 4,\r\n short: 2,\r\n ushort: 2,\r\n uchar: 1,\r\n list: 0,\r\n };\r\n\r\n type PlyProperty = {\r\n name: string;\r\n type: string;\r\n offset: number;\r\n };\r\n\r\n const enum ElementMode {\r\n Vertex = 0,\r\n Chunk = 1,\r\n SH = 2,\r\n }\r\n\r\n let chunkMode = ElementMode.Chunk;\r\n const vertexProperties: PlyProperty[] = [];\r\n const chunkProperties: PlyProperty[] = [];\r\n const filtered = header.slice(0, headerEndIndex).split(\"\\n\");\r\n for (const prop of filtered) {\r\n if (prop.startsWith(\"property \")) {\r\n const [, type, name] = prop.split(\" \");\r\n\r\n if (chunkMode == ElementMode.Chunk) {\r\n chunkProperties.push({ name, type, offset: rowChunkOffset });\r\n rowChunkOffset += offsets[type];\r\n } else if (chunkMode == ElementMode.Vertex) {\r\n vertexProperties.push({ name, type, offset: rowVertexOffset });\r\n rowVertexOffset += offsets[type];\r\n } else if (chunkMode == ElementMode.SH) {\r\n vertexProperties.push({ name, type, offset: rowVertexOffset });\r\n }\r\n if (!offsets[type]) {\r\n Logger.Warn(`Unsupported property type: ${type}.`);\r\n }\r\n } else if (prop.startsWith(\"element \")) {\r\n const [, type] = prop.split(\" \");\r\n if (type == \"chunk\") {\r\n chunkMode = ElementMode.Chunk;\r\n } else if (type == \"vertex\") {\r\n chunkMode = ElementMode.Vertex;\r\n } else if (type == \"sh\") {\r\n chunkMode = ElementMode.SH;\r\n }\r\n }\r\n }\r\n\r\n const rowVertexLength = rowVertexOffset;\r\n const rowChunkLength = rowChunkOffset;\r\n\r\n // eslint-disable-next-line github/no-then\r\n return (GaussianSplattingMesh.ConvertPLYWithSHToSplatAsync(data) as any).then(async (splatsData: any) => {\r\n const dataView = new DataView(data, headerEndIndex + headerEnd.length);\r\n let offset = rowChunkLength * chunkCount + rowVertexLength * vertexCount;\r\n // faces\r\n const faces: number[] = [];\r\n if (faceCount) {\r\n for (let i = 0; i < faceCount; i++) {\r\n const faceVertexCount = dataView.getUint8(offset);\r\n if (faceVertexCount != 3) {\r\n continue; // only support triangles\r\n }\r\n offset += 1;\r\n\r\n for (let j = 0; j < faceVertexCount; j++) {\r\n const vertexIndex = dataView.getUint32(offset + (2 - j) * 4, true); // change face winding\r\n faces.push(vertexIndex);\r\n }\r\n offset += 12;\r\n }\r\n }\r\n\r\n // early exit for chunked/quantized ply\r\n if (chunkCount) {\r\n return await new Promise((resolve) => {\r\n resolve({ mode: Mode.Splat, data: splatsData.buffer, sh: splatsData.sh, faces: faces, hasVertexColors: false, compressed: true, rawSplat: false });\r\n });\r\n }\r\n // count available properties. if all necessary are present then it's a splat. Otherwise, it's a point cloud\r\n // if faces are found, then it's a standard mesh\r\n let propertyCount = 0;\r\n let propertyColorCount = 0;\r\n const splatProperties = [\"x\", \"y\", \"z\", \"scale_0\", \"scale_1\", \"scale_2\", \"opacity\", \"rot_0\", \"rot_1\", \"rot_2\", \"rot_3\"];\r\n const splatColorProperties = [\"red\", \"green\", \"blue\", \"f_dc_0\", \"f_dc_1\", \"f_dc_2\"];\r\n for (let propertyIndex = 0; propertyIndex < vertexProperties.length; propertyIndex++) {\r\n const property = vertexProperties[propertyIndex];\r\n if (splatProperties.includes(property.name)) {\r\n propertyCount++;\r\n }\r\n if (splatColorProperties.includes(property.name)) {\r\n propertyColorCount++;\r\n }\r\n }\r\n const hasMandatoryProperties = propertyCount == splatProperties.length && propertyColorCount == 3;\r\n const currentMode = faceCount ? Mode.Mesh : hasMandatoryProperties ? Mode.Splat : Mode.PointCloud;\r\n // parsed ready ready to be used as a splat\r\n return await new Promise((resolve) => {\r\n resolve({ mode: currentMode, data: splatsData.buffer, sh: splatsData.sh, faces: faces, hasVertexColors: !!propertyColorCount, compressed: false, rawSplat: false });\r\n });\r\n });\r\n }\r\n}\r\n\r\n// Add this loader into the register plugin\r\nRegisterSceneLoaderPlugin(new SPLATFileLoader());\r\n"]}
@@ -174,10 +174,10 @@ export {};
174
174
 
175
175
  ### Math Nodes
176
176
  1. **Constants**
177
- - E (`math/e`) FlowGraphBlockNames.E
178
- - Pi (`math/pi`) FlowGraphBlockNames.PI
179
- - Infinity (`math/inf`) FlowGraphBlockNames.Inf
180
- - Not a Number (`math/nan`) FlowGraphBlockNames.NaN
177
+ - E (`math/E`) FlowGraphBlockNames.E
178
+ - Pi (`math/Pi`) FlowGraphBlockNames.PI
179
+ - Infinity (`math/Inf`) FlowGraphBlockNames.Inf
180
+ - Not a Number (`math/NaN`) FlowGraphBlockNames.NaN
181
181
  2. **Arithmetic Nodes**
182
182
  - Absolute Value (`math/abs`) FlowGraphBlockNames.Abs
183
183
  - Sign (`math/sign`) FlowGraphBlockNames.Sign
@@ -204,8 +204,8 @@ export {};
204
204
  - Greater Than (`math/gt`) FlowGraphBlockNames.GreaterThan
205
205
  - Greater Than Or Equal To (`math/ge`) FlowGraphBlockNames.GreaterThanOrEqual
206
206
  4. **Special Nodes**
207
- - Is Not a Number (`math/isnan`) FlowGraphBlockNames.IsNaN
208
- - Is Infinity (`math/isinf`) FlowGraphBlockNames.IsInfinity
207
+ - Is Not a Number (`math/isNaN`) FlowGraphBlockNames.IsNaN
208
+ - Is Infinity (`math/isInf`) FlowGraphBlockNames.IsInfinity
209
209
  - Select (`math/select`) FlowGraphBlockNames.Conditional
210
210
  - Switch (`math/switch`) FlowGraphBlockNames.DataSwitch
211
211
  - Random (`math/random`) FlowGraphBlockNames.Random
@@ -246,7 +246,7 @@ export {};
246
246
  - Transpose (`math/transpose`) FlowGraphBlockNames.Transpose
247
247
  - Determinant (`math/determinant`) FlowGraphBlockNames.Determinant
248
248
  - Inverse (`math/inverse`) FlowGraphBlockNames.InvertMatrix
249
- - Multiplication (`math/matmul`) FlowGraphBlockNames.MatrixMultiplication
249
+ - Multiplication (`math/matMul`) FlowGraphBlockNames.MatrixMultiplication
250
250
  - Compose (`math/matCompose`) FlowGraphBlockNames.MatrixCompose
251
251
  - Decompose (`math/matDecompose`) FlowGraphBlockNames.MatrixDecompose
252
252
  10. **Quaternion Nodes**
@@ -163,10 +163,10 @@ const gltfToFlowGraphMapping = {
163
163
  return serializedObjects;
164
164
  },
165
165
  },
166
- "math/e": getSimpleInputMapping("FlowGraphEBlock" /* FlowGraphBlockNames.E */),
167
- "math/pi": getSimpleInputMapping("FlowGraphPIBlock" /* FlowGraphBlockNames.PI */),
168
- "math/inf": getSimpleInputMapping("FlowGraphInfBlock" /* FlowGraphBlockNames.Inf */),
169
- "math/nan": getSimpleInputMapping("FlowGraphNaNBlock" /* FlowGraphBlockNames.NaN */),
166
+ "math/E": getSimpleInputMapping("FlowGraphEBlock" /* FlowGraphBlockNames.E */),
167
+ "math/Pi": getSimpleInputMapping("FlowGraphPIBlock" /* FlowGraphBlockNames.PI */),
168
+ "math/Inf": getSimpleInputMapping("FlowGraphInfBlock" /* FlowGraphBlockNames.Inf */),
169
+ "math/NaN": getSimpleInputMapping("FlowGraphNaNBlock" /* FlowGraphBlockNames.NaN */),
170
170
  "math/abs": getSimpleInputMapping("FlowGraphAbsBlock" /* FlowGraphBlockNames.Abs */),
171
171
  "math/sign": getSimpleInputMapping("FlowGraphSignBlock" /* FlowGraphBlockNames.Sign */),
172
172
  "math/trunc": getSimpleInputMapping("FlowGraphTruncBlock" /* FlowGraphBlockNames.Trunc */),
@@ -240,8 +240,8 @@ const gltfToFlowGraphMapping = {
240
240
  "math/le": getSimpleInputMapping("FlowGraphLessThanOrEqualBlock" /* FlowGraphBlockNames.LessThanOrEqual */, ["a", "b"]),
241
241
  "math/gt": getSimpleInputMapping("FlowGraphGreaterThanBlock" /* FlowGraphBlockNames.GreaterThan */, ["a", "b"]),
242
242
  "math/ge": getSimpleInputMapping("FlowGraphGreaterThanOrEqualBlock" /* FlowGraphBlockNames.GreaterThanOrEqual */, ["a", "b"]),
243
- "math/isnan": getSimpleInputMapping("FlowGraphIsNaNBlock" /* FlowGraphBlockNames.IsNaN */),
244
- "math/isinf": getSimpleInputMapping("FlowGraphIsInfBlock" /* FlowGraphBlockNames.IsInfinity */),
243
+ "math/isNaN": getSimpleInputMapping("FlowGraphIsNaNBlock" /* FlowGraphBlockNames.IsNaN */),
244
+ "math/isInf": getSimpleInputMapping("FlowGraphIsInfBlock" /* FlowGraphBlockNames.IsInfinity */),
245
245
  "math/select": {
246
246
  blocks: ["FlowGraphConditionalBlock" /* FlowGraphBlockNames.Conditional */],
247
247
  inputs: {
@@ -290,8 +290,34 @@ const gltfToFlowGraphMapping = {
290
290
  "math/normalize": getSimpleInputMapping("FlowGraphNormalizeBlock" /* FlowGraphBlockNames.Normalize */),
291
291
  "math/dot": getSimpleInputMapping("FlowGraphDotBlock" /* FlowGraphBlockNames.Dot */, ["a", "b"]),
292
292
  "math/cross": getSimpleInputMapping("FlowGraphCrossBlock" /* FlowGraphBlockNames.Cross */, ["a", "b"]),
293
- "math/rotate2D": getSimpleInputMapping("FlowGraphRotate2DBlock" /* FlowGraphBlockNames.Rotate2D */, ["a", "b"]),
294
- "math/rotate3D": getSimpleInputMapping("FlowGraphRotate3DBlock" /* FlowGraphBlockNames.Rotate3D */, ["a", "b"]),
293
+ "math/rotate2D": {
294
+ blocks: ["FlowGraphRotate2DBlock" /* FlowGraphBlockNames.Rotate2D */],
295
+ inputs: {
296
+ values: {
297
+ a: { name: "a" },
298
+ angle: { name: "b" },
299
+ },
300
+ },
301
+ outputs: {
302
+ values: {
303
+ value: { name: "value" },
304
+ },
305
+ },
306
+ },
307
+ "math/rotate3D": {
308
+ blocks: ["FlowGraphRotate3DBlock" /* FlowGraphBlockNames.Rotate3D */],
309
+ inputs: {
310
+ values: {
311
+ a: { name: "a" },
312
+ rotation: { name: "b" },
313
+ },
314
+ },
315
+ outputs: {
316
+ values: {
317
+ value: { name: "value" },
318
+ },
319
+ },
320
+ },
295
321
  "math/transform": {
296
322
  // glTF transform is vectorN with matrixN
297
323
  blocks: ["FlowGraphTransformVectorBlock" /* FlowGraphBlockNames.TransformVector */],
@@ -401,7 +427,7 @@ const gltfToFlowGraphMapping = {
401
427
  "math/transpose": getSimpleInputMapping("FlowGraphTransposeBlock" /* FlowGraphBlockNames.Transpose */),
402
428
  "math/determinant": getSimpleInputMapping("FlowGraphDeterminantBlock" /* FlowGraphBlockNames.Determinant */),
403
429
  "math/inverse": getSimpleInputMapping("FlowGraphInvertMatrixBlock" /* FlowGraphBlockNames.InvertMatrix */),
404
- "math/matmul": getSimpleInputMapping("FlowGraphMatrixMultiplicationBlock" /* FlowGraphBlockNames.MatrixMultiplication */, ["a", "b"]),
430
+ "math/matMul": getSimpleInputMapping("FlowGraphMatrixMultiplicationBlock" /* FlowGraphBlockNames.MatrixMultiplication */, ["a", "b"]),
405
431
  "math/matCompose": {
406
432
  blocks: ["FlowGraphMatrixCompose" /* FlowGraphBlockNames.MatrixCompose */],
407
433
  inputs: {
@@ -1429,9 +1455,6 @@ const gltfToFlowGraphMapping = {
1429
1455
  },
1430
1456
  },
1431
1457
  };
1432
- // aliases for backwards compatibility
1433
- gltfToFlowGraphMapping["math/compose"] = gltfToFlowGraphMapping["math/matCompose"];
1434
- gltfToFlowGraphMapping["math/decompose"] = gltfToFlowGraphMapping["math/matDecompose"];
1435
1458
  function getSimpleInputMapping(type, inputs = ["a"], inferType) {
1436
1459
  return {
1437
1460
  blocks: [type],
@@ -1498,10 +1521,10 @@ export function getAllSupportedNativeNodeTypes() {
1498
1521
 
1499
1522
  ### Math Nodes
1500
1523
  1. **Constants**
1501
- - E (`math/e`) FlowGraphBlockNames.E
1502
- - Pi (`math/pi`) FlowGraphBlockNames.PI
1503
- - Infinity (`math/inf`) FlowGraphBlockNames.Inf
1504
- - Not a Number (`math/nan`) FlowGraphBlockNames.NaN
1524
+ - E (`math/E`) FlowGraphBlockNames.E
1525
+ - Pi (`math/Pi`) FlowGraphBlockNames.PI
1526
+ - Infinity (`math/Inf`) FlowGraphBlockNames.Inf
1527
+ - Not a Number (`math/NaN`) FlowGraphBlockNames.NaN
1505
1528
  2. **Arithmetic Nodes**
1506
1529
  - Absolute Value (`math/abs`) FlowGraphBlockNames.Abs
1507
1530
  - Sign (`math/sign`) FlowGraphBlockNames.Sign
@@ -1528,8 +1551,8 @@ export function getAllSupportedNativeNodeTypes() {
1528
1551
  - Greater Than (`math/gt`) FlowGraphBlockNames.GreaterThan
1529
1552
  - Greater Than Or Equal To (`math/ge`) FlowGraphBlockNames.GreaterThanOrEqual
1530
1553
  4. **Special Nodes**
1531
- - Is Not a Number (`math/isnan`) FlowGraphBlockNames.IsNaN
1532
- - Is Infinity (`math/isinf`) FlowGraphBlockNames.IsInfinity
1554
+ - Is Not a Number (`math/isNaN`) FlowGraphBlockNames.IsNaN
1555
+ - Is Infinity (`math/isInf`) FlowGraphBlockNames.IsInfinity
1533
1556
  - Select (`math/select`) FlowGraphBlockNames.Conditional
1534
1557
  - Switch (`math/switch`) FlowGraphBlockNames.DataSwitch
1535
1558
  - Random (`math/random`) FlowGraphBlockNames.Random
@@ -1570,7 +1593,7 @@ export function getAllSupportedNativeNodeTypes() {
1570
1593
  - Transpose (`math/transpose`) FlowGraphBlockNames.Transpose
1571
1594
  - Determinant (`math/determinant`) FlowGraphBlockNames.Determinant
1572
1595
  - Inverse (`math/inverse`) FlowGraphBlockNames.InvertMatrix
1573
- - Multiplication (`math/matmul`) FlowGraphBlockNames.MatrixMultiplication
1596
+ - Multiplication (`math/matMul`) FlowGraphBlockNames.MatrixMultiplication
1574
1597
  - Compose (`math/matCompose`) FlowGraphBlockNames.MatrixCompose
1575
1598
  - Decompose (`math/matDecompose`) FlowGraphBlockNames.MatrixDecompose
1576
1599
  10. **Quaternion Nodes**
@@ -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,GAAG,IAAI,WAAW,CAAC,iBAAiB,EAAE,CAAC;oBAC9C,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG;wBACjB,IAAI,EAAE,GAAG;qBACZ,CAAC;gB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqLG","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) => { valid: boolean; error?: string };\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 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 { valid: false, error: \"Receive event should have a configuration object\" };\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 { valid: false, error: \"Receive event should have a single configuration object, the event itself\" };\n }\n const eventId = eventConfiguration.value[0];\n if (typeof eventId !== \"number\") {\n Logger.Error(\"Event id should be a number\");\n return { valid: false, error: \"Event id should be a number\" };\n }\n const event = interactivityGraph.events?.[eventId];\n if (!event) {\n Logger.Error(`Event with id ${eventId} not found`);\n return { valid: false, error: `Event with id ${eventId} not found` };\n }\n return { valid: 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 ||= {};\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 ||= {};\n serializedObjects[0].config.useMatrixPerComponent = true;\n serializedObjects[0].config.preventIntegerFloatArithmetic = 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 validation(gltfBlock) {\n if (gltfBlock.values) {\n // make sure types are the same\n return ValidateTypes(gltfBlock);\n }\n return { valid: true };\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\"]),\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/quatConjugate\": getSimpleInputMapping(FlowGraphBlockNames.Conjugate, [\"a\"]),\n \"math/quatMul\": {\n blocks: [FlowGraphBlockNames.Multiply],\n inputs: {\n values: {\n a: { name: \"a\", gltfType: \"vector4\" },\n b: { name: \"b\", gltfType: \"vector4\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects) {\n serializedObjects[0].config ||= {};\n serializedObjects[0].config.type = FlowGraphTypes.Quaternion;\n return serializedObjects;\n },\n },\n \"math/quatAngleBetween\": getSimpleInputMapping(FlowGraphBlockNames.AngleBetween, [\"a\", \"b\"]),\n \"math/quatFromAxisAngle\": {\n blocks: [FlowGraphBlockNames.QuaternionFromAxisAngle],\n inputs: {\n values: {\n axis: { name: \"a\", gltfType: \"float3\" },\n angle: { name: \"b\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n },\n \"math/quatToAxisAngle\": getSimpleInputMapping(FlowGraphBlockNames.AxisAngleFromQuaternion, [\"a\"]),\n \"math/quatFromDirections\": getSimpleInputMapping(FlowGraphBlockNames.QuaternionFromDirections, [\"a\", \"b\"]),\n \"math/combine2x2\": {\n blocks: [FlowGraphBlockNames.CombineMatrix2D],\n inputs: {\n values: {\n a: { name: \"input_0\", gltfType: \"number\" },\n b: { name: \"input_1\", gltfType: \"number\" },\n c: { name: \"input_2\", gltfType: \"number\" },\n d: { name: \"input_3\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config ||= {};\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 ||= {};\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 ||= {};\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/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 ||= {};\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 ||= {};\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 ||= {};\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 ||= {};\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 default: { name: \"default\" },\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 Logger.Warn(\"Switch cases should be integers. Using empty array instead.\");\n gltfBlock.configuration.cases.value = [] as number[];\n return { valid: 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 { valid: 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 extraProcessor(_gltfBlock, _declaration, _mapping, _arrays, serializedObjects) {\n const serializedObject = serializedObjects[0];\n serializedObject.config ||= {};\n serializedObject.config.incrementIndexWhenLoopDone = true;\n return serializedObjects;\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 reset: { name: \"reset\" },\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 { valid: 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 { valid: false, error: \"Variable get block should have a variable configuration\" };\n }\n return { valid: 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: number[], parser): string[] {\n return [parser.getVariableName(index[0])];\n },\n },\n },\n },\n \"variable/setMultiple\": {\n blocks: [FlowGraphBlockNames.SetVariable],\n configuration: {\n variables: {\n name: \"variables\",\n gltfType: \"number\",\n flowGraphType: \"string\",\n inOptions: true,\n dataTransformer(index: number[][], parser): string[][] {\n return [index[0].map((i) => parser.getVariableName(i))];\n },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, parser, serializedObjects) {\n // variable/get configuration\n const serializedGetVariable = serializedObjects[0];\n serializedGetVariable.dataInputs.forEach((input) => {\n input.name = parser.getVariableName(+input.name);\n });\n\n return serializedObjects;\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.BezierCurveEasing],\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.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: \"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 startTime: { name: \"from\", gltfType: \"number\", dataTransformer: (time: number[], parser) => [time[0] * parser._animationTargetFps] },\n endTime: { name: \"to\", gltfType: \"number\", dataTransformer: (time: number[], parser) => [time[0] * parser._animationTargetFps] },\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._animationTargetFps] },\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 Logger.Warn(\"Switch cases should be integers. Using empty array instead.\");\n gltfBlock.configuration.cases.value = [] as number[];\n return { valid: 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 { valid: true };\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _arrays, serializedObjects) {\n const serializedObject = serializedObjects[0];\n serializedObject.dataInputs.forEach((input) => {\n if (input.name !== \"default\" && input.name !== \"case\") {\n input.name = \"in_\" + input.name;\n }\n });\n serializedObject.config ||= {};\n serializedObject.config.treatCasesAsIntegers = true;\n return serializedObjects;\n },\n },\n \"debug/log\": {\n blocks: [FlowGraphBlockNames.ConsoleLog],\n configuration: {\n message: { name: \"messageTemplate\", inOptions: true },\n },\n },\n};\n\n// aliases for backwards compatibility\ngltfToFlowGraphMapping[\"math/compose\"] = gltfToFlowGraphMapping[\"math/matCompose\"];\ngltfToFlowGraphMapping[\"math/decompose\"] = gltfToFlowGraphMapping[\"math/matDecompose\"];\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 ||= {};\n serializedObjects[0].config.preventIntegerFloatArithmetic = 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 }\n return serializedObjects;\n },\n validation(gltfBlock) {\n if (inferType) {\n // make sure types are the same\n return ValidateTypes(gltfBlock);\n }\n return { valid: true };\n },\n };\n}\n\nfunction ValidateTypes(gltfBlock: IKHRInteractivity_Node): { valid: boolean; error?: string } {\n if (gltfBlock.values) {\n const types = Object.keys(gltfBlock.values)\n .map((key) => gltfBlock.values![key].type)\n .filter((type) => type !== undefined);\n const allSameType = types.every((type) => type === types[0]);\n if (!allSameType) {\n return { valid: false, error: \"All inputs must be of the same type\" };\n }\n }\n return { valid: true };\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 - Switch (`math/switch`) FlowGraphBlockNames.DataSwitch\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\n - Compose (`math/matCompose`) FlowGraphBlockNames.MatrixCompose\n - Decompose (`math/matDecompose`) FlowGraphBlockNames.MatrixDecompose\n10. **Quaternion Nodes**\n - Conjugate (`math/quatConjugate`) FlowGraphBlockNames.Conjugate\n - Multiplication (`math/quatMul`) FlowGraphBlockNames.Multiply\n - Angle Between Quaternions (`math/quatAngleBetween`) FlowGraphBlockNames.AngleBetween\n - Quaternion From Axis Angle (`math/quatFromAxisAngle`) FlowGraphBlockNames.QuaternionFromAxisAngle\n - Quaternion To Axis Angle (`math/quatToAxisAngle`) FlowGraphBlockNames.QuaternionToAxisAngle\n - Quaternion From Two Directional Vectors (`math/quatFromDirections`) FlowGraphBlockNames.QuaternionFromDirections\n11. **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\n12. **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\n13. **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\n14. **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\n15. **Boolean Arithmetic Nodes**\n - Equality (`math/eq`) FlowGraphBlockNames.Equality\n - Boolean NOT (`math/not`) FlowGraphBlockNames.BitwiseNot\n - Boolean AND (`math/and`) FlowGraphBlockNames.BitwiseAnd\n - Boolean OR (`math/or`) FlowGraphBlockNames.BitwiseOr\n - Boolean XOR (`math/xor`) FlowGraphBlockNames.BitwiseXor\n\n### Type Conversion Nodes\n1. **Boolean Conversion Nodes**\n - Boolean to Integer (`type/boolToInt`) FlowGraphBlockNames.BooleanToInt\n - Boolean to Float (`type/boolToFloat`) FlowGraphBlockNames.BooleanToFloat\n2. **Integer Conversion Nodes**\n - Integer to Boolean (`type/intToBool`) FlowGraphBlockNames.IntToBoolean\n - Integer to Float (`type/intToFloat`) FlowGraphBlockNames.IntToFloat\n3. **Float Conversion Nodes**\n - Float to Boolean (`type/floatToBool`) FlowGraphBlockNames.FloatToBoolean\n - Float to Integer (`type/floatToInt`) FlowGraphBlockNames.FloatToInt\n\n### Control Flow Nodes\n1. **Sync Nodes**\n - Sequence (`flow/sequence`) FlowGraphBlockNames.Sequence\n - Branch (`flow/branch`) FlowGraphBlockNames.Branch\n - Switch (`flow/switch`) FlowGraphBlockNames.Switch\n - While Loop (`flow/while`) FlowGraphBlockNames.WhileLoop\n - For Loop (`flow/for`) FlowGraphBlockNames.ForLoop\n - Do N (`flow/doN`) FlowGraphBlockNames.DoN\n - Multi Gate (`flow/multiGate`) FlowGraphBlockNames.MultiGate\n - Wait All (`flow/waitAll`) FlowGraphBlockNames.WaitAll\n - Throttle (`flow/throttle`) FlowGraphBlockNames.Throttle\n2. **Delay Nodes**\n - Set Delay (`flow/setDelay`) FlowGraphBlockNames.SetDelay\n - Cancel Delay (`flow/cancelDelay`) FlowGraphBlockNames.CancelDelay\n\n### State Manipulation Nodes\n1. **Custom Variable Access**\n - Variable Get (`variable/get`) FlowGraphBlockNames.GetVariable\n - Variable Set (`variable/set`) FlowGraphBlockNames.SetVariable\n - Variable Interpolate (`variable/interpolate`)\n2. **Object Model Access** // TODO fully test this!!!\n - JSON Pointer Template Parsing (`pointer/get`) [FlowGraphBlockNames.GetProperty, FlowGraphBlockNames.JsonPointerParser]\n - Effective JSON Pointer Generation (`pointer/set`) [FlowGraphBlockNames.SetProperty, FlowGraphBlockNames.JsonPointerParser]\n - Pointer Get (`pointer/get`) [FlowGraphBlockNames.GetProperty, FlowGraphBlockNames.JsonPointerParser]\n - Pointer Set (`pointer/set`) [FlowGraphBlockNames.SetProperty, FlowGraphBlockNames.JsonPointerParser]\n - Pointer Interpolate (`pointer/interpolate`) [FlowGraphBlockNames.ValueInterpolation, FlowGraphBlockNames.JsonPointerParser, FlowGraphBlockNames.PlayAnimation, FlowGraphBlockNames.Easing]\n\n### Animation Control Nodes\n1. **Animation Play** (`animation/start`) FlowGraphBlockNames.PlayAnimation\n2. **Animation Stop** (`animation/stop`) FlowGraphBlockNames.StopAnimation \n3. **Animation Stop At** (`animation/stopAt`) FlowGraphBlockNames.StopAnimation \n\n### Event Nodes\n1. **Lifecycle Event Nodes**\n - On Start (`event/onStart`) FlowGraphBlockNames.SceneReadyEvent\n - On Tick (`event/onTick`) FlowGraphBlockNames.SceneTickEvent\n2. **Custom Event Nodes**\n - Receive (`event/receive`) FlowGraphBlockNames.ReceiveCustomEvent\n - Send (`event/send`) FlowGraphBlockNames.SendCustomEvent\n\n */\n"]}
1
+ {"version":3,"file":"declarationMapper.js","sourceRoot":"","sources":["../../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,uCAAyB;AAI1C,OAAO,EAAkB,+BAA+B,EAAE,wDAA0C;AA+JpG,MAAM,UAAU,8BAA8B,CAAC,iBAAyB;IACpE,MAAM,CAAC,EAAE,EAAE,SAAS,CAAC,GAAG,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrD,OAAO,wBAAwB,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,MA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AAC,CAAC,CAAC,CAAC;QAC7D,IAAI,CAAC,WAAW,EAAE,CAAC;YACf,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,qCAAqC,EAAE,CAAC;QAC1E,CAAC;IACL,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,8BAA8B;IAC1C,OAAO,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqLG","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) => { valid: boolean; error?: string };\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 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 { valid: false, error: \"Receive event should have a configuration object\" };\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 { valid: false, error: \"Receive event should have a single configuration object, the event itself\" };\n }\n const eventId = eventConfiguration.value[0];\n if (typeof eventId !== \"number\") {\n Logger.Error(\"Event id should be a number\");\n return { valid: false, error: \"Event id should be a number\" };\n }\n const event = interactivityGraph.events?.[eventId];\n if (!event) {\n Logger.Error(`Event with id ${eventId} not found`);\n return { valid: false, error: `Event with id ${eventId} not found` };\n }\n return { valid: 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 ||= {};\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 ||= {};\n serializedObjects[0].config.useMatrixPerComponent = true;\n serializedObjects[0].config.preventIntegerFloatArithmetic = 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 validation(gltfBlock) {\n if (gltfBlock.values) {\n // make sure types are the same\n return ValidateTypes(gltfBlock);\n }\n return { valid: true };\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\": {\n blocks: [FlowGraphBlockNames.Rotate2D],\n inputs: {\n values: {\n a: { name: \"a\" },\n angle: { name: \"b\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n },\n \"math/rotate3D\": {\n blocks: [FlowGraphBlockNames.Rotate3D],\n inputs: {\n values: {\n a: { name: \"a\" },\n rotation: { name: \"b\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n },\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/quatConjugate\": getSimpleInputMapping(FlowGraphBlockNames.Conjugate, [\"a\"]),\n \"math/quatMul\": {\n blocks: [FlowGraphBlockNames.Multiply],\n inputs: {\n values: {\n a: { name: \"a\", gltfType: \"vector4\" },\n b: { name: \"b\", gltfType: \"vector4\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects) {\n serializedObjects[0].config ||= {};\n serializedObjects[0].config.type = FlowGraphTypes.Quaternion;\n return serializedObjects;\n },\n },\n \"math/quatAngleBetween\": getSimpleInputMapping(FlowGraphBlockNames.AngleBetween, [\"a\", \"b\"]),\n \"math/quatFromAxisAngle\": {\n blocks: [FlowGraphBlockNames.QuaternionFromAxisAngle],\n inputs: {\n values: {\n axis: { name: \"a\", gltfType: \"float3\" },\n angle: { name: \"b\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n },\n \"math/quatToAxisAngle\": getSimpleInputMapping(FlowGraphBlockNames.AxisAngleFromQuaternion, [\"a\"]),\n \"math/quatFromDirections\": getSimpleInputMapping(FlowGraphBlockNames.QuaternionFromDirections, [\"a\", \"b\"]),\n \"math/combine2x2\": {\n blocks: [FlowGraphBlockNames.CombineMatrix2D],\n inputs: {\n values: {\n a: { name: \"input_0\", gltfType: \"number\" },\n b: { name: \"input_1\", gltfType: \"number\" },\n c: { name: \"input_2\", gltfType: \"number\" },\n d: { name: \"input_3\", gltfType: \"number\" },\n },\n },\n outputs: {\n values: {\n value: { name: \"value\" },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects) {\n // configure it to work the way glTF specifies\n serializedObjects[0].config ||= {};\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 ||= {};\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 ||= {};\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/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 ||= {};\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 ||= {};\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 ||= {};\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 ||= {};\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 default: { name: \"default\" },\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 Logger.Warn(\"Switch cases should be integers. Using empty array instead.\");\n gltfBlock.configuration.cases.value = [] as number[];\n return { valid: 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 { valid: 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 extraProcessor(_gltfBlock, _declaration, _mapping, _arrays, serializedObjects) {\n const serializedObject = serializedObjects[0];\n serializedObject.config ||= {};\n serializedObject.config.incrementIndexWhenLoopDone = true;\n return serializedObjects;\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 reset: { name: \"reset\" },\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 { valid: 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 { valid: false, error: \"Variable get block should have a variable configuration\" };\n }\n return { valid: 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: number[], parser): string[] {\n return [parser.getVariableName(index[0])];\n },\n },\n },\n },\n \"variable/setMultiple\": {\n blocks: [FlowGraphBlockNames.SetVariable],\n configuration: {\n variables: {\n name: \"variables\",\n gltfType: \"number\",\n flowGraphType: \"string\",\n inOptions: true,\n dataTransformer(index: number[][], parser): string[][] {\n return [index[0].map((i) => parser.getVariableName(i))];\n },\n },\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, parser, serializedObjects) {\n // variable/get configuration\n const serializedGetVariable = serializedObjects[0];\n serializedGetVariable.dataInputs.forEach((input) => {\n input.name = parser.getVariableName(+input.name);\n });\n\n return serializedObjects;\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.BezierCurveEasing],\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.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: \"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 startTime: { name: \"from\", gltfType: \"number\", dataTransformer: (time: number[], parser) => [time[0] * parser._animationTargetFps] },\n endTime: { name: \"to\", gltfType: \"number\", dataTransformer: (time: number[], parser) => [time[0] * parser._animationTargetFps] },\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._animationTargetFps] },\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 Logger.Warn(\"Switch cases should be integers. Using empty array instead.\");\n gltfBlock.configuration.cases.value = [] as number[];\n return { valid: 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 { valid: true };\n },\n extraProcessor(_gltfBlock, _declaration, _mapping, _arrays, serializedObjects) {\n const serializedObject = serializedObjects[0];\n serializedObject.dataInputs.forEach((input) => {\n if (input.name !== \"default\" && input.name !== \"case\") {\n input.name = \"in_\" + input.name;\n }\n });\n serializedObject.config ||= {};\n serializedObject.config.treatCasesAsIntegers = true;\n return serializedObjects;\n },\n },\n \"debug/log\": {\n blocks: [FlowGraphBlockNames.ConsoleLog],\n configuration: {\n message: { name: \"messageTemplate\", inOptions: true },\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 ||= {};\n serializedObjects[0].config.preventIntegerFloatArithmetic = 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 }\n return serializedObjects;\n },\n validation(gltfBlock) {\n if (inferType) {\n // make sure types are the same\n return ValidateTypes(gltfBlock);\n }\n return { valid: true };\n },\n };\n}\n\nfunction ValidateTypes(gltfBlock: IKHRInteractivity_Node): { valid: boolean; error?: string } {\n if (gltfBlock.values) {\n const types = Object.keys(gltfBlock.values)\n .map((key) => gltfBlock.values![key].type)\n .filter((type) => type !== undefined);\n const allSameType = types.every((type) => type === types[0]);\n if (!allSameType) {\n return { valid: false, error: \"All inputs must be of the same type\" };\n }\n }\n return { valid: true };\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 - Switch (`math/switch`) FlowGraphBlockNames.DataSwitch\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\n - Compose (`math/matCompose`) FlowGraphBlockNames.MatrixCompose\n - Decompose (`math/matDecompose`) FlowGraphBlockNames.MatrixDecompose\n10. **Quaternion Nodes**\n - Conjugate (`math/quatConjugate`) FlowGraphBlockNames.Conjugate\n - Multiplication (`math/quatMul`) FlowGraphBlockNames.Multiply\n - Angle Between Quaternions (`math/quatAngleBetween`) FlowGraphBlockNames.AngleBetween\n - Quaternion From Axis Angle (`math/quatFromAxisAngle`) FlowGraphBlockNames.QuaternionFromAxisAngle\n - Quaternion To Axis Angle (`math/quatToAxisAngle`) FlowGraphBlockNames.QuaternionToAxisAngle\n - Quaternion From Two Directional Vectors (`math/quatFromDirections`) FlowGraphBlockNames.QuaternionFromDirections\n11. **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\n12. **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\n13. **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\n14. **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\n15. **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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/loaders",
3
- "version": "8.22.0",
3
+ "version": "8.22.2",
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": "^8.22.0",
21
+ "@babylonjs/core": "^8.22.2",
22
22
  "@dev/build-tools": "^1.0.0",
23
23
  "@lts/loaders": "^1.0.0",
24
- "babylonjs-gltf2interface": "^8.22.0"
24
+ "babylonjs-gltf2interface": "^8.22.2"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "@babylonjs/core": "^8.0.0",