@onerjs/core 8.49.4 → 8.49.6

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.
@@ -42,7 +42,7 @@ export class GeospatialCameraMovement extends CameraMovement {
42
42
  return point.normalizeToRef(result);
43
43
  };
44
44
  this.pickPredicate = pickPredicate;
45
- this._tempPickingRay = new Ray(this._cameraPosition, this._cameraLookAt);
45
+ this._tempPickingRay = Ray.Zero();
46
46
  this.panInertia = 0;
47
47
  this.rotationInertia = 0;
48
48
  this.rotationXSpeed = Math.PI / 500; // Move 1/500th of a half circle per pixel
@@ -88,25 +88,25 @@ export class GeospatialCameraMovement extends CameraMovement {
88
88
  }
89
89
  }
90
90
  handleDrag(pointerX, pointerY) {
91
- if (this._hitPointRadius) {
92
- const pickResult = this._scene.pick(pointerX, pointerY, this.pickPredicate);
93
- if (pickResult.ray) {
94
- const localToEcef = TmpVectors.Matrix[0];
95
- this._recalculateDragPlaneHitPoint(this._hitPointRadius, pickResult.ray, localToEcef);
96
- const delta = this._dragPlaneHitPointLocal.subtractToRef(this._previousDragPlaneHitPointLocal, TmpVectors.Vector3[6]);
97
- // When the camera is pitched nearly parallel to the drag plane, ray-plane intersection
98
- // can produce enormous deltas. Clamp the delta to avoid massive jumps.
99
- const maxDragDelta = this._hitPointRadius * 0.1; // Max 10% of hit radius per frame
100
- const deltaLength = delta.length();
101
- if (deltaLength > maxDragDelta) {
102
- delta.scaleInPlace(maxDragDelta / deltaLength);
103
- }
104
- this._previousDragPlaneHitPointLocal.copyFrom(this._dragPlaneHitPointLocal);
105
- Vector3.TransformNormalToRef(delta, localToEcef, delta);
106
- this._dragPlaneOriginPointEcef.addInPlace(delta);
107
- this.panAccumulatedPixels.subtractInPlace(delta);
108
- }
91
+ const scene = this._scene;
92
+ if (!this._hitPointRadius || !scene.activeCamera) {
93
+ return;
94
+ }
95
+ scene.createPickingRayToRef(pointerX, pointerY, null, this._tempPickingRay, scene.activeCamera);
96
+ const localToEcef = TmpVectors.Matrix[0];
97
+ this._recalculateDragPlaneHitPoint(this._hitPointRadius, this._tempPickingRay, localToEcef);
98
+ const delta = this._dragPlaneHitPointLocal.subtractToRef(this._previousDragPlaneHitPointLocal, TmpVectors.Vector3[6]);
99
+ // When the camera is pitched nearly parallel to the drag plane, ray-plane intersection
100
+ // can produce enormous deltas. Clamp the delta to avoid massive jumps.
101
+ const maxDragDelta = this._hitPointRadius * 0.1; // Max 10% of hit radius per frame
102
+ const deltaLength = delta.length();
103
+ if (deltaLength > maxDragDelta) {
104
+ delta.scaleInPlace(maxDragDelta / deltaLength);
109
105
  }
106
+ this._previousDragPlaneHitPointLocal.copyFrom(this._dragPlaneHitPointLocal);
107
+ Vector3.TransformNormalToRef(delta, localToEcef, delta);
108
+ this._dragPlaneOriginPointEcef.addInPlace(delta);
109
+ this.panAccumulatedPixels.subtractInPlace(delta);
110
110
  }
111
111
  /** @override */
112
112
  computeCurrentFrameDeltas() {
@@ -1 +1 @@
1
- {"version":3,"file":"geospatialCameraMovement.js","sourceRoot":"","sources":["../../../../dev/core/src/Cameras/geospatialCameraMovement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAErC,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAMvD;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,wBAAyB,SAAQ,cAAc;IAkBxD,YACI,KAAY,EACL,MAAwB,EAC/B,cAAuB,EACf,aAAsB,EACtB,aAAsB,EAC9B,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,CAAC;IACjD,CAAC;IACD,QAAQ,CAAC,SAAS,EAAE,CAAC;AACzB,CAAC","sourcesContent":["import { CameraMovement } from \"./cameraMovement\";\r\nimport { Epsilon } from \"../Maths/math.constants\";\r\nimport { type GeospatialLimits } from \"./Limits/geospatialLimits\";\r\nimport { Matrix, TmpVectors, Vector3 } from \"../Maths/math.vector\";\r\nimport { type MeshPredicate } from \"../Culling/ray.core\";\r\nimport { Plane } from \"../Maths/math.plane\";\r\nimport { Ray } from \"../Culling/ray\";\r\nimport { type Scene } from \"../scene\";\r\nimport { Vector3Distance } from \"../Maths/math.vector.functions\";\r\nimport { Clamp } from \"../Maths/math.scalar.functions\";\r\nimport { type PickingInfo } from \"../Collisions/pickingInfo\";\r\nimport { type Nullable } from \"../types\";\r\nimport { type InterpolatingBehavior } from \"../Behaviors/Cameras/interpolatingBehavior\";\r\nimport { type GeospatialCamera } from \"./geospatialCamera\";\r\n\r\n/**\r\n * Geospatial-specific camera movement system that extends the base movement with\r\n * raycasting and altitude-aware zoom constraints.\r\n *\r\n * This class encapsulates geospatial camera movement logic:\r\n * - Dragging in a way which keeps cursor anchored to globe\r\n * - Latitude-based pan speed dampening\r\n * - Zoom speed scaling based on distance to center\r\n * - Raycasting to determine zoom constraints based on terrain/globe\r\n * - Altitude-based zoom clamping\r\n * - Zoom direction calculation (towards cursor vs along look vector)\r\n */\r\nexport class GeospatialCameraMovement extends CameraMovement {\r\n /** Predicate function to determine which meshes to pick against (e.g., globe mesh) */\r\n public pickPredicate?: MeshPredicate;\r\n\r\n /** World-space picked point under cursor for zoom-to-cursor behavior (may be undefined) */\r\n public computedPerFrameZoomPickPoint?: Vector3;\r\n\r\n public zoomToCursor: boolean = true;\r\n\r\n private _tempPickingRay: Ray;\r\n\r\n private _hitPointRadius?: number = undefined;\r\n private _dragPlane: Plane = new Plane(0, 0, 0, 0);\r\n private _dragPlaneNormal: Vector3 = Vector3.Zero();\r\n private _dragPlaneOriginPointEcef: Vector3 = Vector3.Zero();\r\n private _dragPlaneHitPointLocal: Vector3 = Vector3.Zero();\r\n private _previousDragPlaneHitPointLocal: Vector3 = Vector3.Zero();\r\n\r\n constructor(\r\n scene: Scene,\r\n public limits: GeospatialLimits,\r\n cameraPosition: Vector3,\r\n private _cameraCenter: Vector3,\r\n private _cameraLookAt: Vector3,\r\n pickPredicate?: MeshPredicate,\r\n behavior?: InterpolatingBehavior<GeospatialCamera>\r\n ) {\r\n super(scene, cameraPosition, behavior);\r\n this.pickPredicate = pickPredicate;\r\n this._tempPickingRay = new Ray(this._cameraPosition, this._cameraLookAt);\r\n this.panInertia = 0;\r\n this.rotationInertia = 0;\r\n this.rotationXSpeed = Math.PI / 500; // Move 1/500th of a half circle per pixel\r\n this.rotationYSpeed = Math.PI / 500; // Move 1/500th of a half circle per pixel\r\n this.zoomSpeed = 2; // Base zoom speed; actual speed is scaled based on altitude\r\n }\r\n\r\n /**\r\n * Function to calculate the up vector from a given point.\r\n * Can be overridden to support non-spherical planets or custom up vector logic.\r\n * Defaults to using the geocentric normal.\r\n * @param point The point from which to calculate the up vector (e.g., camera position)\r\n * @param result The vector to store the calculated up vector\r\n * @returns The calculated up vector\r\n */\r\n public calculateUpVectorFromPointToRef = (point: Vector3, result: Vector3): Vector3 => {\r\n return point.normalizeToRef(result);\r\n };\r\n\r\n public startDrag(pointerX: number, pointerY: number) {\r\n const pickResult = this._scene.pick(pointerX, pointerY, this.pickPredicate);\r\n if (pickResult.pickedPoint && pickResult.ray) {\r\n // Store radius from earth center to pickedPoint, used when calculating drag plane\r\n this._hitPointRadius = pickResult.pickedPoint.length();\r\n\r\n this._recalculateDragPlaneHitPoint(this._hitPointRadius, pickResult.ray, TmpVectors.Matrix[0]);\r\n this._previousDragPlaneHitPointLocal.copyFrom(this._dragPlaneHitPointLocal);\r\n } else {\r\n this._hitPointRadius = undefined; // can't drag without a hit on the globe\r\n }\r\n }\r\n\r\n public stopDrag() {\r\n this._hitPointRadius = undefined;\r\n }\r\n\r\n /**\r\n * The previous drag plane hit point in local space is stored to compute the movement delta.\r\n * As the drag movement occurs, we will continuously recalculate this point. The delta between the previous and current hit points is the delta we will apply to the camera's localtranslation\r\n * @param hitPointRadius The distance between the world origin (center of globe) and the initial drag hit point\r\n * @param ray The ray from the camera to the new cursor location\r\n * @param localToEcefResult The matrix to convert from local to ECEF space\r\n */\r\n private _recalculateDragPlaneHitPoint(hitPointRadius: number, ray: Ray, localToEcefResult: Matrix): void {\r\n // Use the camera's geocentric normal to find the dragPlaneOriginPoint which lives at hitPointRadius along the camera's geocentric normal\r\n this._cameraPosition.scaleToRef(hitPointRadius / Math.max(0.00001, this._cameraPosition.length()), this._dragPlaneOriginPointEcef);\r\n\r\n // The dragPlaneOffsetVector will later be recalculated when drag occurs, and the delta between the offset vectors will be applied to localTranslation\r\n ComputeLocalBasisToRefs(\r\n this._dragPlaneOriginPointEcef,\r\n TmpVectors.Vector3[0],\r\n TmpVectors.Vector3[1],\r\n this._dragPlaneNormal,\r\n this._scene.useRightHandedSystem,\r\n this.calculateUpVectorFromPointToRef\r\n );\r\n const localToEcef = Matrix.FromXYZAxesToRef(TmpVectors.Vector3[0], TmpVectors.Vector3[1], this._dragPlaneNormal, localToEcefResult);\r\n localToEcef.setTranslationFromFloats(this._dragPlaneOriginPointEcef.x, this._dragPlaneOriginPointEcef.y, this._dragPlaneOriginPointEcef.z);\r\n const ecefToLocal = localToEcef.invertToRef(TmpVectors.Matrix[1]);\r\n\r\n // Now create a plane at that point, perpendicular to _dragPlaneNormal.\r\n Plane.FromPositionAndNormalToRef(this._dragPlaneOriginPointEcef, this._dragPlaneNormal, this._dragPlane);\r\n\r\n // Lastly, find the _dragPlaneHitPoint where the ray intersects the _dragPlane.\r\n if (IntersectRayWithPlaneToRef(ray, this._dragPlane, this._dragPlaneHitPointLocal)) {\r\n // If hit, convert the drag plane hit point into the local space.\r\n Vector3.TransformCoordinatesToRef(this._dragPlaneHitPointLocal, ecefToLocal, this._dragPlaneHitPointLocal);\r\n }\r\n }\r\n\r\n public handleDrag(pointerX: number, pointerY: number) {\r\n if (this._hitPointRadius) {\r\n const pickResult = this._scene.pick(pointerX, pointerY, this.pickPredicate);\r\n if (pickResult.ray) {\r\n const localToEcef = TmpVectors.Matrix[0];\r\n this._recalculateDragPlaneHitPoint(this._hitPointRadius, pickResult.ray, localToEcef);\r\n\r\n const delta = this._dragPlaneHitPointLocal.subtractToRef(this._previousDragPlaneHitPointLocal, TmpVectors.Vector3[6]);\r\n\r\n // When the camera is pitched nearly parallel to the drag plane, ray-plane intersection\r\n // can produce enormous deltas. Clamp the delta to avoid massive jumps.\r\n const maxDragDelta = this._hitPointRadius * 0.1; // Max 10% of hit radius per frame\r\n const deltaLength = delta.length();\r\n if (deltaLength > maxDragDelta) {\r\n delta.scaleInPlace(maxDragDelta / deltaLength);\r\n }\r\n\r\n this._previousDragPlaneHitPointLocal.copyFrom(this._dragPlaneHitPointLocal);\r\n\r\n Vector3.TransformNormalToRef(delta, localToEcef, delta);\r\n this._dragPlaneOriginPointEcef.addInPlace(delta);\r\n\r\n this.panAccumulatedPixels.subtractInPlace(delta);\r\n }\r\n }\r\n }\r\n\r\n /** @override */\r\n public override computeCurrentFrameDeltas(): void {\r\n const cameraCenter = this._cameraCenter;\r\n\r\n // Slows down panning near the poles\r\n if (this.panAccumulatedPixels.lengthSquared() > Epsilon) {\r\n const centerRadius = cameraCenter.length(); // distance from planet origin to camera center\r\n const currentRadius = this._cameraPosition.length();\r\n // Dampen the pan speed based on latitude (slower near poles)\r\n const upAtCenter = TmpVectors.Vector3[7];\r\n this.calculateUpVectorFromPointToRef(cameraCenter, upAtCenter);\r\n // Latitude is derived from the Z component of the up vector (ECEF convention: Z = polar axis)\r\n const sineOfSphericalLat = upAtCenter.z;\r\n const cosOfSphericalLat = Math.sqrt(1 - Math.min(1, sineOfSphericalLat * sineOfSphericalLat));\r\n const latitudeDampening = Math.sqrt(Math.abs(cosOfSphericalLat)); // sqrt here reduces effect near equator\r\n\r\n // Reduce the dampening effect near surface (so that at ground level, pan speed is not affected by latitude)\r\n const height = Math.max(currentRadius - centerRadius, Epsilon);\r\n const latitudeDampeningScale = Math.max(1, centerRadius / height);\r\n\r\n this._panSpeedMultiplier = Clamp(latitudeDampeningScale * latitudeDampening, 0, 1);\r\n } else {\r\n this._panSpeedMultiplier = 1;\r\n }\r\n\r\n // If a pan drag is occurring, stop zooming.\r\n let zoomTargetDistance: number | undefined;\r\n if (this.isDragging) {\r\n this._zoomSpeedMultiplier = 0;\r\n this._zoomVelocity = 0;\r\n } else {\r\n zoomTargetDistance = this.computedPerFrameZoomPickPoint ? Vector3Distance(this._cameraPosition, this.computedPerFrameZoomPickPoint) : undefined;\r\n\r\n // Scales zoom movement speed based on camera distance to zoom target.\r\n this._zoomSpeedMultiplier = (zoomTargetDistance ?? Vector3Distance(this._cameraPosition, cameraCenter)) * 0.01;\r\n }\r\n\r\n super.computeCurrentFrameDeltas();\r\n }\r\n\r\n public get isDragging() {\r\n return this._hitPointRadius !== undefined;\r\n }\r\n\r\n public handleZoom(zoomDelta: number, toCursor: boolean) {\r\n if (zoomDelta !== 0) {\r\n this.zoomAccumulatedPixels += zoomDelta;\r\n\r\n const pickResult = this._scene.pick(this._scene.pointerX, this._scene.pointerY, this.pickPredicate);\r\n\r\n if (toCursor && pickResult.hit && pickResult.pickedPoint && pickResult.ray && this.zoomToCursor) {\r\n this.computedPerFrameZoomPickPoint = pickResult.pickedPoint;\r\n } else {\r\n // If no hit under cursor or explicitly told not to zoom to cursor, zoom along lookVector instead\r\n const lookPickResult = this.pickAlongVector(this._cameraLookAt);\r\n this.computedPerFrameZoomPickPoint = lookPickResult?.pickedPoint ?? undefined;\r\n }\r\n }\r\n }\r\n\r\n public pickAlongVector(vector: Vector3): Nullable<PickingInfo> {\r\n this._tempPickingRay.origin.copyFrom(this._cameraPosition);\r\n this._tempPickingRay.direction.copyFrom(vector);\r\n return this._scene.pickWithRay(this._tempPickingRay, this.pickPredicate);\r\n }\r\n}\r\n/** @internal */\r\nexport function ClampCenterFromPolesInPlace(center: Vector3) {\r\n const sineOfSphericalLatitudeLimit = 0.998749218; // ~90 degrees\r\n const centerMagnitude = center.length(); // distance from planet origin\r\n if (centerMagnitude > Epsilon) {\r\n const sineSphericalLat = centerMagnitude === 0 ? 0 : center.z / centerMagnitude;\r\n if (Math.abs(sineSphericalLat) > sineOfSphericalLatitudeLimit) {\r\n // Clamp the spherical latitude (and derive longitude)\r\n const sineOfClampedSphericalLat = Clamp(sineSphericalLat, -sineOfSphericalLatitudeLimit, sineOfSphericalLatitudeLimit);\r\n const cosineOfClampedSphericalLat = Math.sqrt(1 - sineOfClampedSphericalLat * sineOfClampedSphericalLat);\r\n const longitude = Math.atan2(center.y, center.x);\r\n\r\n // Spherical to Cartesian\r\n const newX = centerMagnitude * Math.cos(longitude) * cosineOfClampedSphericalLat;\r\n const newY = centerMagnitude * Math.sin(longitude) * cosineOfClampedSphericalLat;\r\n const newZ = centerMagnitude * sineOfClampedSphericalLat;\r\n\r\n center.set(newX, newY, newZ);\r\n }\r\n }\r\n return center;\r\n}\r\n\r\nfunction IntersectRayWithPlaneToRef(ray: Ray, plane: Plane, ref: Vector3): boolean {\r\n // Distance along the ray to the plane; null if no hit\r\n const dist = ray.intersectsPlane(plane);\r\n\r\n if (dist !== null && dist >= 0) {\r\n ray.origin.addToRef(ray.direction.scaleToRef(dist, TmpVectors.Vector3[0]), ref);\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Helper to build east/north/up basis vectors at a world position.\r\n * Cross product order is swapped based on handedness so that the east vector\r\n * encodes the coordinate-system convention, removing the need for a separate yawScale.\r\n * @param worldPos - The position on the globe\r\n * @param refEast - Receives the east direction\r\n * @param refNorth - Receives the north direction\r\n * @param refUp - Receives the up (outward) direction\r\n * @param useRightHandedSystem - Whether the scene uses a right-handed coordinate system (default: false)\r\n * @param calculateUpVectorFromPointToRef - Optional function to calculate the up vector from a point. If supplied, this function will be used instead of assuming a spherical geocentric normal, allowing support for non-spherical planets or custom up vector logic.\r\n * @internal\r\n */\r\nexport function ComputeLocalBasisToRefs(\r\n worldPos: Vector3,\r\n refEast: Vector3,\r\n refNorth: Vector3,\r\n refUp: Vector3,\r\n useRightHandedSystem: boolean = false,\r\n calculateUpVectorFromPointToRef?: (point: Vector3, result: Vector3) => Vector3\r\n): void {\r\n if (calculateUpVectorFromPointToRef) {\r\n calculateUpVectorFromPointToRef(worldPos, refUp);\r\n } else {\r\n // up = normalized position (geocentric normal)\r\n refUp.copyFrom(worldPos).normalize();\r\n }\r\n\r\n // east – cross product order determines handedness\r\n const worldNorth = Vector3.LeftHandedForwardReadOnly; // (0,0,1)\r\n if (useRightHandedSystem) {\r\n Vector3.CrossToRef(worldNorth, refUp, refEast);\r\n } else {\r\n Vector3.CrossToRef(refUp, worldNorth, refEast);\r\n }\r\n\r\n // at poles, cross with worldRight instead\r\n if (refEast.lengthSquared() < Epsilon) {\r\n if (useRightHandedSystem) {\r\n Vector3.CrossToRef(Vector3.Right(), refUp, refEast);\r\n } else {\r\n Vector3.CrossToRef(refUp, Vector3.Right(), refEast);\r\n }\r\n }\r\n refEast.normalize();\r\n\r\n // north – completes the basis (cross order also swapped for handedness)\r\n if (useRightHandedSystem) {\r\n Vector3.CrossToRef(refUp, refEast, refNorth);\r\n } else {\r\n Vector3.CrossToRef(refEast, refUp, refNorth);\r\n }\r\n refNorth.normalize();\r\n}\r\n"]}
1
+ {"version":3,"file":"geospatialCameraMovement.js","sourceRoot":"","sources":["../../../../dev/core/src/Cameras/geospatialCameraMovement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAA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C;IACL,CAAC;IACD,OAAO,CAAC,SAAS,EAAE,CAAC;IAEpB,wEAAwE;IACxE,IAAI,oBAAoB,EAAE,CAAC;QACvB,OAAO,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IACjD,CAAC;SAAM,CAAC;QACJ,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACjD,CAAC;IACD,QAAQ,CAAC,SAAS,EAAE,CAAC;AACzB,CAAC","sourcesContent":["import { CameraMovement } from \"./cameraMovement\";\r\nimport { Epsilon } from \"../Maths/math.constants\";\r\nimport { type GeospatialLimits } from \"./Limits/geospatialLimits\";\r\nimport { Matrix, TmpVectors, Vector3 } from \"../Maths/math.vector\";\r\nimport { type MeshPredicate } from \"../Culling/ray.core\";\r\nimport { Plane } from \"../Maths/math.plane\";\r\nimport { Ray } from \"../Culling/ray\";\r\nimport { type Scene } from \"../scene\";\r\nimport { Vector3Distance } from \"../Maths/math.vector.functions\";\r\nimport { Clamp } from \"../Maths/math.scalar.functions\";\r\nimport { type PickingInfo } from \"../Collisions/pickingInfo\";\r\nimport { type Nullable } from \"../types\";\r\nimport { type InterpolatingBehavior } from \"../Behaviors/Cameras/interpolatingBehavior\";\r\nimport { type GeospatialCamera } from \"./geospatialCamera\";\r\n\r\n/**\r\n * Geospatial-specific camera movement system that extends the base movement with\r\n * raycasting and altitude-aware zoom constraints.\r\n *\r\n * This class encapsulates geospatial camera movement logic:\r\n * - Dragging in a way which keeps cursor anchored to globe\r\n * - Latitude-based pan speed dampening\r\n * - Zoom speed scaling based on distance to center\r\n * - Raycasting to determine zoom constraints based on terrain/globe\r\n * - Altitude-based zoom clamping\r\n * - Zoom direction calculation (towards cursor vs along look vector)\r\n */\r\nexport class GeospatialCameraMovement extends CameraMovement {\r\n /** Predicate function to determine which meshes to pick against (e.g., globe mesh) */\r\n public pickPredicate?: MeshPredicate;\r\n\r\n /** World-space picked point under cursor for zoom-to-cursor behavior (may be undefined) */\r\n public computedPerFrameZoomPickPoint?: Vector3;\r\n\r\n public zoomToCursor: boolean = true;\r\n\r\n private _tempPickingRay: Ray;\r\n\r\n private _hitPointRadius?: number = undefined;\r\n private _dragPlane: Plane = new Plane(0, 0, 0, 0);\r\n private _dragPlaneNormal: Vector3 = Vector3.Zero();\r\n private _dragPlaneOriginPointEcef: Vector3 = Vector3.Zero();\r\n private _dragPlaneHitPointLocal: Vector3 = Vector3.Zero();\r\n private _previousDragPlaneHitPointLocal: Vector3 = Vector3.Zero();\r\n\r\n constructor(\r\n scene: Scene,\r\n public limits: GeospatialLimits,\r\n cameraPosition: Vector3,\r\n private _cameraCenter: Vector3,\r\n private _cameraLookAt: Vector3,\r\n pickPredicate?: MeshPredicate,\r\n behavior?: InterpolatingBehavior<GeospatialCamera>\r\n ) {\r\n super(scene, cameraPosition, behavior);\r\n this.pickPredicate = pickPredicate;\r\n this._tempPickingRay = Ray.Zero();\r\n this.panInertia = 0;\r\n this.rotationInertia = 0;\r\n this.rotationXSpeed = Math.PI / 500; // Move 1/500th of a half circle per pixel\r\n this.rotationYSpeed = Math.PI / 500; // Move 1/500th of a half circle per pixel\r\n this.zoomSpeed = 2; // Base zoom speed; actual speed is scaled based on altitude\r\n }\r\n\r\n /**\r\n * Function to calculate the up vector from a given point.\r\n * Can be overridden to support non-spherical planets or custom up vector logic.\r\n * Defaults to using the geocentric normal.\r\n * @param point The point from which to calculate the up vector (e.g., camera position)\r\n * @param result The vector to store the calculated up vector\r\n * @returns The calculated up vector\r\n */\r\n public calculateUpVectorFromPointToRef = (point: Vector3, result: Vector3): Vector3 => {\r\n return point.normalizeToRef(result);\r\n };\r\n\r\n public startDrag(pointerX: number, pointerY: number) {\r\n const pickResult = this._scene.pick(pointerX, pointerY, this.pickPredicate);\r\n if (pickResult.pickedPoint && pickResult.ray) {\r\n // Store radius from earth center to pickedPoint, used when calculating drag plane\r\n this._hitPointRadius = pickResult.pickedPoint.length();\r\n\r\n this._recalculateDragPlaneHitPoint(this._hitPointRadius, pickResult.ray, TmpVectors.Matrix[0]);\r\n this._previousDragPlaneHitPointLocal.copyFrom(this._dragPlaneHitPointLocal);\r\n } else {\r\n this._hitPointRadius = undefined; // can't drag without a hit on the globe\r\n }\r\n }\r\n\r\n public stopDrag() {\r\n this._hitPointRadius = undefined;\r\n }\r\n\r\n /**\r\n * The previous drag plane hit point in local space is stored to compute the movement delta.\r\n * As the drag movement occurs, we will continuously recalculate this point. The delta between the previous and current hit points is the delta we will apply to the camera's localtranslation\r\n * @param hitPointRadius The distance between the world origin (center of globe) and the initial drag hit point\r\n * @param ray The ray from the camera to the new cursor location\r\n * @param localToEcefResult The matrix to convert from local to ECEF space\r\n */\r\n private _recalculateDragPlaneHitPoint(hitPointRadius: number, ray: Ray, localToEcefResult: Matrix): void {\r\n // Use the camera's geocentric normal to find the dragPlaneOriginPoint which lives at hitPointRadius along the camera's geocentric normal\r\n this._cameraPosition.scaleToRef(hitPointRadius / Math.max(0.00001, this._cameraPosition.length()), this._dragPlaneOriginPointEcef);\r\n\r\n // The dragPlaneOffsetVector will later be recalculated when drag occurs, and the delta between the offset vectors will be applied to localTranslation\r\n ComputeLocalBasisToRefs(\r\n this._dragPlaneOriginPointEcef,\r\n TmpVectors.Vector3[0],\r\n TmpVectors.Vector3[1],\r\n this._dragPlaneNormal,\r\n this._scene.useRightHandedSystem,\r\n this.calculateUpVectorFromPointToRef\r\n );\r\n const localToEcef = Matrix.FromXYZAxesToRef(TmpVectors.Vector3[0], TmpVectors.Vector3[1], this._dragPlaneNormal, localToEcefResult);\r\n localToEcef.setTranslationFromFloats(this._dragPlaneOriginPointEcef.x, this._dragPlaneOriginPointEcef.y, this._dragPlaneOriginPointEcef.z);\r\n const ecefToLocal = localToEcef.invertToRef(TmpVectors.Matrix[1]);\r\n\r\n // Now create a plane at that point, perpendicular to _dragPlaneNormal.\r\n Plane.FromPositionAndNormalToRef(this._dragPlaneOriginPointEcef, this._dragPlaneNormal, this._dragPlane);\r\n\r\n // Lastly, find the _dragPlaneHitPoint where the ray intersects the _dragPlane.\r\n if (IntersectRayWithPlaneToRef(ray, this._dragPlane, this._dragPlaneHitPointLocal)) {\r\n // If hit, convert the drag plane hit point into the local space.\r\n Vector3.TransformCoordinatesToRef(this._dragPlaneHitPointLocal, ecefToLocal, this._dragPlaneHitPointLocal);\r\n }\r\n }\r\n\r\n public handleDrag(pointerX: number, pointerY: number) {\r\n const scene = this._scene;\r\n if (!this._hitPointRadius || !scene.activeCamera) {\r\n return;\r\n }\r\n\r\n scene.createPickingRayToRef(pointerX, pointerY, null, this._tempPickingRay, scene.activeCamera);\r\n\r\n const localToEcef = TmpVectors.Matrix[0];\r\n this._recalculateDragPlaneHitPoint(this._hitPointRadius, this._tempPickingRay, localToEcef);\r\n\r\n const delta = this._dragPlaneHitPointLocal.subtractToRef(this._previousDragPlaneHitPointLocal, TmpVectors.Vector3[6]);\r\n\r\n // When the camera is pitched nearly parallel to the drag plane, ray-plane intersection\r\n // can produce enormous deltas. Clamp the delta to avoid massive jumps.\r\n const maxDragDelta = this._hitPointRadius * 0.1; // Max 10% of hit radius per frame\r\n const deltaLength = delta.length();\r\n if (deltaLength > maxDragDelta) {\r\n delta.scaleInPlace(maxDragDelta / deltaLength);\r\n }\r\n\r\n this._previousDragPlaneHitPointLocal.copyFrom(this._dragPlaneHitPointLocal);\r\n\r\n Vector3.TransformNormalToRef(delta, localToEcef, delta);\r\n this._dragPlaneOriginPointEcef.addInPlace(delta);\r\n\r\n this.panAccumulatedPixels.subtractInPlace(delta);\r\n }\r\n\r\n /** @override */\r\n public override computeCurrentFrameDeltas(): void {\r\n const cameraCenter = this._cameraCenter;\r\n\r\n // Slows down panning near the poles\r\n if (this.panAccumulatedPixels.lengthSquared() > Epsilon) {\r\n const centerRadius = cameraCenter.length(); // distance from planet origin to camera center\r\n const currentRadius = this._cameraPosition.length();\r\n // Dampen the pan speed based on latitude (slower near poles)\r\n const upAtCenter = TmpVectors.Vector3[7];\r\n this.calculateUpVectorFromPointToRef(cameraCenter, upAtCenter);\r\n // Latitude is derived from the Z component of the up vector (ECEF convention: Z = polar axis)\r\n const sineOfSphericalLat = upAtCenter.z;\r\n const cosOfSphericalLat = Math.sqrt(1 - Math.min(1, sineOfSphericalLat * sineOfSphericalLat));\r\n const latitudeDampening = Math.sqrt(Math.abs(cosOfSphericalLat)); // sqrt here reduces effect near equator\r\n\r\n // Reduce the dampening effect near surface (so that at ground level, pan speed is not affected by latitude)\r\n const height = Math.max(currentRadius - centerRadius, Epsilon);\r\n const latitudeDampeningScale = Math.max(1, centerRadius / height);\r\n\r\n this._panSpeedMultiplier = Clamp(latitudeDampeningScale * latitudeDampening, 0, 1);\r\n } else {\r\n this._panSpeedMultiplier = 1;\r\n }\r\n\r\n // If a pan drag is occurring, stop zooming.\r\n let zoomTargetDistance: number | undefined;\r\n if (this.isDragging) {\r\n this._zoomSpeedMultiplier = 0;\r\n this._zoomVelocity = 0;\r\n } else {\r\n zoomTargetDistance = this.computedPerFrameZoomPickPoint ? Vector3Distance(this._cameraPosition, this.computedPerFrameZoomPickPoint) : undefined;\r\n\r\n // Scales zoom movement speed based on camera distance to zoom target.\r\n this._zoomSpeedMultiplier = (zoomTargetDistance ?? Vector3Distance(this._cameraPosition, cameraCenter)) * 0.01;\r\n }\r\n\r\n super.computeCurrentFrameDeltas();\r\n }\r\n\r\n public get isDragging() {\r\n return this._hitPointRadius !== undefined;\r\n }\r\n\r\n public handleZoom(zoomDelta: number, toCursor: boolean) {\r\n if (zoomDelta !== 0) {\r\n this.zoomAccumulatedPixels += zoomDelta;\r\n\r\n const pickResult = this._scene.pick(this._scene.pointerX, this._scene.pointerY, this.pickPredicate);\r\n\r\n if (toCursor && pickResult.hit && pickResult.pickedPoint && pickResult.ray && this.zoomToCursor) {\r\n this.computedPerFrameZoomPickPoint = pickResult.pickedPoint;\r\n } else {\r\n // If no hit under cursor or explicitly told not to zoom to cursor, zoom along lookVector instead\r\n const lookPickResult = this.pickAlongVector(this._cameraLookAt);\r\n this.computedPerFrameZoomPickPoint = lookPickResult?.pickedPoint ?? undefined;\r\n }\r\n }\r\n }\r\n\r\n public pickAlongVector(vector: Vector3): Nullable<PickingInfo> {\r\n this._tempPickingRay.origin.copyFrom(this._cameraPosition);\r\n this._tempPickingRay.direction.copyFrom(vector);\r\n return this._scene.pickWithRay(this._tempPickingRay, this.pickPredicate);\r\n }\r\n}\r\n/** @internal */\r\nexport function ClampCenterFromPolesInPlace(center: Vector3) {\r\n const sineOfSphericalLatitudeLimit = 0.998749218; // ~90 degrees\r\n const centerMagnitude = center.length(); // distance from planet origin\r\n if (centerMagnitude > Epsilon) {\r\n const sineSphericalLat = centerMagnitude === 0 ? 0 : center.z / centerMagnitude;\r\n if (Math.abs(sineSphericalLat) > sineOfSphericalLatitudeLimit) {\r\n // Clamp the spherical latitude (and derive longitude)\r\n const sineOfClampedSphericalLat = Clamp(sineSphericalLat, -sineOfSphericalLatitudeLimit, sineOfSphericalLatitudeLimit);\r\n const cosineOfClampedSphericalLat = Math.sqrt(1 - sineOfClampedSphericalLat * sineOfClampedSphericalLat);\r\n const longitude = Math.atan2(center.y, center.x);\r\n\r\n // Spherical to Cartesian\r\n const newX = centerMagnitude * Math.cos(longitude) * cosineOfClampedSphericalLat;\r\n const newY = centerMagnitude * Math.sin(longitude) * cosineOfClampedSphericalLat;\r\n const newZ = centerMagnitude * sineOfClampedSphericalLat;\r\n\r\n center.set(newX, newY, newZ);\r\n }\r\n }\r\n return center;\r\n}\r\n\r\nfunction IntersectRayWithPlaneToRef(ray: Ray, plane: Plane, ref: Vector3): boolean {\r\n // Distance along the ray to the plane; null if no hit\r\n const dist = ray.intersectsPlane(plane);\r\n\r\n if (dist !== null && dist >= 0) {\r\n ray.origin.addToRef(ray.direction.scaleToRef(dist, TmpVectors.Vector3[0]), ref);\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Helper to build east/north/up basis vectors at a world position.\r\n * Cross product order is swapped based on handedness so that the east vector\r\n * encodes the coordinate-system convention, removing the need for a separate yawScale.\r\n * @param worldPos - The position on the globe\r\n * @param refEast - Receives the east direction\r\n * @param refNorth - Receives the north direction\r\n * @param refUp - Receives the up (outward) direction\r\n * @param useRightHandedSystem - Whether the scene uses a right-handed coordinate system (default: false)\r\n * @param calculateUpVectorFromPointToRef - Optional function to calculate the up vector from a point. If supplied, this function will be used instead of assuming a spherical geocentric normal, allowing support for non-spherical planets or custom up vector logic.\r\n * @internal\r\n */\r\nexport function ComputeLocalBasisToRefs(\r\n worldPos: Vector3,\r\n refEast: Vector3,\r\n refNorth: Vector3,\r\n refUp: Vector3,\r\n useRightHandedSystem: boolean = false,\r\n calculateUpVectorFromPointToRef?: (point: Vector3, result: Vector3) => Vector3\r\n): void {\r\n if (calculateUpVectorFromPointToRef) {\r\n calculateUpVectorFromPointToRef(worldPos, refUp);\r\n } else {\r\n // up = normalized position (geocentric normal)\r\n refUp.copyFrom(worldPos).normalize();\r\n }\r\n\r\n // east – cross product order determines handedness\r\n const worldNorth = Vector3.LeftHandedForwardReadOnly; // (0,0,1)\r\n if (useRightHandedSystem) {\r\n Vector3.CrossToRef(worldNorth, refUp, refEast);\r\n } else {\r\n Vector3.CrossToRef(refUp, worldNorth, refEast);\r\n }\r\n\r\n // at poles, cross with worldRight instead\r\n if (refEast.lengthSquared() < Epsilon) {\r\n if (useRightHandedSystem) {\r\n Vector3.CrossToRef(Vector3.Right(), refUp, refEast);\r\n } else {\r\n Vector3.CrossToRef(refUp, Vector3.Right(), refEast);\r\n }\r\n }\r\n refEast.normalize();\r\n\r\n // north – completes the basis (cross order also swapped for handedness)\r\n if (useRightHandedSystem) {\r\n Vector3.CrossToRef(refUp, refEast, refNorth);\r\n } else {\r\n Vector3.CrossToRef(refEast, refUp, refNorth);\r\n }\r\n refNorth.normalize();\r\n}\r\n"]}
@@ -2,6 +2,10 @@
2
2
  * Any external module that wishes to add a new block to the flow graph can add to this object using the helper function.
3
3
  */
4
4
  const CustomBlocks = {};
5
+ /**
6
+ * Reverse lookup: short block name → full "module/blockName" key, for O(1) fallback.
7
+ */
8
+ const ShortNameToFullKey = {};
5
9
  /**
6
10
  * If you want to add a new block to the block factory, you should use this function.
7
11
  * Please be sure to choose a unique name and define the responsible module.
@@ -11,7 +15,9 @@ const CustomBlocks = {};
11
15
  */
12
16
  // eslint-disable-next-line @typescript-eslint/naming-convention
13
17
  export function addToBlockFactory(module, blockName, factory) {
14
- CustomBlocks[`${module}/${blockName}`] = factory;
18
+ const fullKey = `${module}/${blockName}`;
19
+ CustomBlocks[fullKey] = factory;
20
+ ShortNameToFullKey[blockName] = fullKey;
15
21
  }
16
22
  /**
17
23
  * a function to get a factory function for a block.
@@ -350,6 +356,13 @@ export function blockFactory(blockName) {
350
356
  if (CustomBlocks[blockName]) {
351
357
  return CustomBlocks[blockName];
352
358
  }
359
+ // Fallback: O(1) reverse lookup by short name (e.g. "FlowGraphGLTFDataProvider" → "KHR_interactivity/FlowGraphGLTFDataProvider")
360
+ if (!blockName.includes("/")) {
361
+ const fullKey = ShortNameToFullKey[blockName];
362
+ if (fullKey && CustomBlocks[fullKey]) {
363
+ return CustomBlocks[fullKey];
364
+ }
365
+ }
353
366
  throw new Error(`Unknown block name ${blockName}`);
354
367
  }
355
368
  }
@@ -1 +1 @@
1
- {"version":3,"file":"flowGraphBlockFactory.js","sourceRoot":"","sources":["../../../../../dev/core/src/FlowGraph/Blocks/flowGraphBlockFactory.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,YAAY,GAAyD,EAAE,CAAC;AAE9E;;;;;;GAMG;AACH,gEAAgE;AAChE,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,SAAiB,EAAE,OAA6C;IAC9G,YAAY,CAAC,GAAG,MAAM,IAAI,SAAS,EAAE,CAAC,GAAG,OAAO,CAAC;AACrD,CAAC;AAED;;;;GAIG;AACH,gEAAgE;AAChE,MAAM,UAAU,YAAY,CAAC,SAAuC;IAChE,QAAQ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BAC1B,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;YACnC,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,sBAAsB,SAAS,EAAE,CAAC,CAAC;IAC3D,CAAC;AACL,CAAC","sourcesContent":["import { type FlowGraphBlock } from \"../flowGraphBlock\";\nimport { FlowGraphBlockNames } from \"./flowGraphBlockNames\";\n\n/**\n * Any external module that wishes to add a new block to the flow graph can add to this object using the helper function.\n */\nconst CustomBlocks: Record<string, () => Promise<typeof FlowGraphBlock>> = {};\n\n/**\n * If you want to add a new block to the block factory, you should use this function.\n * Please be sure to choose a unique name and define the responsible module.\n * @param module the name of the module that is responsible for the block\n * @param blockName the name of the block. This should be unique.\n * @param factory an async factory function to generate the block\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function addToBlockFactory(module: string, blockName: string, factory: () => Promise<typeof FlowGraphBlock>): void {\n CustomBlocks[`${module}/${blockName}`] = factory;\n}\n\n/**\n * a function to get a factory function for a block.\n * @param blockName the block name to initialize. If the block comes from an external module, the name should be in the format \"module/blockName\"\n * @returns an async factory function that will return the block class when called.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function blockFactory(blockName: FlowGraphBlockNames | string): () => Promise<typeof FlowGraphBlock> {\n switch (blockName) {\n case FlowGraphBlockNames.PlayAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphPlayAnimationBlock\")).FlowGraphPlayAnimationBlock;\n case FlowGraphBlockNames.StopAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphStopAnimationBlock\")).FlowGraphStopAnimationBlock;\n case FlowGraphBlockNames.PauseAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphPauseAnimationBlock\")).FlowGraphPauseAnimationBlock;\n case FlowGraphBlockNames.ValueInterpolation:\n return async () => (await import(\"./Execution/Animation/flowGraphInterpolationBlock\")).FlowGraphInterpolationBlock;\n case FlowGraphBlockNames.SceneReadyEvent:\n return async () => (await import(\"./Event/flowGraphSceneReadyEventBlock\")).FlowGraphSceneReadyEventBlock;\n case FlowGraphBlockNames.SceneTickEvent:\n return async () => (await import(\"./Event/flowGraphSceneTickEventBlock\")).FlowGraphSceneTickEventBlock;\n case FlowGraphBlockNames.SendCustomEvent:\n return async () => (await import(\"./Event/flowGraphSendCustomEventBlock\")).FlowGraphSendCustomEventBlock;\n case FlowGraphBlockNames.ReceiveCustomEvent:\n return async () => (await import(\"./Event/flowGraphReceiveCustomEventBlock\")).FlowGraphReceiveCustomEventBlock;\n case FlowGraphBlockNames.MeshPickEvent:\n return async () => (await import(\"./Event/flowGraphMeshPickEventBlock\")).FlowGraphMeshPickEventBlock;\n case FlowGraphBlockNames.E:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphEBlock;\n case FlowGraphBlockNames.PI:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphPiBlock;\n case FlowGraphBlockNames.Inf:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphInfBlock;\n case FlowGraphBlockNames.NaN:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphNaNBlock;\n case FlowGraphBlockNames.Random:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRandomBlock;\n case FlowGraphBlockNames.Add:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAddBlock;\n case FlowGraphBlockNames.Subtract:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSubtractBlock;\n case FlowGraphBlockNames.Multiply:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMultiplyBlock;\n case FlowGraphBlockNames.Divide:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphDivideBlock;\n case FlowGraphBlockNames.Abs:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAbsBlock;\n case FlowGraphBlockNames.Sign:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSignBlock;\n case FlowGraphBlockNames.Trunc:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTruncBlock;\n case FlowGraphBlockNames.Floor:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphFloorBlock;\n case FlowGraphBlockNames.Ceil:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCeilBlock;\n case FlowGraphBlockNames.Round:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRoundBlock;\n case FlowGraphBlockNames.Fraction:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphFractionBlock;\n case FlowGraphBlockNames.Negation:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphNegationBlock;\n case FlowGraphBlockNames.Modulo:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphModuloBlock;\n case FlowGraphBlockNames.Min:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMinBlock;\n case FlowGraphBlockNames.Max:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMaxBlock;\n case FlowGraphBlockNames.Clamp:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphClampBlock;\n case FlowGraphBlockNames.Saturate:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSaturateBlock;\n case FlowGraphBlockNames.MathInterpolation:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMathInterpolationBlock;\n case FlowGraphBlockNames.Equality:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphEqualityBlock;\n case FlowGraphBlockNames.LessThan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLessThanBlock;\n case FlowGraphBlockNames.LessThanOrEqual:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLessThanOrEqualBlock;\n case FlowGraphBlockNames.GreaterThan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphGreaterThanBlock;\n case FlowGraphBlockNames.GreaterThanOrEqual:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphGreaterThanOrEqualBlock;\n case FlowGraphBlockNames.IsNaN:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphIsNanBlock;\n case FlowGraphBlockNames.IsInfinity:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphIsInfinityBlock;\n case FlowGraphBlockNames.DegToRad:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphDegToRadBlock;\n case FlowGraphBlockNames.RadToDeg:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRadToDegBlock;\n case FlowGraphBlockNames.Sin:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSinBlock;\n case FlowGraphBlockNames.Cos:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCosBlock;\n case FlowGraphBlockNames.Tan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTanBlock;\n case FlowGraphBlockNames.Asin:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAsinBlock;\n case FlowGraphBlockNames.Acos:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAcosBlock;\n case FlowGraphBlockNames.Atan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtanBlock;\n case FlowGraphBlockNames.Atan2:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtan2Block;\n case FlowGraphBlockNames.Sinh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSinhBlock;\n case FlowGraphBlockNames.Cosh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCoshBlock;\n case FlowGraphBlockNames.Tanh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTanhBlock;\n case FlowGraphBlockNames.Asinh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAsinhBlock;\n case FlowGraphBlockNames.Acosh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAcoshBlock;\n case FlowGraphBlockNames.Atanh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtanhBlock;\n case FlowGraphBlockNames.Exponential:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphExpBlock;\n case FlowGraphBlockNames.Log:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLogBlock;\n case FlowGraphBlockNames.Log2:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLog2Block;\n case FlowGraphBlockNames.Log10:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLog10Block;\n case FlowGraphBlockNames.SquareRoot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSquareRootBlock;\n case FlowGraphBlockNames.Power:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphPowerBlock;\n case FlowGraphBlockNames.CubeRoot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCubeRootBlock;\n case FlowGraphBlockNames.BitwiseAnd:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseAndBlock;\n case FlowGraphBlockNames.BitwiseOr:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseOrBlock;\n case FlowGraphBlockNames.BitwiseNot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseNotBlock;\n case FlowGraphBlockNames.BitwiseXor:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseXorBlock;\n case FlowGraphBlockNames.BitwiseLeftShift:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseLeftShiftBlock;\n case FlowGraphBlockNames.BitwiseRightShift:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseRightShiftBlock;\n case FlowGraphBlockNames.Length:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphLengthBlock;\n case FlowGraphBlockNames.Normalize:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphNormalizeBlock;\n case FlowGraphBlockNames.Dot:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphDotBlock;\n case FlowGraphBlockNames.Cross:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphCrossBlock;\n case FlowGraphBlockNames.Rotate2D:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphRotate2DBlock;\n case FlowGraphBlockNames.Rotate3D:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphRotate3DBlock;\n case FlowGraphBlockNames.Transpose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphTransposeBlock;\n case FlowGraphBlockNames.Determinant:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphDeterminantBlock;\n case FlowGraphBlockNames.InvertMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphInvertMatrixBlock;\n case FlowGraphBlockNames.MatrixMultiplication:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixMultiplicationBlock;\n case FlowGraphBlockNames.Branch:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphBranchBlock\")).FlowGraphBranchBlock;\n case FlowGraphBlockNames.SetDelay:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSetDelayBlock\")).FlowGraphSetDelayBlock;\n case FlowGraphBlockNames.CancelDelay:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphCancelDelayBlock\")).FlowGraphCancelDelayBlock;\n case FlowGraphBlockNames.CallCounter:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphCounterBlock\")).FlowGraphCallCounterBlock;\n case FlowGraphBlockNames.Debounce:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphDebounceBlock\")).FlowGraphDebounceBlock;\n case FlowGraphBlockNames.Throttle:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphThrottleBlock\")).FlowGraphThrottleBlock;\n case FlowGraphBlockNames.DoN:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphDoNBlock\")).FlowGraphDoNBlock;\n case FlowGraphBlockNames.FlipFlop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphFlipFlopBlock\")).FlowGraphFlipFlopBlock;\n case FlowGraphBlockNames.ForLoop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphForLoopBlock\")).FlowGraphForLoopBlock;\n case FlowGraphBlockNames.MultiGate:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphMultiGateBlock\")).FlowGraphMultiGateBlock;\n case FlowGraphBlockNames.Sequence:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSequenceBlock\")).FlowGraphSequenceBlock;\n case FlowGraphBlockNames.Switch:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSwitchBlock\")).FlowGraphSwitchBlock;\n case FlowGraphBlockNames.WaitAll:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphWaitAllBlock\")).FlowGraphWaitAllBlock;\n case FlowGraphBlockNames.WhileLoop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphWhileLoopBlock\")).FlowGraphWhileLoopBlock;\n case FlowGraphBlockNames.ConsoleLog:\n return async () => (await import(\"./Execution/flowGraphConsoleLogBlock\")).FlowGraphConsoleLogBlock;\n case FlowGraphBlockNames.Conditional:\n return async () => (await import(\"./Data/flowGraphConditionalDataBlock\")).FlowGraphConditionalDataBlock;\n case FlowGraphBlockNames.Constant:\n return async () => (await import(\"./Data/flowGraphConstantBlock\")).FlowGraphConstantBlock;\n case FlowGraphBlockNames.TransformCoordinatesSystem:\n return async () => (await import(\"./Data/flowGraphTransformCoordinatesSystemBlock\")).FlowGraphTransformCoordinatesSystemBlock;\n case FlowGraphBlockNames.GetAsset:\n return async () => (await import(\"./Data/flowGraphGetAssetBlock\")).FlowGraphGetAssetBlock;\n case FlowGraphBlockNames.GetProperty:\n return async () => (await import(\"./Data/flowGraphGetPropertyBlock\")).FlowGraphGetPropertyBlock;\n case FlowGraphBlockNames.SetProperty:\n return async () => (await import(\"./Execution/flowGraphSetPropertyBlock\")).FlowGraphSetPropertyBlock;\n case FlowGraphBlockNames.GetVariable:\n return async () => (await import(\"./Data/flowGraphGetVariableBlock\")).FlowGraphGetVariableBlock;\n case FlowGraphBlockNames.SetVariable:\n return async () => (await import(\"./Execution/flowGraphSetVariableBlock\")).FlowGraphSetVariableBlock;\n case FlowGraphBlockNames.JsonPointerParser:\n return async () => (await import(\"./Data/Transformers/flowGraphJsonPointerParserBlock\")).FlowGraphJsonPointerParserBlock;\n case FlowGraphBlockNames.LeadingZeros:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLeadingZerosBlock;\n case FlowGraphBlockNames.TrailingZeros:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTrailingZerosBlock;\n case FlowGraphBlockNames.OneBitsCounter:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphOneBitsCounterBlock;\n case FlowGraphBlockNames.CombineVector2:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector2Block;\n case FlowGraphBlockNames.CombineVector3:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector3Block;\n case FlowGraphBlockNames.CombineVector4:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector4Block;\n case FlowGraphBlockNames.CombineMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrixBlock;\n case FlowGraphBlockNames.CombineMatrix2D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrix2DBlock;\n case FlowGraphBlockNames.CombineMatrix3D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrix3DBlock;\n case FlowGraphBlockNames.ExtractVector2:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector2Block;\n case FlowGraphBlockNames.ExtractVector3:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector3Block;\n case FlowGraphBlockNames.ExtractVector4:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector4Block;\n case FlowGraphBlockNames.ExtractMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrixBlock;\n case FlowGraphBlockNames.ExtractMatrix2D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrix2DBlock;\n case FlowGraphBlockNames.ExtractMatrix3D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrix3DBlock;\n case FlowGraphBlockNames.TransformVector:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphTransformBlock;\n case FlowGraphBlockNames.TransformCoordinates:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphTransformCoordinatesBlock;\n case FlowGraphBlockNames.Conjugate:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphConjugateBlock;\n case FlowGraphBlockNames.AngleBetween:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphAngleBetweenBlock;\n case FlowGraphBlockNames.QuaternionFromAxisAngle:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphQuaternionFromAxisAngleBlock;\n case FlowGraphBlockNames.AxisAngleFromQuaternion:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphAxisAngleFromQuaternionBlock;\n case FlowGraphBlockNames.QuaternionFromDirections:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphQuaternionFromDirectionsBlock;\n case FlowGraphBlockNames.MatrixDecompose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixDecomposeBlock;\n case FlowGraphBlockNames.MatrixCompose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixComposeBlock;\n case FlowGraphBlockNames.BooleanToFloat:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphBooleanToFloat;\n case FlowGraphBlockNames.BooleanToInt:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphBooleanToInt;\n case FlowGraphBlockNames.FloatToBoolean:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphFloatToBoolean;\n case FlowGraphBlockNames.IntToBoolean:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphIntToBoolean;\n case FlowGraphBlockNames.IntToFloat:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphIntToFloat;\n case FlowGraphBlockNames.FloatToInt:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphFloatToInt;\n case FlowGraphBlockNames.Easing:\n return async () => (await import(\"./Execution/Animation/flowGraphEasingBlock\")).FlowGraphEasingBlock;\n case FlowGraphBlockNames.BezierCurveEasing:\n return async () => (await import(\"./Execution/Animation/flowGraphBezierCurveEasingBlock\")).FlowGraphBezierCurveEasingBlock;\n case FlowGraphBlockNames.PointerOverEvent:\n return async () => (await import(\"./Event/flowGraphPointerOverEventBlock\")).FlowGraphPointerOverEventBlock;\n case FlowGraphBlockNames.PointerOutEvent:\n return async () => (await import(\"./Event/flowGraphPointerOutEventBlock\")).FlowGraphPointerOutEventBlock;\n case FlowGraphBlockNames.PointerDownEvent:\n return async () => (await import(\"./Event/flowGraphPointerDownEventBlock\")).FlowGraphPointerDownEventBlock;\n case FlowGraphBlockNames.PointerUpEvent:\n return async () => (await import(\"./Event/flowGraphPointerUpEventBlock\")).FlowGraphPointerUpEventBlock;\n case FlowGraphBlockNames.PointerMoveEvent:\n return async () => (await import(\"./Event/flowGraphPointerMoveEventBlock\")).FlowGraphPointerMoveEventBlock;\n case FlowGraphBlockNames.Context:\n return async () => (await import(\"./Data/Utils/flowGraphContextBlock\")).FlowGraphContextBlock;\n case FlowGraphBlockNames.ArrayIndex:\n return async () => (await import(\"./Data/Utils/flowGraphArrayIndexBlock\")).FlowGraphArrayIndexBlock;\n case FlowGraphBlockNames.CodeExecution:\n return async () => (await import(\"./Data/Utils/flowGraphCodeExecutionBlock\")).FlowGraphCodeExecutionBlock;\n case FlowGraphBlockNames.IndexOf:\n return async () => (await import(\"./Data/Utils/flowGraphIndexOfBlock\")).FlowGraphIndexOfBlock;\n case FlowGraphBlockNames.FunctionReference:\n return async () => (await import(\"./Data/Utils/flowGraphFunctionReferenceBlock\")).FlowGraphFunctionReferenceBlock;\n case FlowGraphBlockNames.DataSwitch:\n return async () => (await import(\"./Data/flowGraphDataSwitchBlock\")).FlowGraphDataSwitchBlock;\n case FlowGraphBlockNames.DebugBlock:\n return async () => (await import(\"./Data/flowGraphDebugBlock\")).FlowGraphDebugBlock;\n // Physics\n case FlowGraphBlockNames.PhysicsCollisionEvent:\n return async () => (await import(\"./Event/flowGraphPhysicsCollisionEventBlock\")).FlowGraphPhysicsCollisionEventBlock;\n case FlowGraphBlockNames.PhysicsApplyForce:\n return async () => (await import(\"./Execution/Physics/flowGraphApplyForceBlock\")).FlowGraphApplyForceBlock;\n case FlowGraphBlockNames.PhysicsApplyImpulse:\n return async () => (await import(\"./Execution/Physics/flowGraphApplyImpulseBlock\")).FlowGraphApplyImpulseBlock;\n case FlowGraphBlockNames.PhysicsSetLinearVelocity:\n return async () => (await import(\"./Execution/Physics/flowGraphSetLinearVelocityBlock\")).FlowGraphSetLinearVelocityBlock;\n case FlowGraphBlockNames.PhysicsSetAngularVelocity:\n return async () => (await import(\"./Execution/Physics/flowGraphSetAngularVelocityBlock\")).FlowGraphSetAngularVelocityBlock;\n case FlowGraphBlockNames.PhysicsSetMotionType:\n return async () => (await import(\"./Execution/Physics/flowGraphSetPhysicsMotionTypeBlock\")).FlowGraphSetPhysicsMotionTypeBlock;\n case FlowGraphBlockNames.PhysicsGetLinearVelocity:\n return async () => (await import(\"./Data/Physics/flowGraphGetLinearVelocityBlock\")).FlowGraphGetLinearVelocityBlock;\n case FlowGraphBlockNames.PhysicsGetAngularVelocity:\n return async () => (await import(\"./Data/Physics/flowGraphGetAngularVelocityBlock\")).FlowGraphGetAngularVelocityBlock;\n case FlowGraphBlockNames.PhysicsGetMassProperties:\n return async () => (await import(\"./Data/Physics/flowGraphGetPhysicsMassPropertiesBlock\")).FlowGraphGetPhysicsMassPropertiesBlock;\n // Audio\n case FlowGraphBlockNames.AudioPlaySound:\n return async () => (await import(\"./Execution/Audio/flowGraphPlaySoundBlock\")).FlowGraphPlaySoundBlock;\n case FlowGraphBlockNames.AudioStopSound:\n return async () => (await import(\"./Execution/Audio/flowGraphStopSoundBlock\")).FlowGraphStopSoundBlock;\n case FlowGraphBlockNames.AudioPauseSound:\n return async () => (await import(\"./Execution/Audio/flowGraphPauseSoundBlock\")).FlowGraphPauseSoundBlock;\n case FlowGraphBlockNames.AudioSetVolume:\n return async () => (await import(\"./Execution/Audio/flowGraphSetSoundVolumeBlock\")).FlowGraphSetSoundVolumeBlock;\n case FlowGraphBlockNames.AudioSoundEndedEvent:\n return async () => (await import(\"./Event/flowGraphSoundEndedEventBlock\")).FlowGraphSoundEndedEventBlock;\n case FlowGraphBlockNames.AudioGetVolume:\n return async () => (await import(\"./Data/Audio/flowGraphGetSoundVolumeBlock\")).FlowGraphGetSoundVolumeBlock;\n case FlowGraphBlockNames.AudioIsSoundPlaying:\n return async () => (await import(\"./Data/Audio/flowGraphIsSoundPlayingBlock\")).FlowGraphIsSoundPlayingBlock;\n default:\n // check if the block is a custom block\n if (CustomBlocks[blockName]) {\n return CustomBlocks[blockName];\n }\n throw new Error(`Unknown block name ${blockName}`);\n }\n}\n"]}
1
+ {"version":3,"file":"flowGraphBlockFactory.js","sourceRoot":"","sources":["../../../../../dev/core/src/FlowGraph/Blocks/flowGraphBlockFactory.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,YAAY,GAAyD,EAAE,CAAC;AAC9E;;GAEG;AACH,MAAM,kBAAkB,GAA2B,EAAE,CAAC;AAEtD;;;;;;GAMG;AACH,gEAAgE;AAChE,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,SAAiB,EAAE,OAA6C;IAC9G,MAAM,OAAO,GAAG,GAAG,MAAM,IAAI,SAAS,EAAE,CAAC;IACzC,YAAY,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAChC,kBAAkB,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC;AAC5C,CAAC;AAED;;;;GAIG;AACH,gEAAgE;AAChE,MAAM,UAAU,YAAY,CAAC,SAAuC;IAChE,QAAQ,SAAS,EAAE,CAAC;QAChB;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,mDAAmD,CAAC,CAAC,CAAC,2BAA2B,CAAC;QACvH;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,mDAAmD,CAAC,CAAC,CAAC,2BAA2B,CAAC;QACvH;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,oDAAoD,CAAC,CAAC,C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CAAC;YACD,MAAM,IAAI,KAAK,CAAC,sBAAsB,SAAS,EAAE,CAAC,CAAC;IAC3D,CAAC;AACL,CAAC","sourcesContent":["import { type FlowGraphBlock } from \"../flowGraphBlock\";\nimport { FlowGraphBlockNames } from \"./flowGraphBlockNames\";\n\n/**\n * Any external module that wishes to add a new block to the flow graph can add to this object using the helper function.\n */\nconst CustomBlocks: Record<string, () => Promise<typeof FlowGraphBlock>> = {};\n/**\n * Reverse lookup: short block name → full \"module/blockName\" key, for O(1) fallback.\n */\nconst ShortNameToFullKey: Record<string, string> = {};\n\n/**\n * If you want to add a new block to the block factory, you should use this function.\n * Please be sure to choose a unique name and define the responsible module.\n * @param module the name of the module that is responsible for the block\n * @param blockName the name of the block. This should be unique.\n * @param factory an async factory function to generate the block\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function addToBlockFactory(module: string, blockName: string, factory: () => Promise<typeof FlowGraphBlock>): void {\n const fullKey = `${module}/${blockName}`;\n CustomBlocks[fullKey] = factory;\n ShortNameToFullKey[blockName] = fullKey;\n}\n\n/**\n * a function to get a factory function for a block.\n * @param blockName the block name to initialize. If the block comes from an external module, the name should be in the format \"module/blockName\"\n * @returns an async factory function that will return the block class when called.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function blockFactory(blockName: FlowGraphBlockNames | string): () => Promise<typeof FlowGraphBlock> {\n switch (blockName) {\n case FlowGraphBlockNames.PlayAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphPlayAnimationBlock\")).FlowGraphPlayAnimationBlock;\n case FlowGraphBlockNames.StopAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphStopAnimationBlock\")).FlowGraphStopAnimationBlock;\n case FlowGraphBlockNames.PauseAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphPauseAnimationBlock\")).FlowGraphPauseAnimationBlock;\n case FlowGraphBlockNames.ValueInterpolation:\n return async () => (await import(\"./Execution/Animation/flowGraphInterpolationBlock\")).FlowGraphInterpolationBlock;\n case FlowGraphBlockNames.SceneReadyEvent:\n return async () => (await import(\"./Event/flowGraphSceneReadyEventBlock\")).FlowGraphSceneReadyEventBlock;\n case FlowGraphBlockNames.SceneTickEvent:\n return async () => (await import(\"./Event/flowGraphSceneTickEventBlock\")).FlowGraphSceneTickEventBlock;\n case FlowGraphBlockNames.SendCustomEvent:\n return async () => (await import(\"./Event/flowGraphSendCustomEventBlock\")).FlowGraphSendCustomEventBlock;\n case FlowGraphBlockNames.ReceiveCustomEvent:\n return async () => (await import(\"./Event/flowGraphReceiveCustomEventBlock\")).FlowGraphReceiveCustomEventBlock;\n case FlowGraphBlockNames.MeshPickEvent:\n return async () => (await import(\"./Event/flowGraphMeshPickEventBlock\")).FlowGraphMeshPickEventBlock;\n case FlowGraphBlockNames.E:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphEBlock;\n case FlowGraphBlockNames.PI:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphPiBlock;\n case FlowGraphBlockNames.Inf:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphInfBlock;\n case FlowGraphBlockNames.NaN:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphNaNBlock;\n case FlowGraphBlockNames.Random:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRandomBlock;\n case FlowGraphBlockNames.Add:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAddBlock;\n case FlowGraphBlockNames.Subtract:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSubtractBlock;\n case FlowGraphBlockNames.Multiply:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMultiplyBlock;\n case FlowGraphBlockNames.Divide:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphDivideBlock;\n case FlowGraphBlockNames.Abs:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAbsBlock;\n case FlowGraphBlockNames.Sign:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSignBlock;\n case FlowGraphBlockNames.Trunc:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTruncBlock;\n case FlowGraphBlockNames.Floor:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphFloorBlock;\n case FlowGraphBlockNames.Ceil:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCeilBlock;\n case FlowGraphBlockNames.Round:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRoundBlock;\n case FlowGraphBlockNames.Fraction:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphFractionBlock;\n case FlowGraphBlockNames.Negation:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphNegationBlock;\n case FlowGraphBlockNames.Modulo:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphModuloBlock;\n case FlowGraphBlockNames.Min:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMinBlock;\n case FlowGraphBlockNames.Max:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMaxBlock;\n case FlowGraphBlockNames.Clamp:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphClampBlock;\n case FlowGraphBlockNames.Saturate:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSaturateBlock;\n case FlowGraphBlockNames.MathInterpolation:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMathInterpolationBlock;\n case FlowGraphBlockNames.Equality:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphEqualityBlock;\n case FlowGraphBlockNames.LessThan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLessThanBlock;\n case FlowGraphBlockNames.LessThanOrEqual:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLessThanOrEqualBlock;\n case FlowGraphBlockNames.GreaterThan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphGreaterThanBlock;\n case FlowGraphBlockNames.GreaterThanOrEqual:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphGreaterThanOrEqualBlock;\n case FlowGraphBlockNames.IsNaN:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphIsNanBlock;\n case FlowGraphBlockNames.IsInfinity:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphIsInfinityBlock;\n case FlowGraphBlockNames.DegToRad:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphDegToRadBlock;\n case FlowGraphBlockNames.RadToDeg:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRadToDegBlock;\n case FlowGraphBlockNames.Sin:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSinBlock;\n case FlowGraphBlockNames.Cos:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCosBlock;\n case FlowGraphBlockNames.Tan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTanBlock;\n case FlowGraphBlockNames.Asin:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAsinBlock;\n case FlowGraphBlockNames.Acos:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAcosBlock;\n case FlowGraphBlockNames.Atan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtanBlock;\n case FlowGraphBlockNames.Atan2:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtan2Block;\n case FlowGraphBlockNames.Sinh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSinhBlock;\n case FlowGraphBlockNames.Cosh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCoshBlock;\n case FlowGraphBlockNames.Tanh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTanhBlock;\n case FlowGraphBlockNames.Asinh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAsinhBlock;\n case FlowGraphBlockNames.Acosh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAcoshBlock;\n case FlowGraphBlockNames.Atanh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtanhBlock;\n case FlowGraphBlockNames.Exponential:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphExpBlock;\n case FlowGraphBlockNames.Log:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLogBlock;\n case FlowGraphBlockNames.Log2:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLog2Block;\n case FlowGraphBlockNames.Log10:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLog10Block;\n case FlowGraphBlockNames.SquareRoot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSquareRootBlock;\n case FlowGraphBlockNames.Power:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphPowerBlock;\n case FlowGraphBlockNames.CubeRoot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCubeRootBlock;\n case FlowGraphBlockNames.BitwiseAnd:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseAndBlock;\n case FlowGraphBlockNames.BitwiseOr:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseOrBlock;\n case FlowGraphBlockNames.BitwiseNot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseNotBlock;\n case FlowGraphBlockNames.BitwiseXor:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseXorBlock;\n case FlowGraphBlockNames.BitwiseLeftShift:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseLeftShiftBlock;\n case FlowGraphBlockNames.BitwiseRightShift:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseRightShiftBlock;\n case FlowGraphBlockNames.Length:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphLengthBlock;\n case FlowGraphBlockNames.Normalize:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphNormalizeBlock;\n case FlowGraphBlockNames.Dot:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphDotBlock;\n case FlowGraphBlockNames.Cross:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphCrossBlock;\n case FlowGraphBlockNames.Rotate2D:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphRotate2DBlock;\n case FlowGraphBlockNames.Rotate3D:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphRotate3DBlock;\n case FlowGraphBlockNames.Transpose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphTransposeBlock;\n case FlowGraphBlockNames.Determinant:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphDeterminantBlock;\n case FlowGraphBlockNames.InvertMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphInvertMatrixBlock;\n case FlowGraphBlockNames.MatrixMultiplication:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixMultiplicationBlock;\n case FlowGraphBlockNames.Branch:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphBranchBlock\")).FlowGraphBranchBlock;\n case FlowGraphBlockNames.SetDelay:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSetDelayBlock\")).FlowGraphSetDelayBlock;\n case FlowGraphBlockNames.CancelDelay:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphCancelDelayBlock\")).FlowGraphCancelDelayBlock;\n case FlowGraphBlockNames.CallCounter:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphCounterBlock\")).FlowGraphCallCounterBlock;\n case FlowGraphBlockNames.Debounce:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphDebounceBlock\")).FlowGraphDebounceBlock;\n case FlowGraphBlockNames.Throttle:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphThrottleBlock\")).FlowGraphThrottleBlock;\n case FlowGraphBlockNames.DoN:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphDoNBlock\")).FlowGraphDoNBlock;\n case FlowGraphBlockNames.FlipFlop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphFlipFlopBlock\")).FlowGraphFlipFlopBlock;\n case FlowGraphBlockNames.ForLoop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphForLoopBlock\")).FlowGraphForLoopBlock;\n case FlowGraphBlockNames.MultiGate:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphMultiGateBlock\")).FlowGraphMultiGateBlock;\n case FlowGraphBlockNames.Sequence:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSequenceBlock\")).FlowGraphSequenceBlock;\n case FlowGraphBlockNames.Switch:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSwitchBlock\")).FlowGraphSwitchBlock;\n case FlowGraphBlockNames.WaitAll:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphWaitAllBlock\")).FlowGraphWaitAllBlock;\n case FlowGraphBlockNames.WhileLoop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphWhileLoopBlock\")).FlowGraphWhileLoopBlock;\n case FlowGraphBlockNames.ConsoleLog:\n return async () => (await import(\"./Execution/flowGraphConsoleLogBlock\")).FlowGraphConsoleLogBlock;\n case FlowGraphBlockNames.Conditional:\n return async () => (await import(\"./Data/flowGraphConditionalDataBlock\")).FlowGraphConditionalDataBlock;\n case FlowGraphBlockNames.Constant:\n return async () => (await import(\"./Data/flowGraphConstantBlock\")).FlowGraphConstantBlock;\n case FlowGraphBlockNames.TransformCoordinatesSystem:\n return async () => (await import(\"./Data/flowGraphTransformCoordinatesSystemBlock\")).FlowGraphTransformCoordinatesSystemBlock;\n case FlowGraphBlockNames.GetAsset:\n return async () => (await import(\"./Data/flowGraphGetAssetBlock\")).FlowGraphGetAssetBlock;\n case FlowGraphBlockNames.GetProperty:\n return async () => (await import(\"./Data/flowGraphGetPropertyBlock\")).FlowGraphGetPropertyBlock;\n case FlowGraphBlockNames.SetProperty:\n return async () => (await import(\"./Execution/flowGraphSetPropertyBlock\")).FlowGraphSetPropertyBlock;\n case FlowGraphBlockNames.GetVariable:\n return async () => (await import(\"./Data/flowGraphGetVariableBlock\")).FlowGraphGetVariableBlock;\n case FlowGraphBlockNames.SetVariable:\n return async () => (await import(\"./Execution/flowGraphSetVariableBlock\")).FlowGraphSetVariableBlock;\n case FlowGraphBlockNames.JsonPointerParser:\n return async () => (await import(\"./Data/Transformers/flowGraphJsonPointerParserBlock\")).FlowGraphJsonPointerParserBlock;\n case FlowGraphBlockNames.LeadingZeros:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLeadingZerosBlock;\n case FlowGraphBlockNames.TrailingZeros:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTrailingZerosBlock;\n case FlowGraphBlockNames.OneBitsCounter:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphOneBitsCounterBlock;\n case FlowGraphBlockNames.CombineVector2:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector2Block;\n case FlowGraphBlockNames.CombineVector3:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector3Block;\n case FlowGraphBlockNames.CombineVector4:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector4Block;\n case FlowGraphBlockNames.CombineMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrixBlock;\n case FlowGraphBlockNames.CombineMatrix2D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrix2DBlock;\n case FlowGraphBlockNames.CombineMatrix3D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrix3DBlock;\n case FlowGraphBlockNames.ExtractVector2:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector2Block;\n case FlowGraphBlockNames.ExtractVector3:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector3Block;\n case FlowGraphBlockNames.ExtractVector4:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector4Block;\n case FlowGraphBlockNames.ExtractMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrixBlock;\n case FlowGraphBlockNames.ExtractMatrix2D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrix2DBlock;\n case FlowGraphBlockNames.ExtractMatrix3D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrix3DBlock;\n case FlowGraphBlockNames.TransformVector:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphTransformBlock;\n case FlowGraphBlockNames.TransformCoordinates:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphTransformCoordinatesBlock;\n case FlowGraphBlockNames.Conjugate:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphConjugateBlock;\n case FlowGraphBlockNames.AngleBetween:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphAngleBetweenBlock;\n case FlowGraphBlockNames.QuaternionFromAxisAngle:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphQuaternionFromAxisAngleBlock;\n case FlowGraphBlockNames.AxisAngleFromQuaternion:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphAxisAngleFromQuaternionBlock;\n case FlowGraphBlockNames.QuaternionFromDirections:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphQuaternionFromDirectionsBlock;\n case FlowGraphBlockNames.MatrixDecompose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixDecomposeBlock;\n case FlowGraphBlockNames.MatrixCompose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixComposeBlock;\n case FlowGraphBlockNames.BooleanToFloat:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphBooleanToFloat;\n case FlowGraphBlockNames.BooleanToInt:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphBooleanToInt;\n case FlowGraphBlockNames.FloatToBoolean:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphFloatToBoolean;\n case FlowGraphBlockNames.IntToBoolean:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphIntToBoolean;\n case FlowGraphBlockNames.IntToFloat:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphIntToFloat;\n case FlowGraphBlockNames.FloatToInt:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphFloatToInt;\n case FlowGraphBlockNames.Easing:\n return async () => (await import(\"./Execution/Animation/flowGraphEasingBlock\")).FlowGraphEasingBlock;\n case FlowGraphBlockNames.BezierCurveEasing:\n return async () => (await import(\"./Execution/Animation/flowGraphBezierCurveEasingBlock\")).FlowGraphBezierCurveEasingBlock;\n case FlowGraphBlockNames.PointerOverEvent:\n return async () => (await import(\"./Event/flowGraphPointerOverEventBlock\")).FlowGraphPointerOverEventBlock;\n case FlowGraphBlockNames.PointerOutEvent:\n return async () => (await import(\"./Event/flowGraphPointerOutEventBlock\")).FlowGraphPointerOutEventBlock;\n case FlowGraphBlockNames.PointerDownEvent:\n return async () => (await import(\"./Event/flowGraphPointerDownEventBlock\")).FlowGraphPointerDownEventBlock;\n case FlowGraphBlockNames.PointerUpEvent:\n return async () => (await import(\"./Event/flowGraphPointerUpEventBlock\")).FlowGraphPointerUpEventBlock;\n case FlowGraphBlockNames.PointerMoveEvent:\n return async () => (await import(\"./Event/flowGraphPointerMoveEventBlock\")).FlowGraphPointerMoveEventBlock;\n case FlowGraphBlockNames.Context:\n return async () => (await import(\"./Data/Utils/flowGraphContextBlock\")).FlowGraphContextBlock;\n case FlowGraphBlockNames.ArrayIndex:\n return async () => (await import(\"./Data/Utils/flowGraphArrayIndexBlock\")).FlowGraphArrayIndexBlock;\n case FlowGraphBlockNames.CodeExecution:\n return async () => (await import(\"./Data/Utils/flowGraphCodeExecutionBlock\")).FlowGraphCodeExecutionBlock;\n case FlowGraphBlockNames.IndexOf:\n return async () => (await import(\"./Data/Utils/flowGraphIndexOfBlock\")).FlowGraphIndexOfBlock;\n case FlowGraphBlockNames.FunctionReference:\n return async () => (await import(\"./Data/Utils/flowGraphFunctionReferenceBlock\")).FlowGraphFunctionReferenceBlock;\n case FlowGraphBlockNames.DataSwitch:\n return async () => (await import(\"./Data/flowGraphDataSwitchBlock\")).FlowGraphDataSwitchBlock;\n case FlowGraphBlockNames.DebugBlock:\n return async () => (await import(\"./Data/flowGraphDebugBlock\")).FlowGraphDebugBlock;\n // Physics\n case FlowGraphBlockNames.PhysicsCollisionEvent:\n return async () => (await import(\"./Event/flowGraphPhysicsCollisionEventBlock\")).FlowGraphPhysicsCollisionEventBlock;\n case FlowGraphBlockNames.PhysicsApplyForce:\n return async () => (await import(\"./Execution/Physics/flowGraphApplyForceBlock\")).FlowGraphApplyForceBlock;\n case FlowGraphBlockNames.PhysicsApplyImpulse:\n return async () => (await import(\"./Execution/Physics/flowGraphApplyImpulseBlock\")).FlowGraphApplyImpulseBlock;\n case FlowGraphBlockNames.PhysicsSetLinearVelocity:\n return async () => (await import(\"./Execution/Physics/flowGraphSetLinearVelocityBlock\")).FlowGraphSetLinearVelocityBlock;\n case FlowGraphBlockNames.PhysicsSetAngularVelocity:\n return async () => (await import(\"./Execution/Physics/flowGraphSetAngularVelocityBlock\")).FlowGraphSetAngularVelocityBlock;\n case FlowGraphBlockNames.PhysicsSetMotionType:\n return async () => (await import(\"./Execution/Physics/flowGraphSetPhysicsMotionTypeBlock\")).FlowGraphSetPhysicsMotionTypeBlock;\n case FlowGraphBlockNames.PhysicsGetLinearVelocity:\n return async () => (await import(\"./Data/Physics/flowGraphGetLinearVelocityBlock\")).FlowGraphGetLinearVelocityBlock;\n case FlowGraphBlockNames.PhysicsGetAngularVelocity:\n return async () => (await import(\"./Data/Physics/flowGraphGetAngularVelocityBlock\")).FlowGraphGetAngularVelocityBlock;\n case FlowGraphBlockNames.PhysicsGetMassProperties:\n return async () => (await import(\"./Data/Physics/flowGraphGetPhysicsMassPropertiesBlock\")).FlowGraphGetPhysicsMassPropertiesBlock;\n // Audio\n case FlowGraphBlockNames.AudioPlaySound:\n return async () => (await import(\"./Execution/Audio/flowGraphPlaySoundBlock\")).FlowGraphPlaySoundBlock;\n case FlowGraphBlockNames.AudioStopSound:\n return async () => (await import(\"./Execution/Audio/flowGraphStopSoundBlock\")).FlowGraphStopSoundBlock;\n case FlowGraphBlockNames.AudioPauseSound:\n return async () => (await import(\"./Execution/Audio/flowGraphPauseSoundBlock\")).FlowGraphPauseSoundBlock;\n case FlowGraphBlockNames.AudioSetVolume:\n return async () => (await import(\"./Execution/Audio/flowGraphSetSoundVolumeBlock\")).FlowGraphSetSoundVolumeBlock;\n case FlowGraphBlockNames.AudioSoundEndedEvent:\n return async () => (await import(\"./Event/flowGraphSoundEndedEventBlock\")).FlowGraphSoundEndedEventBlock;\n case FlowGraphBlockNames.AudioGetVolume:\n return async () => (await import(\"./Data/Audio/flowGraphGetSoundVolumeBlock\")).FlowGraphGetSoundVolumeBlock;\n case FlowGraphBlockNames.AudioIsSoundPlaying:\n return async () => (await import(\"./Data/Audio/flowGraphIsSoundPlayingBlock\")).FlowGraphIsSoundPlayingBlock;\n default:\n // check if the block is a custom block\n if (CustomBlocks[blockName]) {\n return CustomBlocks[blockName];\n }\n // Fallback: O(1) reverse lookup by short name (e.g. \"FlowGraphGLTFDataProvider\" → \"KHR_interactivity/FlowGraphGLTFDataProvider\")\n if (!blockName.includes(\"/\")) {\n const fullKey = ShortNameToFullKey[blockName];\n if (fullKey && CustomBlocks[fullKey]) {\n return CustomBlocks[fullKey];\n }\n }\n throw new Error(`Unknown block name ${blockName}`);\n }\n}\n"]}
@@ -141,6 +141,12 @@ export class FlowGraph {
141
141
  // Tear down old event coordinator
142
142
  this._detachEventObserver();
143
143
  this._sceneEventCoordinator.dispose();
144
+ // Clear execution contexts so start() creates fresh ones with the new scene.
145
+ // NOTE: This intentionally discards user variables and connection values.
146
+ // Callers that need to preserve them (e.g. the Flow Graph Editor) should
147
+ // snapshot context state BEFORE calling setScene() and restore it in a
148
+ // wrapped createContext() callback after start() re-creates contexts.
149
+ this._executionContexts.length = 0;
144
150
  // Rebuild with the new scene
145
151
  this._scene = scene;
146
152
  this._scene.constantlyUpdateMeshUnderPointer = true; // ensure pointer info is always up to date for event blocks that need it