@babylonjs/lite-compat 1.38.2-preview → 1.39.0-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,5 +1,5 @@
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";
1
+ import { $ as Vector2, A as Material, B as attachMaterialToScene, C as RegisterPolygonBuilder, D as registerMeshAtStart, E as VertexData, F as PBRMetallicRoughnessMaterial, G as BoundingSphere, H as Observable, I as PBRSheenConfiguration, J as transformNormal, K as Matrix, L as PBRSpecularGlossinessMaterial, M as PBRClearCoatConfiguration, N as PBRIridescenceConfiguration, O as MorphTarget, P as PBRMaterial, Q as liteBackedColor3, R as PushMaterial, S as PolygonBuilder, T as VertexBuffer, U as BoundingBox, V as Node, W as BoundingInfo, X as Color3, Y as Quaternion, Z as Color4, _ as GroundMesh, a as CreateDisc, b as Mesh, c as CreateLines, d as CreatePolygonVertexData, et as Vector3, f as CreateSphere, g as ExtrudePolygon, h as CreateTorus, i as CreateDashedLines, it as unsupported, j as PBRAnisotropicConfiguration, k as MorphTargetManager, l as CreatePlane, m as CreateTiledPlane, n as CreateBox, nt as liteBackedVector3, o as CreateGround, p as CreateTiledBox, q as transformCoordinates, r as CreateCylinder, rt as LiteCompatError, s as CreateLineSystem, t as AbstractMesh, tt as Vector4, u as CreatePolygon, v as InstancedMesh, w as TransformNode, x as MeshBuilder, y as LinesMesh, z as StandardMaterial } from "./meshes-C-PkzbPM.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, clampGaussianSplattingGpuSortKeyBits, clearAnimationManager, clearBoneOverride, clearStorageBuffer, computeGaussianSplattingGpuSortDepthCoefficients, computeGaussianSplattingGpuSortDepthRange, computeGaussianSplattingGpuSortKeyScale, 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, 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, decodeGaussianSplattingGpuSortSogMean, 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, divideTextureProcessConstants, elasticEase, enableAnalyzer, enableAnimationBlending, enableArcRotateKeyboardControls, enableBoneControlForSkinnedAssets, enableGaussianPointSplatting, enableHavokThinInstancePhysicsSync, enableMirroredMeshes, enableOrthographicCamera, enableRectAreaLights, enableSpatial, enableStereo, enableUnsupportedGltfMaterialExtension, encodeIdToColor, exponentialEase, getBoneByName, getByteFrequencyData, getByteTimeDomainData, getCameraPosition, getFloatFrequencyData, getFloatTimeDomainData, getGaussianSplattingGpuSortPaddedCount, getGaussianSplattingGpuSortPassCount, getGaussianSplattingGpuSorterMaxSplatCount, getGaussianSplattingMaxPartCount, getGaussianSplattingPartIndexVaryingDeclaration, getMasterVolume, getMeshSkeleton, getParticleSystems, getPhysicsBodyAngularVelocity, getPhysicsBodyLinearVelocity, getPickedUV, getProjectionMatrix, getVariantNames, getViewMatrix, getWhiteBalanceMatrix, goToFrame, hasDefaultInteractivityFlowInput, initializeCsg2Async, inverseLerp, invertMat4, isExternalTextureReady, isParticleSystemStarted, loadBabylon, loadBasisTexture2D, loadDdsEnvironment, loadEnvironment, loadGltf, loadHdrEnvironment, loadImageToArrayLayer, loadKtxTexture2D, loadSOG, loadSPZ, loadSplat, loadSpriteAtlas, loadTexture2D, loadUsd, markClusteredLightContainerDirty, multiScatterToSingleScatterAlbedoConstants, multiplyMat4, multiplyPolarToRef, multiplySphericalToRef, normalizeInteractivityEventDataConfiguration, normalizeKhrInteractivityRuntimeValue, onBeforeRender, onEngineDeviceLost, onPhysicsAfterStep, onSceneDispose, packGaussianSplattingGpuSortIntervals, 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, resetSkeletonToRest, resetVariant, resizeEngine, resolveCameraViewport, resumeSound, resumeStreamingSound, sampleCatmullRomSpline, sampleHermiteSpline, scalePolarToRef, scaleSphericalToRef, selectVariant, setAnimationAdditive, setBonePosition, setBoneRotationQuaternion, setBoneScaling, setBusVolume, setClipPlane, setEngineSize, setEnvironmentLightingRotation, setEnvironmentSkyboxRotation, setFog, setGeospatialOrientation, setMasterVolume, 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, singleScatterToMultiScatterAlbedoConstants, sphericalFromVec3ToRef, sphericalToVec3ToRef, spriteBlendAdditive, spriteBlendAlpha, spriteBlendPremultiplied, startEngine, startParticleSystem, stepScene, stopAnimation, stopEngine, stopParticleSystem, stopSound, stopStreamingSound, submitComputeTasks, subtractPolarToRef, subtractSphericalToRef, syncParticleBillboard, temperatureTintToXyz, thinWalledScatterWeightConstants, transmissionFractionConstants, transmissionScatterToSingleScatterAlbedoConstants, unlockAudioEngineAsync, unpackMeshBlendingTag, updateAnimationManager, updateBillboardSpriteIndex, updateDynamicTexture, updateHtmlTexture, updateSpatialAudio, updateSprite2DIndex, updateStorageBufferRange, updateTexture2DArrayFromPixels, updateTexture2DFromPixels, updateUniformBuffer, uploadImageToArrayLayer, whenHtmlTextureReady } from "@babylonjs/lite";
3
3
  // \0rolldown/runtime.js
4
4
  var __defProp = Object.defineProperty;
