@babylonjs/lite-compat 1.31.1-preview → 1.33.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/README.md +15 -15
- package/index.d.ts +228 -41
- package/index.js +533 -59
- package/index.js.map +1 -1
- package/{meshes-Fu955h5M.js → meshes-BLcUDvXV.js} +107 -8
- package/meshes-BLcUDvXV.js.map +1 -0
- package/navigation.d.ts +16 -6
- package/navigation.js +1 -1
- package/package.json +4 -4
- package/meshes-Fu955h5M.js.map +0 -1
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { CharacterSupportedState as CharacterSupportedState$1, MaxTintMagnitude, MinTemperatureKelvin, PhysicsConstraintAxis as PhysicsConstraintAxis$1, PhysicsConstraintType as PhysicsConstraintType$1, PhysicsMotionType as PhysicsMotionType$1, PhysicsPrestepType as PhysicsPrestepType$1, PhysicsShapeType as PhysicsShapeType$1, VERSION, 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, 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, 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, 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, disposeUtilityLayer, dividePolarToRef, divideSphericalToRef, elasticEase, enableAnalyzer, enableAnimationBlending, enableArcRotateKeyboardControls, enableBoneControlForSkinnedAssets, enableHavokThinInstancePhysicsSync, enableMirroredMeshes, enableOrthographicCamera, enableSpatial, enableStereo, exponentialEase, getBoneByName, getByteFrequencyData, getByteTimeDomainData, getCameraPosition, getFloatFrequencyData, getFloatTimeDomainData, getMasterVolume, getPhysicsBodyAngularVelocity, getPhysicsBodyLinearVelocity, getProjectionMatrix, getVariantNames, getViewMatrix, getWhiteBalanceMatrix, goToFrame, hasDefaultInteractivityFlowInput, initializeCsg2Async, invertMat4, loadBabylon, loadBasisTexture2D, loadDdsEnvironment, loadEnvironment, loadGltf, loadHdrEnvironment, loadImageToArrayLayer, loadKtxTexture2D, loadSOG, loadSPZ, loadSplat, loadSpriteAtlas, loadTexture2D, markClusteredLightContainerDirty, multiplyMat4, multiplyPolarToRef, multiplySphericalToRef, normalizeInteractivityEventDataConfiguration, normalizeKhrInteractivityRuntimeValue, onBeforeRender, onPhysicsAfterStep, packMeshBlendingTag, parseNodeMaterialFromSnippet, parseNodeParticleSetFromSnippet, pauseAnimation, pauseSound, pauseStreamingSound, physicsRaycast, pickAsync,
|
|
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-BLcUDvXV.js";
|
|
2
|
+
import { CharacterSupportedState as CharacterSupportedState$1, MaxTintMagnitude, MinTemperatureKelvin, PhysicsConstraintAxis as PhysicsConstraintAxis$1, PhysicsConstraintType as PhysicsConstraintType$1, PhysicsMotionType as PhysicsMotionType$1, PhysicsPrestepType as PhysicsPrestepType$1, PhysicsShapeType as PhysicsShapeType$1, VERSION, 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, 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, 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, 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, enableHavokThinInstancePhysicsSync, enableMirroredMeshes, enableOrthographicCamera, enableSpatial, enableStereo, exponentialEase, getBoneByName, getByteFrequencyData, getByteTimeDomainData, getCameraPosition, getFloatFrequencyData, getFloatTimeDomainData, getMasterVolume, getPhysicsBodyAngularVelocity, getPhysicsBodyLinearVelocity, getPickedUV, getProjectionMatrix, getVariantNames, getViewMatrix, getWhiteBalanceMatrix, goToFrame, hasDefaultInteractivityFlowInput, initializeCsg2Async, invertMat4, loadBabylon, loadBasisTexture2D, loadDdsEnvironment, loadEnvironment, loadGltf, loadHdrEnvironment, loadImageToArrayLayer, loadKtxTexture2D, loadSOG, loadSPZ, loadSplat, loadSpriteAtlas, loadTexture2D, loadUsd, markClusteredLightContainerDirty, multiplyMat4, multiplyPolarToRef, multiplySphericalToRef, normalizeInteractivityEventDataConfiguration, normalizeKhrInteractivityRuntimeValue, onBeforeRender, onPhysicsAfterStep, packMeshBlendingTag, parseNodeMaterialFromSnippet, parseNodeParticleSetFromSnippet, pauseAnimation, pauseSound, pauseStreamingSound, physicsRaycast, pickAsync, pickMeshesWithRayPrecise, playAnimation, playSound, playStreamingSound, polarFromVec2ToRef, polarToVec2ToRef, powerEase, preloadStreamingInstanceAsync, preloadStreamingInstancesAsync, quadraticEase, quarticEase, quinticEase, readStorageBufferAfterFrame, registerNodeParticleSet, registerScene, registerSceneWithShadowSupport, registerSpriteRenderer, registerUtilityLayer, releasePhysicsConstraint, releasePhysicsShape, removeAnimationGroup, removeFromScene, removePhysicsBody, requestHtmlTextureUpdate, resetVariant, resizeEngine, resolveCameraViewport, resumeSound, resumeStreamingSound, sampleCatmullRomSpline, sampleHermiteSpline, scalePolarToRef, scaleSphericalToRef, selectVariant, setAnimationAdditive, setBonePosition, setBoneRotationQuaternion, setBoneScaling, setBusVolume, setClipPlane, setEngineSize, setFog, setGeospatialOrientation, setMasterVolume, setMorphTargetWeights, setParent, setPhysicsBodyAngularVelocity, setPhysicsBodyLinearVelocity, setPhysicsBodyMassProperties, setPhysicsBodyMotionType, setPhysicsBodyPrestepType, setPhysicsBodyShape, setPhysicsGravity, setPhysicsShapeFilterCollideMask, setPhysicsShapeFilterMembershipMask, setPhysicsShapeIsTrigger, setPhysicsShapeMaterial, setPhysicsTimestep, setPositionGizmoLocalCoordinates, setRotationGizmoLocalCoordinates, setScaleGizmoLocalCoordinates, setShadowTaskCasterMeshes, setSoundSourceVolume, setSoundVolume, setSpatialListener, setSpatialListenerPosition, setSpatialOrientation, setSpatialPosition, setStereoPan, setStreamingSoundVolume, sineEase, sphericalFromVec3ToRef, sphericalToVec3ToRef, spriteBlendAdditive, spriteBlendAlpha, spriteBlendPremultiplied, startEngine, startParticleSystem, stepScene, stopAnimation, stopEngine, stopParticleSystem, stopSound, stopStreamingSound, submitComputeTasks, subtractPolarToRef, subtractSphericalToRef, syncParticleBillboard, temperatureTintToXyz, unlockAudioEngineAsync, unpackMeshBlendingTag, updateAnimationManager, updateBillboardSpriteIndex, updateDynamicTexture, updateHtmlTexture, updateSpatialAudio, updateSprite2DIndex, updateStorageBufferRange, updateTexture2DArrayFromPixels, updateTexture2DFromPixels, updateUniformBuffer, uploadImageToArrayLayer, whenHtmlTextureReady } from "@babylonjs/lite";
|
|
3
3
|
//#region \0rolldown/runtime.js
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -607,6 +607,9 @@ var PickingInfo = class PickingInfo {
|
|
|
607
607
|
gripTransform = null;
|
|
608
608
|
_normal = null;
|
|
609
609
|
_worldNormal = null;
|
|
610
|
+
_faceNormal = null;
|
|
611
|
+
_faceWorldNormal = null;
|
|
612
|
+
_uv = null;
|
|
610
613
|
/** @internal Create a compat result from Lite's synchronous CPU-picking result. */
|
|
611
614
|
static _fromLite(info, pickedMesh, ray) {
|
|
612
615
|
const result = new PickingInfo();
|
|
@@ -623,13 +626,17 @@ var PickingInfo = class PickingInfo {
|
|
|
623
626
|
result.ray = ray;
|
|
624
627
|
result._normal = info.pickedNormal ? Vector3.FromArray(info.pickedNormal) : null;
|
|
625
628
|
result._worldNormal = info.pickedNormalWorld ? Vector3.FromArray(info.pickedNormalWorld) : null;
|
|
629
|
+
result._faceNormal = info.pickedFaceNormal ? Vector3.FromArray(info.pickedFaceNormal) : null;
|
|
630
|
+
result._faceWorldNormal = info.pickedFaceNormalWorld ? Vector3.FromArray(info.pickedFaceNormalWorld) : null;
|
|
631
|
+
const uv = getPickedUV(info);
|
|
632
|
+
result._uv = uv ? new Vector2(uv[0], uv[1]) : null;
|
|
626
633
|
return result;
|
|
627
634
|
}
|
|
628
|
-
getNormal(useWorldCoordinates = false,
|
|
629
|
-
return useWorldCoordinates ? this._worldNormal
|
|
635
|
+
getNormal(useWorldCoordinates = false, useVerticesNormals = true) {
|
|
636
|
+
return (useVerticesNormals ? useWorldCoordinates ? this._worldNormal : this._normal : useWorldCoordinates ? this._faceWorldNormal : this._faceNormal)?.clone() ?? null;
|
|
630
637
|
}
|
|
631
|
-
getTextureCoordinates(
|
|
632
|
-
return
|
|
638
|
+
getTextureCoordinates(uvSet = "uv") {
|
|
639
|
+
return uvSet === "uv" ? this._uv?.clone() ?? null : null;
|
|
633
640
|
}
|
|
634
641
|
};
|
|
635
642
|
//#endregion
|
|
@@ -5269,10 +5276,9 @@ var Scene = class Scene extends AbstractScene {
|
|
|
5269
5276
|
}
|
|
5270
5277
|
/** Babylon.js synchronous screen-coordinate picking over Lite's CPU ray picker. */
|
|
5271
5278
|
pick(x, y, predicate, fastCheck = false, camera = null, trianglePredicate) {
|
|
5272
|
-
if (fastCheck || trianglePredicate) return unsupported("Scene.pick", "Babylon Lite's synchronous picker returns the nearest bounding-box hit and does not expose fast-first-hit or per-triangle predicate modes.");
|
|
5273
5279
|
const cameraToUse = camera ?? this.activeCamera ?? this.cameraToUseForPointers;
|
|
5274
5280
|
if (!cameraToUse) return new PickingInfo();
|
|
5275
|
-
return this.pickWithRay(this.createPickingRay(x, y, null, cameraToUse), predicate);
|
|
5281
|
+
return this.pickWithRay(this.createPickingRay(x, y, null, cameraToUse), predicate, fastCheck, trianglePredicate);
|
|
5276
5282
|
}
|
|
5277
5283
|
/**
|
|
5278
5284
|
* Babylon.js `Scene.createPickingRay` — translate CSS coordinates and camera
|
|
@@ -5300,26 +5306,26 @@ var Scene = class Scene extends AbstractScene {
|
|
|
5300
5306
|
}
|
|
5301
5307
|
/** Synchronous CPU ray picking over Babylon Lite's scene-mesh picker. */
|
|
5302
5308
|
pickWithRay(ray, predicate, fastCheck = false, trianglePredicate) {
|
|
5303
|
-
if (fastCheck || trianglePredicate) return unsupported("Scene.pickWithRay", "Babylon Lite's synchronous picker returns the nearest bounding-box hit and does not expose fast-first-hit or per-triangle predicate modes.");
|
|
5304
5309
|
const candidates = new Set(this._lite.meshes);
|
|
5305
5310
|
for (const wrapper of this.meshes) if (wrapper instanceof AbstractMesh) candidates.add(wrapper._lite);
|
|
5306
5311
|
const wrappers = /* @__PURE__ */ new Map();
|
|
5307
5312
|
for (const candidate of candidates) {
|
|
5308
|
-
if (candidate.thinInstances && candidate.thinInstances.count > 0) return unsupported("Scene.pickWithRay", "Thin-instance transforms are not represented by Lite's AABB ray picker; pick the source mesh before adding thin instances or use Lite's GPU picker.");
|
|
5309
5313
|
const registered = this._meshWrappers.get(candidate);
|
|
5310
5314
|
const wrapper = registered instanceof AbstractMesh ? registered : Mesh._fromLite(candidate, void 0, this);
|
|
5311
5315
|
wrappers.set(candidate, wrapper);
|
|
5312
5316
|
}
|
|
5313
|
-
const info =
|
|
5317
|
+
const info = pickMeshesWithRayPrecise(candidates, {
|
|
5314
5318
|
origin: ray.origin.asArray(),
|
|
5315
5319
|
direction: ray.direction.asArray(),
|
|
5316
5320
|
length: ray.length
|
|
5317
5321
|
}, {
|
|
5318
|
-
predicate: (mesh) => {
|
|
5322
|
+
predicate: (mesh, thinInstanceIndex) => {
|
|
5319
5323
|
const wrapper = wrappers.get(mesh);
|
|
5320
|
-
return !!wrapper && (predicate ? predicate(wrapper) : wrapper.isEnabled() && wrapper.isVisible && wrapper.isPickable);
|
|
5324
|
+
return !!wrapper && (predicate ? predicate(wrapper, thinInstanceIndex) : wrapper.isEnabled() && wrapper.isVisible && wrapper.isPickable);
|
|
5321
5325
|
},
|
|
5322
|
-
skipPickableCheck: !!predicate
|
|
5326
|
+
skipPickableCheck: !!predicate,
|
|
5327
|
+
fastCheck,
|
|
5328
|
+
trianglePredicate: trianglePredicate ? (p0, p1, p2, localRay, i0, i1, i2) => trianglePredicate(Vector3.FromArray(p0), Vector3.FromArray(p1), Vector3.FromArray(p2), new Ray(Vector3.FromArray(localRay.origin), Vector3.FromArray(localRay.direction), localRay.length), i0, i1, i2) : void 0
|
|
5323
5329
|
});
|
|
5324
5330
|
return PickingInfo._fromLite(info, info.pickedMesh ? wrappers.get(info.pickedMesh) ?? null : null, ray);
|
|
5325
5331
|
}
|
|
@@ -5422,14 +5428,32 @@ var Scene = class Scene extends AbstractScene {
|
|
|
5422
5428
|
return this.beginDirectAnimation(target, target.animations ?? [], from, to, loop, speedRatio);
|
|
5423
5429
|
}
|
|
5424
5430
|
dispose() {
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
+
let hasError = false;
|
|
5432
|
+
let firstError;
|
|
5433
|
+
const runCleanup = (cleanup) => {
|
|
5434
|
+
try {
|
|
5435
|
+
cleanup();
|
|
5436
|
+
} catch (error) {
|
|
5437
|
+
if (!hasError) {
|
|
5438
|
+
hasError = true;
|
|
5439
|
+
firstError = error;
|
|
5440
|
+
}
|
|
5441
|
+
}
|
|
5442
|
+
};
|
|
5443
|
+
runCleanup(() => this._detachPointerEvents());
|
|
5444
|
+
const observerResult = this.onDisposeObservable._notifyObserversSafely(this);
|
|
5445
|
+
if (observerResult.hasError && !hasError) {
|
|
5446
|
+
hasError = true;
|
|
5447
|
+
firstError = observerResult.error;
|
|
5448
|
+
}
|
|
5449
|
+
runCleanup(() => this.onDisposeObservable.clear());
|
|
5450
|
+
runCleanup(() => this.onPointerObservable.clear());
|
|
5451
|
+
runCleanup(() => this._beforeRenderFlushCallbacks.clear());
|
|
5452
|
+
if (this._propertyAnimationManager) runCleanup(() => clearAnimationManager(this._propertyAnimationManager));
|
|
5453
|
+
if (this._blendManager) runCleanup(() => clearAnimationManager(this._blendManager));
|
|
5431
5454
|
this._runningAnimatables.length = 0;
|
|
5432
|
-
disposeScene(this._lite);
|
|
5455
|
+
runCleanup(() => disposeScene(this._lite));
|
|
5456
|
+
if (hasError) throw firstError;
|
|
5433
5457
|
}
|
|
5434
5458
|
};
|
|
5435
5459
|
//#endregion
|
|
@@ -6283,9 +6307,9 @@ var GaussianSplattingMesh = class GaussianSplattingMesh extends TransformNode {
|
|
|
6283
6307
|
getClassName() {
|
|
6284
6308
|
return "GaussianSplattingMesh";
|
|
6285
6309
|
}
|
|
6286
|
-
/** @internal The transform
|
|
6310
|
+
/** @internal The wrapper's transform node; the loaded cloud is parented beneath it during deferred adoption. */
|
|
6287
6311
|
get _xform() {
|
|
6288
|
-
return this._gs ?? this._node;
|
|
6312
|
+
return this._gs?.parent === this._node ? this._node : this._gs ?? this._node;
|
|
6289
6313
|
}
|
|
6290
6314
|
get position() {
|
|
6291
6315
|
return liteBackedVector3(this._xform.position);
|
|
@@ -6322,12 +6346,15 @@ var GaussianSplattingMesh = class GaussianSplattingMesh extends TransformNode {
|
|
|
6322
6346
|
this._adopt(lite);
|
|
6323
6347
|
return this;
|
|
6324
6348
|
}
|
|
6325
|
-
/**
|
|
6349
|
+
/**
|
|
6350
|
+
* @internal Adopt a loaded Lite splat node from either the mesh or loader-plugin API.
|
|
6351
|
+
* Parenting preserves the loader's format-specific local transform while composing it
|
|
6352
|
+
* with transforms applied to the wrapper before loading.
|
|
6353
|
+
*/
|
|
6326
6354
|
_adopt(lite) {
|
|
6327
6355
|
const placeholder = this._node;
|
|
6328
|
-
lite.
|
|
6329
|
-
|
|
6330
|
-
lite.rotation.set(placeholder.rotation.x, placeholder.rotation.y, placeholder.rotation.z);
|
|
6356
|
+
lite.parent = placeholder;
|
|
6357
|
+
placeholder.children.push(lite);
|
|
6331
6358
|
lite.name = this.name;
|
|
6332
6359
|
this._gs = lite;
|
|
6333
6360
|
this._scene?._registerMesh(this);
|
|
@@ -6361,7 +6388,18 @@ var GaussianSplattingMesh = class GaussianSplattingMesh extends TransformNode {
|
|
|
6361
6388
|
}
|
|
6362
6389
|
/** Babylon.js `gs.bakeCurrentTransformIntoVertices()` — fold the node transform into the splat data. */
|
|
6363
6390
|
bakeCurrentTransformIntoVertices() {
|
|
6364
|
-
if (this._gs)
|
|
6391
|
+
if (this._gs) {
|
|
6392
|
+
bakeCurrentTransformIntoVertices(this._gs);
|
|
6393
|
+
if (this._gs.parent === this._node) {
|
|
6394
|
+
const userChildren = this._node.children.filter((child) => child !== this._gs && child.parent === this._node);
|
|
6395
|
+
for (const child of this.getChildren(void 0, true)) if (child instanceof TransformNode && child._node !== this._gs && !userChildren.includes(child._node)) userChildren.push(child._node);
|
|
6396
|
+
for (const child of userChildren) setParent(child, null);
|
|
6397
|
+
this._node.position.set(0, 0, 0);
|
|
6398
|
+
this._node.rotation.set(0, 0, 0);
|
|
6399
|
+
this._node.scaling.set(1, 1, 1);
|
|
6400
|
+
for (const child of userChildren) setParent(child, this._node);
|
|
6401
|
+
}
|
|
6402
|
+
}
|
|
6365
6403
|
}
|
|
6366
6404
|
/** @internal Babylon.js's worker-throttle flag; ported scenes poll it to detect the first sort. */
|
|
6367
6405
|
get _canPostToWorker() {
|
|
@@ -6761,9 +6799,10 @@ var RawTexture3D = class extends BaseTexture {
|
|
|
6761
6799
|
_scene;
|
|
6762
6800
|
/** Babylon.js `RawTexture3D.is3D` — always true for a 3D texture. */
|
|
6763
6801
|
is3D = true;
|
|
6764
|
-
constructor(data, width, height, depth, format, scene,
|
|
6802
|
+
constructor(data, width, height, depth, format, scene, generateMipMaps = true, _invertY = false, _samplingMode = 3, _textureType, _creationFlags) {
|
|
6765
6803
|
super();
|
|
6766
6804
|
this.format = format;
|
|
6805
|
+
if (generateMipMaps) unsupported("RawTexture3D(generateMipMaps)", "Babylon.js 3D mip generation renders every depth slice of every level and requires a mip-capable 3D allocation plus a dedicated shader/pipeline. Babylon Lite's public 3D texture factory allocates only one level; adding this GPU subsystem is not a small mechanical extension. Pass false to create a base-level texture.");
|
|
6767
6806
|
this._scene = scene;
|
|
6768
6807
|
const bytes = toRgbaBytes(data, width, height, depth);
|
|
6769
6808
|
this._lite = createTexture3DFromPixels(scene.getEngine()._lite, bytes, width, height, depth);
|
|
@@ -7299,6 +7338,184 @@ var Bone = class Bone {
|
|
|
7299
7338
|
}
|
|
7300
7339
|
};
|
|
7301
7340
|
//#endregion
|
|
7341
|
+
//#region src/loading/splat-file-loader.ts
|
|
7342
|
+
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.";
|
|
7343
|
+
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.";
|
|
7344
|
+
var SPLAT_DIRECTORY_UNSUPPORTED = "Directory SOG JSON requires a loader contract for resolving and decoding external texture resources relative to rootUrl; Lite's SOG loader accepts only self-contained archives.";
|
|
7345
|
+
var SPLAT_RELOAD_UNSUPPORTED = "Lite does not expose an atomic Gaussian-Splatting replacement lifecycle that detaches the old renderable and picker while retiring its worker and GPU resources.";
|
|
7346
|
+
var SPLAT_CONCURRENT_TARGET_UNSUPPORTED = "An unloaded GaussianSplattingMesh target can only be populated by one in-flight load.";
|
|
7347
|
+
var loadingTargets;
|
|
7348
|
+
function bytesOf(data) {
|
|
7349
|
+
if (data instanceof ArrayBuffer) return new Uint8Array(data);
|
|
7350
|
+
if (ArrayBuffer.isView(data)) return new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
|
|
7351
|
+
return unsupported("SPLATFileLoader", "Binary .splat, .ply, .sog, and .spz inputs must be supplied as an ArrayBuffer or ArrayBufferView.");
|
|
7352
|
+
}
|
|
7353
|
+
function loaderFor(data) {
|
|
7354
|
+
if (typeof data === "string") return unsupported("SPLATFileLoader", data.includes("\"lods\"") ? SPLAT_STREAMING_UNSUPPORTED : SPLAT_DIRECTORY_UNSUPPORTED);
|
|
7355
|
+
const bytes = bytesOf(data);
|
|
7356
|
+
if (bytes[0] === 80 && bytes[1] === 75) return loadSOG;
|
|
7357
|
+
if (bytes[0] === 31 && bytes[1] === 139 || bytes[0] === 78 && bytes[1] === 71 && bytes[2] === 83 && bytes[3] === 80) return loadSPZ;
|
|
7358
|
+
return loadSplat;
|
|
7359
|
+
}
|
|
7360
|
+
function loaderForUrl(url) {
|
|
7361
|
+
const path = url.split(/[?#]/)[0].toLowerCase();
|
|
7362
|
+
if (path.endsWith(".json")) return unsupported("SPLATFileLoader", SPLAT_STREAMING_UNSUPPORTED);
|
|
7363
|
+
if (path.endsWith(".sog")) return loadSOG;
|
|
7364
|
+
if (path.endsWith(".spz")) return loadSPZ;
|
|
7365
|
+
return loadSplat;
|
|
7366
|
+
}
|
|
7367
|
+
function binaryData(data) {
|
|
7368
|
+
return new Uint8Array(bytesOf(data)).buffer;
|
|
7369
|
+
}
|
|
7370
|
+
function validateOptions(options) {
|
|
7371
|
+
if (options.flipY === true) unsupported("SPLATLoadingOptions.flipY", "Lite's native splat parsers own their format-specific orientation conversion and do not expose a parser-level flipY override.");
|
|
7372
|
+
if (options.deflateURL !== void 0 || options.fflate !== void 0) unsupported("SPLATLoadingOptions.fflate", "Lite owns its SOG decompressor and does not expose Babylon.js's replaceable fflate loading policy.");
|
|
7373
|
+
if (options.needsRotationScaleTextures) unsupported("SPLATLoadingOptions.needsRotationScaleTextures", "Voxel IBL-shadow rotation/scale textures require Babylon.js's Gaussian-Splatting IBL shadow subsystem, which Babylon Lite does not define.");
|
|
7374
|
+
if (options.useSogTextures) unsupported("SPLATLoadingOptions.useSogTextures", "Lite's SOG loader uses its native CPU decode path and does not expose Babylon.js's raw-texture dequantization pipeline.");
|
|
7375
|
+
if (options.spzLibraryUrl !== void 0) unsupported("SPLATLoadingOptions.spzLibraryUrl", "Lite owns its SPZ decoder and does not expose a replaceable WASM-library URL policy.");
|
|
7376
|
+
}
|
|
7377
|
+
var SPLATFileLoader = class SPLATFileLoader {
|
|
7378
|
+
name = "splat";
|
|
7379
|
+
extensions = {
|
|
7380
|
+
".splat": { isBinary: true },
|
|
7381
|
+
".ply": { isBinary: true },
|
|
7382
|
+
".spz": { isBinary: true },
|
|
7383
|
+
".json": { isBinary: false },
|
|
7384
|
+
".sog": { isBinary: true }
|
|
7385
|
+
};
|
|
7386
|
+
_loadingOptions;
|
|
7387
|
+
constructor(loadingOptions = {}) {
|
|
7388
|
+
this._loadingOptions = { ...loadingOptions };
|
|
7389
|
+
validateOptions(this._loadingOptions);
|
|
7390
|
+
}
|
|
7391
|
+
createPlugin(options) {
|
|
7392
|
+
return new SPLATFileLoader(options.splat);
|
|
7393
|
+
}
|
|
7394
|
+
async importMeshAsync(_meshesNames, scene, data, _rootUrl, _onProgress, _fileName) {
|
|
7395
|
+
return {
|
|
7396
|
+
meshes: [await this._load(scene, data)],
|
|
7397
|
+
particleSystems: [],
|
|
7398
|
+
skeletons: [],
|
|
7399
|
+
animationGroups: [],
|
|
7400
|
+
transformNodes: [],
|
|
7401
|
+
geometries: [],
|
|
7402
|
+
lights: [],
|
|
7403
|
+
spriteManagers: []
|
|
7404
|
+
};
|
|
7405
|
+
}
|
|
7406
|
+
async loadAsync(scene, data, rootUrl, onProgress, fileName) {
|
|
7407
|
+
await this.importMeshAsync(null, scene, data, rootUrl, onProgress, fileName);
|
|
7408
|
+
}
|
|
7409
|
+
loadAssetContainerAsync(_scene, _data, _rootUrl) {
|
|
7410
|
+
return unsupported("SPLATFileLoader.loadAssetContainerAsync", SPLAT_ASSET_CONTAINER_UNSUPPORTED);
|
|
7411
|
+
}
|
|
7412
|
+
/** @internal Load a URL through Lite while preserving this plugin's Babylon.js options. */
|
|
7413
|
+
async _loadUrlAsync(scene, url) {
|
|
7414
|
+
return this._loadReserved(scene, () => loaderForUrl(url)(scene._lite, url));
|
|
7415
|
+
}
|
|
7416
|
+
async _load(scene, data) {
|
|
7417
|
+
return this._loadReserved(scene, async () => {
|
|
7418
|
+
const loader = loaderFor(data);
|
|
7419
|
+
const url = URL.createObjectURL(new Blob([binaryData(data)]));
|
|
7420
|
+
try {
|
|
7421
|
+
return await loader(scene._lite, url);
|
|
7422
|
+
} finally {
|
|
7423
|
+
URL.revokeObjectURL(url);
|
|
7424
|
+
}
|
|
7425
|
+
});
|
|
7426
|
+
}
|
|
7427
|
+
async _loadReserved(scene, load) {
|
|
7428
|
+
const target = this._loadingOptions.gaussianSplattingMesh;
|
|
7429
|
+
if (target?._pickLiteNode) unsupported("SPLATLoadingOptions.gaussianSplattingMesh", SPLAT_RELOAD_UNSUPPORTED);
|
|
7430
|
+
if (target) {
|
|
7431
|
+
loadingTargets ??= /* @__PURE__ */ new WeakSet();
|
|
7432
|
+
if (loadingTargets.has(target)) unsupported("SPLATLoadingOptions.gaussianSplattingMesh", SPLAT_CONCURRENT_TARGET_UNSUPPORTED);
|
|
7433
|
+
loadingTargets.add(target);
|
|
7434
|
+
}
|
|
7435
|
+
try {
|
|
7436
|
+
return this._adoptLoaded(scene, await load());
|
|
7437
|
+
} finally {
|
|
7438
|
+
if (target) loadingTargets?.delete(target);
|
|
7439
|
+
}
|
|
7440
|
+
}
|
|
7441
|
+
_adoptLoaded(scene, lite) {
|
|
7442
|
+
const target = this._loadingOptions.gaussianSplattingMesh;
|
|
7443
|
+
if (target) {
|
|
7444
|
+
target._adopt(lite);
|
|
7445
|
+
return target;
|
|
7446
|
+
}
|
|
7447
|
+
lite.name = "GaussianSplatting";
|
|
7448
|
+
return GaussianSplattingMesh._fromLite(lite, scene);
|
|
7449
|
+
}
|
|
7450
|
+
};
|
|
7451
|
+
function RegisterSPLATFileLoader() {}
|
|
7452
|
+
//#endregion
|
|
7453
|
+
//#region src/loading/usd-options.ts
|
|
7454
|
+
var USD_RUNTIME_BASE_URL = "https://cdn.babylonjs.com/babylonUsdImporter/5/";
|
|
7455
|
+
var USD_RUNTIME_NAMES = {
|
|
7456
|
+
workerUrl: "babylon-usd-importer.worker.js",
|
|
7457
|
+
glueUrl: "babylon-usd-importer.js",
|
|
7458
|
+
wasmUrl: "babylon-usd-importer.wasm",
|
|
7459
|
+
dataUrl: "babylon-usd-importer.data"
|
|
7460
|
+
};
|
|
7461
|
+
var defaultConfiguration;
|
|
7462
|
+
function getUsdDefaultConfiguration() {
|
|
7463
|
+
return defaultConfiguration ??= {
|
|
7464
|
+
glueUrl: `${USD_RUNTIME_BASE_URL}${USD_RUNTIME_NAMES.glueUrl}`,
|
|
7465
|
+
wasmUrl: `${USD_RUNTIME_BASE_URL}${USD_RUNTIME_NAMES.wasmUrl}`,
|
|
7466
|
+
dataUrl: `${USD_RUNTIME_BASE_URL}${USD_RUNTIME_NAMES.dataUrl}`,
|
|
7467
|
+
workerUrl: `${USD_RUNTIME_BASE_URL}${USD_RUNTIME_NAMES.workerUrl}`
|
|
7468
|
+
};
|
|
7469
|
+
}
|
|
7470
|
+
function setUsdDefaultConfiguration(configuration) {
|
|
7471
|
+
defaultConfiguration = configuration;
|
|
7472
|
+
}
|
|
7473
|
+
function resolveUsdOptions(options) {
|
|
7474
|
+
const configured = Object.keys(USD_RUNTIME_NAMES).filter((key) => options[key] !== void 0);
|
|
7475
|
+
if (configured.length !== 0 && configured.length !== 4) unsupported("USDFileLoaderOptions runtime URLs", "Babylon Lite loads the OpenUSD worker, glue, WASM, and data files from one runtime directory. Babylon.js runtime URL overrides can be adapted only when all four standard files are configured together.");
|
|
7476
|
+
const defaults = getUsdDefaultConfiguration();
|
|
7477
|
+
return {
|
|
7478
|
+
...defaults,
|
|
7479
|
+
...options,
|
|
7480
|
+
workerUrl: options.workerUrl ?? defaults.workerUrl,
|
|
7481
|
+
glueUrl: options.glueUrl ?? defaults.glueUrl,
|
|
7482
|
+
wasmUrl: options.wasmUrl ?? defaults.wasmUrl,
|
|
7483
|
+
dataUrl: options.dataUrl ?? defaults.dataUrl
|
|
7484
|
+
};
|
|
7485
|
+
}
|
|
7486
|
+
function toLiteUsdOptions(options, signal, onProgress) {
|
|
7487
|
+
const configured = Object.keys(USD_RUNTIME_NAMES).filter((key) => options[key] !== void 0);
|
|
7488
|
+
let runtimeBaseUrl;
|
|
7489
|
+
for (const key of configured) {
|
|
7490
|
+
const url = new URL(String(options[key]), globalThis.location?.href ?? "http://localhost/");
|
|
7491
|
+
if (url.search || url.hash) unsupported(`USDFileLoaderOptions.${key}`, "Babylon Lite reconstructs OpenUSD runtime file URLs from one directory and cannot preserve per-file query strings or hash fragments.");
|
|
7492
|
+
if (!url.pathname.endsWith(`/${USD_RUNTIME_NAMES[key]}`)) unsupported(`USDFileLoaderOptions.${key}`, `Babylon Lite loads the four OpenUSD runtime files from one directory using their standard names; '${USD_RUNTIME_NAMES[key]}' is required.`);
|
|
7493
|
+
const candidate = new URL(".", url).href;
|
|
7494
|
+
if (runtimeBaseUrl !== void 0 && candidate !== runtimeBaseUrl) unsupported("USDFileLoaderOptions runtime URLs", "Babylon Lite loads the OpenUSD worker, glue, WASM, and data files from one runtime directory; independently located runtime files cannot be adapted.");
|
|
7495
|
+
runtimeBaseUrl = candidate;
|
|
7496
|
+
}
|
|
7497
|
+
return {
|
|
7498
|
+
rootFileName: options.rootFileName,
|
|
7499
|
+
files: options.files,
|
|
7500
|
+
resolveByFileName: options.resolveByFileName ?? true,
|
|
7501
|
+
runtimeBaseUrl,
|
|
7502
|
+
signal,
|
|
7503
|
+
onProgress: (progress) => {
|
|
7504
|
+
if (progress.phase !== "fetching") options.onProgress?.({
|
|
7505
|
+
phase: progress.phase,
|
|
7506
|
+
message: progress.message
|
|
7507
|
+
});
|
|
7508
|
+
const loaded = progress.phase === "fetching" ? 0 : progress.phase === "initializing" ? 1 : progress.phase === "staging" ? 2 : progress.phase === "extracting" ? 3 : 4;
|
|
7509
|
+
onProgress?.({
|
|
7510
|
+
lengthComputable: false,
|
|
7511
|
+
loaded,
|
|
7512
|
+
total: 4
|
|
7513
|
+
});
|
|
7514
|
+
},
|
|
7515
|
+
onLog: options.onLog
|
|
7516
|
+
};
|
|
7517
|
+
}
|
|
7518
|
+
//#endregion
|
|
7302
7519
|
//#region src/loading/scene-loader.ts
|
|
7303
7520
|
/**
|
|
7304
7521
|
* Babylon.js-compatible `SceneLoader` and `AssetContainer` over Babylon Lite's
|
|
@@ -7323,16 +7540,14 @@ function urlPath(url) {
|
|
|
7323
7540
|
/** Splat asset extensions Babylon Lite can parse (`loadSplat` / `loadSOG` / `loadSPZ`). */
|
|
7324
7541
|
function isSplatUrl(url) {
|
|
7325
7542
|
const u = urlPath(url).toLowerCase();
|
|
7326
|
-
return u.endsWith(".ply") || u.endsWith(".splat") || u.endsWith(".sog") || u.endsWith(".spz");
|
|
7543
|
+
return u.endsWith(".ply") || u.endsWith(".splat") || u.endsWith(".sog") || u.endsWith(".spz") || u.endsWith(".json");
|
|
7327
7544
|
}
|
|
7328
7545
|
/** True when a URL points at a `.babylon` file, ignoring any query string or hash. */
|
|
7329
7546
|
function isBabylonUrl(url) {
|
|
7330
7547
|
return urlPath(url).toLowerCase().endsWith(".babylon");
|
|
7331
7548
|
}
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
const path = urlPath(url);
|
|
7335
|
-
return path.slice(path.lastIndexOf("/") + 1) || "splat";
|
|
7549
|
+
function isUsdUrl(url) {
|
|
7550
|
+
return /\.(?:usd|usda|usdc|usdz)$/i.test(urlPath(url));
|
|
7336
7551
|
}
|
|
7337
7552
|
var AssetContainer = class {
|
|
7338
7553
|
/** @internal Underlying Babylon Lite asset container. */
|
|
@@ -7343,8 +7558,15 @@ var AssetContainer = class {
|
|
|
7343
7558
|
_scene;
|
|
7344
7559
|
/** @internal Canonical loaded-skeleton wrappers. */
|
|
7345
7560
|
_skeletons;
|
|
7346
|
-
|
|
7561
|
+
_dispose;
|
|
7562
|
+
/** @internal Original USD mesh ownership, independent of later hierarchy changes. */
|
|
7563
|
+
_ownedMeshes;
|
|
7564
|
+
_sceneDisposeObserver;
|
|
7565
|
+
_disposed = false;
|
|
7566
|
+
constructor(lite, dispose, ownedMeshes) {
|
|
7347
7567
|
this._lite = lite;
|
|
7568
|
+
this._dispose = dispose;
|
|
7569
|
+
this._ownedMeshes = ownedMeshes ? [...ownedMeshes] : void 0;
|
|
7348
7570
|
}
|
|
7349
7571
|
get animationGroups() {
|
|
7350
7572
|
return this._lite.animationGroups ?? [];
|
|
@@ -7356,6 +7578,7 @@ var AssetContainer = class {
|
|
|
7356
7578
|
* same handles `scene.meshes` exposes.
|
|
7357
7579
|
*/
|
|
7358
7580
|
get meshes() {
|
|
7581
|
+
if (this._disposed) return [...this._meshRegistry.values()];
|
|
7359
7582
|
return collectLoadedMeshes(this._lite, this._meshRegistry, this._scene);
|
|
7360
7583
|
}
|
|
7361
7584
|
get skeletons() {
|
|
@@ -7364,21 +7587,77 @@ var AssetContainer = class {
|
|
|
7364
7587
|
/** Add every entity, animation group, camera, and clear colour to the scene. */
|
|
7365
7588
|
addAllToScene(scene) {
|
|
7366
7589
|
addToScene(scene._lite, this._lite);
|
|
7590
|
+
this._adoptScene(scene);
|
|
7591
|
+
}
|
|
7592
|
+
/** @internal Associate an already-added Lite container with its compat scene. */
|
|
7593
|
+
_adoptScene(scene) {
|
|
7594
|
+
if (this._sceneDisposeObserver && this._scene && this._scene !== scene) {
|
|
7595
|
+
this._scene.onDisposeObservable.remove(this._sceneDisposeObserver);
|
|
7596
|
+
this._sceneDisposeObserver = void 0;
|
|
7597
|
+
}
|
|
7367
7598
|
this._scene = scene;
|
|
7599
|
+
if (this._dispose && !this._sceneDisposeObserver) this._sceneDisposeObserver = scene.onDisposeObservable.addOnce(() => {
|
|
7600
|
+
this._scene = void 0;
|
|
7601
|
+
this._sceneDisposeObserver = void 0;
|
|
7602
|
+
this._detachFromScene(scene);
|
|
7603
|
+
});
|
|
7368
7604
|
collectLoadedMeshes(this._lite, this._meshRegistry, scene);
|
|
7369
7605
|
scene._surfaceLoadedCamera();
|
|
7370
7606
|
}
|
|
7371
|
-
dispose() {
|
|
7607
|
+
dispose() {
|
|
7608
|
+
const scene = this._scene;
|
|
7609
|
+
if (scene && this._sceneDisposeObserver) {
|
|
7610
|
+
scene.onDisposeObservable.remove(this._sceneDisposeObserver);
|
|
7611
|
+
this._sceneDisposeObserver = void 0;
|
|
7612
|
+
}
|
|
7613
|
+
this._scene = void 0;
|
|
7614
|
+
if (scene) this._detachFromScene(scene);
|
|
7615
|
+
else try {
|
|
7616
|
+
this._retireMeshWrappers();
|
|
7617
|
+
} finally {
|
|
7618
|
+
this._disposeOnce();
|
|
7619
|
+
}
|
|
7620
|
+
}
|
|
7621
|
+
_detachFromScene(scene) {
|
|
7622
|
+
try {
|
|
7623
|
+
if (this._ownedMeshes) for (const mesh of this._ownedMeshes) setParent(mesh, null);
|
|
7624
|
+
removeFromScene(scene._lite, this._lite);
|
|
7625
|
+
if (this._ownedMeshes) for (const mesh of this._ownedMeshes) removeFromScene(scene._lite, mesh);
|
|
7626
|
+
} finally {
|
|
7627
|
+
try {
|
|
7628
|
+
this._retireMeshWrappers();
|
|
7629
|
+
} finally {
|
|
7630
|
+
this._disposeOnce();
|
|
7631
|
+
}
|
|
7632
|
+
}
|
|
7633
|
+
}
|
|
7634
|
+
_retireMeshWrappers() {
|
|
7635
|
+
let hasError = false;
|
|
7636
|
+
let firstError;
|
|
7637
|
+
for (const wrapper of this._meshRegistry.values()) try {
|
|
7638
|
+
wrapper._disposeWrapperOnly();
|
|
7639
|
+
} catch (error) {
|
|
7640
|
+
if (!hasError) {
|
|
7641
|
+
hasError = true;
|
|
7642
|
+
firstError = error;
|
|
7643
|
+
}
|
|
7644
|
+
}
|
|
7645
|
+
if (hasError) throw firstError;
|
|
7646
|
+
}
|
|
7647
|
+
_disposeOnce() {
|
|
7648
|
+
if (!this._disposed) {
|
|
7649
|
+
this._disposed = true;
|
|
7650
|
+
this._dispose?.();
|
|
7651
|
+
}
|
|
7652
|
+
}
|
|
7372
7653
|
};
|
|
7373
7654
|
function validateGltfOptions(source, options) {
|
|
7374
7655
|
if (!isBabylonUrl(source) && !isSplatUrl(source) && options?.pluginOptions?.gltf?.preprocessUrlAsync) unsupported("ISceneLoaderOptions.pluginOptions.gltf.preprocessUrlAsync", "Supporting per-resource URL preprocessing requires a loader-wide callback/context contract across Lite's core glTF loader and lazy extension modules, which cannot be added as an independent tree-shakeable export.");
|
|
7375
7656
|
}
|
|
7376
7657
|
/** @internal Load a splat URL into a `GaussianSplattingMesh` (shared by every loader entry point). */
|
|
7377
|
-
async function loadSplatResult(url, scene) {
|
|
7378
|
-
const gs = new GaussianSplattingMesh(baseName(url), null, scene);
|
|
7379
|
-
await gs.loadFileAsync(url);
|
|
7658
|
+
async function loadSplatResult(url, scene, options) {
|
|
7380
7659
|
return {
|
|
7381
|
-
meshes: [
|
|
7660
|
+
meshes: [await new SPLATFileLoader(options)._loadUrlAsync(scene, url)],
|
|
7382
7661
|
particleSystems: [],
|
|
7383
7662
|
skeletons: [],
|
|
7384
7663
|
animationGroups: [],
|
|
@@ -7391,10 +7670,11 @@ function joinUrl(rootUrl, fileName) {
|
|
|
7391
7670
|
if (/^(https?:)?\/\//.test(fileName) || fileName.startsWith("/")) return fileName;
|
|
7392
7671
|
return rootUrl.endsWith("/") || rootUrl === "" ? rootUrl + fileName : rootUrl + "/" + fileName;
|
|
7393
7672
|
}
|
|
7394
|
-
async function load(rootUrl, fileName, scene) {
|
|
7673
|
+
async function load(rootUrl, fileName, scene, usdOptions) {
|
|
7395
7674
|
const url = joinUrl(rootUrl, fileName);
|
|
7396
7675
|
const engine = scene.getEngine()._lite;
|
|
7397
|
-
if (!isBabylonUrl(url)) enableBoneControlForSkinnedAssets();
|
|
7676
|
+
if (!isBabylonUrl(url) && !isUsdUrl(url)) enableBoneControlForSkinnedAssets();
|
|
7677
|
+
if (isUsdUrl(url)) return loadUsdContainer(engine, url, usdOptions);
|
|
7398
7678
|
return new AssetContainer(isBabylonUrl(url) ? await loadBabylon(engine, url) : await loadGltf(engine, url));
|
|
7399
7679
|
}
|
|
7400
7680
|
/** Babylon.js `SceneLoader` — async glTF/.babylon loading into a compat scene. */
|
|
@@ -7427,6 +7707,7 @@ var SceneLoader = {
|
|
|
7427
7707
|
},
|
|
7428
7708
|
/** Load an asset into a container without adding it to the scene. */
|
|
7429
7709
|
async LoadAssetContainerAsync(rootUrl, sceneFilename, scene) {
|
|
7710
|
+
if (isSplatUrl(joinUrl(rootUrl, sceneFilename))) return new SPLATFileLoader().loadAssetContainerAsync(scene, "", rootUrl);
|
|
7430
7711
|
return load(rootUrl, sceneFilename, scene);
|
|
7431
7712
|
},
|
|
7432
7713
|
/** Plugin registration — out of scope (side-effectful global registry). */
|
|
@@ -7437,9 +7718,9 @@ var SceneLoader = {
|
|
|
7437
7718
|
/** Babylon.js `ImportMeshAsync(source, scene, options?)` — imports an asset into the scene. */
|
|
7438
7719
|
async function ImportMeshAsync(source, scene, options) {
|
|
7439
7720
|
const url = joinUrl(options?.rootUrl ?? "", source);
|
|
7440
|
-
if (isSplatUrl(url)) return loadSplatResult(url, scene);
|
|
7721
|
+
if (isSplatUrl(url)) return loadSplatResult(url, scene, options?.pluginOptions?.splat);
|
|
7441
7722
|
validateGltfOptions(url, options);
|
|
7442
|
-
const container = await loadFromSource(url, scene);
|
|
7723
|
+
const container = await loadFromSource(url, scene, options?.pluginOptions?.usd, options?.onProgress);
|
|
7443
7724
|
container.addAllToScene(scene);
|
|
7444
7725
|
return {
|
|
7445
7726
|
meshes: container.meshes,
|
|
@@ -7455,25 +7736,38 @@ async function ImportMeshAsync(source, scene, options) {
|
|
|
7455
7736
|
async function AppendSceneAsync(source, scene, options) {
|
|
7456
7737
|
const url = joinUrl(options?.rootUrl ?? "", source);
|
|
7457
7738
|
if (isSplatUrl(url)) {
|
|
7458
|
-
await loadSplatResult(url, scene);
|
|
7739
|
+
await loadSplatResult(url, scene, options?.pluginOptions?.splat);
|
|
7459
7740
|
return scene;
|
|
7460
7741
|
}
|
|
7461
7742
|
validateGltfOptions(url, options);
|
|
7462
|
-
(await loadFromSource(url, scene)).addAllToScene(scene);
|
|
7743
|
+
(await loadFromSource(url, scene, options?.pluginOptions?.usd, options?.onProgress)).addAllToScene(scene);
|
|
7463
7744
|
return scene;
|
|
7464
7745
|
}
|
|
7465
7746
|
/** Babylon.js `LoadAssetContainerAsync(source, scene, options?)` — loads into a container without adding. */
|
|
7466
7747
|
async function LoadAssetContainerAsync(source, scene, options) {
|
|
7467
7748
|
const url = joinUrl(options?.rootUrl ?? "", source);
|
|
7749
|
+
if (isSplatUrl(url)) return new SPLATFileLoader(options?.pluginOptions?.splat).loadAssetContainerAsync(scene, "", options?.rootUrl ?? "");
|
|
7468
7750
|
validateGltfOptions(url, options);
|
|
7469
|
-
return loadFromSource(url, scene);
|
|
7751
|
+
return loadFromSource(url, scene, options?.pluginOptions?.usd, options?.onProgress);
|
|
7470
7752
|
}
|
|
7471
7753
|
/** @internal Load a glTF/.babylon asset from a single source URL (function-loader form). */
|
|
7472
|
-
async function loadFromSource(source, scene) {
|
|
7754
|
+
async function loadFromSource(source, scene, usdOptions, onProgress) {
|
|
7473
7755
|
const engine = scene.getEngine()._lite;
|
|
7474
|
-
if (!isBabylonUrl(source)) enableBoneControlForSkinnedAssets();
|
|
7756
|
+
if (!isBabylonUrl(source) && !isUsdUrl(source)) enableBoneControlForSkinnedAssets();
|
|
7757
|
+
if (isUsdUrl(source)) return loadUsdContainer(engine, source, usdOptions, onProgress);
|
|
7475
7758
|
return new AssetContainer(isBabylonUrl(source) ? await loadBabylon(engine, source) : await loadGltf(engine, source));
|
|
7476
7759
|
}
|
|
7760
|
+
async function loadUsdContainer(engine, source, options = {}, onProgress) {
|
|
7761
|
+
const lite = await loadUsd(engine, source, toLiteUsdOptions(resolveUsdOptions(options), void 0, onProgress));
|
|
7762
|
+
const container = new AssetContainer(lite, () => disposeUsd(lite), lite._usdMeshes);
|
|
7763
|
+
try {
|
|
7764
|
+
options.onComplete?.(lite.diagnostics);
|
|
7765
|
+
return container;
|
|
7766
|
+
} catch (error) {
|
|
7767
|
+
container.dispose();
|
|
7768
|
+
throw error;
|
|
7769
|
+
}
|
|
7770
|
+
}
|
|
7477
7771
|
//#endregion
|
|
7478
7772
|
//#region src/loading/assets-manager.ts
|
|
7479
7773
|
/**
|
|
@@ -7618,6 +7912,89 @@ var KHR_materials_variants = {
|
|
|
7618
7912
|
}
|
|
7619
7913
|
};
|
|
7620
7914
|
//#endregion
|
|
7915
|
+
//#region src/loading/usd-file-loader.ts
|
|
7916
|
+
function requireBinary(data) {
|
|
7917
|
+
if (!(data instanceof ArrayBuffer) && !ArrayBuffer.isView(data)) throw new Error("USDFileLoader expects binary USD data.");
|
|
7918
|
+
return data;
|
|
7919
|
+
}
|
|
7920
|
+
var USDFileLoader = class USDFileLoader {
|
|
7921
|
+
static get DefaultConfiguration() {
|
|
7922
|
+
return getUsdDefaultConfiguration();
|
|
7923
|
+
}
|
|
7924
|
+
static set DefaultConfiguration(configuration) {
|
|
7925
|
+
setUsdDefaultConfiguration(configuration);
|
|
7926
|
+
}
|
|
7927
|
+
name = "usd";
|
|
7928
|
+
extensions = {
|
|
7929
|
+
".usd": { isBinary: true },
|
|
7930
|
+
".usda": { isBinary: true },
|
|
7931
|
+
".usdc": { isBinary: true },
|
|
7932
|
+
".usdz": { isBinary: true }
|
|
7933
|
+
};
|
|
7934
|
+
_options;
|
|
7935
|
+
_activeLoads = /* @__PURE__ */ new Set();
|
|
7936
|
+
constructor(options = {}) {
|
|
7937
|
+
this._options = {
|
|
7938
|
+
...getUsdDefaultConfiguration(),
|
|
7939
|
+
...options
|
|
7940
|
+
};
|
|
7941
|
+
}
|
|
7942
|
+
createPlugin(options) {
|
|
7943
|
+
return new USDFileLoader(options.usd);
|
|
7944
|
+
}
|
|
7945
|
+
async importMeshAsync(_meshNames, scene, data, _rootUrl, onProgress, fileName) {
|
|
7946
|
+
const container = await this._load(scene, data, onProgress, fileName, true);
|
|
7947
|
+
return {
|
|
7948
|
+
meshes: container.meshes,
|
|
7949
|
+
particleSystems: [],
|
|
7950
|
+
skeletons: container.skeletons,
|
|
7951
|
+
animationGroups: container.animationGroups,
|
|
7952
|
+
transformNodes: [],
|
|
7953
|
+
lights: []
|
|
7954
|
+
};
|
|
7955
|
+
}
|
|
7956
|
+
async loadAsync(scene, data, _rootUrl, onProgress, fileName) {
|
|
7957
|
+
await this._load(scene, data, onProgress, fileName, true);
|
|
7958
|
+
}
|
|
7959
|
+
async loadAssetContainerAsync(scene, data, _rootUrl, onProgress, fileName) {
|
|
7960
|
+
return this._load(scene, data, onProgress, fileName, false);
|
|
7961
|
+
}
|
|
7962
|
+
dispose() {
|
|
7963
|
+
const error = /* @__PURE__ */ new Error("USDFileLoader was disposed.");
|
|
7964
|
+
for (const controller of this._activeLoads) controller.abort(error);
|
|
7965
|
+
this._activeLoads.clear();
|
|
7966
|
+
}
|
|
7967
|
+
async _load(scene, data, onProgress, fileName, add) {
|
|
7968
|
+
const controller = new AbortController();
|
|
7969
|
+
this._activeLoads.add(controller);
|
|
7970
|
+
try {
|
|
7971
|
+
const lite = await loadUsd(scene.getEngine()._lite, requireBinary(data), toLiteUsdOptions(resolveUsdOptions({
|
|
7972
|
+
...this._options,
|
|
7973
|
+
rootFileName: this._options.rootFileName ?? fileName
|
|
7974
|
+
}), controller.signal, onProgress));
|
|
7975
|
+
const container = new AssetContainer(lite, () => disposeUsd(lite), lite._usdMeshes);
|
|
7976
|
+
try {
|
|
7977
|
+
controller.signal.throwIfAborted();
|
|
7978
|
+
if (add) {
|
|
7979
|
+
addToScene(scene._lite, lite);
|
|
7980
|
+
container._adoptScene(scene);
|
|
7981
|
+
}
|
|
7982
|
+
this._options.onComplete?.(lite.diagnostics);
|
|
7983
|
+
controller.signal.throwIfAborted();
|
|
7984
|
+
return container;
|
|
7985
|
+
} catch (error) {
|
|
7986
|
+
container.dispose();
|
|
7987
|
+
throw error;
|
|
7988
|
+
}
|
|
7989
|
+
} finally {
|
|
7990
|
+
this._activeLoads.delete(controller);
|
|
7991
|
+
}
|
|
7992
|
+
}
|
|
7993
|
+
};
|
|
7994
|
+
function RegisterUSDFileLoader() {}
|
|
7995
|
+
/** @internal Babylon.js pure-registration hook; Lite has no global loader dependency registry. */
|
|
7996
|
+
function _RegisterUSDLoaderDependencies() {}
|
|
7997
|
+
//#endregion
|
|
7621
7998
|
//#region src/picking/gpu-picker.ts
|
|
7622
7999
|
/**
|
|
7623
8000
|
* Babylon.js-compatible `GPUPicker` over Babylon Lite's GPU picker
|
|
@@ -10997,16 +11374,7 @@ var MaterialPluginBase = class MaterialPluginBase {
|
|
|
10997
11374
|
* replaced by a real wrapper (and its `COMPAT-STATUS.md` row upgraded).
|
|
10998
11375
|
*/
|
|
10999
11376
|
var FLUID_RENDERER_UNSUPPORTED = "Fluid rendering requires dedicated depth, thickness, and diffuse passes plus render-target lifecycle and composition policies that Babylon Lite does not define.";
|
|
11000
|
-
var USD_LOADER_UNSUPPORTED = "OpenUSD loading requires an OpenUSD WebAssembly worker, virtual-file staging, command-buffer extraction, and a USD-to-Lite scene/material materializer; those form a new loader subsystem with unresolved ownership and material-mapping design.";
|
|
11001
11377
|
var DITHERED_TILE_FADE_UNSUPPORTED = "Lite's material-plugin bridge supports shared shader injection, but not Babylon.js per-draw mesh uniforms, hardware-instance bounds, or custom thin-instance attributes/varyings. Adding those requires an opt-in per-renderable plugin-data design.";
|
|
11002
|
-
var USDFileLoader = class {
|
|
11003
|
-
constructor(_options = {}) {
|
|
11004
|
-
unsupported("USDFileLoader", USD_LOADER_UNSUPPORTED);
|
|
11005
|
-
}
|
|
11006
|
-
};
|
|
11007
|
-
function RegisterUSDFileLoader() {
|
|
11008
|
-
return unsupported("RegisterUSDFileLoader", USD_LOADER_UNSUPPORTED);
|
|
11009
|
-
}
|
|
11010
11378
|
var FLOW_GRAPH_UNSUPPORTED = "Babylon Lite's flow-graph runtime does not expose Babylon.js FlowGraph blocks, connections, or contexts. Validation requires a stable cross-model graph adapter and block registry design.";
|
|
11011
11379
|
var FlowGraphValidationSeverity = /* @__PURE__ */ function(FlowGraphValidationSeverity) {
|
|
11012
11380
|
FlowGraphValidationSeverity[FlowGraphValidationSeverity["Error"] = 0] = "Error";
|
|
@@ -11053,6 +11421,112 @@ var FluidRendererSceneComponent = class {
|
|
|
11053
11421
|
function RegisterFluidRenderer() {
|
|
11054
11422
|
unsupported("RegisterFluidRenderer", FLUID_RENDERER_UNSUPPORTED);
|
|
11055
11423
|
}
|
|
11424
|
+
var ROOT_MOTION_UNSUPPORTED = "Babylon.js root motion analyzes animation hierarchies, rewrites in-place clips, journals mixer writes, and applies blended per-frame travel. Lite exposes animation playback but not that analysis and mixer-journal subsystem; its lifecycle and ownership require a Lite-level design.";
|
|
11425
|
+
var RootMotionSource = /* @__PURE__ */ function(RootMotionSource) {
|
|
11426
|
+
RootMotionSource[RootMotionSource["None"] = 0] = "None";
|
|
11427
|
+
RootMotionSource[RootMotionSource["Root"] = 1] = "Root";
|
|
11428
|
+
RootMotionSource[RootMotionSource["FootContact"] = 2] = "FootContact";
|
|
11429
|
+
return RootMotionSource;
|
|
11430
|
+
}({});
|
|
11431
|
+
var RootMotionClip = class {
|
|
11432
|
+
constructor(_animationGroup, _options = {}) {
|
|
11433
|
+
unsupported("RootMotionClip", ROOT_MOTION_UNSUPPORTED);
|
|
11434
|
+
}
|
|
11435
|
+
get sourceAnimationGroup() {
|
|
11436
|
+
return unsupported("RootMotionClip.sourceAnimationGroup", ROOT_MOTION_UNSUPPORTED);
|
|
11437
|
+
}
|
|
11438
|
+
get animationGroup() {
|
|
11439
|
+
return unsupported("RootMotionClip.animationGroup", ROOT_MOTION_UNSUPPORTED);
|
|
11440
|
+
}
|
|
11441
|
+
get controller() {
|
|
11442
|
+
return unsupported("RootMotionClip.controller", ROOT_MOTION_UNSUPPORTED);
|
|
11443
|
+
}
|
|
11444
|
+
get source() {
|
|
11445
|
+
return unsupported("RootMotionClip.source", ROOT_MOTION_UNSUPPORTED);
|
|
11446
|
+
}
|
|
11447
|
+
get rootNode() {
|
|
11448
|
+
return unsupported("RootMotionClip.rootNode", ROOT_MOTION_UNSUPPORTED);
|
|
11449
|
+
}
|
|
11450
|
+
get characterNode() {
|
|
11451
|
+
return unsupported("RootMotionClip.characterNode", ROOT_MOTION_UNSUPPORTED);
|
|
11452
|
+
}
|
|
11453
|
+
get contactNodes() {
|
|
11454
|
+
return unsupported("RootMotionClip.contactNodes", ROOT_MOTION_UNSUPPORTED);
|
|
11455
|
+
}
|
|
11456
|
+
get upAxis() {
|
|
11457
|
+
return unsupported("RootMotionClip.upAxis", ROOT_MOTION_UNSUPPORTED);
|
|
11458
|
+
}
|
|
11459
|
+
get fromFrame() {
|
|
11460
|
+
return unsupported("RootMotionClip.fromFrame", ROOT_MOTION_UNSUPPORTED);
|
|
11461
|
+
}
|
|
11462
|
+
get toFrame() {
|
|
11463
|
+
return unsupported("RootMotionClip.toFrame", ROOT_MOTION_UNSUPPORTED);
|
|
11464
|
+
}
|
|
11465
|
+
get travelDirection() {
|
|
11466
|
+
return unsupported("RootMotionClip.travelDirection", ROOT_MOTION_UNSUPPORTED);
|
|
11467
|
+
}
|
|
11468
|
+
get cycleOffset() {
|
|
11469
|
+
return unsupported("RootMotionClip.cycleOffset", ROOT_MOTION_UNSUPPORTED);
|
|
11470
|
+
}
|
|
11471
|
+
get cycleDistance() {
|
|
11472
|
+
return unsupported("RootMotionClip.cycleDistance", ROOT_MOTION_UNSUPPORTED);
|
|
11473
|
+
}
|
|
11474
|
+
get cycleRotation() {
|
|
11475
|
+
return unsupported("RootMotionClip.cycleRotation", ROOT_MOTION_UNSUPPORTED);
|
|
11476
|
+
}
|
|
11477
|
+
get extractsRotation() {
|
|
11478
|
+
return unsupported("RootMotionClip.extractsRotation", ROOT_MOTION_UNSUPPORTED);
|
|
11479
|
+
}
|
|
11480
|
+
get duration() {
|
|
11481
|
+
return unsupported("RootMotionClip.duration", ROOT_MOTION_UNSUPPORTED);
|
|
11482
|
+
}
|
|
11483
|
+
get averageSpeed() {
|
|
11484
|
+
return unsupported("RootMotionClip.averageSpeed", ROOT_MOTION_UNSUPPORTED);
|
|
11485
|
+
}
|
|
11486
|
+
get characterHeight() {
|
|
11487
|
+
return unsupported("RootMotionClip.characterHeight", ROOT_MOTION_UNSUPPORTED);
|
|
11488
|
+
}
|
|
11489
|
+
getOffsetAtFrame(_frame, _result) {
|
|
11490
|
+
return unsupported("RootMotionClip.getOffsetAtFrame", ROOT_MOTION_UNSUPPORTED);
|
|
11491
|
+
}
|
|
11492
|
+
getRotationAtFrame(_frame) {
|
|
11493
|
+
return unsupported("RootMotionClip.getRotationAtFrame", ROOT_MOTION_UNSUPPORTED);
|
|
11494
|
+
}
|
|
11495
|
+
dispose() {
|
|
11496
|
+
unsupported("RootMotionClip.dispose", ROOT_MOTION_UNSUPPORTED);
|
|
11497
|
+
}
|
|
11498
|
+
};
|
|
11499
|
+
var RootMotionController = class {
|
|
11500
|
+
applyToCharacter = true;
|
|
11501
|
+
onRootMotionObservable;
|
|
11502
|
+
constructor(_characterNode, _clips = []) {
|
|
11503
|
+
unsupported("RootMotionController", ROOT_MOTION_UNSUPPORTED);
|
|
11504
|
+
}
|
|
11505
|
+
get characterNode() {
|
|
11506
|
+
return unsupported("RootMotionController.characterNode", ROOT_MOTION_UNSUPPORTED);
|
|
11507
|
+
}
|
|
11508
|
+
get clips() {
|
|
11509
|
+
return unsupported("RootMotionController.clips", ROOT_MOTION_UNSUPPORTED);
|
|
11510
|
+
}
|
|
11511
|
+
get deltaPosition() {
|
|
11512
|
+
return unsupported("RootMotionController.deltaPosition", ROOT_MOTION_UNSUPPORTED);
|
|
11513
|
+
}
|
|
11514
|
+
get deltaRotation() {
|
|
11515
|
+
return unsupported("RootMotionController.deltaRotation", ROOT_MOTION_UNSUPPORTED);
|
|
11516
|
+
}
|
|
11517
|
+
addClip(_clip) {
|
|
11518
|
+
unsupported("RootMotionController.addClip", ROOT_MOTION_UNSUPPORTED);
|
|
11519
|
+
}
|
|
11520
|
+
removeClip(_clip) {
|
|
11521
|
+
unsupported("RootMotionController.removeClip", ROOT_MOTION_UNSUPPORTED);
|
|
11522
|
+
}
|
|
11523
|
+
reset() {
|
|
11524
|
+
unsupported("RootMotionController.reset", ROOT_MOTION_UNSUPPORTED);
|
|
11525
|
+
}
|
|
11526
|
+
dispose() {
|
|
11527
|
+
unsupported("RootMotionController.dispose", ROOT_MOTION_UNSUPPORTED);
|
|
11528
|
+
}
|
|
11529
|
+
};
|
|
11056
11530
|
var MultiMaterial = class {
|
|
11057
11531
|
constructor() {
|
|
11058
11532
|
unsupported("MultiMaterial", "Babylon Lite uses one material per renderable. Split the mesh geometry by material into separate meshes instead.");
|
|
@@ -12334,6 +12808,6 @@ var NodeParticleSystemSet = class NodeParticleSystemSet {
|
|
|
12334
12808
|
}
|
|
12335
12809
|
};
|
|
12336
12810
|
//#endregion
|
|
12337
|
-
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, 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, CreateSoundAsync, CreateSoundBufferAsync, CreateSoundSourceAsync, CreateSphere, CreateStreamingSoundAsync, CreateTexture2DArrayFromImageUrlsAsync, CreateTexture2DArrayFromKTX2Async, CreateTiledBox, CreateTiledPlane, CreateTorus, CubeTexture, CubicEase, Curve3, CustomAssetTask, DefaultRenderingPipeline, DepthOfFieldEffect, DepthRenderer, DeviceOrientationCamera, DirectionalLight, DistanceConstraint, DitheredTileFadeMaterialPlugin, DynamicTexture, EASINGMODE_EASEIN, EASINGMODE_EASEINOUT, EASINGMODE_EASEOUT, EasingFunction, EdgesRenderer, EffectLayer, ElasticEase, Engine, Epsilon, ExecuteCodeAction, ExponentialEase, FBXConstraintBehavior, FBXConstraintSolver, FBXFileLoader, FBXFileLoaderMetadata, FSR1RenderingPipeline, FactorGradient, FadeInOutBehavior, FlowGraphValidationSeverity, FluidRenderer, FluidRendererSceneComponent, FluidRenderingObject, FluidRenderingObjectCustomParticles, FluidRenderingObjectParticleSystem, FluidRenderingTargetRenderer, FlyCamera, FollowBehavior, FollowCamera, FrameGraphMeshBlendingTask, FramingBehavior, FreeCamera, Frustum, FxaaPostProcess, gltf1_exports as GLTF1, gltf2_exports as GLTF2, GPUParticleSystem, GPUPicker, GUID, GamepadCamera, GaussianSplattingMesh, GaussianSplattingStream, GeometryBufferRenderer, GeospatialCamera, GeospatialClippingBehavior, GetElementPixelFromUv, 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, 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, PointsCloudSystem, Polar, PositionGizmo, PostProcess, PowerEase, PrecisionDate, PredicateCondition, PrismaticConstraint, PushMaterial, QuadraticEase, QuarticEase, Quaternion, QuinticEase, RandomGUID, RawTexture, RawTexture2DArray, RawTexture3D, Ray, RecastJSPlugin, RectAreaLight, ReflectionProbe, RegisterAbstractEngineTextureLoaders, RegisterComputeShader, RegisterEnginesExtensionsEngineTexture2DArrayImageSource, RegisterEnginesWebGPUExtensionsEngineTexture2DArrayImageSource, RegisterFluidRenderer, RegisterGreasedLinePluginMaterial, RegisterImageProcessingConfiguration, RegisterMeshBlendingPostProcessBlock, RegisterOpenpbrMaterial, RegisterUSDFileLoader, RenderTargetTexture, RotationGizmo, 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, 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, registerBuiltInLoaders, transformCoordinates, transformNormal, unsupported };
|
|
12811
|
+
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, 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, DeviceOrientationCamera, DirectionalLight, DistanceConstraint, DitheredTileFadeMaterialPlugin, DynamicTexture, EASINGMODE_EASEIN, EASINGMODE_EASEINOUT, EASINGMODE_EASEOUT, EasingFunction, EdgesRenderer, EffectLayer, ElasticEase, Engine, Epsilon, ExecuteCodeAction, ExponentialEase, ExtrudePolygon, FBXConstraintBehavior, FBXConstraintSolver, FBXFileLoader, FBXFileLoaderMetadata, FSR1RenderingPipeline, FactorGradient, FadeInOutBehavior, FlowGraphValidationSeverity, FluidRenderer, FluidRendererSceneComponent, FluidRenderingObject, FluidRenderingObjectCustomParticles, FluidRenderingObjectParticleSystem, FluidRenderingTargetRenderer, FlyCamera, FollowBehavior, FollowCamera, FrameGraphMeshBlendingTask, FramingBehavior, FreeCamera, Frustum, FxaaPostProcess, gltf1_exports as GLTF1, gltf2_exports as GLTF2, GPUParticleSystem, GPUPicker, GUID, GamepadCamera, GaussianSplattingMesh, GaussianSplattingStream, GeometryBufferRenderer, GeospatialCamera, GeospatialClippingBehavior, GetElementPixelFromUv, 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, 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, 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, RegisterGreasedLinePluginMaterial, RegisterImageProcessingConfiguration, RegisterMeshBlendingPostProcessBlock, RegisterOpenpbrMaterial, RegisterPolygonBuilder, RegisterSPLATFileLoader, RegisterUSDFileLoader, 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, 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, _RegisterUSDLoaderDependencies, registerBuiltInLoaders, transformCoordinates, transformNormal, unsupported };
|
|
12338
12812
|
|
|
12339
12813
|
//# sourceMappingURL=index.js.map
|