@babylonjs/lite-compat 1.21.0-preview → 1.23.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.d.ts +46 -0
- package/index.js +54 -8
- package/index.js.map +1 -1
- package/{meshes-eNVvq5sm.js → meshes-CidWpEh8.js} +6 -6
- package/meshes-CidWpEh8.js.map +1 -0
- package/navigation.js +1 -1
- package/package.json +4 -4
- package/meshes-eNVvq5sm.js.map +0 -1
package/index.d.ts
CHANGED
|
@@ -1754,6 +1754,10 @@ export declare const Frustum: {
|
|
|
1754
1754
|
GetPlanesToRef(transform: Matrix, planes: Plane[]): void;
|
|
1755
1755
|
};
|
|
1756
1756
|
|
|
1757
|
+
export declare class FSR1RenderingPipeline {
|
|
1758
|
+
constructor();
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1757
1761
|
export declare class FxaaPostProcess {
|
|
1758
1762
|
constructor();
|
|
1759
1763
|
}
|
|
@@ -1853,6 +1857,18 @@ export declare function GetElementPixelFromUv(): never;
|
|
|
1853
1857
|
|
|
1854
1858
|
export declare function GetPointsCount(..._args: unknown[]): never;
|
|
1855
1859
|
|
|
1860
|
+
/**
|
|
1861
|
+
* Babylon.js `GetSupportedSimultaneousLights(scene, maxSimultaneousLights)`.
|
|
1862
|
+
*
|
|
1863
|
+
* Returns the number of simultaneous lights the engine can actually render, which
|
|
1864
|
+
* may be lower than the requested maximum. Engines that declare one uniform buffer
|
|
1865
|
+
* per light in the vertex shader (WebGPU) are bounded by
|
|
1866
|
+
* `maxUniformBuffersPerShaderStage`; past that limit every pipeline creation is
|
|
1867
|
+
* rejected by the validator and nothing renders. Engines that do not report the
|
|
1868
|
+
* limit leave the requested count untouched.
|
|
1869
|
+
*/
|
|
1870
|
+
export declare function GetSupportedSimultaneousLights(scene: Scene, maxSimultaneousLights: number): number;
|
|
1871
|
+
|
|
1856
1872
|
/** Shared base for compat gizmos (Babylon.js `Gizmo`). */
|
|
1857
1873
|
declare abstract class GizmoBase {
|
|
1858
1874
|
protected constructor(layer: UtilityLayerRenderer);
|
|
1859
1875
|
abstract get attachedMesh(): AbstractMesh | null;
|
|
@@ -2061,6 +2077,19 @@ declare interface GroundOptions {
|
|
|
2061
2077
|
subdivisions?: number;
|
|
2062
2078
|
}
|
|
2063
2079
|
|
|
2080
|
+
/**
|
|
2081
|
+
* Namespace-like object used to manipulate GUIDs, matching Babylon.js `GUID`.
|
|
2082
|
+
* Babylon.js declares `GUID` as a `const` object literal rather than a class, so the
|
|
2083
|
+
* compat layer mirrors that shape: consumers call `GUID.RandomId()` without `new`.
|
|
2084
|
+
*/
|
|
2085
|
+
export declare const GUID: {
|
|
2086
|
+
/**
|
|
2087
|
+
* Generate a pseudo-random RFC4122 v4 UUID. Alias of {@link RandomGUID}.
|
|
2088
|
+
* @returns a pseudo random id
|
|
2089
|
+
*/
|
|
2090
|
+
RandomId: typeof RandomGUID;
|
|
2091
|
+
};
|
|
2092
|
+
|
|
2064
2093
|
export declare class HandConstraintBehavior {
|
|
2065
2094
|
constructor();
|
|
2066
2095
|
}
|
|
@@ -3668,6 +3697,15 @@ export declare class QuinticEase extends EasingFunction {
|
|
|
3668
3697
|
easeInCore(gradient: number): number;
|
|
3669
3698
|
}
|
|
3670
3699
|
|
|
3700
|
+
/** Babylon.js-compatible GUID helpers (`@babylonjs/core` `Misc/guid`). */
|
|
3701
|
+
/**
|
|
3702
|
+
* Generate a pseudo-random RFC4122 v4 UUID, matching Babylon.js `RandomGUID`.
|
|
3703
|
+
* Be aware `Math.random()` could cause collisions, but all except 6 of the 128 bits are
|
|
3704
|
+
* randomly generated, so any two ids have a 1 in 2^122 chance of colliding.
|
|
3705
|
+
* @returns a pseudo random id
|
|
3706
|
+
*/
|
|
3707
|
+
export declare function RandomGUID(): string;
|
|
3708
|
+
|
|
3671
3709
|
/**
|
|
3672
3710
|
* Babylon.js `RawTexture` — a texture created from raw pixel bytes. Backed by
|
|
3673
3711
|
* Babylon Lite's `createTexture2DFromPixels`; the GPU handle is available
|
|
@@ -4654,6 +4692,14 @@ declare interface TextureLike {
|
|
|
4654
4692
|
export declare class ThinEngine extends AbstractEngine {
|
|
4655
4693
|
}
|
|
4656
4694
|
|
|
4695
|
+
export declare class ThinFSR1SharpenPostProcess {
|
|
4696
|
+
constructor();
|
|
4697
|
+
}
|
|
4698
|
+
|
|
4699
|
+
export declare class ThinFSR1UpscalePostProcess {
|
|
4700
|
+
constructor();
|
|
4701
|
+
}
|
|
4702
|
+
|
|
4657
4703
|
/**
|
|
4658
4704
|
* Babylon.js `ThinSprite` — a lightweight pixel-space sprite drawn by a
|
|
4659
4705
|
* {@link SpriteRenderer}. Position is in screen pixels (origin bottom-left, +Y
|
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { V as Vector3, u as unsupported, L as LiteCompatError, N as Node, M as Matrix, C as Color3, S as StandardMaterial, a as Color4, b as Mesh, T as TransformNode, l as liteBackedVector3, Q as Quaternion } from "./meshes-
|
|
5
|
-
import { A, B, c, d, e, f, g, h, i, j, k, m, n, o, p, q, G, I, r, s, t, P, v, w, x, y, z, D, E, F, H, J, K, O, R } from "./meshes-
|
|
4
|
+
import { V as Vector3, u as unsupported, L as LiteCompatError, N as Node, M as Matrix, C as Color3, S as StandardMaterial, a as Color4, b as Mesh, T as TransformNode, l as liteBackedVector3, Q as Quaternion } from "./meshes-CidWpEh8.js";
|
|
5
|
+
import { A, B, c, d, e, f, g, h, i, j, k, m, n, o, p, q, G, I, r, s, t, P, v, w, x, y, z, D, E, F, H, J, K, O, R } from "./meshes-CidWpEh8.js";
|
|
6
6
|
import { VERSION, createEngine, onBeforeRender, stopEngine, resizeEngine, setEngineSize, disposeEngine, uploadImageToArrayLayer, enableMirroredMeshes, registerSceneWithShadowSupport, registerScene, startEngine, createNullEngine, stepScene, setPhysicsTimestep, setPhysicsGravity, disposePhysics, createHavokWorld, createArcRotateCamera, attachControl, getCameraPosition, getViewMatrix, getProjectionMatrix, createGeospatialCamera, setGeospatialOrientation, attachGeospatialControls, createFreeCamera, attachFreeControl, setAnimationAdditive, playAnimation, pauseAnimation, goToFrame, stopAnimation, createSceneContext, updateAnimationManager, setFog, setClipPlane, loadHdrEnvironment, loadDdsEnvironment, loadEnvironment, createDefaultCamera, addToScene, createHemisphericLight, createAnimationManager, enableAnimationBlending, addAnimationGroup, disposeScene, createDirectionalLight, createPointLight, createSpotLight, createClusteredLightContainer, createClusteredPointLight, removeFromScene, addClusteredLightContainer, markClusteredLightContainerDirty, createCsgFromMesh, csgSubtract, csgIntersect, csgUnion, createMeshFromCsg, createCsg2FromMesh, csg2Subtract, csg2Intersect, csg2Add, createMeshesFromCsg2, disposeCsg2, initializeCsg2Async, createMorphTargets, setMorphTargetWeights, createTransformNode, bakeCurrentTransformIntoVertices, loadSOG, loadSPZ, loadSplat, createDynamicTexture, updateDynamicTexture, createTexture2DFromPixels, updateTexture2DFromPixels, createTexture3DFromPixels, loadBasisTexture2D, loadKtxTexture2D, loadTexture2D, createTexture2DArrayFromUrls, createTexture2DArrayFromKtx2, loadImageToArrayLayer, createTexture2DArray, createTexture2DArrayFromPixels, updateTexture2DArrayFromPixels, loadBabylon, loadGltf, resetVariant, getVariantNames, selectVariant, disposePicker, createGpuPicker, pickAsync, createAxisDragGizmo, attachAxisDragGizmoToNode, disposeAxisDragGizmo, createAxisScaleGizmo, attachAxisScaleGizmoToNode, disposeAxisScaleGizmo, createBoundingBoxGizmo, attachBoundingBoxGizmoToNode, disposeBoundingBoxGizmo, createCameraGizmo, attachCameraGizmoToCamera, disposeCameraGizmo, createLightGizmo, attachLightGizmoToLight, disposeLightGizmo, createPlaneDragGizmo, attachPlaneDragGizmoToNode, disposePlaneDragGizmo, createPlaneRotationGizmo, attachPlaneRotationGizmoToNode, disposePlaneRotationGizmo, createPositionGizmo, setPositionGizmoLocalCoordinates, attachPositionGizmoToNode, disposePositionGizmo, createRotationGizmo, setRotationGizmoLocalCoordinates, attachRotationGizmoToNode, disposeRotationGizmo, createScaleGizmo, setScaleGizmoLocalCoordinates, attachScaleGizmoToNode, disposeScaleGizmo, createUtilityLayer, registerUtilityLayer, disposeUtilityLayer, addBillboardSpriteIndex, updateBillboardSpriteIndex, loadSpriteAtlas, createFacingBillboardSystem, addFacingBillboardSystem, billboardBlendAdditive, billboardBlendAlpha, spriteBlendPremultiplied, spriteBlendAdditive, spriteBlendAlpha, createSprite2DLayer, addSprite2DIndex, createSpriteRenderer, registerSpriteRenderer, updateSprite2DIndex, createPcfSpotlightShadowGenerator, createPcfDirectionalShadowGenerator, createEsmDirectionalShadowGenerator, setShadowTaskCasterMeshes, parseNodeMaterialFromSnippet, createGridMaterial, getByteFrequencyData, getFloatFrequencyData, getByteTimeDomainData, getFloatTimeDomainData, enableAnalyzer, setSpatialPosition, setSpatialOrientation, enableSpatial, setSpatialListenerPosition, setSpatialListener, updateSpatialAudio, enableStereo, setStereoPan, disposeAudioBus, setBusVolume, getMasterVolume, setMasterVolume, unlockAudioEngineAsync, createSoundAsync, createSoundBufferAsync, createStreamingSoundAsync, createAudioBusAsync, createSoundSourceAsync, createMicrophoneSoundSourceAsync, disposeAudioEngine, createAudioEngineAsync, disposeSoundSource, setSoundSourceVolume, playSound, pauseSound, resumeSound, stopSound, disposeSound, setSoundVolume, playStreamingSound, pauseStreamingSound, resumeStreamingSound, stopStreamingSound, preloadStreamingInstanceAsync, preloadStreamingInstancesAsync, disposeStreamingSound, setStreamingSoundVolume, startParticleSystem, animateParticleSystem, stopParticleSystem, createParticleBillboard, syncParticleBillboard, parseNodeParticleSetFromSnippet, registerNodeParticleSet } from "@babylonjs/lite";
|
|
7
7
|
const Epsilon = 1e-3;
|
|
8
8
|
const ToRadians = Math.PI / 180;
|
|
@@ -673,7 +673,7 @@ class AbstractEngine {
|
|
|
673
673
|
* WebGPU baseline. A headless `NullEngine` has no device, so all flags are off.
|
|
674
674
|
*/
|
|
675
675
|
getCaps() {
|
|
676
|
-
var _a;
|
|
676
|
+
var _a, _b;
|
|
677
677
|
const device = (_a = this._lite) == null ? void 0 : _a._device;
|
|
678
678
|
const has = (name) => {
|
|
679
679
|
var _a2;
|
|
@@ -694,6 +694,12 @@ class AbstractEngine {
|
|
|
694
694
|
textureHalfFloat: true,
|
|
695
695
|
textureFloatLinearFiltering: true,
|
|
696
696
|
maxTextureSize: 8192,
|
|
697
|
+
// Maximum uniform buffers bindable to a single shader stage. BJS reports this
|
|
698
|
+
// only for engines that enforce it as a hard limit (WebGPU); Babylon Lite is
|
|
699
|
+
// WebGPU-only, so it forwards the device's reported limit, and leaves it
|
|
700
|
+
// undefined for a device-less NullEngine — matching BJS's "left undefined
|
|
701
|
+
// elsewhere" contract.
|
|
702
|
+
maxUniformBuffersPerShaderStage: (_b = device == null ? void 0 : device.limits) == null ? void 0 : _b.maxUniformBuffersPerShaderStage,
|
|
697
703
|
instancedArrays: true,
|
|
698
704
|
uintIndices: true
|
|
699
705
|
};
|
|
@@ -5788,6 +5794,15 @@ class GridMaterial {
|
|
|
5788
5794
|
dispose() {
|
|
5789
5795
|
}
|
|
5790
5796
|
}
|
|
5797
|
+
const NON_LIGHT_VERTEX_UNIFORM_BUFFER_COUNT = 4;
|
|
5798
|
+
function GetSupportedSimultaneousLights(scene, maxSimultaneousLights) {
|
|
5799
|
+
const maxUniformBuffersPerShaderStage = scene.getEngine().getCaps().maxUniformBuffersPerShaderStage;
|
|
5800
|
+
if (maxUniformBuffersPerShaderStage == null) {
|
|
5801
|
+
return maxSimultaneousLights;
|
|
5802
|
+
}
|
|
5803
|
+
const supported = Math.max(maxUniformBuffersPerShaderStage - NON_LIGHT_VERTEX_UNIFORM_BUFFER_COUNT, 0);
|
|
5804
|
+
return Math.min(maxSimultaneousLights, supported);
|
|
5805
|
+
}
|
|
5791
5806
|
const EASINGMODE_EASEIN = 0;
|
|
5792
5807
|
const EASINGMODE_EASEOUT = 1;
|
|
5793
5808
|
const EASINGMODE_EASEINOUT = 2;
|
|
@@ -5908,6 +5923,20 @@ class BounceEase extends EasingFunction {
|
|
|
5908
5923
|
return -Math.pow(1 / bounciness, num - num7) / (num13 * num13) * (num12 - num13) * (num12 + num13);
|
|
5909
5924
|
}
|
|
5910
5925
|
}
|
|
5926
|
+
function RandomGUID() {
|
|
5927
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c2) => {
|
|
5928
|
+
const r2 = Math.random() * 16 | 0;
|
|
5929
|
+
const v2 = c2 === "x" ? r2 : r2 & 3 | 8;
|
|
5930
|
+
return v2.toString(16);
|
|
5931
|
+
});
|
|
5932
|
+
}
|
|
5933
|
+
const GUID = {
|
|
5934
|
+
/**
|
|
5935
|
+
* Generate a pseudo-random RFC4122 v4 UUID. Alias of {@link RandomGUID}.
|
|
5936
|
+
* @returns a pseudo random id
|
|
5937
|
+
*/
|
|
5938
|
+
RandomId: RandomGUID
|
|
5939
|
+
};
|
|
5911
5940
|
const Tools = {
|
|
5912
5941
|
/** High-resolution timestamp in milliseconds. */
|
|
5913
5942
|
Now() {
|
|
@@ -5925,11 +5954,7 @@ const Tools = {
|
|
|
5925
5954
|
},
|
|
5926
5955
|
/** Generate an RFC4122 v4 UUID (used by Babylon.js for unique ids). */
|
|
5927
5956
|
RandomId() {
|
|
5928
|
-
return
|
|
5929
|
-
const r2 = Math.random() * 16 | 0;
|
|
5930
|
-
const v2 = c2 === "x" ? r2 : r2 & 3 | 8;
|
|
5931
|
-
return v2.toString(16);
|
|
5932
|
-
});
|
|
5957
|
+
return RandomGUID();
|
|
5933
5958
|
}
|
|
5934
5959
|
};
|
|
5935
5960
|
const ActionManagerTriggers = {
|
|
@@ -7682,6 +7707,21 @@ class SSAO2RenderingPipeline {
|
|
|
7682
7707
|
unsupported("SSAO2RenderingPipeline", "SSAO is not implemented in Babylon Lite.");
|
|
7683
7708
|
}
|
|
7684
7709
|
}
|
|
7710
|
+
class FSR1RenderingPipeline {
|
|
7711
|
+
constructor() {
|
|
7712
|
+
unsupported("FSR1RenderingPipeline", "FSR 1 upscaling is not implemented in Babylon Lite; it has no PostProcessRenderPipeline subsystem.");
|
|
7713
|
+
}
|
|
7714
|
+
}
|
|
7715
|
+
class ThinFSR1UpscalePostProcess {
|
|
7716
|
+
constructor() {
|
|
7717
|
+
unsupported("ThinFSR1UpscalePostProcess", "FSR 1 (EASU) upscaling is not implemented in Babylon Lite.");
|
|
7718
|
+
}
|
|
7719
|
+
}
|
|
7720
|
+
class ThinFSR1SharpenPostProcess {
|
|
7721
|
+
constructor() {
|
|
7722
|
+
unsupported("ThinFSR1SharpenPostProcess", "FSR 1 (RCAS) sharpening is not implemented in Babylon Lite.");
|
|
7723
|
+
}
|
|
7724
|
+
}
|
|
7685
7725
|
class ParticleHelper {
|
|
7686
7726
|
constructor() {
|
|
7687
7727
|
unsupported(
|
|
@@ -8215,6 +8255,7 @@ export {
|
|
|
8215
8255
|
ExecuteCodeAction,
|
|
8216
8256
|
ExponentialEase,
|
|
8217
8257
|
FBXFileLoader,
|
|
8258
|
+
FSR1RenderingPipeline,
|
|
8218
8259
|
FactorGradient,
|
|
8219
8260
|
FadeInOutBehavior,
|
|
8220
8261
|
FlyCamera,
|
|
@@ -8226,6 +8267,7 @@ export {
|
|
|
8226
8267
|
FxaaPostProcess,
|
|
8227
8268
|
GPUParticleSystem,
|
|
8228
8269
|
GPUPicker,
|
|
8270
|
+
GUID,
|
|
8229
8271
|
GamepadCamera,
|
|
8230
8272
|
GaussianSplattingMesh,
|
|
8231
8273
|
GaussianSplattingStream,
|
|
@@ -8234,6 +8276,7 @@ export {
|
|
|
8234
8276
|
GeospatialClippingBehavior,
|
|
8235
8277
|
GetElementPixelFromUv,
|
|
8236
8278
|
GetPointsCount,
|
|
8279
|
+
GetSupportedSimultaneousLights,
|
|
8237
8280
|
GizmoManager,
|
|
8238
8281
|
GlowLayer,
|
|
8239
8282
|
GreasedLineBaseMesh,
|
|
@@ -8332,6 +8375,7 @@ export {
|
|
|
8332
8375
|
QuarticEase,
|
|
8333
8376
|
Quaternion,
|
|
8334
8377
|
QuinticEase,
|
|
8378
|
+
RandomGUID,
|
|
8335
8379
|
RawTexture,
|
|
8336
8380
|
RawTexture2DArray,
|
|
8337
8381
|
RawTexture3D,
|
|
@@ -8382,6 +8426,8 @@ export {
|
|
|
8382
8426
|
TargetCamera,
|
|
8383
8427
|
Texture,
|
|
8384
8428
|
ThinEngine,
|
|
8429
|
+
ThinFSR1SharpenPostProcess,
|
|
8430
|
+
ThinFSR1UpscalePostProcess,
|
|
8385
8431
|
ThinSprite,
|
|
8386
8432
|
ToDegrees,
|
|
8387
8433
|
ToRadians,
|