5
5
  var __exportAll = (all, no_symbols) => {
@@ -3179,6 +3179,14 @@ var Camera = class Camera extends Node {
3179
3179
  getClassName() {
3180
3180
  return "Camera";
3181
3181
  }
3182
+ /**
3183
+ * Babylon.js `Camera.resetViewHistory()` invalidates temporal history owned by
3184
+ * every render pass using this camera. Lite's TAA/history state is owned by
3185
+ * independently-created frame-graph tasks, with no camera-to-task registry.
3186
+ */
3187
+ resetViewHistory() {
3188
+ return unsupported("Camera.resetViewHistory", "Babylon Lite's temporal history is owned by independent frame-graph tasks and exposes no camera-to-task registry through which a camera can invalidate every pass.");
3189
+ }
3182
3190
  get fov() {
3183
3191
  return this._lite.fov;
3184
3192
  }
@@ -4653,6 +4661,7 @@ var Constants = {
4653
4661
  TEXTURE_TRILINEAR_SAMPLINGMODE: 3,
4654
4662
  TEXTUREFORMAT_RGBA: 5,
4655
4663
  TEXTURETYPE_UNSIGNED_BYTE: 0,
4664
+ TEXTURE_CREATIONFLAG_SAMPLED_DATA_ONLY: 2,
4656
4665
  BUFFER_CREATIONFLAG_READ: 1,
4657
4666
  BUFFER_CREATIONFLAG_WRITE: 2,
4658
4667
  BUFFER_CREATIONFLAG_READWRITE: 3,
@@ -4694,103 +4703,405 @@ var PointerInfo = class {
4694
4703
  return this._pickInfo;
4695
4704
  }
4696
4705
  };
4697
- // src/scene/scene.ts
4706
+ // src/bones/skeleton.ts
4707
+ var Skeleton = class Skeleton {
4708
+ name;
4709
+ id;
4710
+ bones;
4711
+ /** @internal Underlying loader-produced Babylon Lite skeleton. */
4712
+ _lite;
4713
+ constructor(_name, _id, _scene) {
4714
+ return unsupported("Skeleton", "Babylon Lite exposes loader-produced skeletons but has no public API for manually constructing a skeleton. Load a skinned glTF and use the returned skeleton.");
4715
+ }
4716
+ /** @internal Wrap a loader-produced Babylon Lite skeleton. */
4717
+ static _fromLite(lite, index) {
4718
+ const skeleton = Object.create(Skeleton.prototype);
4719
+ Object.defineProperties(skeleton, {
4720
+ name: {
4721
+ value: `skeleton${index}`,
4722
+ enumerable: true
4723
+ },
4724
+ id: {
4725
+ value: `skeleton${index}`,
4726
+ enumerable: true
4727
+ },
4728
+ _lite: { value: lite }
4729
+ });
4730
+ const wrappers = /* @__PURE__ */ new Map();
4731
+ for (const bone of lite.bones) wrappers.set(bone, Bone._fromLite(bone, skeleton, wrappers));
4732
+ Object.defineProperty(skeleton, "bones", {
4733
+ value: [...wrappers.values()],
4734
+ enumerable: true
4735
+ });
4736
+ return skeleton;
4737
+ }
4738
+ getBoneIndexByName(name) {
4739
+ const bone = getBoneByName(this._lite, name);
4740
+ return bone ? this._lite.bones.indexOf(bone) : -1;
4741
+ }
4742
+ getBoneByName(name) {
4743
+ const index = this.getBoneIndexByName(name);
4744
+ return index < 0 ? null : this.bones[index];
4745
+ }
4746
+ /** Babylon.js `Skeleton.returnToRest()` — clear every compat bone override. */
4747
+ returnToRest() {
4748
+ resetSkeletonToRest(this._lite);
4749
+ }
4750
+ /** Babylon.js `Skeleton.prepare()` — Lite keeps loaded/evaluated bone matrices ready, so no additional bake is needed. */
4751
+ prepare(_dontCheckFrameId = false) {}
4752
+ };
4753
+ var Bone = class Bone {
4754
+ _enabled = true;
4755
+ name;
4756
+ parent;
4757
+ /** @internal Underlying loader-produced Babylon Lite bone. */
4758
+ _lite;
4759
+ /** @internal Owning compat skeleton. */
4760
+ _skeleton;
4761
+ constructor(_name, _skeleton) {
4762
+ return unsupported("Bone", "Babylon Lite exposes loader-produced bones but has no public API for manually constructing a bone. Use Skeleton.bones from a loaded skinned glTF.");
4763
+ }
4764
+ /** @internal Wrap a loader-produced Babylon Lite bone. */
4765
+ static _fromLite(lite, skeleton, wrappers) {
4766
+ const bone = Object.create(Bone.prototype);
4767
+ Object.defineProperties(bone, {
4768
+ name: {
4769
+ value: lite.name,
4770
+ enumerable: true
4771
+ },
4772
+ parent: {
4773
+ get: () => lite.parent ? wrappers?.get(lite.parent) ?? null : null,
4774
+ enumerable: true
4775
+ },
4776
+ _lite: { value: lite },
4777
+ _skeleton: { value: skeleton },
4778
+ _enabled: {
4779
+ value: true,
4780
+ writable: true
4781
+ }
4782
+ });
4783
+ return bone;
4784
+ }
4785
+ getName() {
4786
+ return this.name;
4787
+ }
4788
+ getSkeleton() {
4789
+ return this._skeleton;
4790
+ }
4791
+ setPosition(position, space = 0) {
4792
+ if (space !== 0) return unsupported("Bone.setPosition", "Babylon Lite's bone-control API currently exposes local-space position overrides only.");
4793
+ setBonePosition(this._skeleton._lite, this._lite, position.x, position.y, position.z);
4794
+ return this;
4795
+ }
4796
+ setRotationQuaternion(rotation, space = 0) {
4797
+ if (space !== 0) return unsupported("Bone.setRotationQuaternion", "Babylon Lite's bone-control API currently exposes local-space rotation overrides only.");
4798
+ setBoneRotationQuaternion(this._skeleton._lite, this._lite, rotation.x, rotation.y, rotation.z, rotation.w);
4799
+ return this;
4800
+ }
4801
+ setScale(scale) {
4802
+ setBoneScaling(this._skeleton._lite, this._lite, scale.x, scale.y, scale.z);
4803
+ return this;
4804
+ }
4805
+ setEnabled(value) {
4806
+ this._enabled = value;
4807
+ }
4808
+ isEnabled() {
4809
+ return this._enabled;
4810
+ }
4811
+ returnToRest() {
4812
+ clearBoneOverride(this._skeleton._lite, this._lite);
4813
+ }
4814
+ };
4815
+ // src/particles/particle-system.ts
4698
4816
  /**
4699
- * Babylon.js-compatible `Scene` implemented over a Babylon Lite `SceneContext`.
4817
+ * Babylon.js-compatible `ParticleSystem` over Babylon Lite's data-oriented
4818
+ * node-particle runtime.
4700
4819
  *
4701
- * The wrapper owns a Lite `SceneContext` (`_lite`) and proxies the common
4702
- * Babylon.js scene surface: `clearColor`, `activeCamera`, the before/after-render
4703
- * observables, default camera creation, and disposal. Entities created by the
4704
- * compat light/camera/mesh wrappers register themselves against `_lite`.
4820
+ * Babylon.js exposes `ParticleSystem` both as an **imperative constructor**
4821
+ * (`new ParticleSystem(name, capacity, scene)` — emitters, over-lifetime
4822
+ * gradients, `minEmitBox`) and as the **per-system handle** returned from a built
4823
+ * Node Particle Editor graph (`NodeParticleSystemSet.buildAsync(scene).systems[i]`).
4705
4824
  *
4706
- * `scene.render()` is a no-op: Babylon Lite drives rendering through the engine's
4707
- * loop (`runRenderLoop` / `startEngine`). Manual single-frame rendering is not
4708
- * supported in this compat layer.
4825
+ * Babylon Lite backs only the second shape: `buildNodeParticleSet` compiles a
4826
+ * serialized graph into `NodeParticleSet.systems` (Lite `ParticleSystem` state
4827
+ * objects), which the standalone functions `startParticleSystem` /
4828
+ * `animateParticleSystem` / `stopParticleSystem` drive, and
4829
+ * `createParticleBillboard` / `syncParticleBillboard` /
4830
+ * `addFacingBillboardSystem` render as camera-facing billboards. So the compat
4831
+ * wrapper's **runtime subset** (`start` / `animate` / `stop` / `updateSpeed` /
4832
+ * `particleTexture` / `preWarmStepOffset`) forwards to those Lite functions,
4833
+ * while the imperative constructor throws — there is no Lite graph to author.
4834
+ *
4835
+ * The instances handed back from {@link ParticleSystemSet.systems} are built via
4836
+ * the `@internal` {@link ParticleSystem._fromLite} factory, which bypasses the
4837
+ * throwing constructor (mirroring `AnimationGroup._fromLite`).
4709
4838
  */
4710
- /** Babylon.js EnvironmentHelper default skybox/ground assets (match the Lite ports). */
4711
- var DEFAULT_SKYBOX_URL = "https://assets.babylonjs.com/core/environments/backgroundSkybox.dds";
4712
- var DEFAULT_GROUND_URL = "https://assets.babylonjs.com/core/environments/backgroundGround.png";
4713
- /** Babylon.js `createDefaultEnvironment` IBL fallback when no `environmentTexture` is set. */
4714
- var DEFAULT_ENV_URL = "https://assets.babylonjs.com/environments/environmentSpecular.env";
4715
- var FLUID_RENDERER_UNSUPPORTED$1 = "Fluid rendering requires dedicated depth, thickness, and diffuse passes plus render-target lifecycle and composition policies that Babylon Lite does not define.";
4716
4839
  /**
4717
- * Babylon.js resolves the BRDF lookup texture from an embedded Base64 PNG rather than a
4718
- * URL, so PBR materials work with no asset deployment and no network request. Mirror that
4719
- * here instead of exposing a URL option: Babylon.js's `IEnvironmentHelperOptions` has no
4720
- * BRDF field, and a fetched default breaks under SPA dev servers that answer missing files
4721
- * with a 200 HTML page. Loaded lazily so only apps that load an environment pay for it.
4840
+ * Babylon.js `ParticleSystem` — the built output of one NPE graph system. Backed
4841
+ * by a Lite `ParticleSystem`; the deterministic prewarm-and-freeze pattern used by
4842
+ * ported parity scenes (seed RNG → `start()` → N × `animate()` → `updateSpeed = 0`)
4843
+ * maps directly onto Lite's `startParticleSystem` / `animateParticleSystem`, with a
4844
+ * camera-facing billboard built and synced once the scene starts.
4722
4845
  */
4723
- async function getBrdfLutUrl() {
4724
- return (await import("./brdf-lut-data-CIJtJXN2.js")).BRDF_LUT_DATA_URL;
4725
- }
4726
- var Scene = class Scene extends AbstractScene {
4727
- /** @internal Underlying Babylon Lite scene context. */
4728
- _lite;
4729
- /** Babylon.js fog-mode constants. */
4730
- static FOGMODE_NONE = 0;
4731
- static FOGMODE_EXP = 1;
4732
- static FOGMODE_EXP2 = 2;
4733
- static FOGMODE_LINEAR = 3;
4734
- /** Fires before each scene render (wired to Lite's before-render hook). */
4735
- onBeforeRenderObservable = new Observable();
4736
- /** Fires before animations are evaluated each frame (used by ported cross-fade drivers). */
4737
- onBeforeAnimationsObservable = new Observable();
4738
- /** Fires after each scene render. */
4739
- onAfterRenderObservable = new Observable();
4740
- /** Fires after each Lite Havok simulation step. */
4741
- onAfterPhysicsObservable = new Observable();
4742
- /** Fires once when the scene is disposed. */
4743
- onDisposeObservable = new Observable();
4744
- /** Babylon.js scene-level pointer events from the engine rendering canvas. */
4745
- onPointerObservable = new Observable();
4746
- /** @internal Callbacks that must run after Babylon.js-compatible before-render observers. */
4747
- _beforeRenderFlushCallbacks = /* @__PURE__ */ new Set();
4748
- /** @internal Canvas target that owns this scene's pointer listeners. */
4749
- _pointerEventTarget = null;
4750
- /** @internal Shared listener registered for each supported DOM pointer event. */
4751
- _pointerEventListener = null;
4846
+ var ParticleSystem = class ParticleSystem {
4847
+ name = "";
4848
+ /** @internal The backing Lite particle system (null on a bare, unbuilt instance). */
4849
+ _lite = null;
4850
+ /** @internal The compat scene this system was built against. */
4851
+ _scene = null;
4752
4852
  /**
4753
- * Babylon.js `scene.animationGroups` / `scene.animatables`. Loaded glTF /
4754
- * `.babylon` animation clips live on the Lite scene; `animationGroups` returns
4755
- * BJS-shaped `AnimationGroup`s over them (so scenes can `goToFrame`/`pause`/`stop`
4756
- * to freeze a model at a deterministic frame). `animatables` surfaces the
4757
- * native-backed and fallback `Animatable`s started through the scene.
4853
+ * Babylon.js `ParticleSystem.preWarmStepOffset` — the step ratio applied during
4854
+ * prewarm cycles. Multiplies {@link updateSpeed} on every `animate(true)` call,
4855
+ * matching Babylon.js (which uses `updateSpeed * preWarmStepOffset` while
4856
+ * prewarming and the regular animation ratio otherwise).
4758
4857
  */
4759
- get animationGroups() {
4760
- return (this._lite.animationGroups ?? []).map((g) => {
4761
- let wrapper = this._animationGroupCache.get(g);
4762
- if (!wrapper) {
4763
- wrapper = AnimationGroup._fromLite(g, this._engine._lite, this);
4764
- this._animationGroupCache.set(g, wrapper);
4765
- }
4766
- return wrapper;
4767
- });
4858
+ preWarmStepOffset = 1;
4859
+ _texture = null;
4860
+ _billboardScheduled = false;
4861
+ _billboardOwnedBySet = false;
4862
+ _started = false;
4863
+ /**
4864
+ * Babylon.js `new ParticleSystem(name, capacity, scene)`. The imperative
4865
+ * construction API (emitters, over-lifetime gradients, `minEmitBox`, a
4866
+ * GPU-compute path) is not backed: Babylon Lite builds particle systems only
4867
+ * from a serialized Node Particle Editor graph. Load a graph via
4868
+ * `NodeParticleSystemSet.Parse` / `ParseFromSnippetAsync` → `buildAsync` and read
4869
+ * its {@link ParticleSystemSet.systems} instead.
4870
+ */
4871
+ constructor() {
4872
+ unsupported("ParticleSystem", "Babylon Lite builds particle systems only from a serialized Node Particle Editor graph, not the imperative classic `ParticleSystem` construction API (emitters, over-lifetime gradients, `minEmitBox`). Use `NodeParticleSystemSet.Parse`/`ParseFromSnippetAsync` → `buildAsync` and drive `set.systems[i]`.");
4768
4873
  }
4769
- /** Babylon.js `scene.getAnimationGroupByName(name)` — first loaded animation group with a matching name, else `null`. */
4770
- getAnimationGroupByName(name) {
4771
- return this.animationGroups.find((g) => g.name === name) ?? null;
4874
+ /**
4875
+ * @internal Build a `ParticleSystem` backed by a Lite `ParticleSystem` produced
4876
+ * by an NPE graph build. Bypasses the throwing public constructor.
4877
+ */
4878
+ static _fromLite(lite, scene) {
4879
+ const system = Object.create(ParticleSystem.prototype);
4880
+ system.name = lite.name ?? "";
4881
+ system._lite = lite;
4882
+ system._scene = scene;
4883
+ system.preWarmStepOffset = 1;
4884
+ system._texture = null;
4885
+ system._billboardScheduled = false;
4886
+ system._billboardOwnedBySet = false;
4887
+ system._started = isParticleSystemStarted(lite) === true;
4888
+ return system;
4772
4889
  }
4773
- get animatables() {
4774
- return this._runningAnimatables;
4890
+ getClassName() {
4891
+ return "ParticleSystem";
4892
+ }
4893
+ /** Babylon.js `ParticleSystem.updateSpeed` — simulation advance per frame. Proxies the Lite system. */
4894
+ get updateSpeed() {
4895
+ return this._lite?.updateSpeed ?? 0;
4896
+ }
4897
+ set updateSpeed(value) {
4898
+ if (this._lite) this._lite.updateSpeed = value;
4775
4899
  }
4776
- _engine;
4777
- _activeCamera = null;
4778
- cameraToUseForPointers = null;
4779
- /** Babylon.js `scene.pointerX` / `pointerY`: the last pointer position in CSS pixels relative to the canvas. */
4780
- pointerX = 0;
4781
- pointerY = 0;
4782
- _defaultMaterial = null;
4783
- _fogMode = 0;
4784
- _fogStart = 0;
4785
- _fogEnd = 1e3;
4786
- _fogDensity = .1;
4787
- _fogColor = new Color3(.2, .2, .3);
4788
4900
  /**
4789
- * @internal Mesh scene-adds deferred until the engine starts. Babylon Lite
4790
- * locks a mesh into a render group (standard vs PBR) at `addToScene` time by
4791
- * reading its material, whereas Babylon.js code routinely creates a mesh and
4792
- * assigns `mesh.material` a line later. Deferring the add until engine start
4793
- * lets those assignments settle so the mesh lands in the correct group.
4901
+ * Babylon.js `ParticleSystem.particleTexture` — the sprite texture. Recorded and
4902
+ * bound onto the Lite system when the billboard is built at engine start (the
4903
+ * compat `Texture` loads asynchronously, so its GPU handle is read after the
4904
+ * scene's pending texture loads settle).
4905
+ */
4906
+ get particleTexture() {
4907
+ return this._texture;
4908
+ }
4909
+ set particleTexture(value) {
4910
+ this._texture = value;
4911
+ }
4912
+ /**
4913
+ * Babylon.js `ParticleSystem.start()` — begin emission. Forwards to Lite
4914
+ * `startParticleSystem` (which clears the stopped flag and resets the frame
4915
+ * counter, so `start()` → `stop()` → `start()` resumes emission) and schedules
4916
+ * the camera-facing billboard build for engine start. The billboard build is
4917
+ * separately guarded, so it happens exactly once however often `start()` runs.
4918
+ */
4919
+ start() {
4920
+ if (!this._lite) return;
4921
+ startParticleSystem(this._lite);
4922
+ this._started = true;
4923
+ this._scheduleBillboard();
4924
+ }
4925
+ /**
4926
+ * Babylon.js `ParticleSystem.animate(preWarmOnly?)` — advance the simulation by
4927
+ * one deterministic step. Forwards to Lite `animateParticleSystem` with Babylon.js's
4928
+ * step ratio: {@link preWarmStepOffset} while prewarming, otherwise the ratio `1`
4929
+ * used by the parity ports' seeded step loop.
4930
+ */
4931
+ animate(preWarmOnly = false) {
4932
+ if (this._lite) animateParticleSystem(this._lite, preWarmOnly ? this.preWarmStepOffset : 1);
4933
+ }
4934
+ /** Babylon.js `ParticleSystem.stop()` — stop emission; live particles drain. Forwards to Lite `stopParticleSystem`. */
4935
+ stop() {
4936
+ if (this._lite) stopParticleSystem(this._lite);
4937
+ }
4938
+ /** Babylon.js `ParticleSystem.isStarted()` — whether the system is currently emitting. */
4939
+ isStarted() {
4940
+ return this._started;
4941
+ }
4942
+ /** Babylon.js `ParticleSystem.dispose()` — stop the system. */
4943
+ dispose() {
4944
+ this.stop();
4945
+ if (this._lite) this._scene?._unregisterParticleSystem(this._lite);
4946
+ }
4947
+ /**
4948
+ * @internal Bind the recorded {@link particleTexture}'s GPU handle onto the backing
4949
+ * Lite system. Called from the deferred per-system billboard build and from
4950
+ * {@link ParticleSystemSet.start} before set-level registration, so a
4951
+ * wrapper-assigned texture wins over whatever the graph baked in. A no-op while
4952
+ * the compat `Texture` is still loading (callers run after the scene's pending
4953
+ * texture loads settle).
4954
+ */
4955
+ _bindTexture() {
4956
+ const liteTexture = this._texture?._lite;
4957
+ if (this._lite && liteTexture) this._lite.texture = liteTexture;
4958
+ }
4959
+ /**
4960
+ * @internal Hand billboard rendering to the owning {@link ParticleSystemSet}: Lite's
4961
+ * `registerNodeParticleSet` builds and per-frame syncs a billboard for every system
4962
+ * in the set, so this wrapper's one-shot build must be skipped to avoid rendering
4963
+ * the same particles twice.
4964
+ */
4965
+ _releaseBillboardToSet() {
4966
+ this._billboardOwnedBySet = true;
4967
+ }
4968
+ /** @internal Synchronize Babylon.js lifecycle state when the owning set starts this system. */
4969
+ _markStartedBySet() {
4970
+ this._started = true;
4971
+ }
4972
+ /**
4973
+ * Schedule the one-time billboard build. Deferred to engine start (via the
4974
+ * scene's `_deferAdd`, which runs after pending texture loads settle), so the
4975
+ * particle system is already prewarmed/frozen and its texture GPU handle is
4976
+ * ready. Mirrors the native Lite port's build → sync → add sequence.
4977
+ */
4978
+ _scheduleBillboard() {
4979
+ if (this._billboardScheduled || !this._scene || !this._lite) return;
4980
+ this._billboardScheduled = true;
4981
+ const scene = this._scene;
4982
+ const lite = this._lite;
4983
+ scene._deferAdd(() => {
4984
+ if (this._billboardOwnedBySet) return;
4985
+ this._bindTexture();
4986
+ if (!lite.texture) return;
4987
+ const billboard = createParticleBillboard(lite);
4988
+ syncParticleBillboard(lite, billboard);
4989
+ addFacingBillboardSystem(scene._lite, billboard);
4990
+ });
4991
+ }
4992
+ };
4993
+ // src/scene/scene.ts
4994
+ /**
4995
+ * Babylon.js-compatible `Scene` implemented over a Babylon Lite `SceneContext`.
4996
+ *
4997
+ * The wrapper owns a Lite `SceneContext` (`_lite`) and proxies the common
4998
+ * Babylon.js scene surface: `clearColor`, `activeCamera`, the before/after-render
4999
+ * observables, default camera creation, and disposal. Entities created by the
5000
+ * compat light/camera/mesh wrappers register themselves against `_lite`.
5001
+ *
5002
+ * `scene.render()` is a no-op: Babylon Lite drives rendering through the engine's
5003
+ * loop (`runRenderLoop` / `startEngine`). Manual single-frame rendering is not
5004
+ * supported in this compat layer.
5005
+ */
5006
+ /** Babylon.js EnvironmentHelper default skybox/ground assets (match the Lite ports). */
5007
+ var DEFAULT_SKYBOX_URL = "https://assets.babylonjs.com/core/environments/backgroundSkybox.dds";
5008
+ var DEFAULT_GROUND_URL = "https://assets.babylonjs.com/core/environments/backgroundGround.png";
5009
+ /** Babylon.js `createDefaultEnvironment` IBL fallback when no `environmentTexture` is set. */
5010
+ var DEFAULT_ENV_URL = "https://assets.babylonjs.com/environments/environmentSpecular.env";
5011
+ var FLUID_RENDERER_UNSUPPORTED$1 = "Fluid rendering requires dedicated depth, thickness, and diffuse passes plus render-target lifecycle and composition policies that Babylon Lite does not define.";
5012
+ /**
5013
+ * Babylon.js resolves the BRDF lookup texture from an embedded Base64 PNG rather than a
5014
+ * URL, so PBR materials work with no asset deployment and no network request. Mirror that
5015
+ * here instead of exposing a URL option: Babylon.js's `IEnvironmentHelperOptions` has no
5016
+ * BRDF field, and a fetched default breaks under SPA dev servers that answer missing files
5017
+ * with a 200 HTML page. Loaded lazily so only apps that load an environment pay for it.
5018
+ */
5019
+ async function getBrdfLutUrl() {
5020
+ return (await import("./brdf-lut-data-CIJtJXN2.js")).BRDF_LUT_DATA_URL;
5021
+ }
5022
+ var Scene = class Scene extends AbstractScene {
5023
+ /** @internal Underlying Babylon Lite scene context. */
5024
+ _lite;
5025
+ /** Babylon.js fog-mode constants. */
5026
+ static FOGMODE_NONE = 0;
5027
+ static FOGMODE_EXP = 1;
5028
+ static FOGMODE_EXP2 = 2;
5029
+ static FOGMODE_LINEAR = 3;
5030
+ /** Fires before each scene render (wired to Lite's before-render hook). */
5031
+ onBeforeRenderObservable = new Observable();
5032
+ /** Fires before animations are evaluated each frame (used by ported cross-fade drivers). */
5033
+ onBeforeAnimationsObservable = new Observable();
5034
+ /** Fires after each scene render. */
5035
+ onAfterRenderObservable = new Observable();
5036
+ /** Fires after each Lite Havok simulation step. */
5037
+ onAfterPhysicsObservable = new Observable();
5038
+ /** Fires once when the scene is disposed. */
5039
+ onDisposeObservable = new Observable();
5040
+ /** Babylon.js scene-level pointer events from the engine rendering canvas. */
5041
+ onPointerObservable = new Observable();
5042
+ /** @internal Callbacks that must run after Babylon.js-compatible before-render observers. */
5043
+ _beforeRenderFlushCallbacks = /* @__PURE__ */ new Set();
5044
+ /** @internal Canvas target that owns this scene's pointer listeners. */
5045
+ _pointerEventTarget = null;
5046
+ /** @internal Shared listener registered for each supported DOM pointer event. */
5047
+ _pointerEventListener = null;
5048
+ /**
5049
+ * Babylon.js `scene.animationGroups` / `scene.animatables`. Loaded glTF /
5050
+ * `.babylon` animation clips live on the Lite scene; `animationGroups` returns
5051
+ * BJS-shaped `AnimationGroup`s over them (so scenes can `goToFrame`/`pause`/`stop`
5052
+ * to freeze a model at a deterministic frame). `animatables` surfaces the
5053
+ * native-backed and fallback `Animatable`s started through the scene.
5054
+ */
5055
+ get animationGroups() {
5056
+ return (this._lite.animationGroups ?? []).map((g) => {
5057
+ let wrapper = this._animationGroupCache.get(g);
5058
+ if (!wrapper) {
5059
+ wrapper = AnimationGroup._fromLite(g, this._engine._lite, this);
5060
+ this._animationGroupCache.set(g, wrapper);
5061
+ }
5062
+ return wrapper;
5063
+ });
5064
+ }
5065
+ /** Babylon.js `scene.getAnimationGroupByName(name)` — first loaded animation group with a matching name, else `null`. */
5066
+ getAnimationGroupByName(name) {
5067
+ return this.animationGroups.find((g) => g.name === name) ?? null;
5068
+ }
5069
+ get animatables() {
5070
+ return this._runningAnimatables;
5071
+ }
5072
+ /** Babylon.js `scene.skeletons` — loader-produced skeletons currently used by scene meshes. */
5073
+ get skeletons() {
5074
+ if (this._disposed) return this._skeletons;
5075
+ for (const mesh of this._lite.meshes) {
5076
+ const lite = getMeshSkeleton(mesh);
5077
+ if (lite) this._wrapSkeleton(lite);
5078
+ }
5079
+ return this._skeletons;
5080
+ }
5081
+ /** Babylon.js `scene.particleSystems` — registered Lite node-particle systems in scene order. */
5082
+ get particleSystems() {
5083
+ if (this._disposed) return this._particleSystems;
5084
+ for (const system of getParticleSystems(this._lite)) if (!this._retiredParticleSystems.has(system)) this._wrapParticleSystem(system);
5085
+ return this._particleSystems;
5086
+ }
5087
+ _engine;
5088
+ _activeCamera = null;
5089
+ cameraToUseForPointers = null;
5090
+ /** Babylon.js `scene.pointerX` / `pointerY`: the last pointer position in CSS pixels relative to the canvas. */
5091
+ pointerX = 0;
5092
+ pointerY = 0;
5093
+ _defaultMaterial = null;
5094
+ _fogMode = 0;
5095
+ _fogStart = 0;
5096
+ _fogEnd = 1e3;
5097
+ _fogDensity = .1;
5098
+ _fogColor = new Color3(.2, .2, .3);
5099
+ /**
5100
+ * @internal Mesh scene-adds deferred until the engine starts. Babylon Lite
5101
+ * locks a mesh into a render group (standard vs PBR) at `addToScene` time by
5102
+ * reading its material, whereas Babylon.js code routinely creates a mesh and
5103
+ * assigns `mesh.material` a line later. Deferring the add until engine start
5104
+ * lets those assignments settle so the mesh lands in the correct group.
4794
5105
  */
4795
5106
  _pendingAdds = [];
4796
5107
  _started = false;
@@ -4803,12 +5114,19 @@ var Scene = class Scene extends AbstractScene {
4803
5114
  _pendingTextures = [];
4804
5115
  _pendingGroundBakes = [];
4805
5116
  _pendingMorphBuilds = [];
5117
+ _ownedMorphTargetManagers = /* @__PURE__ */ new Set();
4806
5118
  _materialPluginsRequested = false;
4807
5119
  _pendingMaterialPluginReconciliations = /* @__PURE__ */ new Set();
4808
5120
  _runningAnimatables = [];
4809
5121
  /** @internal Lite manager that owns supported compat property animations. */
4810
5122
  _propertyAnimationManager = null;
4811
5123
  _animationGroupCache = /* @__PURE__ */ new WeakMap();
5124
+ _skeletonCache = /* @__PURE__ */ new Map();
5125
+ _skeletons = [];
5126
+ _particleSystemCache = /* @__PURE__ */ new Map();
5127
+ _particleSystems = [];
5128
+ _retiredParticleSystems = /* @__PURE__ */ new Set();
5129
+ _disposed = false;
4812
5130
  /** @internal Structural `AnimationGroup`s stepped + weight-blended each frame. */
4813
5131
  _structuralGroups = [];
4814
5132
  /** @internal Lite manager that weight/additive-blends loaded glTF groups (lazily created). */
@@ -5008,15 +5326,65 @@ var Scene = class Scene extends AbstractScene {
5008
5326
  * builders / `VertexData.applyToMesh`) exists when per-target deltas are computed.
5009
5327
  */
5010
5328
  _registerMorphTargetManager(mesh, manager) {
5011
- this._pendingMorphBuilds.push({
5329
+ const index = this._pendingMorphBuilds.findIndex((pending) => pending.mesh === mesh);
5330
+ if (index !== -1) this._pendingMorphBuilds.splice(index, 1);
5331
+ if (manager) this._pendingMorphBuilds.push({
5012
5332
  mesh,
5013
5333
  manager
5014
5334
  });
5015
5335
  }
5336
+ /** @internal Retain manager-wrapper ownership until scene teardown, independently of mesh lifetime. */
5337
+ _retainMorphTargetManagerOwnership(manager) {
5338
+ this._ownedMorphTargetManagers.add(manager);
5339
+ }
5340
+ /** @internal Return the Lite engine used to update loader-produced resources. */
5341
+ _getLiteEngine() {
5342
+ return this._engine._lite;
5343
+ }
5344
+ /** @internal Return the canonical compat wrapper for a loader-produced skeleton. */
5345
+ _wrapSkeleton(lite, preferred) {
5346
+ let wrapper = this._skeletonCache.get(lite);
5347
+ if (!wrapper) {
5348
+ wrapper = preferred ?? Skeleton._fromLite(lite, this._skeletonCache.size);
5349
+ this._skeletonCache.set(lite, wrapper);
5350
+ this._skeletons.push(wrapper);
5351
+ }
5352
+ return wrapper;
5353
+ }
5354
+ /** @internal Remove a disposed asset-container skeleton from the scene collection. */
5355
+ _unregisterSkeleton(lite) {
5356
+ const wrapper = this._skeletonCache.get(lite);
5357
+ if (wrapper) {
5358
+ this._skeletonCache.delete(lite);
5359
+ const index = this._skeletons.indexOf(wrapper);
5360
+ if (index !== -1) this._skeletons.splice(index, 1);
5361
+ }
5362
+ }
5363
+ /** @internal Return the canonical compat wrapper for a registered Lite particle system. */
5364
+ _wrapParticleSystem(lite) {
5365
+ if (this._disposed) return ParticleSystem._fromLite(lite, this);
5366
+ let wrapper = this._particleSystemCache.get(lite);
5367
+ if (!wrapper) {
5368
+ wrapper = ParticleSystem._fromLite(lite, this);
5369
+ this._particleSystemCache.set(lite, wrapper);
5370
+ this._particleSystems.push(wrapper);
5371
+ }
5372
+ return wrapper;
5373
+ }
5374
+ /** @internal Remove a disposed particle system from the Babylon.js scene collection. */
5375
+ _unregisterParticleSystem(lite) {
5376
+ this._retiredParticleSystems.add(lite);
5377
+ const wrapper = this._particleSystemCache.get(lite);
5378
+ if (wrapper) {
5379
+ this._particleSystemCache.delete(lite);
5380
+ const index = this._particleSystems.indexOf(wrapper);
5381
+ if (index !== -1) this._particleSystems.splice(index, 1);
5382
+ }
5383
+ }
5016
5384
  /** @internal Build all registered morph-target managers. Called by the engine before registration. */
5017
5385
  _buildMorphTargets() {
5018
5386
  const engine = this._engine._lite;
5019
- for (const { mesh, manager } of this._pendingMorphBuilds) manager._build(mesh, engine);
5387
+ for (const { mesh, manager } of this._pendingMorphBuilds) if (mesh.morphTargetManager === manager) manager._build(mesh, engine);
5020
5388
  this._pendingMorphBuilds.length = 0;
5021
5389
  }
5022
5390
  /**
@@ -5624,6 +5992,8 @@ var Scene = class Scene extends AbstractScene {
5624
5992
  for (const running of this._runningAnimatables.slice()) if (running._animates(target)) running.stop();
5625
5993
  }
5626
5994
  dispose() {
5995
+ if (this._disposed) return;
5996
+ this._disposed = true;
5627
5997
  let hasError = false;
5628
5998
  let firstError;
5629
5999
  const runCleanup = (cleanup) => {
@@ -5648,6 +6018,14 @@ var Scene = class Scene extends AbstractScene {
5648
6018
  if (this._propertyAnimationManager) runCleanup(() => clearAnimationManager(this._propertyAnimationManager));
5649
6019
  if (this._blendManager) runCleanup(() => clearAnimationManager(this._blendManager));
5650
6020
  this._runningAnimatables.length = 0;
6021
+ runCleanup(() => this._skeletons.splice(0));
6022
+ runCleanup(() => this._skeletonCache.clear());
6023
+ runCleanup(() => this._particleSystems.splice(0));
6024
+ runCleanup(() => this._particleSystemCache.clear());
6025
+ runCleanup(() => this._retiredParticleSystems.clear());
6026
+ runCleanup(() => this._pendingMorphBuilds.splice(0));
6027
+ for (const manager of this._ownedMorphTargetManagers) runCleanup(() => manager.dispose());
6028
+ this._ownedMorphTargetManagers.clear();
5651
6029
  runCleanup(() => disposeScene(this._lite));
5652
6030
  if (hasError) throw firstError;
5653
6031
  }
@@ -7413,113 +7791,6 @@ var MeshoptCompression = class MeshoptCompression {
7413
7791
  return MeshoptCompression._default;
7414
7792
  }
7415
7793
  };
7416
- // src/morph/morph.ts
7417
- /**
7418
- * Babylon.js-compatible `MorphTarget` / `MorphTargetManager` over the Babylon
7419
- * Lite native morph API (`createMorphTargets` / `setMorphTargetWeights`).
7420
- *
7421
- * Babylon.js morph targets carry **absolute** vertex positions/normals
7422
- * (`target.setPositions(abs)`); Babylon Lite's `createMorphTargets` consumes
7423
- * per-target **deltas** (target − base). The manager defers building the Lite
7424
- * morph until engine start (when the owning mesh's base CPU geometry exists),
7425
- * computes the deltas, and assigns the resulting `MorphTargetData` onto the
7426
- * Lite mesh so the Standard/NME pipelines sample it. Weight changes
7427
- * (`target.influence = …`) re-upload via `setMorphTargetWeights`.
7428
- */
7429
- /** Babylon.js `MorphTarget` — a single named morph influence with absolute target geometry. */
7430
- var MorphTarget = class {
7431
- name;
7432
- /** @internal Absolute target positions (Babylon.js `setPositions`). */
7433
- _positions = null;
7434
- /** @internal Absolute target normals (Babylon.js `setNormals`). */
7435
- _normals = null;
7436
- /** @internal Owning manager, set on `addTarget`, used to push weight updates. */
7437
- _manager;
7438
- _influence;
7439
- constructor(name, influence = 0, _scene) {
7440
- this.name = name;
7441
- this._influence = influence;
7442
- }
7443
- get influence() {
7444
- return this._influence;
7445
- }
7446
- set influence(value) {
7447
- this._influence = value;
7448
- this._manager?._syncWeights();
7449
- }
7450
- /** Babylon.js `MorphTarget.setPositions(data)` — absolute target positions. */
7451
- setPositions(data) {
7452
- this._positions = data ? data instanceof Float32Array ? data : Float32Array.from(data) : null;
7453
- }
7454
- /** Babylon.js `MorphTarget.getPositions()`. */
7455
- getPositions() {
7456
- return this._positions;
7457
- }
7458
- /** Babylon.js `MorphTarget.setNormals(data)` — absolute target normals. */
7459
- setNormals(data) {
7460
- this._normals = data ? data instanceof Float32Array ? data : Float32Array.from(data) : null;
7461
- }
7462
- /** Babylon.js `MorphTarget.getNormals()`. */
7463
- getNormals() {
7464
- return this._normals;
7465
- }
7466
- };
7467
- /** Babylon.js `MorphTargetManager` — owns a mesh's morph targets (Babylon Lite supports up to 4). */
7468
- var MorphTargetManager = class {
7469
- /** @internal */
7470
- _engine;
7471
- /** @internal Built Lite morph data (created at engine start). */
7472
- _lite;
7473
- _targets = [];
7474
- constructor(_scene) {}
7475
- get numTargets() {
7476
- return this._targets.length;
7477
- }
7478
- getTarget(index) {
7479
- return this._targets[index];
7480
- }
7481
- /** Babylon.js `MorphTargetManager.addTarget(target)`. */
7482
- addTarget(target) {
7483
- target._manager = this;
7484
- this._targets.push(target);
7485
- }
7486
- /**
7487
- * @internal Build the Lite morph data from the mesh's base CPU geometry and
7488
- * each target's absolute positions/normals (converted to deltas), then assign
7489
- * it onto the Lite mesh. Called by the engine at start, once geometry exists.
7490
- */
7491
- _build(mesh, engine) {
7492
- const lite = mesh._lite;
7493
- const base = lite._cpuPositions;
7494
- if (!base) return;
7495
- this._engine = engine;
7496
- const vertexCount = base.length / 3;
7497
- const baseNormals = lite._cpuNormals;
7498
- const targets = this._targets.slice(0, 4).map((t) => {
7499
- const abs = t._positions;
7500
- const positions = new Float32Array(base.length);
7501
- if (abs) for (let i = 0; i < base.length; i++) positions[i] = (abs[i] ?? 0) - base[i];
7502
- let normals = null;
7503
- if (t._normals && baseNormals) {
7504
- normals = new Float32Array(baseNormals.length);
7505
- for (let i = 0; i < baseNormals.length; i++) normals[i] = (t._normals[i] ?? 0) - baseNormals[i];
7506
- }
7507
- return {
7508
- positions,
7509
- normals
7510
- };
7511
- });
7512
- const weights = this._targets.slice(0, 4).map((t) => t.influence);
7513
- this._lite = createMorphTargets(engine, targets, vertexCount, weights);
7514
- lite.morphTargets = this._lite;
7515
- }
7516
- /** @internal Re-upload current target influences to the GPU weights buffer. */
7517
- _syncWeights() {
7518
- if (!this._lite || !this._engine) return;
7519
- const weights = this._targets.slice(0, 4).map((t) => t.influence);
7520
- setMorphTargetWeights(this._engine, this._lite, weights);
7521
- }
7522
- };
7523
7794
  // src/meshes/gaussian-splatting.ts
7524
7795
  /**
7525
7796
  * Babylon.js-compatible `GaussianSplattingMesh` over Babylon Lite's splat loaders.
@@ -7579,6 +7850,14 @@ function mirrorSplatRowY(buffer) {
7579
7850
  * cloud's `position` / `rotation` / `scaling` proxy onto the Lite splat node.
7580
7851
  */
7581
7852
  var GaussianSplattingMesh = class GaussianSplattingMesh extends TransformNode {
7853
+ static _useGpuSort = false;
7854
+ static GpuSortMinFrameInterval = 1;
7855
+ static get UseGpuSort() {
7856
+ return this._useGpuSort;
7857
+ }
7858
+ static set UseGpuSort(value) {
7859
+ this._useGpuSort = value;
7860
+ }
7582
7861
  /** @internal The loaded Lite splat node (undefined until `loadFileAsync` resolves). */
7583
7862
  _gs;
7584
7863
  /** @internal The constructor's deferred URL, loaded by `loadFileAsync()` with no argument. */
@@ -7597,6 +7876,13 @@ var GaussianSplattingMesh = class GaussianSplattingMesh extends TransformNode {
7597
7876
  _pointSplattingRenderMode = false;
7598
7877
  /** @internal Requested BJS depth-pass ownership, retained before the splat loads. */
7599
7878
  _pointSplattingDepthRenderMode = false;
7879
+ _useGpuSort = null;
7880
+ get useGpuSort() {
7881
+ return this._useGpuSort;
7882
+ }
7883
+ set useGpuSort(value) {
7884
+ this._useGpuSort = value;
7885
+ }
7600
7886
  /**
7601
7887
  * Babylon.js `gs.safeOrbitCameraLimits` — safe-orbit camera limits parsed from the source
7602
7888
  * file's metadata (Adobe safe-orbit extension), or `null` when the file carries none.
@@ -7799,6 +8085,99 @@ var GaussianSplattingMesh = class GaussianSplattingMesh extends TransformNode {
7799
8085
  super._disposeSelf(doNotRecurse);
7800
8086
  }
7801
8087
  };
8088
+ // src/meshes/gaussian-splatting-gpu-sorter.ts
8089
+ var GPU_SORT_UNSUPPORTED = "Babylon Lite exposes no public GPU splat-sort source/output lifecycle. Its ordinary splat sorter is worker-owned and its streaming radix sorter is internal to the streaming subsystem, so adapting this API requires a Lite-owned resource and scheduling design.";
8090
+ function _ClampGpuSortKeyBits(keyBits) {
8091
+ return clampGaussianSplattingGpuSortKeyBits(keyBits);
8092
+ }
8093
+ function _GetGpuSortPassCount(keyBits) {
8094
+ return getGaussianSplattingGpuSortPassCount(keyBits);
8095
+ }
8096
+ function _GetGpuSortPaddedCount(activeCount) {
8097
+ return getGaussianSplattingGpuSortPaddedCount(activeCount);
8098
+ }
8099
+ function _PackGpuSortIntervals(intervals, vertexCount) {
8100
+ return packGaussianSplattingGpuSortIntervals(intervals, vertexCount);
8101
+ }
8102
+ function _ComputeGpuSortDepthCoefficients(_world, _view, _depthSign, _cameraPosition, _out, _offset, _worldOffset = 0) {
8103
+ computeGaussianSplattingGpuSortDepthCoefficients(_world, _view, _depthSign, _cameraPosition, _out, _offset, _worldOffset);
8104
+ }
8105
+ function _ComputeGpuSortDepthRange(_coefficients, _setCount, _boundsMin, _boundsMax, _result = {
8106
+ min: 0,
8107
+ max: 0
8108
+ }) {
8109
+ return computeGaussianSplattingGpuSortDepthRange(_coefficients, _setCount, _boundsMin, _boundsMax, _result);
8110
+ }
8111
+ function _ComputeGpuSortKeyScale(depthMin, depthMax, keyBits) {
8112
+ return computeGaussianSplattingGpuSortKeyScale(depthMin, depthMax, keyBits);
8113
+ }
8114
+ function _DecodeGpuSortSogMean(value) {
8115
+ return decodeGaussianSplattingGpuSortSogMean(value);
8116
+ }
8117
+ function GetGaussianSplattingGpuSorterMaxSplatCount(engine) {
8118
+ const limits = engine._lite?._device?.limits;
8119
+ return getGaussianSplattingGpuSorterMaxSplatCount(limits?.maxStorageBufferBindingSize, limits?.maxBufferSize);
8120
+ }
8121
+ var GaussianSplattingGpuSortOutput = class {
8122
+ constructor(_engine, _label) {
8123
+ unsupported("GaussianSplattingGpuSortOutput", GPU_SORT_UNSUPPORTED);
8124
+ }
8125
+ get buffer() {
8126
+ return null;
8127
+ }
8128
+ get vertexBuffers() {
8129
+ return [];
8130
+ }
8131
+ get paddedCount() {
8132
+ return 0;
8133
+ }
8134
+ get instanceCount() {
8135
+ return 0;
8136
+ }
8137
+ get buffersVersion() {
8138
+ return 0;
8139
+ }
8140
+ dispose() {}
8141
+ };
8142
+ var GaussianSplattingGpuSorter = class {
8143
+ static IsSupported(_engine) {
8144
+ return false;
8145
+ }
8146
+ static GetMaxSupportedSplatCount(_engine) {
8147
+ return GetGaussianSplattingGpuSorterMaxSplatCount(_engine);
8148
+ }
8149
+ static async LoadDependenciesAsync() {
8150
+ return unsupported("GaussianSplattingGpuSorter.LoadDependenciesAsync", GPU_SORT_UNSUPPORTED);
8151
+ }
8152
+ constructor(_engine, _name = "GaussianSplattingGpuSorter", _keyBits = 16) {
8153
+ unsupported("GaussianSplattingGpuSorter", GPU_SORT_UNSUPPORTED);
8154
+ }
8155
+ get activeCount() {
8156
+ return 0;
8157
+ }
8158
+ get paddedCount() {
8159
+ return 0;
8160
+ }
8161
+ get keyBits() {
8162
+ return 16;
8163
+ }
8164
+ setSource(_source) {
8165
+ return unsupported("GaussianSplattingGpuSorter.setSource", GPU_SORT_UNSUPPORTED);
8166
+ }
8167
+ setPartMatrices(_matrices) {
8168
+ return unsupported("GaussianSplattingGpuSorter.setPartMatrices", GPU_SORT_UNSUPPORTED);
8169
+ }
8170
+ setIntervals(_intervals) {
8171
+ return unsupported("GaussianSplattingGpuSorter.setIntervals", GPU_SORT_UNSUPPORTED);
8172
+ }
8173
+ createOutput() {
8174
+ return unsupported("GaussianSplattingGpuSorter.createOutput", GPU_SORT_UNSUPPORTED);
8175
+ }
8176
+ sort(_output, _worldMatrix, _viewMatrix, _options) {
8177
+ return unsupported("GaussianSplattingGpuSorter.sort", GPU_SORT_UNSUPPORTED);
8178
+ }
8179
+ dispose() {}
8180
+ };
7802
8181
  // src/meshes/mesh-blending.ts
7803
8182
  var MeshBlendingRadiusClass = /* @__PURE__ */ function(MeshBlendingRadiusClass) {
7804
8183
  MeshBlendingRadiusClass[MeshBlendingRadiusClass["Small"] = 0] = "Small";
@@ -7901,6 +8280,89 @@ var ExternalTexture = class {
7901
8280
  }
7902
8281
  dispose() {}
7903
8282
  };
8283
+ // src/textures/texture-processing.ts
8284
+ var TEXTURE_PROCESSING_UNSUPPORTED = "Textured operands require Babylon.js's procedural texture processor/merger, render-target allocation, color-space conversion, UV-transform reconciliation, and intermediate-texture disposal lifecycle. Babylon Lite exposes no public general texture-processing contract to adapt.";
8285
+ var TextureColorSpace = /* @__PURE__ */ function(TextureColorSpace) {
8286
+ TextureColorSpace[TextureColorSpace["Linear"] = 0] = "Linear";
8287
+ TextureColorSpace[TextureColorSpace["SRGB"] = 1] = "SRGB";
8288
+ return TextureColorSpace;
8289
+ }({});
8290
+ var ChannelMask = /* @__PURE__ */ function(ChannelMask) {
8291
+ ChannelMask[ChannelMask["R"] = 1] = "R";
8292
+ ChannelMask[ChannelMask["G"] = 2] = "G";
8293
+ ChannelMask[ChannelMask["B"] = 4] = "B";
8294
+ ChannelMask[ChannelMask["A"] = 8] = "A";
8295
+ ChannelMask[ChannelMask["RGB"] = 7] = "RGB";
8296
+ ChannelMask[ChannelMask["RGBA"] = 15] = "RGBA";
8297
+ return ChannelMask;
8298
+ }({});
8299
+ var TextureChannel = /* @__PURE__ */ function(TextureChannel) {
8300
+ TextureChannel[TextureChannel["RGBA"] = 0] = "RGBA";
8301
+ TextureChannel[TextureChannel["R"] = 1] = "R";
8302
+ TextureChannel[TextureChannel["G"] = 2] = "G";
8303
+ TextureChannel[TextureChannel["B"] = 3] = "B";
8304
+ TextureChannel[TextureChannel["A"] = 4] = "A";
8305
+ return TextureChannel;
8306
+ }({});
8307
+ function tuple(color) {
8308
+ return [
8309
+ color.r,
8310
+ color.g,
8311
+ color.b,
8312
+ color.a
8313
+ ];
8314
+ }
8315
+ function color(values) {
8316
+ return new Color4(values[0], values[1], values[2], values[3]);
8317
+ }
8318
+ function factor(operand) {
8319
+ return operand.factor ?? new Color4(1, 1, 1, 1);
8320
+ }
8321
+ function applyMask(value, mask) {
8322
+ if (mask === void 0) return value;
8323
+ return new Color4(mask & 1 ? value.r : 0, mask & 2 ? value.g : 0, mask & 4 ? value.b : 0, mask & 8 ? value.a : 1);
8324
+ }
8325
+ function constantResult(value, mask) {
8326
+ return {
8327
+ texture: null,
8328
+ factor: applyMask(value, mask)
8329
+ };
8330
+ }
8331
+ function requireConstants(name, operands) {
8332
+ if (operands.some((operand) => operand.texture)) unsupported(name, TEXTURE_PROCESSING_UNSUPPORTED);
8333
+ }
8334
+ async function DivideTexturesAsync(_name, a, b, _scene, _outputColorSpace, outputChannelMask, _outputOptions) {
8335
+ requireConstants("DivideTexturesAsync", [a, b]);
8336
+ return constantResult(color(divideTextureProcessConstants(tuple(factor(a)), tuple(factor(b)))), outputChannelMask);
8337
+ }
8338
+ async function TransmissionFractionAsync(_name, a, b, _scene, _outputColorSpace, outputChannelMask, _outputOptions) {
8339
+ requireConstants("TransmissionFractionAsync", [a, b]);
8340
+ return constantResult(color(transmissionFractionConstants(tuple(factor(a)), tuple(factor(b)))), outputChannelMask);
8341
+ }
8342
+ async function TransmissionScatterToSingleScatterAlbedoAsync(_name, transmissionColor, transmissionScatter, _scene, _outputColorSpace, outputChannelMask, _outputOptions) {
8343
+ requireConstants("TransmissionScatterToSingleScatterAlbedoAsync", [transmissionColor, transmissionScatter]);
8344
+ return constantResult(color(transmissionScatterToSingleScatterAlbedoConstants(tuple(factor(transmissionColor)), tuple(factor(transmissionScatter)))), outputChannelMask);
8345
+ }
8346
+ async function MultiScatterToSingleScatterAlbedoAsync(_name, input, _scene, aniso = 0, scale) {
8347
+ requireConstants("MultiScatterToSingleScatterAlbedoAsync", scale ? [input, scale] : [input]);
8348
+ const inputFactor = factor(input);
8349
+ const scaled = scale ? new Color4(inputFactor.r * factor(scale).r, inputFactor.g * factor(scale).g, inputFactor.b * factor(scale).b, inputFactor.a * factor(scale).a) : inputFactor;
8350
+ return constantResult(color(multiScatterToSingleScatterAlbedoConstants(tuple(scaled), aniso)));
8351
+ }
8352
+ async function SingleScatterToMultiScatterAlbedoAsync(_name, input, _scene, aniso = 0, _outputOptions) {
8353
+ requireConstants("SingleScatterToMultiScatterAlbedoAsync", [input]);
8354
+ return constantResult(color(singleScatterToMultiScatterAlbedoConstants(tuple(factor(input)), aniso)));
8355
+ }
8356
+ async function ThinWalledScatterWeightsAsync(_name, transmission, scatter, _scene) {
8357
+ requireConstants("ThinWalledScatterWeightsAsync", [transmission, scatter]);
8358
+ const weights = thinWalledScatterWeightConstants(factor(transmission).r, factor(scatter).r);
8359
+ transmission.dispose?.();
8360
+ scatter.dispose?.();
8361
+ return {
8362
+ transmission: constantResult(new Color4(weights.transmission, weights.transmission, weights.transmission, weights.transmission)),
8363
+ subsurface: constantResult(new Color4(weights.subsurface, weights.subsurface, weights.subsurface, weights.subsurface))
8364
+ };
8365
+ }
7904
8366
  // src/textures/raw-texture-2d-array.ts
7905
8367
  /**
7906
8368
  * Babylon.js-compatible 2D **texture array** wrappers over Babylon Lite's
@@ -8027,182 +8489,89 @@ async function CreateTexture2DArrayFromKTX2Async(scene, data, options) {
8027
8489
  const nearest = samplingMode === Constants.TEXTURE_NEAREST_SAMPLINGMODE;
8028
8490
  const bilinear = samplingMode === Constants.TEXTURE_BILINEAR_SAMPLINGMODE;
8029
8491
  const liteArray = await createTexture2DArrayFromKtx2(scene.getEngine()._lite, buffer, {
8030
- generateMipMaps: options?.generateMipMaps ?? true,
8031
- invertY: options?.invertY ?? false,
8032
- minFilter: nearest ? "nearest" : "linear",
8033
- magFilter: nearest ? "nearest" : "linear",
8034
- mipmapFilter: nearest || bilinear ? "nearest" : "linear"
8035
- });
8036
- return RawTexture2DArray._fromLite(liteArray, Constants.TEXTUREFORMAT_RGBA, scene);
8037
- }
8038
- /** @internal Resolve the live Lite array handle a compat texture wraps. */
8039
- function liteArrayOf(texture) {
8040
- const array = texture.getInternalTexture();
8041
- if (!array) throw new Error("Cannot upload to a 2D array texture that has no internal texture.");
8042
- return array;
8043
- }
8044
- /**
8045
- * Babylon.js `UploadImageToTexture2DArrayLayer` — upload a decoded image source
8046
- * into one layer of a texture array. Routes through the engine's
8047
- * `updateTextureArrayLayerFromImageSource` (as Babylon.js does), which forwards to
8048
- * Lite's `uploadImageToArrayLayer`.
8049
- */
8050
- function UploadImageToTexture2DArrayLayer(texture, source, layer, options) {
8051
- const array = liteArrayOf(texture);
8052
- if (!Number.isInteger(layer) || layer < 0 || layer >= texture.depth) throw new Error(`Layer ${layer} is out of range for a 2D array texture with ${texture.depth} layers.`);
8053
- texture.getScene().getEngine().updateTextureArrayLayerFromImageSource(array, source, layer, options?.invertY ?? false, options?.premultiplyAlpha ?? false);
8054
- }
8055
- /**
8056
- * Babylon.js `LoadImageToTexture2DArrayLayerAsync` — fetch/decode an image URL and
8057
- * upload it into one layer. Forwards to Lite's `loadImageToArrayLayer`.
8058
- */
8059
- async function LoadImageToTexture2DArrayLayerAsync(texture, url, layer, options) {
8060
- const array = liteArrayOf(texture);
8061
- await loadImageToArrayLayer(texture.getScene().getEngine()._lite, array, layer, url, {
8062
- invertY: options?.invertY ?? false,
8063
- premultiplyAlpha: options?.premultiplyAlpha ?? false
8064
- });
8065
- }
8066
- /**
8067
- * Babylon.js `CreateTexture2DArrayFromImageUrlsAsync` — create a texture array and
8068
- * fill each layer from a list of image URLs. Forwards to Lite's
8069
- * `createTexture2DArrayFromUrls`, then wraps the result in a `RawTexture2DArray`.
8070
- *
8071
- * Lite's per-layer upload defaults to `invertY = true` (the Babylon.js *material*
8072
- * convention); the Babylon.js helper defaults to `false`, so the flag is always
8073
- * passed explicitly rather than left to the Lite default.
8074
- */
8075
- async function CreateTexture2DArrayFromImageUrlsAsync(scene, urls, options) {
8076
- const liteArray = await createTexture2DArrayFromUrls(scene.getEngine()._lite, urls, {
8077
- mipMaps: options?.generateMipMaps ?? true,
8078
- invertY: options?.invertY ?? false,
8079
- premultiplyAlpha: options?.premultiplyAlpha ?? false
8080
- });
8081
- return RawTexture2DArray._fromLite(liteArray, Constants.TEXTUREFORMAT_RGBA, scene);
8082
- }
8083
- // src/loading/loaded-mesh.ts
8084
- /**
8085
- * Wrap every node a loaded Babylon Lite asset container exposes as a canonical
8086
- * compat `Mesh`, reusing the cached wrapper for a node when one already exists (so
8087
- * repeated reads return identical handles). When a `scene` is supplied, each
8088
- * wrapper is bound to it (surfaced through `scene.meshes` and given scene-aware
8089
- * disposal).
8090
- *
8091
- * Babylon.js places a synthetic `__root__` transform node at `result.meshes[0]`
8092
- * (the renderable meshes follow it). Babylon Lite builds the same root
8093
- * (`entities[0]` for glTF) but `getContainerMeshes` returns only renderable
8094
- * meshes, so we prepend that root at index 0 to mirror Babylon.js — as a real,
8095
- * non-renderable `Mesh`, exactly as Babylon.js's `__root__` is a `Mesh`.
8096
- */
8097
- function collectLoadedMeshes(container, registry, scene) {
8098
- const result = [];
8099
- const visited = /* @__PURE__ */ new Set();
8100
- const visit = (node, parent) => {
8101
- if (visited.has(node)) return;
8102
- const lite = node;
8103
- if (!lite._gpu && !Array.isArray(lite.children)) return;
8104
- visited.add(node);
8105
- let wrapper = registry.get(node);
8106
- if (!wrapper || scene && wrapper.getScene() !== scene) wrapper = Mesh._fromLiteHierarchy(node, container, scene, registry, parent);
8107
- result.push(wrapper);
8108
- for (const child of lite.children ?? []) visit(child, wrapper);
8109
- };
8110
- for (const entity of container.entities) visit(entity, null);
8111
- return result;
8112
- }
8113
- // src/bones/skeleton.ts
8114
- var Skeleton = class Skeleton {
8115
- name;
8116
- id;
8117
- bones;
8118
- /** @internal Underlying loader-produced Babylon Lite skeleton. */
8119
- _lite;
8120
- constructor(_name, _id, _scene) {
8121
- return unsupported("Skeleton", "Babylon Lite exposes loader-produced skeletons but has no public API for manually constructing a skeleton. Load a skinned glTF and use the returned skeleton.");
8122
- }
8123
- /** @internal Wrap a loader-produced Babylon Lite skeleton. */
8124
- static _fromLite(lite, index) {
8125
- const skeleton = Object.create(Skeleton.prototype);
8126
- Object.defineProperties(skeleton, {
8127
- name: {
8128
- value: `skeleton${index}`,
8129
- enumerable: true
8130
- },
8131
- id: {
8132
- value: `skeleton${index}`,
8133
- enumerable: true
8134
- },
8135
- _lite: { value: lite },
8136
- bones: { value: lite.bones.map((bone) => Bone._fromLite(bone, skeleton)) }
8137
- });
8138
- return skeleton;
8139
- }
8140
- getBoneIndexByName(name) {
8141
- const bone = getBoneByName(this._lite, name);
8142
- return bone ? this._lite.bones.indexOf(bone) : -1;
8143
- }
8144
- getBoneByName(name) {
8145
- const index = this.getBoneIndexByName(name);
8146
- return index < 0 ? null : this.bones[index];
8147
- }
8148
- };
8149
- var Bone = class Bone {
8150
- _enabled = true;
8151
- name;
8152
- /** @internal Underlying loader-produced Babylon Lite bone. */
8153
- _lite;
8154
- /** @internal Owning compat skeleton. */
8155
- _skeleton;
8156
- constructor(_name, _skeleton) {
8157
- return unsupported("Bone", "Babylon Lite exposes loader-produced bones but has no public API for manually constructing a bone. Use Skeleton.bones from a loaded skinned glTF.");
8158
- }
8159
- /** @internal Wrap a loader-produced Babylon Lite bone. */
8160
- static _fromLite(lite, skeleton) {
8161
- const bone = Object.create(Bone.prototype);
8162
- Object.defineProperties(bone, {
8163
- name: {
8164
- value: lite.name,
8165
- enumerable: true
8166
- },
8167
- _lite: { value: lite },
8168
- _skeleton: { value: skeleton },
8169
- _enabled: {
8170
- value: true,
8171
- writable: true
8172
- }
8173
- });
8174
- return bone;
8175
- }
8176
- getName() {
8177
- return this.name;
8178
- }
8179
- getSkeleton() {
8180
- return this._skeleton;
8181
- }
8182
- setPosition(position, space = 0) {
8183
- if (space !== 0) return unsupported("Bone.setPosition", "Babylon Lite's bone-control API currently exposes local-space position overrides only.");
8184
- setBonePosition(this._skeleton._lite, this._lite, position.x, position.y, position.z);
8185
- return this;
8186
- }
8187
- setRotationQuaternion(rotation, space = 0) {
8188
- if (space !== 0) return unsupported("Bone.setRotationQuaternion", "Babylon Lite's bone-control API currently exposes local-space rotation overrides only.");
8189
- setBoneRotationQuaternion(this._skeleton._lite, this._lite, rotation.x, rotation.y, rotation.z, rotation.w);
8190
- return this;
8191
- }
8192
- setScale(scale) {
8193
- setBoneScaling(this._skeleton._lite, this._lite, scale.x, scale.y, scale.z);
8194
- return this;
8195
- }
8196
- setEnabled(value) {
8197
- this._enabled = value;
8198
- }
8199
- isEnabled() {
8200
- return this._enabled;
8201
- }
8202
- returnToRest() {
8203
- clearBoneOverride(this._skeleton._lite, this._lite);
8204
- }
8205
- };
8492
+ generateMipMaps: options?.generateMipMaps ?? true,
8493
+ invertY: options?.invertY ?? false,
8494
+ minFilter: nearest ? "nearest" : "linear",
8495
+ magFilter: nearest ? "nearest" : "linear",
8496
+ mipmapFilter: nearest || bilinear ? "nearest" : "linear"
8497
+ });
8498
+ return RawTexture2DArray._fromLite(liteArray, Constants.TEXTUREFORMAT_RGBA, scene);
8499
+ }
8500
+ /** @internal Resolve the live Lite array handle a compat texture wraps. */
8501
+ function liteArrayOf(texture) {
8502
+ const array = texture.getInternalTexture();
8503
+ if (!array) throw new Error("Cannot upload to a 2D array texture that has no internal texture.");
8504
+ return array;
8505
+ }
8506
+ /**
8507
+ * Babylon.js `UploadImageToTexture2DArrayLayer` — upload a decoded image source
8508
+ * into one layer of a texture array. Routes through the engine's
8509
+ * `updateTextureArrayLayerFromImageSource` (as Babylon.js does), which forwards to
8510
+ * Lite's `uploadImageToArrayLayer`.
8511
+ */
8512
+ function UploadImageToTexture2DArrayLayer(texture, source, layer, options) {
8513
+ const array = liteArrayOf(texture);
8514
+ if (!Number.isInteger(layer) || layer < 0 || layer >= texture.depth) throw new Error(`Layer ${layer} is out of range for a 2D array texture with ${texture.depth} layers.`);
8515
+ texture.getScene().getEngine().updateTextureArrayLayerFromImageSource(array, source, layer, options?.invertY ?? false, options?.premultiplyAlpha ?? false);
8516
+ }
8517
+ /**
8518
+ * Babylon.js `LoadImageToTexture2DArrayLayerAsync` — fetch/decode an image URL and
8519
+ * upload it into one layer. Forwards to Lite's `loadImageToArrayLayer`.
8520
+ */
8521
+ async function LoadImageToTexture2DArrayLayerAsync(texture, url, layer, options) {
8522
+ const array = liteArrayOf(texture);
8523
+ await loadImageToArrayLayer(texture.getScene().getEngine()._lite, array, layer, url, {
8524
+ invertY: options?.invertY ?? false,
8525
+ premultiplyAlpha: options?.premultiplyAlpha ?? false
8526
+ });
8527
+ }
8528
+ /**
8529
+ * Babylon.js `CreateTexture2DArrayFromImageUrlsAsync` — create a texture array and
8530
+ * fill each layer from a list of image URLs. Forwards to Lite's
8531
+ * `createTexture2DArrayFromUrls`, then wraps the result in a `RawTexture2DArray`.
8532
+ *
8533
+ * Lite's per-layer upload defaults to `invertY = true` (the Babylon.js *material*
8534
+ * convention); the Babylon.js helper defaults to `false`, so the flag is always
8535
+ * passed explicitly rather than left to the Lite default.
8536
+ */
8537
+ async function CreateTexture2DArrayFromImageUrlsAsync(scene, urls, options) {
8538
+ const liteArray = await createTexture2DArrayFromUrls(scene.getEngine()._lite, urls, {
8539
+ mipMaps: options?.generateMipMaps ?? true,
8540
+ invertY: options?.invertY ?? false,
8541
+ premultiplyAlpha: options?.premultiplyAlpha ?? false
8542
+ });
8543
+ return RawTexture2DArray._fromLite(liteArray, Constants.TEXTUREFORMAT_RGBA, scene);
8544
+ }
8545
+ // src/loading/loaded-mesh.ts
8546
+ /**
8547
+ * Wrap every node a loaded Babylon Lite asset container exposes as a canonical
8548
+ * compat `Mesh`, reusing the cached wrapper for a node when one already exists (so
8549
+ * repeated reads return identical handles). When a `scene` is supplied, each
8550
+ * wrapper is bound to it (surfaced through `scene.meshes` and given scene-aware
8551
+ * disposal).
8552
+ *
8553
+ * Babylon.js places a synthetic `__root__` transform node at `result.meshes[0]`
8554
+ * (the renderable meshes follow it). Babylon Lite builds the same root
8555
+ * (`entities[0]` for glTF) but `getContainerMeshes` returns only renderable
8556
+ * meshes, so we prepend that root at index 0 to mirror Babylon.js — as a real,
8557
+ * non-renderable `Mesh`, exactly as Babylon.js's `__root__` is a `Mesh`.
8558
+ */
8559
+ function collectLoadedMeshes(container, registry, scene) {
8560
+ const result = [];
8561
+ const visited = /* @__PURE__ */ new Set();
8562
+ const visit = (node, parent) => {
8563
+ if (visited.has(node)) return;
8564
+ const lite = node;
8565
+ if (!lite._gpu && !Array.isArray(lite.children)) return;
8566
+ visited.add(node);
8567
+ let wrapper = registry.get(node);
8568
+ if (!wrapper || scene && wrapper.getScene() !== scene) wrapper = Mesh._fromLiteHierarchy(node, container, scene, registry, parent);
8569
+ result.push(wrapper);
8570
+ for (const child of lite.children ?? []) visit(child, wrapper);
8571
+ };
8572
+ for (const entity of container.entities) visit(entity, null);
8573
+ return result;
8574
+ }
8206
8575
  // src/loading/splat-file-loader.ts
8207
8576
  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.";
8208
8577
  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.";
@@ -8379,6 +8748,29 @@ function toLiteUsdOptions(options, signal, onProgress) {
8379
8748
  onLog: options.onLog
8380
8749
  };
8381
8750
  }
8751
+ // src/loading/khr-materials-scatter.ts
8752
+ var NAME = "KHR_materials_scatter";
8753
+ var BLOCKER = "KHR_materials_scatter requires OpenPBR scattering texture processing plus a screen-space subsurface-scattering prepass. Babylon Lite reserves scattering material state but does not implement that render subsystem.";
8754
+ var registered = false;
8755
+ var KHR_materials_scatter = class {
8756
+ name = NAME;
8757
+ enabled;
8758
+ order = 172;
8759
+ constructor(loader) {
8760
+ this.enabled = loader?.isExtensionUsed?.(this.name) ?? false;
8761
+ }
8762
+ dispose() {}
8763
+ loadMaterialPropertiesAsync(_context, material, _babylonMaterial) {
8764
+ if (!material.extensions?.[this.name]) return null;
8765
+ return unsupported("KHR_materials_scatter.loadMaterialPropertiesAsync", BLOCKER);
8766
+ }
8767
+ };
8768
+ function RegisterKHR_materials_scatter() {
8769
+ if (!registered) {
8770
+ registered = true;
8771
+ enableUnsupportedGltfMaterialExtension(NAME, () => unsupported("KHR_materials_scatter.loadMaterialPropertiesAsync", BLOCKER));
8772
+ }
8773
+ }
8382
8774
  // src/loading/scene-loader.ts
8383
8775
  /**
8384
8776
  * Babylon.js-compatible `SceneLoader` and `AssetContainer` over Babylon Lite's
@@ -8445,7 +8837,7 @@ var AssetContainer = class {
8445
8837
  return collectLoadedMeshes(this._lite, this._meshRegistry, this._scene);
8446
8838
  }
8447
8839
  get skeletons() {
8448
- return this._skeletons ??= (this._lite.skeletons ?? []).map((skeleton, index) => Skeleton._fromLite(skeleton, index));
8840
+ return this._skeletons ??= (this._lite.skeletons ?? []).map((skeleton, index) => this._scene?._wrapSkeleton(skeleton) ?? Skeleton._fromLite(skeleton, index));
8449
8841
  }
8450
8842
  /** Add every entity, animation group, camera, and clear colour to the scene. */
8451
8843
  addAllToScene(scene) {
@@ -8459,6 +8851,7 @@ var AssetContainer = class {
8459
8851
  this._sceneDisposeObserver = void 0;
8460
8852
  }
8461
8853
  this._scene = scene;
8854
+ for (const skeleton of this.skeletons) scene._wrapSkeleton(skeleton._lite, skeleton);
8462
8855
  if (this._dispose && !this._sceneDisposeObserver) this._sceneDisposeObserver = scene.onDisposeObservable.addOnce(() => {
8463
8856
  this._scene = void 0;
8464
8857
  this._sceneDisposeObserver = void 0;
@@ -8483,6 +8876,7 @@ var AssetContainer = class {
8483
8876
  }
8484
8877
  _detachFromScene(scene) {
8485
8878
  try {
8879
+ for (const skeleton of this._skeletons ?? []) scene._unregisterSkeleton(skeleton._lite);
8486
8880
  if (this._ownedMeshes) for (const mesh of this._ownedMeshes) setParent(mesh, null);
8487
8881
  removeFromScene(scene._lite, this._lite);
8488
8882
  if (this._ownedMeshes) for (const mesh of this._ownedMeshes) removeFromScene(scene._lite, mesh);
@@ -8498,6 +8892,7 @@ var AssetContainer = class {
8498
8892
  let hasError = false;
8499
8893
  let firstError;
8500
8894
  for (const wrapper of this._meshRegistry.values()) try {
8895
+ wrapper._releaseMorphTargetManagerOwnership();
8501
8896
  wrapper._disposeWrapperOnly();
8502
8897
  } catch (error) {
8503
8898
  if (!hasError) {
@@ -8538,7 +8933,9 @@ async function load(rootUrl, fileName, scene, usdOptions) {
8538
8933
  const engine = scene.getEngine()._lite;
8539
8934
  if (!isBabylonUrl(url) && !isUsdUrl(url)) enableBoneControlForSkinnedAssets();
8540
8935
  if (isUsdUrl(url)) return loadUsdContainer(engine, url, usdOptions);
8541
- return new AssetContainer(isBabylonUrl(url) ? await loadBabylon(engine, url) : await loadGltf(engine, url));
8936
+ if (isBabylonUrl(url)) return new AssetContainer(await loadBabylon(engine, url));
8937
+ RegisterKHR_materials_scatter();
8938
+ return new AssetContainer(await loadGltf(engine, url));
8542
8939
  }
8543
8940
  /** Babylon.js `SceneLoader` — async glTF/.babylon loading into a compat scene. */
8544
8941
  var SceneLoader = {
@@ -8618,7 +9015,9 @@ async function loadFromSource(source, scene, usdOptions, onProgress) {
8618
9015
  const engine = scene.getEngine()._lite;
8619
9016
  if (!isBabylonUrl(source) && !isUsdUrl(source)) enableBoneControlForSkinnedAssets();
8620
9017
  if (isUsdUrl(source)) return loadUsdContainer(engine, source, usdOptions, onProgress);
8621
- return new AssetContainer(isBabylonUrl(source) ? await loadBabylon(engine, source) : await loadGltf(engine, source));
9018
+ if (isBabylonUrl(source)) return new AssetContainer(await loadBabylon(engine, source));
9019
+ RegisterKHR_materials_scatter();
9020
+ return new AssetContainer(await loadGltf(engine, source));
8622
9021
  }
8623
9022
  async function loadUsdContainer(engine, source, options = {}, onProgress) {
8624
9023
  const lite = await loadUsd(engine, source, toLiteUsdOptions(resolveUsdOptions(options), void 0, onProgress));
@@ -13009,6 +13408,10 @@ function GetElementPixelFromUv() {
13009
13408
  function IsHtmlInCanvasSupportedNatively() {
13010
13409
  return unsupported("IsHtmlInCanvasSupportedNatively", "The HTML-in-canvas feature is not supported by Babylon Lite.");
13011
13410
  }
13411
+ /** Babylon.js internal polyfill-state query. Compat never installs the unsupported polyfill. */
13412
+ function _IsHtmlInCanvasPolyfillInstalled() {
13413
+ return false;
13414
+ }
13012
13415
  /** Babylon.js `InstallHtmlInCanvasPolyfill` — the HTML-in-canvas polyfill is unsupported by the compat layer. */
13013
13416
  function InstallHtmlInCanvasPolyfill() {
13014
13417
  return unsupported("InstallHtmlInCanvasPolyfill", "The HTML-in-canvas polyfill is not supported by Babylon Lite.");
@@ -13306,9 +13709,11 @@ var gltf2_exports = /* @__PURE__ */ __exportAll({
13306
13709
  KHRInteractivityExportError: () => KHRInteractivityExportError,
13307
13710
  KHRInteractivityExportPlan: () => KHRInteractivityExportPlan,
13308
13711
  KHR_INTERACTIVITY_SPECIFICATION_COMMIT: () => KHR_INTERACTIVITY_SPECIFICATION_COMMIT,
13712
+ KHR_materials_scatter: () => KHR_materials_scatter,
13309
13713
  NormalizeInteractivityEventDataConfiguration: () => NormalizeInteractivityEventDataConfiguration,
13310
13714
  OpenPBRMaterialLoadingAdapter: () => OpenPBRMaterialLoadingAdapter,
13311
13715
  ParseDebugLogTemplate: () => ParseDebugLogTemplate,
13716
+ RegisterKHR_materials_scatter: () => RegisterKHR_materials_scatter,
13312
13717
  SetInteractivityNodeState: () => SetInteractivityNodeState,
13313
13718
  _CaptureKHRInteractivityRuntimeInputDefaults: () => _CaptureKHRInteractivityRuntimeInputDefaults,
13314
13719
  _CreateKHRInteractivityRuntimeValueSnapshot: () => _CreateKHRInteractivityRuntimeValueSnapshot,
@@ -13795,172 +14200,6 @@ var SceneOptimizer = class {
13795
14200
  unsupported("SceneOptimizer", "Automatic scene optimisation is not implemented in the compat layer.");
13796
14201
  }
13797
14202
  };
13798
- // src/particles/particle-system.ts
13799
- /**
13800
- * Babylon.js-compatible `ParticleSystem` over Babylon Lite's data-oriented
13801
- * node-particle runtime.
13802
- *
13803
- * Babylon.js exposes `ParticleSystem` both as an **imperative constructor**
13804
- * (`new ParticleSystem(name, capacity, scene)` — emitters, over-lifetime
13805
- * gradients, `minEmitBox`) and as the **per-system handle** returned from a built
13806
- * Node Particle Editor graph (`NodeParticleSystemSet.buildAsync(scene).systems[i]`).
13807
- *
13808
- * Babylon Lite backs only the second shape: `buildNodeParticleSet` compiles a
13809
- * serialized graph into `NodeParticleSet.systems` (Lite `ParticleSystem` state
13810
- * objects), which the standalone functions `startParticleSystem` /
13811
- * `animateParticleSystem` / `stopParticleSystem` drive, and
13812
- * `createParticleBillboard` / `syncParticleBillboard` /
13813
- * `addFacingBillboardSystem` render as camera-facing billboards. So the compat
13814
- * wrapper's **runtime subset** (`start` / `animate` / `stop` / `updateSpeed` /
13815
- * `particleTexture` / `preWarmStepOffset`) forwards to those Lite functions,
13816
- * while the imperative constructor throws — there is no Lite graph to author.
13817
- *
13818
- * The instances handed back from {@link ParticleSystemSet.systems} are built via
13819
- * the `@internal` {@link ParticleSystem._fromLite} factory, which bypasses the
13820
- * throwing constructor (mirroring `AnimationGroup._fromLite`).
13821
- */
13822
- /**
13823
- * Babylon.js `ParticleSystem` — the built output of one NPE graph system. Backed
13824
- * by a Lite `ParticleSystem`; the deterministic prewarm-and-freeze pattern used by
13825
- * ported parity scenes (seed RNG → `start()` → N × `animate()` → `updateSpeed = 0`)
13826
- * maps directly onto Lite's `startParticleSystem` / `animateParticleSystem`, with a
13827
- * camera-facing billboard built and synced once the scene starts.
13828
- */
13829
- var ParticleSystem = class ParticleSystem {
13830
- name = "";
13831
- /** @internal The backing Lite particle system (null on a bare, unbuilt instance). */
13832
- _lite = null;
13833
- /** @internal The compat scene this system was built against. */
13834
- _scene = null;
13835
- /**
13836
- * Babylon.js `ParticleSystem.preWarmStepOffset` — the step ratio applied during
13837
- * prewarm cycles. Multiplies {@link updateSpeed} on every `animate(true)` call,
13838
- * matching Babylon.js (which uses `updateSpeed * preWarmStepOffset` while
13839
- * prewarming and the regular animation ratio otherwise).
13840
- */
13841
- preWarmStepOffset = 1;
13842
- _texture = null;
13843
- _billboardScheduled = false;
13844
- _billboardOwnedBySet = false;
13845
- /**
13846
- * Babylon.js `new ParticleSystem(name, capacity, scene)`. The imperative
13847
- * construction API (emitters, over-lifetime gradients, `minEmitBox`, a
13848
- * GPU-compute path) is not backed: Babylon Lite builds particle systems only
13849
- * from a serialized Node Particle Editor graph. Load a graph via
13850
- * `NodeParticleSystemSet.Parse` / `ParseFromSnippetAsync` → `buildAsync` and read
13851
- * its {@link ParticleSystemSet.systems} instead.
13852
- */
13853
- constructor() {
13854
- unsupported("ParticleSystem", "Babylon Lite builds particle systems only from a serialized Node Particle Editor graph, not the imperative classic `ParticleSystem` construction API (emitters, over-lifetime gradients, `minEmitBox`). Use `NodeParticleSystemSet.Parse`/`ParseFromSnippetAsync` → `buildAsync` and drive `set.systems[i]`.");
13855
- }
13856
- /**
13857
- * @internal Build a `ParticleSystem` backed by a Lite `ParticleSystem` produced
13858
- * by an NPE graph build. Bypasses the throwing public constructor.
13859
- */
13860
- static _fromLite(lite, scene) {
13861
- const system = Object.create(ParticleSystem.prototype);
13862
- system.name = "";
13863
- system._lite = lite;
13864
- system._scene = scene;
13865
- system.preWarmStepOffset = 1;
13866
- system._texture = null;
13867
- system._billboardScheduled = false;
13868
- system._billboardOwnedBySet = false;
13869
- return system;
13870
- }
13871
- getClassName() {
13872
- return "ParticleSystem";
13873
- }
13874
- /** Babylon.js `ParticleSystem.updateSpeed` — simulation advance per frame. Proxies the Lite system. */
13875
- get updateSpeed() {
13876
- return this._lite?.updateSpeed ?? 0;
13877
- }
13878
- set updateSpeed(value) {
13879
- if (this._lite) this._lite.updateSpeed = value;
13880
- }
13881
- /**
13882
- * Babylon.js `ParticleSystem.particleTexture` — the sprite texture. Recorded and
13883
- * bound onto the Lite system when the billboard is built at engine start (the
13884
- * compat `Texture` loads asynchronously, so its GPU handle is read after the
13885
- * scene's pending texture loads settle).
13886
- */
13887
- get particleTexture() {
13888
- return this._texture;
13889
- }
13890
- set particleTexture(value) {
13891
- this._texture = value;
13892
- }
13893
- /**
13894
- * Babylon.js `ParticleSystem.start()` — begin emission. Forwards to Lite
13895
- * `startParticleSystem` (which clears the stopped flag and resets the frame
13896
- * counter, so `start()` → `stop()` → `start()` resumes emission) and schedules
13897
- * the camera-facing billboard build for engine start. The billboard build is
13898
- * separately guarded, so it happens exactly once however often `start()` runs.
13899
- */
13900
- start() {
13901
- if (!this._lite) return;
13902
- startParticleSystem(this._lite);
13903
- this._scheduleBillboard();
13904
- }
13905
- /**
13906
- * Babylon.js `ParticleSystem.animate(preWarmOnly?)` — advance the simulation by
13907
- * one deterministic step. Forwards to Lite `animateParticleSystem` with Babylon.js's
13908
- * step ratio: {@link preWarmStepOffset} while prewarming, otherwise the ratio `1`
13909
- * used by the parity ports' seeded step loop.
13910
- */
13911
- animate(preWarmOnly = false) {
13912
- if (this._lite) animateParticleSystem(this._lite, preWarmOnly ? this.preWarmStepOffset : 1);
13913
- }
13914
- /** Babylon.js `ParticleSystem.stop()` — stop emission; live particles drain. Forwards to Lite `stopParticleSystem`. */
13915
- stop() {
13916
- if (this._lite) stopParticleSystem(this._lite);
13917
- }
13918
- /** Babylon.js `ParticleSystem.dispose()` — stop the system. */
13919
- dispose() {
13920
- this.stop();
13921
- }
13922
- /**
13923
- * @internal Bind the recorded {@link particleTexture}'s GPU handle onto the backing
13924
- * Lite system. Called from the deferred per-system billboard build and from
13925
- * {@link ParticleSystemSet.start} before set-level registration, so a
13926
- * wrapper-assigned texture wins over whatever the graph baked in. A no-op while
13927
- * the compat `Texture` is still loading (callers run after the scene's pending
13928
- * texture loads settle).
13929
- */
13930
- _bindTexture() {
13931
- const liteTexture = this._texture?._lite;
13932
- if (this._lite && liteTexture) this._lite.texture = liteTexture;
13933
- }
13934
- /**
13935
- * @internal Hand billboard rendering to the owning {@link ParticleSystemSet}: Lite's
13936
- * `registerNodeParticleSet` builds and per-frame syncs a billboard for every system
13937
- * in the set, so this wrapper's one-shot build must be skipped to avoid rendering
13938
- * the same particles twice.
13939
- */
13940
- _releaseBillboardToSet() {
13941
- this._billboardOwnedBySet = true;
13942
- }
13943
- /**
13944
- * Schedule the one-time billboard build. Deferred to engine start (via the
13945
- * scene's `_deferAdd`, which runs after pending texture loads settle), so the
13946
- * particle system is already prewarmed/frozen and its texture GPU handle is
13947
- * ready. Mirrors the native Lite port's build → sync → add sequence.
13948
- */
13949
- _scheduleBillboard() {
13950
- if (this._billboardScheduled || !this._scene || !this._lite) return;
13951
- this._billboardScheduled = true;
13952
- const scene = this._scene;
13953
- const lite = this._lite;
13954
- scene._deferAdd(() => {
13955
- if (this._billboardOwnedBySet) return;
13956
- this._bindTexture();
13957
- if (!lite.texture) return;
13958
- const billboard = createParticleBillboard(lite);
13959
- syncParticleBillboard(lite, billboard);
13960
- addFacingBillboardSystem(scene._lite, billboard);
13961
- });
13962
- }
13963
- };
13964
14203
  // src/particles/node-particle-system-set.ts
13965
14204
  /**
13966
14205
  * Babylon.js-compatible Node Particle Editor (NPE) surface over Babylon Lite's
@@ -14013,7 +14252,7 @@ var ParticleSystemSet = class {
14013
14252
  if (!this._systems) {
14014
14253
  const scene = this._scene;
14015
14254
  this._systems = this._lite.systems.map((s) => {
14016
- const system = ParticleSystem._fromLite(s, scene);
14255
+ const system = scene._wrapParticleSystem(s);
14017
14256
  if (this._started) system._releaseBillboardToSet();
14018
14257
  return system;
14019
14258
  });
@@ -14038,7 +14277,10 @@ var ParticleSystemSet = class {
14038
14277
  this._started = true;
14039
14278
  const scene = this._scene;
14040
14279
  const lite = this._lite;
14041
- for (const system of this._systems ?? []) system._releaseBillboardToSet();
14280
+ for (const system of this._systems ?? []) {
14281
+ system._releaseBillboardToSet();
14282
+ system._markStartedBySet();
14283
+ }
14042
14284
  scene._deferAdd(() => {
14043
14285
  for (const system of this._systems ?? []) system._bindTexture();
14044
14286
  registerNodeParticleSet(scene._lite, lite, { autoStart: true });
@@ -14052,7 +14294,9 @@ var ParticleSystemSet = class {
14052
14294
  */
14053
14295
  dispose() {
14054
14296
  if (!this._lite) return;
14055
- for (const system of this._lite.systems) stopParticleSystem(system);
14297
+ const systems = this.systems;
14298
+ for (const system of systems) system.dispose();
14299
+ systems.length = 0;
14056
14300
  }
14057
14301
  };
14058
14302
  /**
@@ -14084,6 +14328,7 @@ var NodeParticleSystemSet = class NodeParticleSystemSet {
14084
14328
  const set = new ParticleSystemSet();
14085
14329
  set._lite = liteSet;
14086
14330
  set._scene = scene;
14331
+ set.systems;
14087
14332
  return set;
14088
14333
  }
14089
14334
  /** Babylon.js `NodeParticleSystemSet.Parse(source)` — deserialize an inline graph. */
@@ -14136,6 +14381,6 @@ var NodeParticleSystemSet = class NodeParticleSystemSet {
14136
14381
  this._snippetId = null;
14137
14382
  }
14138
14383
  };
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 };
14384
+ 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, ChannelMask, 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, DivideTexturesAsync, 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, GaussianSplattingGpuSortOutput, GaussianSplattingGpuSorter, GaussianSplattingMaterial, GaussianSplattingMaxPartCount, GaussianSplattingMesh, GaussianSplattingOverdrawMaterialPlugin, GaussianSplattingPartProxyMesh, GaussianSplattingSizeMaterialPlugin, GaussianSplattingSolidColorMaterialPlugin, GaussianSplattingStream, GeometryBufferRenderer, GeospatialCamera, GeospatialClippingBehavior, GetElementPixelFromUv, GetGaussianSplattingGpuSorterMaxSplatCount, 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_scatter, 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, MultiScatterToSingleScatterAlbedoAsync, 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, RegisterKHR_materials_scatter, 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, SingleScatterToMultiScatterAlbedoAsync, 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, TextureChannel, TextureColorSpace, ThinEngine, ThinFSR1SharpenPostProcess, ThinFSR1UpscalePostProcess, ThinMeshBlendingPostProcess, ThinSprite, ThinWalledScatterWeightsAsync, ToDegrees, ToRadians, Tools, TouchCamera, TransformNode, TransmissionFractionAsync, TransmissionScatterToSingleScatterAlbedoAsync, USDFileLoader, UniformBuffer, UninstallHtmlInCanvasPolyfill, UniversalCamera, UnpackMeshBlendingTag, UploadHtmlElementToTexture, UploadImageToTexture2DArrayLayer, UtilityLayerRenderer, ValidateFlowGraph, ValidateFlowGraphWithBlockList, ValueCondition, ValueConditionOperators, Vector2, Vector3, Vector4, VertexBuffer, VertexData, Viewport, VirtualJoystick, WebGPUEngine, WebXRCamera, WeightedSound, XboxInput, _ClampGpuSortKeyBits, _ComputeGpuSortDepthCoefficients, _ComputeGpuSortDepthRange, _ComputeGpuSortKeyScale, _DecodeGpuSortSogMean, _GetGpuSortPaddedCount, _GetGpuSortPassCount, _GetPackedShBytesPerSplat, _HasGaussianPointSplattingProjectedDepth, _IsHtmlInCanvasPolyfillInstalled, _PackGpuSortIntervals, _RegisterUSDLoaderDependencies, defaultValueParseFunction, registerBuiltInLoaders, transformCoordinates, transformNormal, unsupported };
14140
14385
 
14141
14386
  //# sourceMappingURL=index.js.map