@babylonjs/lite-compat 1.38.0-preview → 1.38.2-preview

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { $ as Vector4, A as PBRClearCoatConfiguration, B as Observable, C as RegisterPolygonBuilder, D as registerMeshAtStart, E as VertexData, F as PBRSpecularGlossinessMaterial, G as transformCoordinates, H as BoundingInfo, I as PushMaterial, J as Color3, K as transformNormal, L as StandardMaterial, M as PBRMaterial, N as PBRMetallicRoughnessMaterial, O as Material, P as PBRSheenConfiguration, Q as Vector3, R as attachMaterialToScene, S as PolygonBuilder, T as VertexBuffer, U as BoundingSphere, V as BoundingBox, W as Matrix, X as liteBackedColor3, Y as Color4, Z as Vector2, _ as GroundMesh, a as CreateDisc, b as Mesh, c as CreateLines, d as CreatePolygonVertexData, et as liteBackedVector3, f as CreateSphere, g as ExtrudePolygon, h as CreateTorus, i as CreateDashedLines, j as PBRIridescenceConfiguration, k as PBRAnisotropicConfiguration, l as CreatePlane, m as CreateTiledPlane, n as CreateBox, nt as unsupported, o as CreateGround, p as CreateTiledBox, q as Quaternion, r as CreateCylinder, s as CreateLineSystem, t as AbstractMesh, tt as LiteCompatError, u as CreatePolygon, v as InstancedMesh, w as TransformNode, x as MeshBuilder, y as LinesMesh, z as Node } from "./meshes-sOWGK4P8.js";
2
- import { CharacterSupportedState as CharacterSupportedState$1, GAUSSIAN_SPLATTING_MAX_PART_COUNT, MaxTintMagnitude, MinTemperatureKelvin, PhysicsConstraintAxis as PhysicsConstraintAxis$1, PhysicsConstraintType as PhysicsConstraintType$1, PhysicsMotionType as PhysicsMotionType$1, PhysicsPrestepType as PhysicsPrestepType$1, PhysicsShapeType as PhysicsShapeType$1, VERSION, _getGaussianPointSplattingPackedShBytesPerSplat, _hasGaussianPointSplattingProjectedDepth, addAnimationGroup, addBillboardSpriteIndex, addClusteredLightContainer, addComputeDispatch, addFacingBillboardSystem, addPolarToRef, addSphericalToRef, addSprite2DIndex, addToScene, animateParticleSystem, applyPhysicsBodyForce, applyPhysicsBodyImpulse, attachAxisDragGizmoToNode, attachAxisScaleGizmoToNode, attachBoundingBoxGizmoToNode, attachCameraGizmoToCamera, attachControl, attachFreeControl, attachGeospatialControls, attachLightGizmoToLight, attachPlaneDragGizmoToNode, attachPlaneRotationGizmoToNode, attachPositionGizmoToNode, attachRotationGizmoToNode, attachScaleGizmoToNode, backEase, bakeCurrentTransformIntoVertices, bezierCurveEase, billboardBlendAdditive, billboardBlendAlpha, bounceEase, calculatePhysicsCharacterMovementToRef, circleEase, clearAnimationManager, clearBoneOverride, clearStorageBuffer, computeStorageBufferBinding, computeUniformBufferBinding, createAnimationManager, createArcRotateCamera, createAudioBusAsync, createAudioEngineAsync, createAxisDragGizmo, createAxisScaleGizmo, createBankedFreeCamera, createBoundingBoxGizmo, createCameraGizmo, createClusteredLightContainer, createClusteredPointLight, createComputeBindingSet, createComputeDispatch, createComputeIndirectDispatch, createComputeShader, createComputeTask, createCsg2FromMesh, createCsgFromMesh, createCsmDirectionalShadowGenerator, createDefaultCamera, createDefaultMeshBlendRadiusDefinitions, createDirectionalLight, createDynamicTexture, createEngine, createEsmDirectionalShadowGenerator, createExternalTexture, createFacingBillboardSystem, createFreeCamera, createGeospatialCamera, createGpuPicker, createGridMaterial, createHavokWorld, createHemisphericLight, createHtmlTexture, createKhrInteractivityRuntimeValueSnapshot, createLightGizmo, createMeshFromCsg, createMeshesFromCsg2, createMicrophoneSoundSourceAsync, createMorphTargets, createNullEngine, createParticleBillboard, createPcfDirectionalShadowGenerator, createPcfSpotlightShadowGenerator, createPhysicsAggregate, createPhysicsBody, createPhysicsCharacterController, createPhysicsConstraint, createPhysicsShape, createPickingRay, createPlaneDragGizmo, createPlaneRotationGizmo, createPointLight, createPositionGizmo, createPropertyAnimationClip, createPropertyAnimationGroup, createRectAreaLight, createRotationGizmo, createScaleGizmo, createSceneContext, createSoundAsync, createSoundBufferAsync, createSoundSourceAsync, createSpotLight, createSprite2DLayer, createSpriteRenderer, createStorageBuffer, createStreamingSoundAsync, createTexture2DArray, createTexture2DArrayFromKtx2, createTexture2DArrayFromPixels, createTexture2DArrayFromUrls, createTexture2DFromPixels, createTexture3DFromPixels, createTransformNode, createUniformBuffer, createUtilityLayer, csg2Add, csg2Intersect, csg2Subtract, csgIntersect, csgSubtract, csgUnion, cubicEase, disableGaussianPointSplatting, disableOrthographicCamera, disposeAudioBus, disposeAudioEngine, disposeAxisDragGizmo, disposeAxisScaleGizmo, disposeBoundingBoxGizmo, disposeCameraGizmo, disposeComputeBindingSet, disposeComputeShader, disposeCsg2, disposeEngine, disposeHtmlTexture, disposeLightGizmo, disposePhysics, disposePicker, disposePlaneDragGizmo, disposePlaneRotationGizmo, disposePositionGizmo, disposeRotationGizmo, disposeScaleGizmo, disposeScene, disposeSound, disposeSoundSource, disposeStorageBuffer, disposeStreamingSound, disposeUniformBuffer, disposeUsd, disposeUtilityLayer, dividePolarToRef, divideSphericalToRef, elasticEase, enableAnalyzer, enableAnimationBlending, enableArcRotateKeyboardControls, enableBoneControlForSkinnedAssets, enableGaussianPointSplatting, enableHavokThinInstancePhysicsSync, enableMirroredMeshes, enableOrthographicCamera, enableRectAreaLights, enableSpatial, enableStereo, encodeIdToColor, exponentialEase, getBoneByName, getByteFrequencyData, getByteTimeDomainData, getCameraPosition, getFloatFrequencyData, getFloatTimeDomainData, getGaussianSplattingMaxPartCount, getGaussianSplattingPartIndexVaryingDeclaration, getMasterVolume, getPhysicsBodyAngularVelocity, getPhysicsBodyLinearVelocity, getPickedUV, getProjectionMatrix, getVariantNames, getViewMatrix, getWhiteBalanceMatrix, goToFrame, hasDefaultInteractivityFlowInput, initializeCsg2Async, inverseLerp, invertMat4, isExternalTextureReady, loadBabylon, loadBasisTexture2D, loadDdsEnvironment, loadEnvironment, loadGltf, loadHdrEnvironment, loadImageToArrayLayer, loadKtxTexture2D, loadSOG, loadSPZ, loadSplat, loadSpriteAtlas, loadTexture2D, loadUsd, markClusteredLightContainerDirty, multiplyMat4, multiplyPolarToRef, multiplySphericalToRef, normalizeInteractivityEventDataConfiguration, normalizeKhrInteractivityRuntimeValue, onBeforeRender, onEngineDeviceLost, onPhysicsAfterStep, packMeshBlendingTag, parseNodeMaterialFromSnippet, parseNodeParticleSetFromSnippet, pauseAnimation, pauseSound, pauseStreamingSound, physicsRaycast, pickAsync, pickMeshesWithRayPrecise, playAnimation, playSound, playStreamingSound, polarFromVec2ToRef, polarToVec2ToRef, powerEase, preloadStreamingInstanceAsync, preloadStreamingInstancesAsync, processAreaLightTexture, quadraticEase, quarticEase, quinticEase, readStorageBufferAfterFrame, rebuildSceneRenderables, registerNodeParticleSet, registerScene, registerSceneWithShadowSupport, registerSpriteRenderer, registerUtilityLayer, releasePhysicsConstraint, releasePhysicsShape, releaseTexture, removeAnimationGroup, removeFromScene, removePhysicsBody, requestHtmlTextureUpdate, resetVariant, resizeEngine, resolveCameraViewport, resumeSound, resumeStreamingSound, sampleCatmullRomSpline, sampleHermiteSpline, scalePolarToRef, scaleSphericalToRef, selectVariant, setAnimationAdditive, setBonePosition, setBoneRotationQuaternion, setBoneScaling, setBusVolume, setClipPlane, setEngineSize, setEnvironmentLightingRotation, setEnvironmentSkyboxRotation, setFog, setGeospatialOrientation, setMasterVolume, setMorphTargetWeights, setParent, setPhysicsBodyAngularVelocity, setPhysicsBodyLinearVelocity, setPhysicsBodyMassProperties, setPhysicsBodyMotionType, setPhysicsBodyPrestepType, setPhysicsBodyShape, setPhysicsGravity, setPhysicsShapeFilterCollideMask, setPhysicsShapeFilterMembershipMask, setPhysicsShapeIsTrigger, setPhysicsShapeMaterial, setPhysicsTimestep, setPositionGizmoLocalCoordinates, setRotationGizmoLocalCoordinates, setScaleGizmoLocalCoordinates, setShadowTaskCasterMeshes, setSoundSourceVolume, setSoundVolume, setSpatialListener, setSpatialListenerPosition, setSpatialOrientation, setSpatialPosition, setStereoPan, setStreamingSoundVolume, sineEase, sphericalFromVec3ToRef, sphericalToVec3ToRef, spriteBlendAdditive, spriteBlendAlpha, spriteBlendPremultiplied, startEngine, startParticleSystem, stepScene, stopAnimation, stopEngine, stopParticleSystem, stopSound, stopStreamingSound, submitComputeTasks, subtractPolarToRef, subtractSphericalToRef, syncParticleBillboard, temperatureTintToXyz, unlockAudioEngineAsync, unpackMeshBlendingTag, updateAnimationManager, updateBillboardSpriteIndex, updateDynamicTexture, updateHtmlTexture, updateSpatialAudio, updateSprite2DIndex, updateStorageBufferRange, updateTexture2DArrayFromPixels, updateTexture2DFromPixels, updateUniformBuffer, uploadImageToArrayLayer, whenHtmlTextureReady } from "@babylonjs/lite";
3
- //#region \0rolldown/runtime.js
1
+ import { $ as Vector4, A as PBRClearCoatConfiguration, B as Observable, C as RegisterPolygonBuilder, D as registerMeshAtStart, E as VertexData, F as PBRSpecularGlossinessMaterial, G as transformCoordinates, H as BoundingInfo, I as PushMaterial, J as Color3, K as transformNormal, L as StandardMaterial, M as PBRMaterial, N as PBRMetallicRoughnessMaterial, O as Material, P as PBRSheenConfiguration, Q as Vector3, R as attachMaterialToScene, S as PolygonBuilder, T as VertexBuffer, U as BoundingSphere, V as BoundingBox, W as Matrix, X as liteBackedColor3, Y as Color4, Z as Vector2, _ as GroundMesh, a as CreateDisc, b as Mesh, c as CreateLines, d as CreatePolygonVertexData, et as liteBackedVector3, f as CreateSphere, g as ExtrudePolygon, h as CreateTorus, i as CreateDashedLines, j as PBRIridescenceConfiguration, k as PBRAnisotropicConfiguration, l as CreatePlane, m as CreateTiledPlane, n as CreateBox, nt as unsupported, o as CreateGround, p as CreateTiledBox, q as Quaternion, r as CreateCylinder, s as CreateLineSystem, t as AbstractMesh, tt as LiteCompatError, u as CreatePolygon, v as InstancedMesh, w as TransformNode, x as MeshBuilder, y as LinesMesh, z as Node } from "./meshes-Bt_UAqXU.js";
2
+ import { CharacterSupportedState as CharacterSupportedState$1, GAUSSIAN_SPLATTING_MAX_PART_COUNT, MaxTintMagnitude, MinTemperatureKelvin, PhysicsConstraintAxis as PhysicsConstraintAxis$1, PhysicsConstraintType as PhysicsConstraintType$1, PhysicsMotionType as PhysicsMotionType$1, PhysicsPrestepType as PhysicsPrestepType$1, PhysicsShapeType as PhysicsShapeType$1, VERSION, _getGaussianPointSplattingPackedShBytesPerSplat, _hasGaussianPointSplattingProjectedDepth, addAnimationGroup, addBillboardSpriteIndex, addClusteredLightContainer, addComputeDispatch, addFacingBillboardSystem, addPolarToRef, addSphericalToRef, addSprite2DIndex, addToScene, animateParticleSystem, applyPhysicsBodyForce, applyPhysicsBodyImpulse, attachAxisDragGizmoToNode, attachAxisScaleGizmoToNode, attachBoundingBoxGizmoToNode, attachCameraGizmoToCamera, attachControl, attachFreeControl, attachGeospatialControls, attachLightGizmoToLight, attachPlaneDragGizmoToNode, attachPlaneRotationGizmoToNode, attachPositionGizmoToNode, attachRotationGizmoToNode, attachScaleGizmoToNode, backEase, bakeCurrentTransformIntoVertices, bezierCurveEase, billboardBlendAdditive, billboardBlendAlpha, bounceEase, calculatePhysicsCharacterMovementToRef, circleEase, clearAnimationManager, clearBoneOverride, clearStorageBuffer, computeStorageBufferBinding, computeUniformBufferBinding, createAnimationManager, createArcRotateCamera, createAudioBusAsync, createAudioEngineAsync, createAxisDragGizmo, createAxisScaleGizmo, createBankedFreeCamera, createBoundingBoxGizmo, createCameraGizmo, createClusteredLightContainer, createClusteredPointLight, createComputeBindingSet, createComputeDispatch, createComputeIndirectDispatch, createComputeShader, createComputeTask, createCsg2FromMesh, createCsgFromMesh, createCsmDirectionalShadowGenerator, createDefaultCamera, createDefaultMeshBlendRadiusDefinitions, createDirectionalLight, createDynamicTexture, createEngine, createEsmDirectionalShadowGenerator, createExternalTexture, createFacingBillboardSystem, createFreeCamera, createGeospatialCamera, createGpuPicker, createGridMaterial, createHavokWorld, createHemisphericLight, createHtmlTexture, createKhrInteractivityRuntimeValueSnapshot, createLightGizmo, createMeshFromCsg, createMeshesFromCsg2, createMicrophoneSoundSourceAsync, createMorphTargets, createNullEngine, createParticleBillboard, createPcfDirectionalShadowGenerator, createPcfSpotlightShadowGenerator, createPhysicsAggregate, createPhysicsBody, createPhysicsCharacterController, createPhysicsConstraint, createPhysicsShape, createPickingRay, createPlaneDragGizmo, createPlaneRotationGizmo, createPointLight, createPositionGizmo, createPropertyAnimationClip, createPropertyAnimationGroup, createRectAreaLight, createRotationGizmo, createScaleGizmo, createSceneContext, createSoundAsync, createSoundBufferAsync, createSoundSourceAsync, createSpotLight, createSprite2DLayer, createSpriteRenderer, createStorageBuffer, createStreamingSoundAsync, createTexture2DArray, createTexture2DArrayFromKtx2, createTexture2DArrayFromPixels, createTexture2DArrayFromUrls, createTexture2DFromPixels, createTexture3DFromPixels, createTransformNode, createUniformBuffer, createUtilityLayer, csg2Add, csg2Intersect, csg2Subtract, csgIntersect, csgSubtract, csgUnion, cubicEase, disableGaussianPointSplatting, disableOrthographicCamera, disposeAudioBus, disposeAudioEngine, disposeAxisDragGizmo, disposeAxisScaleGizmo, disposeBoundingBoxGizmo, disposeCameraGizmo, disposeComputeBindingSet, disposeComputeShader, disposeCsg2, disposeEngine, disposeHtmlTexture, disposeLightGizmo, disposePhysics, disposePicker, disposePlaneDragGizmo, disposePlaneRotationGizmo, disposePositionGizmo, disposeRotationGizmo, disposeScaleGizmo, disposeScene, disposeSound, disposeSoundSource, disposeStorageBuffer, disposeStreamingSound, disposeUniformBuffer, disposeUsd, disposeUtilityLayer, dividePolarToRef, divideSphericalToRef, elasticEase, enableAnalyzer, enableAnimationBlending, enableArcRotateKeyboardControls, enableBoneControlForSkinnedAssets, enableGaussianPointSplatting, enableHavokThinInstancePhysicsSync, enableMirroredMeshes, enableOrthographicCamera, enableRectAreaLights, enableSpatial, enableStereo, encodeIdToColor, exponentialEase, getBoneByName, getByteFrequencyData, getByteTimeDomainData, getCameraPosition, getFloatFrequencyData, getFloatTimeDomainData, getGaussianSplattingMaxPartCount, getGaussianSplattingPartIndexVaryingDeclaration, getMasterVolume, getPhysicsBodyAngularVelocity, getPhysicsBodyLinearVelocity, getPickedUV, getProjectionMatrix, getVariantNames, getViewMatrix, getWhiteBalanceMatrix, goToFrame, hasDefaultInteractivityFlowInput, initializeCsg2Async, inverseLerp, invertMat4, isExternalTextureReady, loadBabylon, loadBasisTexture2D, loadDdsEnvironment, loadEnvironment, loadGltf, loadHdrEnvironment, loadImageToArrayLayer, loadKtxTexture2D, loadSOG, loadSPZ, loadSplat, loadSpriteAtlas, loadTexture2D, loadUsd, markClusteredLightContainerDirty, multiplyMat4, multiplyPolarToRef, multiplySphericalToRef, normalizeInteractivityEventDataConfiguration, normalizeKhrInteractivityRuntimeValue, onBeforeRender, onEngineDeviceLost, onPhysicsAfterStep, onSceneDispose, packMeshBlendingTag, parseNodeMaterialFromSnippet, parseNodeParticleSetFromSnippet, pauseAnimation, pauseSound, pauseStreamingSound, physicsRaycast, pickAsync, pickMeshesWithRayPrecise, playAnimation, playSound, playStreamingSound, polarFromVec2ToRef, polarToVec2ToRef, powerEase, preloadStreamingInstanceAsync, preloadStreamingInstancesAsync, processAreaLightTexture, quadraticEase, quarticEase, quinticEase, readStorageBufferAfterFrame, rebuildSceneRenderables, registerNodeParticleSet, registerScene, registerSceneWithShadowSupport, registerSpriteRenderer, registerUtilityLayer, releasePhysicsConstraint, releasePhysicsShape, releaseTexture, removeAnimationGroup, removeFromScene, removePhysicsBody, requestHtmlTextureUpdate, resetVariant, resizeEngine, resolveCameraViewport, resumeSound, resumeStreamingSound, sampleCatmullRomSpline, sampleHermiteSpline, scalePolarToRef, scaleSphericalToRef, selectVariant, setAnimationAdditive, setBonePosition, setBoneRotationQuaternion, setBoneScaling, setBusVolume, setClipPlane, setEngineSize, setEnvironmentLightingRotation, setEnvironmentSkyboxRotation, setFog, setGeospatialOrientation, setMasterVolume, setMorphTargetWeights, setParent, setPhysicsBodyAngularVelocity, setPhysicsBodyLinearVelocity, setPhysicsBodyMassProperties, setPhysicsBodyMotionType, setPhysicsBodyPrestepType, setPhysicsBodyShape, setPhysicsGravity, setPhysicsShapeFilterCollideMask, setPhysicsShapeFilterMembershipMask, setPhysicsShapeIsTrigger, setPhysicsShapeMaterial, setPhysicsTimestep, setPositionGizmoLocalCoordinates, setRotationGizmoLocalCoordinates, setScaleGizmoLocalCoordinates, setShadowTaskCasterMeshes, setSoundSourceVolume, setSoundVolume, setSpatialListener, setSpatialListenerPosition, setSpatialOrientation, setSpatialPosition, setStereoPan, setStreamingSoundVolume, sineEase, sphericalFromVec3ToRef, sphericalToVec3ToRef, spriteBlendAdditive, spriteBlendAlpha, spriteBlendPremultiplied, startEngine, startParticleSystem, stepScene, stopAnimation, stopEngine, stopParticleSystem, stopSound, stopStreamingSound, submitComputeTasks, subtractPolarToRef, subtractSphericalToRef, syncParticleBillboard, temperatureTintToXyz, unlockAudioEngineAsync, unpackMeshBlendingTag, updateAnimationManager, updateBillboardSpriteIndex, updateDynamicTexture, updateHtmlTexture, updateSpatialAudio, updateSprite2DIndex, updateStorageBufferRange, updateTexture2DArrayFromPixels, updateTexture2DFromPixels, updateUniformBuffer, uploadImageToArrayLayer, whenHtmlTextureReady } from "@babylonjs/lite";
3
+ // \0rolldown/runtime.js
4
4
  var __defProp = Object.defineProperty;
5
5
  var __exportAll = (all, no_symbols) => {
6
6
  let target = {};
@@ -11,8 +11,7 @@ var __exportAll = (all, no_symbols) => {
11
11
  if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
12
12
  return target;
13
13
  };
14
- //#endregion
15
- //#region src/math/scalar.ts
14
+ // src/math/scalar.ts
16
15
  /** Babylon.js-compatible scalar helpers and a small set of math constants. */
17
16
  var Epsilon = .001;
18
17
  var ToRadians = Math.PI / 180;
@@ -44,8 +43,7 @@ var Scalar = {
44
43
  return normalized * (max - min) + min;
45
44
  }
46
45
  };
47
- //#endregion
48
- //#region src/math/constants.ts
46
+ // src/math/constants.ts
49
47
  /** Babylon.js-compatible spatial constants (`Axis`, `Space`). */
50
48
  var _axisX;
51
49
  var _axisY;
@@ -67,8 +65,7 @@ var Space = /* @__PURE__ */ function(Space) {
67
65
  Space[Space["BONE"] = 2] = "BONE";
68
66
  return Space;
69
67
  }({});
70
- //#endregion
71
- //#region src/math/plane.ts
68
+ // src/math/plane.ts
72
69
  /** Babylon.js-compatible `Plane` (pure JS). */
73
70
  var Plane = class Plane {
74
71
  /** Normal x/y/z and signed distance `d` from the origin (`normal · p + d = 0`). */
@@ -129,8 +126,7 @@ var Plane = class Plane {
129
126
  return new Plane(nx, ny, nz, nd);
130
127
  }
131
128
  };
132
- //#endregion
133
- //#region src/math/ray.ts
129
+ // src/math/ray.ts
134
130
  /** Babylon.js-compatible `Ray` (pure JS). */
135
131
  var Ray = class Ray {
136
132
  origin;
@@ -170,8 +166,7 @@ var Ray = class Ray {
170
166
  return new Ray(new Vector3(x, y, z), new Vector3(dx, dy, dz), length);
171
167
  }
172
168
  };
173
- //#endregion
174
- //#region src/math/frustum.ts
169
+ // src/math/frustum.ts
175
170
  /** Babylon.js-compatible `Frustum` (pure JS): extract clip planes from a matrix. */
176
171
  var Frustum = {
177
172
  /** Extract the 6 frustum planes from a view-projection `transform`. */
@@ -197,8 +192,7 @@ function set(plane, a, b, c, d) {
197
192
  plane.d = d;
198
193
  plane.normalize();
199
194
  }
200
- //#endregion
201
- //#region src/math/size.ts
195
+ // src/math/size.ts
202
196
  /** Babylon.js-compatible `Size` and `Viewport` (pure JS). */
203
197
  var Size = class Size {
204
198
  width;
@@ -242,8 +236,7 @@ var Viewport = class Viewport {
242
236
  return new Viewport(this.x, this.y, this.width, this.height);
243
237
  }
244
238
  };
245
- //#endregion
246
- //#region src/math/polar.ts
239
+ // src/math/polar.ts
247
240
  /** Babylon.js-compatible polar-coordinate value object. */
248
241
  var Polar = class Polar {
249
242
  radius;
@@ -353,8 +346,7 @@ var Polar = class Polar {
353
346
  return new Polar(array[0], array[1]);
354
347
  }
355
348
  };
356
- //#endregion
357
- //#region src/math/spherical.ts
349
+ // src/math/spherical.ts
358
350
  /** Babylon.js-compatible spherical-coordinate value object. */
359
351
  var Spherical = class Spherical {
360
352
  radius;
@@ -471,8 +463,7 @@ var Spherical = class Spherical {
471
463
  return new Spherical(array[0], array[1], array[2]);
472
464
  }
473
465
  };
474
- //#endregion
475
- //#region src/math/curve.ts
466
+ // src/math/curve.ts
476
467
  /** Babylon.js-compatible curve/path helpers: `Angle`, `Curve3`, `Path3D` (pure JS). */
477
468
  var Angle = class Angle {
478
469
  _radians;
@@ -577,8 +568,7 @@ var Path3D = class {
577
568
  return this._distances;
578
569
  }
579
570
  };
580
- //#endregion
581
- //#region src/math/color-temperature.ts
571
+ // src/math/color-temperature.ts
582
572
  function TemperatureTintToXyz(temperatureKelvin, tint) {
583
573
  const [x, y, z] = temperatureTintToXyz(temperatureKelvin, tint);
584
574
  return new Vector3(x, y, z);
@@ -586,8 +576,7 @@ function TemperatureTintToXyz(temperatureKelvin, tint) {
586
576
  function GetWhiteBalanceMatrix(temperatureKelvin, tint) {
587
577
  return getWhiteBalanceMatrix(temperatureKelvin, tint);
588
578
  }
589
- //#endregion
590
- //#region src/culling/picking-info.ts
579
+ // src/culling/picking-info.ts
591
580
  /** Babylon.js-compatible result of a scene pick. */
592
581
  var PickingInfo = class PickingInfo {
593
582
  hit = false;
@@ -639,8 +628,7 @@ var PickingInfo = class PickingInfo {
639
628
  return uvSet === "uv" ? this._uv?.clone() ?? null : null;
640
629
  }
641
630
  };
642
- //#endregion
643
- //#region src/misc/misc-utils.ts
631
+ // src/misc/misc-utils.ts
644
632
  /**
645
633
  * Babylon.js-compatible Misc utilities — the pure-JS subset that has no Babylon
646
634
  * Lite or GPU dependency: `SmartArray`, `StringDictionary`, `Tags`,
@@ -826,8 +814,7 @@ var Logger = {
826
814
  var PrecisionDate = { get Now() {
827
815
  return now();
828
816
  } };
829
- //#endregion
830
- //#region src/engine/engine.ts
817
+ // src/engine/engine.ts
831
818
  /**
832
819
  * Babylon.js-compatible engine wrappers.
833
820
  *
@@ -1336,8 +1323,7 @@ var NullEngine = class extends WebGPUEngine {
1336
1323
  if (!this._scenes.includes(scene)) this._scenes.push(scene);
1337
1324
  }
1338
1325
  };
1339
- //#endregion
1340
- //#region src/compute/compute-shader.ts
1326
+ // src/compute/compute-shader.ts
1341
1327
  var nextComputeShaderId = 1;
1342
1328
  function sourceFrom(shaderPath) {
1343
1329
  if (typeof shaderPath === "object" && shaderPath.computeSource !== void 0) return shaderPath.computeSource;
@@ -1561,8 +1547,7 @@ function ComputeShaderParse(source, scene, _rootUrl) {
1561
1547
  return computeShader;
1562
1548
  }
1563
1549
  function RegisterComputeShader() {}
1564
- //#endregion
1565
- //#region src/buffers/storage-buffer.ts
1550
+ // src/buffers/storage-buffer.ts
1566
1551
  function asBytes(data, byteLength) {
1567
1552
  let bytes;
1568
1553
  if (Array.isArray(data)) bytes = new Uint8Array(new Float32Array(data).buffer);
@@ -1635,8 +1620,7 @@ var StorageBuffer = class {
1635
1620
  if (!this._copyWritable) throw new Error(`StorageBuffer.${operation} requires Constants.BUFFER_CREATIONFLAG_WRITE.`);
1636
1621
  }
1637
1622
  };
1638
- //#endregion
1639
- //#region src/materials/uniform-buffer.ts
1623
+ // src/materials/uniform-buffer.ts
1640
1624
  /** Minimum Babylon.js UniformBuffer surface needed to author compute bindings. */
1641
1625
  var UniformBuffer = class {
1642
1626
  _engine;
@@ -1935,8 +1919,7 @@ var UniformBuffer = class {
1935
1919
  }
1936
1920
  }
1937
1921
  };
1938
- //#endregion
1939
- //#region src/scene/abstract-scene.ts
1922
+ // src/scene/abstract-scene.ts
1940
1923
  var AbstractScene = class {
1941
1924
  /**
1942
1925
  * @internal Canonical compat mesh-wrapper registry, keyed by the Lite node each
@@ -2088,6 +2071,10 @@ var AbstractScene = class {
2088
2071
  getMeshByID(id) {
2089
2072
  return this.getMeshById(id);
2090
2073
  }
2074
+ /** Babylon.js `scene.getMeshByUniqueId(uniqueId)` — the mesh with that auto-generated `uniqueId`, else `null`. */
2075
+ getMeshByUniqueId(uniqueId) {
2076
+ return this.meshes.find((m) => m.uniqueId === uniqueId) ?? null;
2077
+ }
2091
2078
  /** Babylon.js `scene.getNodeByName(name)` — searches meshes, cameras, and lights. */
2092
2079
  getNodeByName(name) {
2093
2080
  return this.meshes.find((m) => m.name === name) ?? this._cameras.find((c) => c.name === name) ?? this._lights.find((l) => l.name === name) ?? null;
@@ -2098,8 +2085,7 @@ var AbstractScene = class {
2098
2085
  return this.meshes.find((m) => byId(m)) ?? this._cameras.find((c) => byId(c)) ?? this._lights.find((l) => byId(l)) ?? null;
2099
2086
  }
2100
2087
  };
2101
- //#endregion
2102
- //#region src/physics/physics.ts
2088
+ // src/physics/physics.ts
2103
2089
  /**
2104
2090
  * Physics (Havok V2) compat surface.
2105
2091
  *
@@ -3167,8 +3153,7 @@ var PhysicsEngine = class {
3167
3153
  this._plugin.dispose();
3168
3154
  }
3169
3155
  };
3170
- //#endregion
3171
- //#region src/cameras/cameras.ts
3156
+ // src/cameras/cameras.ts
3172
3157
  /**
3173
3158
  * Babylon.js-compatible camera classes implemented over the Babylon Lite camera
3174
3159
  * factories.
@@ -3283,6 +3268,19 @@ var Camera = class Camera extends Node {
3283
3268
  getViewMatrix() {
3284
3269
  return Matrix.FromArray(getViewMatrix(this._lite));
3285
3270
  }
3271
+ /** Babylon.js `camera.getDirection(localAxis)`: `localAxis` in world space, without translation. */
3272
+ getDirection(localAxis) {
3273
+ const result = Vector3.Zero();
3274
+ this.getDirectionToRef(localAxis, result);
3275
+ return result;
3276
+ }
3277
+ /** Babylon.js `camera.getDirectionToRef(localAxis, result)`: `localAxis` turned by the camera's world matrix, which Lite
3278
+ * keeps current. `result` may be `localAxis`. */
3279
+ getDirectionToRef(localAxis, result) {
3280
+ const w = this._lite.worldMatrix;
3281
+ const { x, y, z } = localAxis;
3282
+ result.set(x * w[0] + y * w[4] + z * w[8], x * w[1] + y * w[5] + z * w[9], x * w[2] + y * w[6] + z * w[10]);
3283
+ }
3286
3284
  /** Babylon.js `camera.getProjectionMatrix()` — the camera's projection matrix. */
3287
3285
  getProjectionMatrix() {
3288
3286
  return Matrix.FromArray(getProjectionMatrix(this._lite, this._aspectRatio()));
@@ -3604,8 +3602,7 @@ var AnaglyphArcRotateCamera = class {
3604
3602
  unsupported("AnaglyphArcRotateCamera", "Stereoscopic camera rigs are not implemented in Babylon Lite. (An anaglyph post-process exists separately.)");
3605
3603
  }
3606
3604
  };
3607
- //#endregion
3608
- //#region src/animations/animation.ts
3605
+ // src/animations/animation.ts
3609
3606
  /**
3610
3607
  * Babylon.js-compatible `Animation` keyframe model + `AnimationGroup`.
3611
3608
  *
@@ -3853,6 +3850,13 @@ var Animatable = class Animatable {
3853
3850
  _to;
3854
3851
  _loop;
3855
3852
  masterFrame = 0;
3853
+ /** Babylon.js `onAnimationEnd`: called when the animatable ends, on its own or through `stop()`. */
3854
+ onAnimationEnd = null;
3855
+ /** Babylon.js `onAnimationEndObservable`: notified right after `onAnimationEnd`. */
3856
+ onAnimationEndObservable = new Observable();
3857
+ /** Babylon.js `disposeOnEnd`: when the animatable completes on its own, its end callback and observers are cleared once
3858
+ * they ran (default true). Unlike Babylon.js, compat keeps it in `scene.animatables`. */
3859
+ disposeOnEnd = true;
3856
3860
  /** @internal Lite group backing a natively-delegated property animation. */
3857
3861
  _lite;
3858
3862
  /** @internal Reason all or part of this animatable retained the compat CPU evaluator. */
@@ -3860,6 +3864,12 @@ var Animatable = class Animatable {
3860
3864
  _speedRatio;
3861
3865
  _paused = false;
3862
3866
  _stopped = false;
3867
+ /** @internal This frame's `_advance` reached the end, which `_completeFrame` reports. */
3868
+ _frameEnded = false;
3869
+ /** @internal This frame's `_advance` stepped the fallback tracks, whose values `_applyFrame` writes. */
3870
+ _frameStepped = false;
3871
+ /** @internal The animatable was playing when this frame started, before any of the frame's user code ran. */
3872
+ _framePlaying = false;
3863
3873
  _nativeManager;
3864
3874
  _fallbackAnimations;
3865
3875
  _fallbackFrames = /* @__PURE__ */ new Map();
@@ -3914,25 +3924,55 @@ var Animatable = class Animatable {
3914
3924
  this._speedRatio = value;
3915
3925
  if (this._lite) this._lite.speedRatio = value;
3916
3926
  }
3917
- /** @internal Advance the animation by `deltaMs`, called once per scene frame. */
3927
+ /** @internal Advance the animation by `deltaMs` and report its end if it reached it: one standalone frame. The scene
3928
+ * runs the steps separately, each for all its animatables: `_beginFrame`, then (after Lite's manager update)
3929
+ * `_advance`, `_applyFrame` and `_completeFrame`. */
3918
3930
  _tick(deltaMs) {
3919
- if (this._paused || this._stopped) return;
3931
+ this._beginFrame();
3932
+ this._advance(deltaMs);
3933
+ this._applyFrame();
3934
+ this._completeFrame();
3935
+ }
3936
+ /** @internal Note whether the animatable plays this frame, before the frame's user code can resume it. */
3937
+ _beginFrame() {
3938
+ this._framePlaying = !this._paused && !this._stopped;
3939
+ }
3940
+ /** @internal Step the fallback tracks by `deltaMs` (Lite steps the native group in its manager update) and note whether
3941
+ * the animatable reached its end, without reporting it yet. Runs no user code. */
3942
+ _advance(deltaMs) {
3943
+ this._frameEnded = false;
3944
+ this._frameStepped = false;
3945
+ if (!this._framePlaying || this._paused || this._stopped) return;
3946
+ this._frameStepped = true;
3947
+ const fallbackRunning = this._advanceFallback(deltaMs);
3920
3948
  if (this._lite) {
3921
3949
  this.masterFrame = this._lite.currentTime * (this._animations[0]?.framePerSecond ?? 60);
3922
- const fallbackRunning = this._advanceFallback(deltaMs);
3950
+ this._frameEnded = !this._loop && this._lite._stopped && !fallbackRunning;
3951
+ } else {
3952
+ this.masterFrame = this._fallbackFrames.get(this._animations[0]) ?? this._from;
3953
+ this._frameEnded = !this._loop && !fallbackRunning;
3954
+ }
3955
+ }
3956
+ /** @internal Write the values this frame's `_advance` stepped to. Easing functions and property setters run here, after
3957
+ * the end was noted, so a stop, pause, seek or restart they make clears it. */
3958
+ _applyFrame() {
3959
+ if (this._frameStepped) {
3960
+ this._frameStepped = false;
3923
3961
  this._applyFallback();
3924
- if (!this._loop && this._lite._stopped && !fallbackRunning) {
3925
- this._detachLite();
3926
- this._stopped = true;
3927
- }
3928
- return;
3929
3962
  }
3930
- const anyFallbackRunning = this._advanceFallback(deltaMs);
3931
- this.masterFrame = this._fallbackFrames.get(this._animations[0]) ?? this._from;
3932
- this._applyFallback();
3933
- if (!this._loop && !anyFallbackRunning) this._stopped = true;
3963
+ }
3964
+ /** @internal Report the end that this frame's `_advance` reached. A pause, restart, seek or stop since then (from an
3965
+ * end callback raised earlier in the frame) has cleared it. */
3966
+ _completeFrame() {
3967
+ if (!this._frameEnded) return;
3968
+ this._frameEnded = false;
3969
+ if (this._lite) this._detachLite();
3970
+ this._stopped = true;
3971
+ this._raiseOnCompletion();
3934
3972
  }
3935
3973
  goToFrame(frame) {
3974
+ this._frameStepped = false;
3975
+ this._frameEnded = false;
3936
3976
  this._completedFallbackAnimations.clear();
3937
3977
  for (const animation of this._fallbackAnimations) this._resetFallbackAnimation(animation, frame);
3938
3978
  if (this._lite) {
@@ -3943,6 +3983,8 @@ var Animatable = class Animatable {
3943
3983
  this._applyFallback();
3944
3984
  }
3945
3985
  pause() {
3986
+ this._applyFrame();
3987
+ this._frameEnded = false;
3946
3988
  this._paused = true;
3947
3989
  if (this._lite) {
3948
3990
  pauseAnimation(this._lite);
@@ -3950,6 +3992,7 @@ var Animatable = class Animatable {
3950
3992
  }
3951
3993
  }
3952
3994
  restart() {
3995
+ this._frameEnded = false;
3953
3996
  const restartFromBeginning = this._stopped;
3954
3997
  this._paused = false;
3955
3998
  this._stopped = false;
@@ -3965,17 +4008,45 @@ var Animatable = class Animatable {
3965
4008
  }
3966
4009
  if (restartFromBeginning) this._applyFallback();
3967
4010
  }
3968
- stop() {
4011
+ /**
4012
+ * Babylon.js `stop(animationName?, targetMask?, useGlobalSplice?, skipOnAnimationEnd?)`: stops the animatable and raises
4013
+ * its end unless `skipOnAnimationEnd`. Stopping only the tracks matching `animationName` or `targetMask` is not supported.
4014
+ */
4015
+ stop(animationName, targetMask, _useGlobalSplice = false, skipOnAnimationEnd = false) {
4016
+ if (animationName || targetMask) unsupported("Animatable.stop(animationName | targetMask)", "Only the whole animatable can be stopped: call `stop()`.");
4017
+ this._applyFrame();
4018
+ const ended = !this._stopped && !skipOnAnimationEnd;
4019
+ this._frameEnded = false;
3969
4020
  this._paused = false;
3970
4021
  this._stopped = true;
3971
4022
  if (this._lite) {
3972
4023
  stopAnimation(this._lite);
3973
4024
  this._detachLite();
3974
4025
  }
4026
+ if (ended) this._raiseOnAnimationEnd();
4027
+ }
4028
+ /** Babylon.js `waitAsync()`: resolves with this animatable when it next ends. */
4029
+ waitAsync() {
4030
+ return new Promise((resolve) => this.onAnimationEndObservable.addOnce(() => resolve(this)));
4031
+ }
4032
+ /** @internal Whether this animatable animates `target`. */
4033
+ _animates(target) {
4034
+ return this._target === target;
3975
4035
  }
3976
4036
  get animationStarted() {
3977
4037
  return !this._paused && !this._stopped;
3978
4038
  }
4039
+ _raiseOnAnimationEnd() {
4040
+ this.onAnimationEnd?.();
4041
+ this.onAnimationEndObservable.notifyObservers(this);
4042
+ }
4043
+ _raiseOnCompletion() {
4044
+ this._raiseOnAnimationEnd();
4045
+ if (this.disposeOnEnd) {
4046
+ this.onAnimationEnd = null;
4047
+ this.onAnimationEndObservable.clear();
4048
+ }
4049
+ }
3979
4050
  _applyFallback() {
3980
4051
  for (const anim of this._fallbackAnimations) {
3981
4052
  const frame = this._fallbackFrames.get(anim) ?? this.masterFrame;
@@ -4459,8 +4530,7 @@ var AnimationGroup = class AnimationGroup {
4459
4530
  }
4460
4531
  }
4461
4532
  };
4462
- //#endregion
4463
- //#region src/misc/engine-constants.ts
4533
+ // src/misc/engine-constants.ts
4464
4534
  /**
4465
4535
  * Babylon.js engine-level enums and constant bags that scenes import for their
4466
4536
  * numeric values. These carry no behaviour in the compat layer — they exist so
@@ -4592,8 +4662,7 @@ var Constants = {
4592
4662
  BUFFER_CREATIONFLAG_STORAGE: 32,
4593
4663
  BUFFER_CREATIONFLAG_INDIRECT: 64
4594
4664
  };
4595
- //#endregion
4596
- //#region src/events/pointer-events.ts
4665
+ // src/events/pointer-events.ts
4597
4666
  /** Babylon.js pointer event masks emitted by `Scene.onPointerObservable`. */
4598
4667
  var PointerEventTypes = class {
4599
4668
  static POINTERDOWN = 1;
@@ -4625,8 +4694,7 @@ var PointerInfo = class {
4625
4694
  return this._pickInfo;
4626
4695
  }
4627
4696
  };
4628
- //#endregion
4629
- //#region src/scene/scene.ts
4697
+ // src/scene/scene.ts
4630
4698
  /**
4631
4699
  * Babylon.js-compatible `Scene` implemented over a Babylon Lite `SceneContext`.
4632
4700
  *
@@ -4653,7 +4721,7 @@ var FLUID_RENDERER_UNSUPPORTED$1 = "Fluid rendering requires dedicated depth, th
4653
4721
  * with a 200 HTML page. Loaded lazily so only apps that load an environment pay for it.
4654
4722
  */
4655
4723
  async function getBrdfLutUrl() {
4656
- return (await import("./brdf-lut-data-BRUnY8c5.js")).BRDF_LUT_DATA_URL;
4724
+ return (await import("./brdf-lut-data-CIJtJXN2.js")).BRDF_LUT_DATA_URL;
4657
4725
  }
4658
4726
  var Scene = class Scene extends AbstractScene {
4659
4727
  /** @internal Underlying Babylon Lite scene context. */
@@ -4828,9 +4896,14 @@ var Scene = class Scene extends AbstractScene {
4828
4896
  _tick(deltaMs) {
4829
4897
  this._engine._lastDeltaMs = deltaMs;
4830
4898
  this.onBeforeAnimationsObservable.notifyObservers(this);
4899
+ const running = this._runningAnimatables;
4900
+ const count = running.length;
4901
+ for (let i = 0; i < count; i++) running[i]._beginFrame();
4831
4902
  if (this._blendManager) updateAnimationManager(this._blendManager, deltaMs);
4832
4903
  if (this._propertyAnimationManager) updateAnimationManager(this._propertyAnimationManager, deltaMs);
4833
- for (const a of this._runningAnimatables) a._tick(deltaMs);
4904
+ for (let i = 0; i < count; i++) running[i]?._advance(deltaMs);
4905
+ for (let i = 0; i < count; i++) running[i]?._applyFrame();
4906
+ for (let i = 0; i < count; i++) running[i]?._completeFrame();
4834
4907
  if (this._structuralGroups.length > 0) {
4835
4908
  for (const g of this._structuralGroups) g._advanceStructural(deltaMs);
4836
4909
  AnimationGroup._blendStructuralGroups(this._structuralGroups);
@@ -5482,12 +5555,12 @@ var Scene = class Scene extends AbstractScene {
5482
5555
  }
5483
5556
  }
5484
5557
  /**
5485
- * Babylon.js `scene.beginDirectAnimation(target, animations, from, to, loop, speedRatio?)`.
5558
+ * Babylon.js `scene.beginDirectAnimation(target, animations, from, to, loop, speedRatio?, onAnimationEnd?)`.
5486
5559
  * Delegates supported tracks to Babylon Lite property animation and retains
5487
5560
  * explicit compat evaluation only for unsupported tracks. Returns one facade
5488
5561
  * coordinating both subsets.
5489
5562
  */
5490
- beginDirectAnimation(target, animations, from, to, loop = false, speedRatio = 1) {
5563
+ beginDirectAnimation(target, animations, from, to, loop = false, speedRatio = 1, onAnimationEnd) {
5491
5564
  if (speedRatio < 0) {
5492
5565
  [from, to] = [to, from];
5493
5566
  speedRatio = -speedRatio;
@@ -5495,6 +5568,7 @@ var Scene = class Scene extends AbstractScene {
5495
5568
  if (from > to) speedRatio = -speedRatio;
5496
5569
  const blockedNativeBindings = this._runningAnimatables.flatMap((animatable) => animatable._getBlockingFallbackBindings());
5497
5570
  const animatable = Animatable._create(() => this._propertyAnimationManager ??= createAnimationManager(), target, animations, from, to, loop, speedRatio, blockedNativeBindings);
5571
+ animatable.onAnimationEnd = onAnimationEnd ?? null;
5498
5572
  this._runningAnimatables.push(animatable);
5499
5573
  return animatable;
5500
5574
  }
@@ -5532,11 +5606,22 @@ var Scene = class Scene extends AbstractScene {
5532
5606
  }
5533
5607
  }
5534
5608
  /**
5535
- * Babylon.js `scene.beginAnimation(target, from, to, loop, speedRatio?)`. Runs
5536
- * the animations already attached to `target.animations`.
5609
+ * Babylon.js `scene.beginAnimation(target, from, to, loop, speedRatio?, onAnimationEnd?, animatable?, stopCurrent?)`.
5610
+ * Runs the animations already attached to `target.animations`. As in Babylon.js, the target's running animatables
5611
+ * are stopped first unless `stopCurrent` is false. Appending to an existing `animatable` is not supported.
5612
+ */
5613
+ beginAnimation(target, from, to, loop = false, speedRatio = 1, onAnimationEnd, animatable, stopCurrent = true) {
5614
+ if (animatable) unsupported("Scene.beginAnimation(…, animatable)", "Appending animations to an existing Animatable is not supported: start a new one.");
5615
+ if (stopCurrent) this.stopAnimation(target);
5616
+ return this.beginDirectAnimation(target, target.animations ?? [], from, to, loop, speedRatio, onAnimationEnd);
5617
+ }
5618
+ /**
5619
+ * Babylon.js `scene.stopAnimation(target)`: stops every running animatable of `target`, which raises their
5620
+ * `onAnimationEnd`. Stopping only the tracks matching `animationName` or `targetMask` is not supported.
5537
5621
  */
5538
- beginAnimation(target, from, to, loop = false, speedRatio = 1) {
5539
- return this.beginDirectAnimation(target, target.animations ?? [], from, to, loop, speedRatio);
5622
+ stopAnimation(target, animationName, targetMask) {
5623
+ if (animationName !== void 0 || targetMask) unsupported("Scene.stopAnimation(…, animationName | targetMask)", "Only whole animatables can be stopped: call `stopAnimation(target)`.");
5624
+ for (const running of this._runningAnimatables.slice()) if (running._animates(target)) running.stop();
5540
5625
  }
5541
5626
  dispose() {
5542
5627
  let hasError = false;
@@ -5567,8 +5652,7 @@ var Scene = class Scene extends AbstractScene {
5567
5652
  if (hasError) throw firstError;
5568
5653
  }
5569
5654
  };
5570
- //#endregion
5571
- //#region src/events/device-input.ts
5655
+ // src/events/device-input.ts
5572
5656
  var DEVICE_SOURCE_BLOCKER = "Lite's standalone keyboard, pointer, and gamepad helpers expose application-owned state snapshots. Babylon.js DeviceSourceManager additionally defines multi-device slot classification, connect/disconnect lifecycles, numeric polling indices, and normalized per-input event payloads; matching that contract requires a new Lite-owned input-management subsystem and lifecycle design.";
5573
5657
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
5574
5658
  DeviceType[DeviceType["Generic"] = 0] = "Generic";
@@ -5734,8 +5818,7 @@ var DeviceSourceManager = class {
5734
5818
  unsupported("DeviceSourceManager.dispose", DEVICE_SOURCE_BLOCKER);
5735
5819
  }
5736
5820
  };
5737
- //#endregion
5738
- //#region src/lights/lights.ts
5821
+ // src/lights/lights.ts
5739
5822
  /**
5740
5823
  * Babylon.js-compatible light classes implemented over the Babylon Lite light
5741
5824
  * factories.
@@ -5749,6 +5832,9 @@ var DeviceSourceManager = class {
5749
5832
  * `light.direction.set(x, y, z)`, `light.position.y = 2`) reach the Lite light. Direction and
5750
5833
  * position are proxies over Lite's observable vectors; colours are proxies over the Lite colour
5751
5834
  * tuples, and every colour write bumps the light version so it reaches the lights UBO.
5835
+ *
5836
+ * `excludedMeshes` / `includedOnlyMeshes` are the same kind of live arrays, published to
5837
+ * `LightBase.excludedMeshes` / `includedOnlyMeshes` as sets of Lite meshes.
5752
5838
  */
5753
5839
  var rectAreaLightReconcileStates = null;
5754
5840
  function requestRectAreaLightReconcile(scene, mutation) {
@@ -5884,12 +5970,137 @@ var Light = class extends Node {
5884
5970
  this._disabledIntensity = null;
5885
5971
  }
5886
5972
  }
5973
+ _excludedMeshes = this._subscribeMeshList([]);
5974
+ _includedOnlyMeshes = this._subscribeMeshList([]);
5975
+ _meshListSyncScheduled = false;
5976
+ _meshListSceneRelease = null;
5977
+ /**
5978
+ * Meshes this light does not light. Babylon.js hands out the light's own array, and
5979
+ * `push` / `splice` on it are observed (those are the two methods Babylon.js hooks), so both
5980
+ * `light.excludedMeshes = [...]` and `light.excludedMeshes.push(mesh)` reach the Lite light.
5981
+ */
5982
+ get excludedMeshes() {
5983
+ this._watchSceneForMeshListRelease();
5984
+ return this._excludedMeshes;
5985
+ }
5986
+ set excludedMeshes(value) {
5987
+ const previous = this._excludedMeshes;
5988
+ this._excludedMeshes = this._subscribeMeshList(value);
5989
+ this._unsubscribeMeshList(previous);
5990
+ this._scheduleMeshListSync();
5991
+ }
5992
+ /** Meshes this light lights exclusively. Live in the same way as {@link excludedMeshes}. */
5993
+ get includedOnlyMeshes() {
5994
+ this._watchSceneForMeshListRelease();
5995
+ return this._includedOnlyMeshes;
5996
+ }
5997
+ set includedOnlyMeshes(value) {
5998
+ const previous = this._includedOnlyMeshes;
5999
+ this._includedOnlyMeshes = this._subscribeMeshList(value);
6000
+ this._unsubscribeMeshList(previous);
6001
+ this._scheduleMeshListSync();
6002
+ }
6003
+ /**
6004
+ * @internal Observe the two array methods Babylon.js hooks (`Lights/light.ts`
6005
+ * `_hookArrayForExcluded`). In-place writes through any other method — `pop`, `shift`, an index
6006
+ * assignment — do not publish in Babylon.js either, so matching the hook set is parity.
6007
+ */
6008
+ _subscribeMeshList(array) {
6009
+ const registry = meshListSubscribers ??= /* @__PURE__ */ new WeakMap();
6010
+ let lights = registry.get(array);
6011
+ if (!lights) {
6012
+ lights = /* @__PURE__ */ new Set();
6013
+ registry.set(array, lights);
6014
+ const subscribers = lights;
6015
+ const push = array.push.bind(array);
6016
+ const splice = array.splice.bind(array);
6017
+ const notify = () => {
6018
+ for (const light of subscribers) light._scheduleMeshListSync();
6019
+ };
6020
+ defineHook(array, "push", (...items) => {
6021
+ const length = push(...items);
6022
+ notify();
6023
+ return length;
6024
+ });
6025
+ defineHook(array, "splice", (...args) => {
6026
+ const removed = splice(...args);
6027
+ notify();
6028
+ return removed;
6029
+ });
6030
+ }
6031
+ lights.add(this);
6032
+ return array;
6033
+ }
6034
+ /** @internal Stop observing an array this light no longer holds, leaving other lights on it. */
6035
+ _unsubscribeMeshList(array) {
6036
+ if (array === this._excludedMeshes || array === this._includedOnlyMeshes) return;
6037
+ meshListSubscribers?.get(array)?.delete(this);
6038
+ }
6039
+ /** @internal Release this light from its lists when its scene is torn down. */
6040
+ _watchSceneForMeshListRelease() {
6041
+ const scene = this._scene;
6042
+ if (!scene) return;
6043
+ if (scene._lite._z) {
6044
+ this._releaseMeshLists();
6045
+ return;
6046
+ }
6047
+ this._meshListSceneRelease ??= onSceneDispose(scene._lite, () => {
6048
+ this._meshListSceneRelease = null;
6049
+ this._releaseMeshLists();
6050
+ });
6051
+ }
6052
+ /** @internal Splice a disposed mesh out of both of this light's lists. */
6053
+ _pruneDisposedMesh(mesh) {
6054
+ this._spliceMeshOut(this._excludedMeshes, mesh);
6055
+ if (this._includedOnlyMeshes !== this._excludedMeshes) this._spliceMeshOut(this._includedOnlyMeshes, mesh);
6056
+ }
6057
+ _spliceMeshOut(list, mesh) {
6058
+ const index = list.indexOf(mesh);
6059
+ if (index !== -1) list.splice(index, 1);
6060
+ }
6061
+ /** @internal Drop this light from both of its lists' subscriber sets. */
6062
+ _releaseMeshLists() {
6063
+ meshListSubscribers?.get(this._excludedMeshes)?.delete(this);
6064
+ meshListSubscribers?.get(this._includedOnlyMeshes)?.delete(this);
6065
+ }
6066
+ /**
6067
+ * @internal Coalesce the sync to the end of the tick: a list built up one `push` at a time,
6068
+ * as a loader callback or a room-by-room walk does, would otherwise rebuild the scene's
6069
+ * renderables once per mesh.
6070
+ */
6071
+ _scheduleMeshListSync() {
6072
+ this._watchSceneForMeshListRelease();
6073
+ if (this._meshListSyncScheduled) return;
6074
+ this._meshListSyncScheduled = true;
6075
+ queueMicrotask(() => {
6076
+ this._meshListSyncScheduled = false;
6077
+ this._syncMeshLists();
6078
+ });
6079
+ }
6080
+ /**
6081
+ * @internal Publish both lists to the Lite light and rebake the per-mesh light selection.
6082
+ *
6083
+ * Published as sets of Lite meshes, not of ids: an id cannot identify a mesh on its own, since
6084
+ * loading one asset twice yields distinct meshes carrying the same asset-local id. Empty lists
6085
+ * publish `undefined` to keep the "no lists" fast path in `lightAffectsMesh` allocation-free.
6086
+ */
6087
+ _syncMeshLists() {
6088
+ this._lite.excludedMeshes = liteMeshSet(this._excludedMeshes);
6089
+ this._lite.includedOnlyMeshes = liteMeshSet(this._includedOnlyMeshes);
6090
+ const scene = this._scene;
6091
+ if (!scene) return;
6092
+ if (!scene._hasStarted || scene._lite._z || this._clusteredContainer) return;
6093
+ requestSceneRebuild(scene);
6094
+ }
5887
6095
  /** Detach this light's shadow generator (compat for `light.shadowEnabled = false`). */
5888
6096
  set shadowEnabled(enabled) {
5889
6097
  if (!enabled) this._lite.shadowGenerator = void 0;
5890
6098
  }
5891
6099
  /** @internal Detach Lite-owned state when this node is disposed directly or through an ancestor. */
5892
6100
  _disposeSelf(_doNotRecurse) {
6101
+ this._meshListSceneRelease?.();
6102
+ this._meshListSceneRelease = null;
6103
+ this._releaseMeshLists();
5893
6104
  const scene = this._scene;
5894
6105
  if (scene) {
5895
6106
  if (scene._hasStarted && (this._lite.lightType === "rectArea" || scene._lite.lights.some((light) => light.lightType === "rectArea" && light.emissionTexture !== null))) {
@@ -5933,6 +6144,56 @@ function ensureLightVersionBump(lite) {
5933
6144
  });
5934
6145
  return bump;
5935
6146
  }
6147
+ /** @internal Lights currently observing each hooked mesh list. Allocated on the first hooked list. */
6148
+ var meshListSubscribers;
6149
+ /** @internal Install a mesh-list method override that behaves like the prototype method it shadows. */
6150
+ function defineHook(array, method, value) {
6151
+ Object.defineProperty(array, method, {
6152
+ value,
6153
+ enumerable: false,
6154
+ configurable: true,
6155
+ writable: true
6156
+ });
6157
+ }
6158
+ /** @internal The Lite meshes behind one list, or `undefined` when the list is empty. */
6159
+ function liteMeshSet(meshes) {
6160
+ if (meshes.length === 0) return;
6161
+ const lite = /* @__PURE__ */ new Set();
6162
+ for (const mesh of meshes) lite.add(mesh._lite);
6163
+ return lite;
6164
+ }
6165
+ /** @internal Lite scenes whose renderables a published list change has invalidated this tick. */
6166
+ var pendingSceneRebuilds;
6167
+ var sceneRebuildScheduled = false;
6168
+ /** @internal Scenes already holding a rebuild for when the initial build finishes. */
6169
+ var pendingStartupRebuilds;
6170
+ /**
6171
+ * @internal Request one rebuild per scene per tick.
6172
+ */
6173
+ function requestSceneRebuild(scene) {
6174
+ const liteScene = scene._lite;
6175
+ if (!liteScene._built) {
6176
+ const held = pendingStartupRebuilds ??= /* @__PURE__ */ new WeakSet();
6177
+ if (held.has(scene)) return;
6178
+ held.add(scene);
6179
+ scene.getEngine()._registerLateWork(async () => {
6180
+ held.delete(scene);
6181
+ await rebuildSceneRenderables(liteScene);
6182
+ });
6183
+ return;
6184
+ }
6185
+ (pendingSceneRebuilds ??= /* @__PURE__ */ new Set()).add(liteScene);
6186
+ if (sceneRebuildScheduled) return;
6187
+ sceneRebuildScheduled = true;
6188
+ queueMicrotask(() => {
6189
+ sceneRebuildScheduled = false;
6190
+ const scenes = [...pendingSceneRebuilds ?? []];
6191
+ pendingSceneRebuilds = void 0;
6192
+ for (const scene of scenes) rebuildSceneRenderables(scene).catch((error) => {
6193
+ console.error(error);
6194
+ });
6195
+ });
6196
+ }
5936
6197
  var HemisphericLight = class extends Light {
5937
6198
  /** @internal Underlying Babylon Lite hemispheric light. */
5938
6199
  _lite;
@@ -6185,8 +6446,7 @@ var RectAreaLight = class extends AreaLight {
6185
6446
  if (next && !next.children.includes(this._lite)) next.children.push(this._lite);
6186
6447
  }
6187
6448
  };
6188
- //#endregion
6189
- //#region src/lights/clustered-light-container.ts
6449
+ // src/lights/clustered-light-container.ts
6190
6450
  /**
6191
6451
  * Babylon.js-compatible `ClusteredLightContainer` implemented over Babylon Lite's
6192
6452
  * clustered (forward+) lighting API (`createClusteredLightContainer` /
@@ -6391,8 +6651,7 @@ var ClusteredLightContainer = class extends Light {
6391
6651
  super.dispose();
6392
6652
  }
6393
6653
  };
6394
- //#endregion
6395
- //#region src/textures/textures.ts
6654
+ // src/textures/textures.ts
6396
6655
  /**
6397
6656
  * Babylon.js-compatible texture wrappers over Babylon Lite's `loadTexture2D`.
6398
6657
  *
@@ -6949,8 +7208,7 @@ var RenderTargetTexture = class {
6949
7208
  unsupported("RenderTargetTexture", "Offscreen rendering uses Babylon Lite's frame-graph render-target APIs (`createRenderTargetTexture` / render tasks).");
6950
7209
  }
6951
7210
  };
6952
- //#endregion
6953
- //#region src/lights/area-light-texture-tools.ts
7211
+ // src/lights/area-light-texture-tools.ts
6954
7212
  var ProcessedAreaLightTexture = class extends BaseTexture {
6955
7213
  constructor(texture) {
6956
7214
  super();
@@ -6993,8 +7251,7 @@ var AreaLightTextureTools = class {
6993
7251
  }
6994
7252
  dispose() {}
6995
7253
  };
6996
- //#endregion
6997
- //#region src/meshes/csg.ts
7254
+ // src/meshes/csg.ts
6998
7255
  /**
6999
7256
  * Babylon.js `CSG` (legacy) and `CSG2` (Manifold-based) constructive solid
7000
7257
  * geometry, wrapped over Babylon Lite's native CSG API.
@@ -7130,8 +7387,7 @@ var CSG2 = class CSG2 {
7130
7387
  async function InitializeCSG2Async() {
7131
7388
  await initializeCsg2Async();
7132
7389
  }
7133
- //#endregion
7134
- //#region src/meshes/compression.ts
7390
+ // src/meshes/compression.ts
7135
7391
  /**
7136
7392
  * Babylon.js `MeshoptCompression` (`@babylonjs/core/Meshes/Compression/meshoptCompression`).
7137
7393
  *
@@ -7157,8 +7413,7 @@ var MeshoptCompression = class MeshoptCompression {
7157
7413
  return MeshoptCompression._default;
7158
7414
  }
7159
7415
  };
7160
- //#endregion
7161
- //#region src/morph/morph.ts
7416
+ // src/morph/morph.ts
7162
7417
  /**
7163
7418
  * Babylon.js-compatible `MorphTarget` / `MorphTargetManager` over the Babylon
7164
7419
  * Lite native morph API (`createMorphTargets` / `setMorphTargetWeights`).
@@ -7265,8 +7520,7 @@ var MorphTargetManager = class {
7265
7520
  setMorphTargetWeights(this._engine, this._lite, weights);
7266
7521
  }
7267
7522
  };
7268
- //#endregion
7269
- //#region src/meshes/gaussian-splatting.ts
7523
+ // src/meshes/gaussian-splatting.ts
7270
7524
  /**
7271
7525
  * Babylon.js-compatible `GaussianSplattingMesh` over Babylon Lite's splat loaders.
7272
7526
  *
@@ -7545,8 +7799,7 @@ var GaussianSplattingMesh = class GaussianSplattingMesh extends TransformNode {
7545
7799
  super._disposeSelf(doNotRecurse);
7546
7800
  }
7547
7801
  };
7548
- //#endregion
7549
- //#region src/meshes/mesh-blending.ts
7802
+ // src/meshes/mesh-blending.ts
7550
7803
  var MeshBlendingRadiusClass = /* @__PURE__ */ function(MeshBlendingRadiusClass) {
7551
7804
  MeshBlendingRadiusClass[MeshBlendingRadiusClass["Small"] = 0] = "Small";
7552
7805
  MeshBlendingRadiusClass[MeshBlendingRadiusClass["Medium"] = 1] = "Medium";
@@ -7619,8 +7872,7 @@ var NodeRenderGraphMeshBlendingPostProcessBlock = class {
7619
7872
  function RegisterMeshBlendingPostProcessBlock() {
7620
7873
  return unsupported("RegisterMeshBlendingPostProcessBlock", MESH_BLENDING_BLOCKER);
7621
7874
  }
7622
- //#endregion
7623
- //#region src/textures/external-texture.ts
7875
+ // src/textures/external-texture.ts
7624
7876
  var nextUniqueId = 0;
7625
7877
  /** Babylon.js `ExternalTexture` over Lite's caller-owned video wrapper. */
7626
7878
  var ExternalTexture = class {
@@ -7649,8 +7901,7 @@ var ExternalTexture = class {
7649
7901
  }
7650
7902
  dispose() {}
7651
7903
  };
7652
- //#endregion
7653
- //#region src/textures/raw-texture-2d-array.ts
7904
+ // src/textures/raw-texture-2d-array.ts
7654
7905
  /**
7655
7906
  * Babylon.js-compatible 2D **texture array** wrappers over Babylon Lite's
7656
7907
  * `createTexture2DArray` / `createTexture2DArrayFromPixels` /
@@ -7829,8 +8080,7 @@ async function CreateTexture2DArrayFromImageUrlsAsync(scene, urls, options) {
7829
8080
  });
7830
8081
  return RawTexture2DArray._fromLite(liteArray, Constants.TEXTUREFORMAT_RGBA, scene);
7831
8082
  }
7832
- //#endregion
7833
- //#region src/loading/loaded-mesh.ts
8083
+ // src/loading/loaded-mesh.ts
7834
8084
  /**
7835
8085
  * Wrap every node a loaded Babylon Lite asset container exposes as a canonical
7836
8086
  * compat `Mesh`, reusing the cached wrapper for a node when one already exists (so
@@ -7860,8 +8110,7 @@ function collectLoadedMeshes(container, registry, scene) {
7860
8110
  for (const entity of container.entities) visit(entity, null);
7861
8111
  return result;
7862
8112
  }
7863
- //#endregion
7864
- //#region src/bones/skeleton.ts
8113
+ // src/bones/skeleton.ts
7865
8114
  var Skeleton = class Skeleton {
7866
8115
  name;
7867
8116
  id;
@@ -7954,8 +8203,7 @@ var Bone = class Bone {
7954
8203
  clearBoneOverride(this._skeleton._lite, this._lite);
7955
8204
  }
7956
8205
  };
7957
- //#endregion
7958
- //#region src/loading/splat-file-loader.ts
8206
+ // src/loading/splat-file-loader.ts
7959
8207
  var SPLAT_ASSET_CONTAINER_UNSUPPORTED = "Lite's splat loaders attach the GPU-backed cloud directly to a scene. They do not expose a detached Gaussian-Splatting asset-container lifecycle that can preserve the BJS mesh type.";
7960
8208
  var SPLAT_STREAMING_UNSUPPORTED = "PlayCanvas lod-meta.json requires Babylon.js's Gaussian-Splatting streaming residency, download scheduling, and GPU work-buffer subsystem, which Babylon Lite does not define.";
7961
8209
  var SPLAT_DIRECTORY_UNSUPPORTED = "Directory SOG JSON requires a loader contract for resolving and decoding external texture resources relative to rootUrl; Lite's SOG loader accepts only self-contained archives.";
@@ -8066,8 +8314,7 @@ var SPLATFileLoader = class SPLATFileLoader {
8066
8314
  }
8067
8315
  };
8068
8316
  function RegisterSPLATFileLoader() {}
8069
- //#endregion
8070
- //#region src/loading/usd-options.ts
8317
+ // src/loading/usd-options.ts
8071
8318
  var USD_RUNTIME_BASE_URL = "https://cdn.babylonjs.com/babylonUsdImporter/5/";
8072
8319
  var USD_RUNTIME_NAMES = {
8073
8320
  workerUrl: "babylon-usd-importer.worker.js",
@@ -8132,8 +8379,7 @@ function toLiteUsdOptions(options, signal, onProgress) {
8132
8379
  onLog: options.onLog
8133
8380
  };
8134
8381
  }
8135
- //#endregion
8136
- //#region src/loading/scene-loader.ts
8382
+ // src/loading/scene-loader.ts
8137
8383
  /**
8138
8384
  * Babylon.js-compatible `SceneLoader` and `AssetContainer` over Babylon Lite's
8139
8385
  * `loadGltf` / `loadBabylon`.
@@ -8385,8 +8631,7 @@ async function loadUsdContainer(engine, source, options = {}, onProgress) {
8385
8631
  throw error;
8386
8632
  }
8387
8633
  }
8388
- //#endregion
8389
- //#region src/loading/assets-manager.ts
8634
+ // src/loading/assets-manager.ts
8390
8635
  /**
8391
8636
  * Babylon.js-compatible `AssetsManager` — a pure task scheduler built on top of
8392
8637
  * the compat loaders. The scheduling/observable surface has no Babylon Lite or
@@ -8489,8 +8734,7 @@ var AssetsManager = class {
8489
8734
  }
8490
8735
  }
8491
8736
  };
8492
- //#endregion
8493
- //#region src/loading/material-variants.ts
8737
+ // src/loading/material-variants.ts
8494
8738
  /**
8495
8739
  * Babylon.js `KHR_materials_variants` glTF loader extension
8496
8740
  * (`@babylonjs/loaders/glTF/2.0/Extensions/KHR_materials_variants`).
@@ -8528,8 +8772,7 @@ var KHR_materials_variants = {
8528
8772
  if (container) resetVariant(container);
8529
8773
  }
8530
8774
  };
8531
- //#endregion
8532
- //#region src/loading/usd-file-loader.ts
8775
+ // src/loading/usd-file-loader.ts
8533
8776
  function requireBinary(data) {
8534
8777
  if (!(data instanceof ArrayBuffer) && !ArrayBuffer.isView(data)) throw new Error("USDFileLoader expects binary USD data.");
8535
8778
  return data;
@@ -8611,8 +8854,7 @@ var USDFileLoader = class USDFileLoader {
8611
8854
  function RegisterUSDFileLoader() {}
8612
8855
  /** @internal Babylon.js pure-registration hook; Lite has no global loader dependency registry. */
8613
8856
  function _RegisterUSDLoaderDependencies() {}
8614
- //#endregion
8615
- //#region src/picking/gpu-picker.ts
8857
+ // src/picking/gpu-picker.ts
8616
8858
  /**
8617
8859
  * Babylon.js-compatible `GPUPicker` over Babylon Lite's GPU picker
8618
8860
  * (`createGpuPicker` / `pickAsync` / `disposePicker`).
@@ -8726,8 +8968,7 @@ var GPUPicker = class {
8726
8968
  this.clearPickingList();
8727
8969
  }
8728
8970
  };
8729
- //#endregion
8730
- //#region src/gizmos/gizmos.ts
8971
+ // src/gizmos/gizmos.ts
8731
8972
  /**
8732
8973
  * Babylon.js-compatible gizmos over Babylon Lite's gizmo suite.
8733
8974
  *
@@ -8798,7 +9039,7 @@ var UtilityLayerRenderer = class {
8798
9039
  _registered = false;
8799
9040
  constructor(scene) {
8800
9041
  this._engine = scene.getEngine()._lite;
8801
- this._lite = createUtilityLayer(this._engine, scene._lite);
9042
+ this._lite = createUtilityLayer(scene._lite);
8802
9043
  scene.getEngine()._registerLateWork(() => this._ensureRegistered());
8803
9044
  }
8804
9045
  /** @internal Ensure the layer is registered with the engine (idempotent). */
@@ -9372,8 +9613,7 @@ var GizmoManager = class {
9372
9613
  }
9373
9614
  }
9374
9615
  };
9375
- //#endregion
9376
- //#region src/behaviors/behaviors.ts
9616
+ // src/behaviors/behaviors.ts
9377
9617
  /**
9378
9618
  * Babylon.js-compatible camera/mesh behaviors.
9379
9619
  *
@@ -9453,8 +9693,7 @@ var FramingBehavior = class {
9453
9693
  if (this._camera) this._camera.radius = boundingRadius * 2.5;
9454
9694
  }
9455
9695
  };
9456
- //#endregion
9457
- //#region src/sprites/sprites.ts
9696
+ // src/sprites/sprites.ts
9458
9697
  /**
9459
9698
  * Babylon.js-compatible `SpriteManager` / `Sprite` over Babylon Lite's
9460
9699
  * camera-facing billboard sprite system.
@@ -9784,8 +10023,7 @@ var SpriteRenderer = class {
9784
10023
  };
9785
10024
  }
9786
10025
  };
9787
- //#endregion
9788
- //#region src/shadows/shadow-generator.ts
10026
+ // src/shadows/shadow-generator.ts
9789
10027
  /**
9790
10028
  * Babylon.js-compatible `ShadowGenerator` over the Babylon Lite shadow factories.
9791
10029
  *
@@ -10020,8 +10258,7 @@ var CascadedShadowGenerator = class extends ShadowGenerator {
10020
10258
  return "CascadedShadowGenerator";
10021
10259
  }
10022
10260
  };
10023
- //#endregion
10024
- //#region src/materials/node-material.ts
10261
+ // src/materials/node-material.ts
10025
10262
  /**
10026
10263
  * Babylon.js-compatible `NodeMaterial` over Babylon Lite's NME parser.
10027
10264
  *
@@ -10138,8 +10375,7 @@ var NodeMaterial = class NodeMaterial {
10138
10375
  return material;
10139
10376
  }
10140
10377
  };
10141
- //#endregion
10142
- //#region src/materials/grid-material.ts
10378
+ // src/materials/grid-material.ts
10143
10379
  /**
10144
10380
  * Babylon.js `@babylonjs/materials` `GridMaterial` over Babylon Lite's native
10145
10381
  * `createGridMaterial`.
@@ -10225,8 +10461,7 @@ var GridMaterial = class {
10225
10461
  }
10226
10462
  dispose() {}
10227
10463
  };
10228
- //#endregion
10229
- //#region src/materials/material-helpers.ts
10464
+ // src/materials/material-helpers.ts
10230
10465
  var NON_LIGHT_VERTEX_UNIFORM_BUFFER_COUNT = 4;
10231
10466
  /**
10232
10467
  * Babylon.js `GetSupportedSimultaneousLights(scene, maxSimultaneousLights)`.
@@ -10244,8 +10479,7 @@ function GetSupportedSimultaneousLights(scene, maxSimultaneousLights) {
10244
10479
  const supported = Math.max(maxUniformBuffersPerShaderStage - NON_LIGHT_VERTEX_UNIFORM_BUFFER_COUNT, 0);
10245
10480
  return Math.min(maxSimultaneousLights, supported);
10246
10481
  }
10247
- //#endregion
10248
- //#region src/animations/easing.ts
10482
+ // src/animations/easing.ts
10249
10483
  /**
10250
10484
  * Babylon.js-compatible easing functions over Babylon Lite's functional curves.
10251
10485
  *
@@ -10380,8 +10614,7 @@ var BezierCurveEase = class extends EasingFunction {
10380
10614
  return bezierCurveEase(gradient, this.x1, this.y1, this.x2, this.y2);
10381
10615
  }
10382
10616
  };
10383
- //#endregion
10384
- //#region src/misc/guid.ts
10617
+ // src/misc/guid.ts
10385
10618
  /** Babylon.js-compatible GUID helpers (`@babylonjs/core` `Misc/guid`). */
10386
10619
  /**
10387
10620
  * Generate a pseudo-random RFC4122 v4 UUID, matching Babylon.js `RandomGUID`.
@@ -10406,8 +10639,7 @@ var GUID = {
10406
10639
  * @returns a pseudo random id
10407
10640
  */
10408
10641
  RandomId: RandomGUID };
10409
- //#endregion
10410
- //#region src/misc/tools.ts
10642
+ // src/misc/tools.ts
10411
10643
  /** Babylon.js-compatible `Tools` helpers (the small, pure subset). */
10412
10644
  var Tools = {
10413
10645
  /** Current high-resolution timestamp in milliseconds, matching Babylon.js's numeric property. */
@@ -10429,8 +10661,7 @@ var Tools = {
10429
10661
  return RandomGUID();
10430
10662
  }
10431
10663
  };
10432
- //#endregion
10433
- //#region src/actions/actions.ts
10664
+ // src/actions/actions.ts
10434
10665
  /**
10435
10666
  * Babylon.js-compatible Actions: `ActionManager`, `Action`, the common concrete
10436
10667
  * actions, and `Condition` variants.
@@ -10610,8 +10841,7 @@ function setByPath(target, path, value) {
10610
10841
  }
10611
10842
  current[parts[parts.length - 1]] = value;
10612
10843
  }
10613
- //#endregion
10614
- //#region src/audio/audio-enums.ts
10844
+ // src/audio/audio-enums.ts
10615
10845
  /** Playback state of a sound (mirrors `@babylonjs/core` `SoundState`). */
10616
10846
  var SoundState = {
10617
10847
  Stopping: 0,
@@ -10647,8 +10877,7 @@ function toLiteRamp(options) {
10647
10877
  shape: options.shape
10648
10878
  };
10649
10879
  }
10650
- //#endregion
10651
- //#region src/audio/audio.ts
10880
+ // src/audio/audio.ts
10652
10881
  /**
10653
10882
  * Babylon.js AudioV2 (`AudioEngineV2` and friends) implemented on top of the
10654
10883
  * Babylon Lite audio port.
@@ -11772,8 +12001,7 @@ function CreateSoundSourceAsync(name, source, options, engine) {
11772
12001
  function CreateMicrophoneSoundSourceAsync(name, options, engine) {
11773
12002
  return resolveEngine(engine).createMicrophoneSoundSourceAsync(name, options);
11774
12003
  }
11775
- //#endregion
11776
- //#region src/materials/material-plugin.ts
12004
+ // src/materials/material-plugin.ts
11777
12005
  var MATERIAL_PLUGIN_INCLUDES_UNSUPPORTED = "Babylon.js shader includes depend on its ShaderStore include registry and expansion pipeline. Lite has no compatible include registry, and introducing one is a loader/shader-subsystem design rather than adapter translation.";
11778
12006
  var MATERIAL_PLUGIN_REGEX_UNSUPPORTED = "Regular-expression shader replacement requires access to the composed host shader source. Lite's plugin bridge exposes fixed injection slots only, so adding regex rewriting requires a new Lite shader-composition contract.";
11779
12007
  var MATERIAL_PLUGIN_HOOKS_UNSUPPORTED = "This Babylon.js plugin overrides hooks outside fixed-slot custom shader code. Executing those hooks requires Babylon.js-compatible define, uniform-buffer, sampler, texture, mesh-attribute, or render-target bridge contracts that Lite does not expose.";
@@ -12005,8 +12233,7 @@ var MaterialPluginBase = class MaterialPluginBase {
12005
12233
  this._pluginManager._removePlugin(this);
12006
12234
  }
12007
12235
  };
12008
- //#endregion
12009
- //#region src/unsupported/unsupported-apis.ts
12236
+ // src/unsupported/unsupported-apis.ts
12010
12237
  /**
12011
12238
  * Stubs for Babylon.js core/loader APIs that are **known but not supported** by
12012
12239
  * Babylon Lite.
@@ -12859,8 +13086,7 @@ var SceneSerializer = {
12859
13086
  return unsupported("SceneSerializer.SerializeMesh", "Babylon Lite does not implement mesh serialization.");
12860
13087
  }
12861
13088
  };
12862
- //#endregion
12863
- //#region src/loading/unsupported-khr-interactivity.ts
13089
+ // src/loading/unsupported-khr-interactivity.ts
12864
13090
  var KHR_INTERACTIVITY_UNSUPPORTED = "KHR_interactivity depends on Babylon.js FlowGraph block, connection, context, serialization, and glTF-reference models. Lite's flow-graph runtime uses a different graph model, so a stable cross-model adapter requires a broader loader/runtime design.";
12865
13091
  var KHR_INTERACTIVITY_EXPORT_UNSUPPORTED = "KHR_interactivity export planning depends on Babylon.js FlowGraph block provenance and the Babylon.js glTF serializer's final entity-index remapping context. Lite exposes a different runtime graph model and no glTF serializer.";
12866
13092
  function ParseDebugLogTemplate(_message) {
@@ -13059,8 +13285,7 @@ function GetInteractivityNodeState(_node, _state) {
13059
13285
  function SetInteractivityNodeState(_node, _state, _value) {
13060
13286
  unsupported("GLTF2.SetInteractivityNodeState", KHR_INTERACTIVITY_UNSUPPORTED);
13061
13287
  }
13062
- //#endregion
13063
- //#region src/loading/gltf2.ts
13288
+ // src/loading/gltf2.ts
13064
13289
  var gltf2_exports = /* @__PURE__ */ __exportAll({
13065
13290
  CloneKHRInteractivityGraph: () => CloneKHRInteractivityGraph,
13066
13291
  CreateEffectiveKHRInteractivityGraph: () => CreateEffectiveKHRInteractivityGraph,
@@ -13095,8 +13320,7 @@ var gltf2_exports = /* @__PURE__ */ __exportAll({
13095
13320
  getNoOpMappingForDeclaration: () => getNoOpMappingForDeclaration,
13096
13321
  gltfTypeToBabylonType: () => gltfTypeToBabylonType
13097
13322
  });
13098
- //#endregion
13099
- //#region src/loading/gltf1.ts
13323
+ // src/loading/gltf1.ts
13100
13324
  var gltf1_exports = /* @__PURE__ */ __exportAll({
13101
13325
  GLTFBinaryExtension: () => GLTFBinaryExtension,
13102
13326
  GLTFLoader: () => GLTFLoader,
@@ -13136,8 +13360,7 @@ function RegisterGLTFBinaryExtension() {
13136
13360
  function RegisterGLTFMaterialsCommonExtension() {
13137
13361
  unsupported("GLTF1.RegisterGLTFMaterialsCommonExtension", GLTF1_UNSUPPORTED);
13138
13362
  }
13139
- //#endregion
13140
- //#region src/meshes/gaussian-splatting-stream.ts
13363
+ // src/meshes/gaussian-splatting-stream.ts
13141
13364
  var STREAM_BLOCKER = "Lite's native streamer accepts only an HTTP(S) manifest URL and combines selection capacity with a mandatory render cap. Babylon.js constructs synchronously from parsed metadata, applies a distinct SOG coordinate transform, and independently controls render budget, residency, compound hosting, and cancellation. Bridging those lifecycle/policy differences requires a new Lite stream-construction contract.";
13142
13365
  var COMPOUND_BLOCKER = "Lite streams one independently rendered scene node and has no compound-mesh atlas reservation/proxy lifecycle to adapt.";
13143
13366
  function unsupportedProxyConstruction(_name) {
@@ -13294,8 +13517,7 @@ function AddGaussianSplattingStreamPart(_compound, _name, _metadata, _rootUrl, _
13294
13517
  async function AddGaussianSplattingStreamPartAsync(_compound, _name, _metadata, _rootUrl, _options = {}) {
13295
13518
  unsupported("AddGaussianSplattingStreamPartAsync", COMPOUND_BLOCKER);
13296
13519
  }
13297
- //#endregion
13298
- //#region src/unsupported/unsupported-extended.ts
13520
+ // src/unsupported/unsupported-extended.ts
13299
13521
  /**
13300
13522
  * Throwing stubs for additional Babylon.js core/loaders symbols that Babylon
13301
13523
  * Lite either does not implement, or exposes only through a different native API
@@ -13573,8 +13795,7 @@ var SceneOptimizer = class {
13573
13795
  unsupported("SceneOptimizer", "Automatic scene optimisation is not implemented in the compat layer.");
13574
13796
  }
13575
13797
  };
13576
- //#endregion
13577
- //#region src/particles/particle-system.ts
13798
+ // src/particles/particle-system.ts
13578
13799
  /**
13579
13800
  * Babylon.js-compatible `ParticleSystem` over Babylon Lite's data-oriented
13580
13801
  * node-particle runtime.
@@ -13740,8 +13961,7 @@ var ParticleSystem = class ParticleSystem {
13740
13961
  });
13741
13962
  }
13742
13963
  };
13743
- //#endregion
13744
- //#region src/particles/node-particle-system-set.ts
13964
+ // src/particles/node-particle-system-set.ts
13745
13965
  /**
13746
13966
  * Babylon.js-compatible Node Particle Editor (NPE) surface over Babylon Lite's
13747
13967
  * node-particle runtime.
@@ -13916,7 +14136,6 @@ var NodeParticleSystemSet = class NodeParticleSystemSet {
13916
14136
  this._snippetId = null;
13917
14137
  }
13918
14138
  };
13919
- //#endregion
13920
14139
  export { AbstractAssetTask, AbstractAudioAnalyzer, AbstractAudioBus, AbstractAudioNode, AbstractAudioOutNode, AbstractEngine, AbstractMesh, AbstractNamedAudioNode, AbstractScene, AbstractSound, AbstractSoundSource, AbstractSpatialAudio, AbstractSpatialAudioListener, AbstractStereoAudio, Action, ActionManager, ActionManagerTriggers, AddGaussianSplattingStreamPart, AddGaussianSplattingStreamPartAsync, AmmoJSPlugin, AnaglyphArcRotateCamera, Angle, Animatable, Animation, AnimationGroup, AnimationKeyInterpolation, AnimationLoopModes, AnimationTypes, AppendSceneAsync, ArcRotateCamera, AreaLight, AreaLightTextureTools, AssetContainer, AssetsManager, AttachToBoxBehavior, AudioBus, AudioEngine, AudioEngineV2, AudioParameterRampShape, AutoRotationBehavior, Axis, AxisDragGizmo, AxisScaleGizmo, BVHFileLoader, BackEase, BackgroundMaterial, BallAndSocketConstraint, BaseSixDofDragBehavior, BaseTexture, BezierCurveEase, BlackAndWhitePostProcess, BloomEffect, BlurPostProcess, Bone, BounceEase, BouncingBehavior, BoundingBox, BoundingBoxGizmo, BoundingBoxRenderer, BoundingInfo, BoundingSphere, CSG, CSG2, Camera, CameraGizmo, CannonJSPlugin, CascadedShadowGenerator, CastingResult, CharacterSupportedState, ChromaticAberrationPostProcess, CircleEase, ClusteredLightContainer, Color3, Color4, ColorGradient, CompleteGreasedLineColorTable, CompleteGreasedLineWidthTable, ComputeOverlayCssTransform, ComputeShader, ComputeShaderParse, Condition, Constants, CreateAudioBusAsync, CreateAudioEngineAsync, CreateBox, CreateCylinder, CreateDashedLines, CreateDefaultMeshBlendRadiusDefinitions, CreateDisc, CreateGreasedLine, CreateGreasedLineMaterial, CreateGround, CreateLineSystem, CreateLines, CreateMainAudioBusAsync, CreateMicrophoneSoundSourceAsync, CreatePlane, CreatePolygon, CreatePolygonVertexData, CreateSoundAsync, CreateSoundBufferAsync, CreateSoundSourceAsync, CreateSphere, CreateStreamingSoundAsync, CreateTexture2DArrayFromImageUrlsAsync, CreateTexture2DArrayFromKTX2Async, CreateTiledBox, CreateTiledPlane, CreateTorus, CubeTexture, CubicEase, Curve3, CustomAssetTask, DefaultRenderingPipeline, DepthOfFieldEffect, DepthRenderer, DeviceInputEventType, DeviceOrientationCamera, DeviceSource, DeviceSourceManager, DeviceType, DirectionalLight, DistanceConstraint, DitheredTileFadeMaterialPlugin, DualSenseInput, DualShockInput, DynamicTexture, EASINGMODE_EASEIN, EASINGMODE_EASEINOUT, EASINGMODE_EASEOUT, EasingFunction, EdgesRenderer, Effect, EffectLayer, EffectWrapper, ElasticEase, Engine, Epsilon, EventConstants, ExecuteCodeAction, ExponentialEase, ExternalTexture, ExtrudePolygon, FBXConstraintBehavior, FBXConstraintSolver, FBXFileLoader, FBXFileLoaderMetadata, FSR1RenderingPipeline, FactorGradient, FadeInOutBehavior, FlowGraphValidationSeverity, FluidRenderer, FluidRendererSceneComponent, FluidRenderingObject, FluidRenderingObjectCustomParticles, FluidRenderingObjectParticleSystem, FluidRenderingTargetRenderer, FlyCamera, FollowBehavior, FollowCamera, FrameGraphMeshBlendingTask, FrameGraphMinMaxReducerTask, FramingBehavior, FreeCamera, Frustum, FxaaPostProcess, gltf1_exports as GLTF1, gltf2_exports as GLTF2, GPUParticleSystem, GPUPicker, GUID, GamepadCamera, GaussianPointSplattingBlitMaterial, GaussianPointSplattingDepthBlitMaterial, GaussianPointSplattingRenderer, GaussianSplattingDebugMaterialPlugin, GaussianSplattingGpuPickingMaterialPlugin, GaussianSplattingMaterial, GaussianSplattingMaxPartCount, GaussianSplattingMesh, GaussianSplattingOverdrawMaterialPlugin, GaussianSplattingPartProxyMesh, GaussianSplattingSizeMaterialPlugin, GaussianSplattingSolidColorMaterialPlugin, GaussianSplattingStream, GeometryBufferRenderer, GeospatialCamera, GeospatialClippingBehavior, GetElementPixelFromUv, GetGaussianSplattingMaxPartCount, GetPartIndexVaryingDeclaration, GetPointsCount, GetSupportedSimultaneousLights, GetWhiteBalanceMatrix, GizmoManager, GlowLayer, GreasedLineBaseMesh, GreasedLineMaterialDefaults, GreasedLineMesh, GreasedLineMeshColorDistribution, GreasedLineMeshWidthDistribution, GreasedLinePluginMaterial, GreasedLineRibbonAutoDirectionMode, GreasedLineRibbonFacesMode, GreasedLineRibbonMesh, GreasedLineRibbonPointsMode, GreasedLineSimpleMaterial, GreasedLineTools, GridMaterial, GroundMesh, HDRCubeTexture, HandConstraintBehavior, HavokPlugin, HemisphericLight, HighlightLayer, HingeConstraint, HtmlInteractionManager, HtmlRaycastInteractionManager, HtmlTexture, ImageProcessingConfiguration, ImportMeshAsync, IncrementValueAction, InitializeCSG2Async, InstallHtmlInCanvasPolyfill, InstancedMesh, InterpolatingBehavior, IsHtmlInCanvasSupportedNatively, IsHtmlInCanvasUploadSupported, KHR_materials_variants, LastCreatedAudioEngine, Layer, Light, LightGizmo, LinesMesh, LiteCompatError, LoadAssetContainerAsync, LoadImageToTexture2DArrayLayerAsync, LockConstraint, Logger, MainAudioBus, Material, MaterialGreasedLineDefines, MaterialPluginBase, MaterialPluginManager, Matrix, MaxTintMagnitude, Mesh, MeshBlendDebugMode, MeshBlendDepthType, MeshBlendQuality, MeshBlendingPostProcess, MeshBlendingRadiusClass, MeshBuilder, MeshoptCompression, MinTemperatureKelvin, MirrorTexture, MorphTarget, MorphTargetManager, MultiMaterial, MultiPointerScaleBehavior, Node, NodeMaterial, NodeParticleSystemSet, NodeRenderGraphMeshBlendingPostProcessBlock, NodeRenderGraphMinMaxReducerBlock, NullEngine, OBJFileLoader, Observable, OnAudioEngineV2CreatedObservable, OpenPBRMaterial, OpenPBRMaterialDefines, OpenPBRMaterialLoadingAdapter, OutlineRenderer, PBRAnisotropicConfiguration, PBRClearCoatConfiguration, PBRIridescenceConfiguration, PBRMaterial, PBRMetallicRoughnessMaterial, PBRSheenConfiguration, PBRSpecularGlossinessMaterial, PackMeshBlendingTag, ParticleHelper, ParticleSystem, ParticleSystemSet, Path3D, PerformanceMonitor, Physics6DoFConstraint, Physics6DoFLimit, PhysicsAggregate, PhysicsBody, PhysicsCharacterController, PhysicsConstraint, PhysicsConstraintAxis, PhysicsConstraintType, PhysicsEngine, PhysicsMotionType, PhysicsPrestepType, PhysicsRaycastResult, PhysicsShape, PhysicsShapeType, PickingInfo, Plane, PlaneDragGizmo, PlaneRotationGizmo, PointLight, PointerDragBehavior, PointerEventTypes, PointerInfo, PointerInput, PointsCloudSystem, Polar, PolygonBuilder, PositionGizmo, PostProcess, PowerEase, PrecisionDate, PredicateCondition, PrismaticConstraint, PushMaterial, QuadraticEase, QuarticEase, Quaternion, QuinticEase, RandomGUID, RawTexture, RawTexture2DArray, RawTexture3D, Ray, RecastJSPlugin, RectAreaLight, ReflectionProbe, RegisterAbstractEngineTextureLoaders, RegisterComputeShader, RegisterEnginesExtensionsEngineTexture2DArrayImageSource, RegisterEnginesWebGPUExtensionsEngineTexture2DArrayImageSource, RegisterFluidRenderer, RegisterGaussianSplattingDebugMaterialPlugin, RegisterGaussianSplattingGpuPickingMaterialPlugin, RegisterGaussianSplattingMaterial, RegisterGaussianSplattingOverdrawMaterialPlugin, RegisterGaussianSplattingSizeMaterialPlugin, RegisterGaussianSplattingSolidColorMaterialPlugin, RegisterGreasedLinePluginMaterial, RegisterImageProcessingConfiguration, RegisterMeshBlendingPostProcessBlock, RegisterMinMaxReducerBlock, RegisterOpenpbrMaterial, RegisterPolygonBuilder, RegisterSPLATFileLoader, RegisterUSDFileLoader, RemoveFlowGraphAnimationGroupObservers, RenderTargetTexture, RootMotionClip, RootMotionController, RootMotionSource, RotationGizmo, SPLATFileLoader, SSAO2RenderingPipeline, STLFileLoader, Scalar, ScaleGizmo, Scene, SceneLoader, SceneOptimizer, ScenePerformancePriority, SceneSerializer, SetValueAction, ShaderLanguage, ShaderMaterial, ShadowGenerator, SineEase, SixDofDragBehavior, Size, Skeleton, SliderConstraint, SmartArray, SolidParticleSystem, Sound, SoundSource, SoundState, Space, SpatialAudioAttachmentType, Spherical, SpotLight, SpringConstraint, Sprite, SpriteManager, SpriteMap, SpritePackedManager, SpriteRenderer, StandardMaterial, StaticSound, StaticSoundBuffer, StorageBuffer, StreamingSound, StringDictionary, SurfaceMagnetismBehavior, SwitchInput, Tags, TargetCamera, TemperatureTintToXyz, Texture, ThinEngine, ThinFSR1SharpenPostProcess, ThinFSR1UpscalePostProcess, ThinMeshBlendingPostProcess, ThinSprite, ToDegrees, ToRadians, Tools, TouchCamera, TransformNode, USDFileLoader, UniformBuffer, UninstallHtmlInCanvasPolyfill, UniversalCamera, UnpackMeshBlendingTag, UploadHtmlElementToTexture, UploadImageToTexture2DArrayLayer, UtilityLayerRenderer, ValidateFlowGraph, ValidateFlowGraphWithBlockList, ValueCondition, ValueConditionOperators, Vector2, Vector3, Vector4, VertexBuffer, VertexData, Viewport, VirtualJoystick, WebGPUEngine, WebXRCamera, WeightedSound, XboxInput, _GetPackedShBytesPerSplat, _HasGaussianPointSplattingProjectedDepth, _RegisterUSDLoaderDependencies, defaultValueParseFunction, registerBuiltInLoaders, transformCoordinates, transformNormal, unsupported };
13921
14140
 
13922
14141
  //# sourceMappingURL=index.js.map