@babylonjs/lite-compat 1.39.0-preview → 1.39.2
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/CHANGELOG.md +1739 -0
- package/README.md +3 -3
- package/index.d.ts +85 -12
- package/index.js +187 -23
- package/index.js.map +1 -1
- package/{meshes-C-PkzbPM.js → meshes-DWnDIh1l.js} +126 -20
- package/meshes-DWnDIh1l.js.map +1 -0
- package/navigation.d.ts +20 -11
- package/navigation.js +1 -1
- package/package.json +8 -5
- package/meshes-C-PkzbPM.js.map +0 -1
package/README.md
CHANGED
|
@@ -127,7 +127,7 @@ overloads within a supported area may still be absent.
|
|
|
127
127
|
| Meshes & geometry (class chain, `MeshBuilder` primitives, transforms, thin instances, `clone`, `VertexData`, `Mesh.MergeMeshes`) | ⚡ | Gaussian GPU-sort helper math is available and GPU-sort preferences preserve Lite's CPU-worker fallback; explicit GPU sorter/output resource classes still throw. `CreateLines`/`CreateLineSystem`, dashed lines, mesh metadata/blending tags, and common merges work; polygon/decal/text/tiled builders, thick lines, instances, LOD/edges/outline remain unsupported |
|
|
128
128
|
| CSG / CSG2 | ✅ | over Lite boolean ops |
|
|
129
129
|
| Gizmos (position/rotation/scale/bounding-box/light/camera + `GizmoManager`) | ⚡ | over Lite gizmo suite; `isEnabled` toggles per-axis interactivity (display-only when disabled) |
|
|
130
|
-
| Materials (`StandardMaterial`, `PBRMaterial`, metallic-rough / spec-gloss, `NodeMaterial`) | ⚡ |
|
|
130
|
+
| Materials (`StandardMaterial`, `PBRMaterial`, metallic-rough / spec-gloss, `NodeMaterial`) | ⚡ | Includes native bent-normal IBL occlusion and cloned loaded PBR materials; BJS parallax scale semantics, Gaussian-splat plugins, preprocessed `ShaderMaterial`, `MultiMaterial`, `BackgroundMaterial`, and `OpenPBRMaterial` remain unsupported |
|
|
131
131
|
| Textures (`Texture`, `RawTexture`, `RawTexture2DArray`, `RawTexture3D`, `DynamicTexture`, `HtmlTexture`, `ExternalTexture`, cube textures) | ⚡ | New texture/scatter processors support exact constant-only paths; textured operands need BJS's missing procedural render-target pipeline and throw. Arrays, base-level 3D volumes, dynamic/HTML/external textures, and cube environments work; `RenderTargetTexture` / `MirrorTexture` remain unsupported |
|
|
132
132
|
| Animation (keyframe `Animation`, easing, `Animatable`, `AnimationGroup` incl. weighted/additive blend) | ⚡ | All standard easing classes, including `PowerEase` / `BezierCurveEase`, reuse Lite's native functional curves; `beginAnimation` / `beginDirectAnimation` delegate supported float/vector/quaternion tracks to Lite property animation; unsupported tracks use an explicit compat evaluator; structural groups remain compat-owned; loaded glTF skeletal blending supported; root-motion analysis/controller APIs throw |
|
|
133
133
|
| Morph targets (`MorphTarget` / `MorphTargetManager`) | ✅ | over Lite morph targets, including named loader-produced targets and live influence writes |
|
|
@@ -137,7 +137,7 @@ overloads within a supported area may still be absent.
|
|
|
137
137
|
| Audio V2 (`AudioEngineV2`, `StaticSound`, `StreamingSound`, `AudioBus`, buses/sources/analyzer) | ⚡ | over Lite's AudioV2 port; `MainAudioBus` spatial/analyzer and a second main bus unsupported |
|
|
138
138
|
| Physics (`HavokPlugin`, `scene.enablePhysics`/`getPhysicsEngine`, `PhysicsAggregate`/`PhysicsBody`/`PhysicsShape`) | ⚡ | Native Havok V2 forwarding for common body/shape operations, thin-instance bodies, and filtered raycasts with instance indices; unrecognized enum values throw at the compat boundary |
|
|
139
139
|
| Particles (`NodeParticleSystemSet` / `ParticleSystemSet` — Node Particle Editor) | ⚡ | NPE snippet/JSON graphs: `Parse`/`ParseFromSnippetAsync` → `buildAsync` → `start`, with stable named systems through both `set.systems` and `scene.particleSystems`, plus `isStarted`; imperative classic/GPU/solid construction and programmatic block authoring remain unsupported |
|
|
140
|
-
| Post-processes, layers (glow/highlight), probes, WebXR | ❌ | Babylon.js wrapper classes
|
|
140
|
+
| Post-processes, layers (glow/highlight), probes, WebXR | ❌ | Babylon.js wrapper classes remain unsupported; Lite SSAO has materially different sampling/intensity/blur semantics and is available through native tasks |
|
|
141
141
|
|
|
142
142
|
### `@babylonjs/loaders`
|
|
143
143
|
|
|
@@ -148,7 +148,7 @@ overloads within a supported area may still be absent.
|
|
|
148
148
|
| glTF 1.0 loader and extensions | ❌ | named `GLTF1` stubs throw; Lite has no legacy parser, extension registry, or material-conversion subsystem |
|
|
149
149
|
| OpenPBR glTF material adapter | ❌ | exported at root and under `GLTF2`; throws because Lite has no OpenPBR material subsystem |
|
|
150
150
|
| OpenUSD (`USDFileLoader`) | ⚡ | delegates binary import, virtual files, callbacks, diagnostics, asset containers, and disposal to Lite; all four custom runtime assets must share one directory |
|
|
151
|
-
| `SceneLoader` (`ImportMeshAsync` / `AppendAsync` / `LoadAssetContainerAsync`), `AssetsManager` | ⚡ | `AssetContainer`
|
|
151
|
+
| `SceneLoader` (`ImportMeshAsync` / `AppendAsync` / `LoadAssetContainerAsync`), `AssetsManager` | ⚡ | `AssetContainer` supports canonical loaded handles and clone-backed `instantiateModelsToScene` for non-animated/non-skinned hierarchies |
|
|
152
152
|
| Gaussian Splatting (`.ply` / `.splat` / `.sog` / `.spz`) | ⚡ | `GaussianSplattingMesh` wraps eager Lite loaders and Lite's opt-in point renderer; point render scale supports `"auto"` or exact `1 / n` multipliers for divisors 1–8. BJS streaming and standalone point-renderer/blit classes remain named stubs |
|
|
153
153
|
| `OBJ` / `STL` / `FBX` / `BVH` | ❌ | parser/materializer subsystems are not in Lite — convert to glTF |
|
|
154
154
|
|
package/index.d.ts
CHANGED
|
@@ -132,6 +132,9 @@ export declare abstract class AbstractEngine {
|
|
|
132
132
|
* configuration internally, so this is a settable no-op kept for API shape.
|
|
133
133
|
*/
|
|
134
134
|
useReverseDepthBuffer: boolean;
|
|
135
|
+
private _maxFramesInFlight;
|
|
136
|
+
get maxFramesInFlight(): number;
|
|
137
|
+
set maxFramesInFlight(value: number);
|
|
135
138
|
/** Babylon.js `engine.onResizeObservable` — fires after `resize()` / `setSize()`. */
|
|
136
139
|
readonly onResizeObservable: Observable<AbstractEngine>;
|
|
137
140
|
/** Babylon.js context-loss signal, forwarded from Lite's device-loss subscription. */
|
|
@@ -878,7 +881,7 @@ export declare class AreaLightTextureTools {
|
|
|
878
881
|
constructor(engine: AbstractEng
|
|
879
882
|
|
|
880
883
|
export declare class AssetContainer {
|
|
881
884
|
private readonly _dispose;
|
|
882
885
|
private _sceneDisposeObserver;
|
|
883
886
|
private _disposed;
|
|
884
|
-
constructor(lite: AssetContainer_2, dispose?: () => void, ownedMeshes?: readonly Mesh_2[]);
|
|
887
|
+
constructor(lite: AssetContainer_2, dispose?: () => void, ownedMeshes?: readonly Mesh_2[], scene?: Scene);
|
|
885
888
|
get animationGroups(): AnimationGroup_2[];
|
|
886
889
|
/**
|
|
887
890
|
* Flat list of the loaded meshes as canonical, stable-identity compat `Mesh`
|
|
@@ -888,6 +891,18 @@ export declare class AssetContainer {
|
|
|
888
891
|
private readonly _dispose;
|
|
889
892
|
private
|
|
890
893
|
*/
|
|
891
894
|
get meshes(): Mesh[];
|
|
892
895
|
get skeletons(): Skeleton[];
|
|
896
|
+
/**
|
|
897
|
+
* Babylon.js `AssetContainer.instantiateModelsToScene` for clone-backed Lite
|
|
898
|
+
* hierarchies. Materials can be cloned independently; animation/skeleton
|
|
899
|
+
* retargeting remains outside Lite's clone contract.
|
|
900
|
+
*/
|
|
901
|
+
instantiateModelsToScene(nameFunction?: (sourceName: string) => string, cloneMaterials?: boolean, options?: {
|
|
902
|
+
doNotInstantiate?: boolean;
|
|
903
|
+
}): {
|
|
904
|
+
rootNodes: TransformNode[];
|
|
905
|
+
skeletons: Skeleton[];
|
|
906
|
+
animationGroups: AnimationGroup_2[];
|
|
907
|
+
};
|
|
893
908
|
/** Add every entity, animation group, camera, and clear colour to the scene. */
|
|
894
909
|
addAllToScene(scene: Scene): void;
|
|
895
910
|
dispose(): void;
|
|
896
911
|
private _detachFromScene;
|
|
@@ -1088,7 +1103,9 @@ export declare class BaseSixDofDragBehavior {
|
|
|
1088
1103
|
}
|
|
1089
1104
|
|
|
1090
1105
|
export declare abstract class BaseTexture {
|
|
1091
|
-
name: string;
|
|
1092
1106
|
getClassName(): string;
|
|
1093
1107
|
/**
|
|
1108
|
+
name: string;
|
|
1109
|
+
private _level;
|
|
1094
1110
|
get level(): number;
|
|
1111
|
+
set level(value: number);
|
|
1095
1112
|
getClassName(): string;
|
|
1096
1113
|
/**
|
|
1097
1114
|
* Babylon.js `BaseTexture.getInternalTexture()` — the backend texture handle. Babylon.js
|
|
1098
1115
|
* returns an `InternalTexture`; the compat layer's equivalent is the Lite texture handle,
|
|
1099
1116
|
* which is what the compat engine's texture methods accept.
|
|
@@ -1787,8 +1804,7 @@ export declare class CubeTexture extends BaseTexture {
|
|
|
1787
1804
|
readonly url: string;
|
|
1788
1805
|
/** Babylon.js `coordinatesMode` (skybox = 5). Recorded for API parity. */
|
|
1789
1806
|
coordinatesMode: number;
|
|
1790
|
-
gammaSpace: boolean;
|
|
1791
|
-
level: number;
|
|
1792
1807
|
/** Fires when the cube map is "ready" (resolved on a microtask in this compat layer). */
|
|
1808
|
+
gammaSpace: boolean;
|
|
1793
1809
|
/** Fires when the cube map is "ready" (resolved on a microtask in this compat layer). */
|
|
1794
1810
|
readonly onLoadObservable: Observable<CubeTexture>;
|
|
1795
1811
|
/**
|
|
1796
1812
|
* Babylon.js `CubeTexture.rotationY` — rotation of the environment around the Y axis, in radians. A scene that uses the
|
|
@@ -1870,6 +1886,23 @@ declare interface DefaultEnvironmentOptions {
|
|
|
1870
1886
|
/** Babylon.js EnvironmentHelper tone-mapping toggle (default true). */
|
|
1871
1887
|
toneMappingEnabled?: boolean;
|
|
1872
1888
|
|
|
1889
|
+
export declare class DefaultKTX2EncoderOptions {
|
|
1890
|
+
private _dirty;
|
|
1891
|
+
private _etc1sQualityLevel;
|
|
1892
|
+
private _etc1sCompressionLevel;
|
|
1893
|
+
private _uastcQualityLevel;
|
|
1894
|
+
private _zstandard;
|
|
1895
|
+
get isDirty(): boolean;
|
|
1896
|
+
get etc1sQualityLevel(): number | undefined;
|
|
1897
|
+
set etc1sQualityLevel(value: number | undefined);
|
|
1898
|
+
get etc1sCompressionLevel(): number | undefined;
|
|
1899
|
+
set etc1sCompressionLevel(value: number | undefined);
|
|
1900
|
+
get uastcQualityLevel(): number | undefined;
|
|
1901
|
+
set uastcQualityLevel(value: number | undefined);
|
|
1902
|
+
get zstandard(): boolean | undefined;
|
|
1903
|
+
set zstandard(value: boolean | undefined);
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1873
1906
|
export declare class DefaultRenderingPipeline {
|
|
1874
1907
|
constructor();
|
|
1875
1908
|
}
|
|
@@ -3127,8 +3160,7 @@ export declare class HDRCubeTexture extends BaseTexture {
|
|
|
3127
3160
|
readonly size: number;
|
|
3128
3161
|
/** Babylon.js `coordinatesMode` (skybox = 5). Recorded for API parity. */
|
|
3129
3162
|
coordinatesMode: number;
|
|
3130
|
-
gammaSpace: boolean;
|
|
3131
|
-
level: number;
|
|
3132
3163
|
/** Fires when the HDR environment is "ready" (resolved on a microtask). */
|
|
3164
|
+
gammaSpace: boolean;
|
|
3133
3165
|
/** Fires when the HDR environment is "ready" (resolved on a microtask). */
|
|
3134
3166
|
readonly onLoadObservable: Observable<HDRCubeTexture>;
|
|
3135
3167
|
/**
|
|
3136
3168
|
* Babylon.js `HDRCubeTexture.rotationY` — rotation of the environment around the Y axis, in radians. A scene that uses the
|
|
@@ -3553,6 +3585,16 @@ export declare interface IKeyboardEvent extends IUIEvent {
|
|
|
3553
3585
|
repeat?: boolean;
|
|
3554
3586
|
}
|
|
3555
3587
|
|
|
3588
|
+
export declare interface IKTX2EncoderOptions {
|
|
3589
|
+
usage: KTX2EncoderUsage;
|
|
3590
|
+
generateMipmaps?: boolean;
|
|
3591
|
+
flipY?: boolean;
|
|
3592
|
+
etc1sQualityLevel?: number;
|
|
3593
|
+
etc1sCompressionLevel?: number;
|
|
3594
|
+
uastcQualityLevel?: number;
|
|
3595
|
+
zstandard?: boolean;
|
|
3596
|
+
}
|
|
3597
|
+
|
|
3556
3598
|
/**
|
|
3557
3599
|
* Minimal Babylon.js `ImageProcessingConfiguration` facade over Lite's image
|
|
3558
3600
|
* processing state.
|
|
@@ -3979,6 +4021,19 @@ export declare const KHR_materials_variants: {
|
|
|
3979
4021
|
Reset(rootMesh: unknown): void;
|
|
3980
4022
|
};
|
|
3981
4023
|
|
|
4024
|
+
export declare class KhronosTextureContainer2Encoder {
|
|
4025
|
+
static get URLConfig(): {
|
|
4026
|
+
jsEncoderModule: string;
|
|
4027
|
+
jsBasisEncoder: string;
|
|
4028
|
+
wasmBasisEncoder: string;
|
|
4029
|
+
};
|
|
4030
|
+
static DefaultNumWorkers: number;
|
|
4031
|
+
static get DefaultEncoderOptions(): DefaultKTX2EncoderOptions;
|
|
4032
|
+
constructor();
|
|
4033
|
+
}
|
|
4034
|
+
|
|
4035
|
+
export declare type KTX2EncoderUsage = "color" | "data" | "normal";
|
|
4036
|
+
|
|
3982
4037
|
/** Babylon.js `LastCreatedAudioEngine()` — the most recently created engine, if any. */
|
|
3983
4038
|
export declare function LastCreatedAudioEngine(): AudioEngineV2 | null;
|
|
3984
4039
|
|
|
@@ -4127,6 +4182,8 @@ export declare class MainAudioBus extends AbstractAudioBus {
|
|
|
4127
4182
|
getClassName():
|
|
4128
4183
|
protected _spatialHost(): AudioGraphHost;
|
|
4129
4184
|
}
|
|
4130
4185
|
|
|
4186
|
+
export declare function MapSRGBToLinear(format: number): number | null;
|
|
4187
|
+
|
|
4131
4188
|
/** Babylon.js `Material` — base class for all materials. */
|
|
4132
4189
|
export declare abstract class Material {
|
|
4133
4190
|
name: string;
|
|
4134
4191
|
/** Babylon.js plugin manager, created lazily by the first `MaterialPluginBase`. */
|
|
@@ -4936,8 +4993,7 @@ export declare class PBRIridescenceConfiguration {
|
|
|
4936
4993
|
|
|
4937
4994
|
export declare class PBRMaterial extends PushMaterial {
|
|
4938
4995
|
private _albedoFactor;
|
|
4939
4996
|
constructor(name: string, scene?: Scene);
|
|
4940
|
-
getClassName(): string;
|
|
4941
|
-
get albedoColor(): Color3;
|
|
4997
|
+
getClassName(): string;
|
|
4942
4998
|
get albedoColor(): Color3;
|
|
4943
4999
|
set albedoColor(value: Color3);
|
|
4944
5000
|
/**
|
|
4945
5001
|
* Babylon.js `pbr.albedoTexture` (glTF base-color map). The texture loads
|
|
@@ -4947,6 +5003,11 @@ export declare class PBRMaterial extends PushMaterial {
|
|
|
4947
5003
|
private _albedoFacto
|
|
4948
5004
|
get albedoTexture(): BaseTexture | null;
|
|
4949
5005
|
set albedoTexture(texture: BaseTexture | null);
|
|
4950
5006
|
private _albedoTexture;
|
|
5007
|
+
private _bentNormalTexture;
|
|
5008
|
+
private _bentNormalLevelUnsubscribe;
|
|
5009
|
+
/** Babylon.js `PBRMaterial.bentNormalTexture` over Lite's native IBL occlusion extension. */
|
|
5010
|
+
get bentNormalTexture(): BaseTexture | null;
|
|
5011
|
+
set bentNormalTexture(texture: BaseTexture | null);
|
|
4951
5012
|
/**
|
|
4952
5013
|
* Enumerate every bound PBR texture slot, including extension sub-configurations
|
|
4953
5014
|
* (Babylon.js `PBRMaterial.getActiveTextures`).
|
|
@@ -5005,7 +5066,8 @@ export declare class PBRMaterial extends PushMaterial {
|
|
|
5005
5066
|
private _albedoFacto
|
|
5006
5067
|
* clearcoat/sheen/anisotropy/iridescence sub-configurations (sharing any nested
|
|
5007
5068
|
* texture), and a fresh Lite PBR renderable.
|
|
5008
5069
|
*/
|
|
5009
|
-
clone(name: string): PBRMaterial;
|
|
5070
|
+
clone(name: string): PBRMaterial;
|
|
5010
5071
|
dispose(): void;
|
|
5072
|
+
}
|
|
5011
5073
|
|
|
5012
5074
|
/**
|
|
5013
5075
|
* Babylon.js `PBRMetallicRoughnessMaterial` — a simplified façade over
|
|
@@ -6051,6 +6113,7 @@ export declare class Scene extends AbstractScene {
|
|
|
6051
6113
|
/** Babylon.js fog-mode c
|
|
6052
6114
|
private readonly _skeletonCache;
|
|
6053
6115
|
private readonly _skeletons;
|
|
6054
6116
|
private readonly _particleSystemCache;
|
|
6117
|
+
private readonly _loadedMaterialCache;
|
|
6055
6118
|
private readonly _particleSystems;
|
|
6056
6119
|
private readonly _retiredParticleSystems;
|
|
6057
6120
|
private _disposed;
|
|
6058
6121
|
private _ambientColor;
|
|
@@ -6745,8 +6808,7 @@ export declare class SSAO2RenderingPipeline {
|
|
|
6745
6808
|
export declare class StandardMaterial extends PushMaterial {
|
|
6746
6809
|
/** Diffuse colour as the app set it. Kept apart from `_lite.diffuseColor`, which is forced to white
|
|
6747
6810
|
* while the material is unlit (see `_syncDiffuse`). */
|
|
6748
6811
|
private _diffuse;
|
|
6749
|
-
constructor(name: string, scene?: Scene);
|
|
6750
|
-
/**
|
|
6812
|
+
constructor(name: string, scene?: Scene);
|
|
6751
6813
|
/**
|
|
6752
6814
|
* Babylon.js shades an unlit StandardMaterial as `emissive + ambient`: the diffuse colour only scales
|
|
6753
6815
|
* the accumulated light, and there is none. Lite's unlit path is `emissive × diffuse`, so the usual
|
|
6754
6816
|
* "unlit colour" setup (black diffuse, colour in emissive) rendered black. Hand Lite a neutral white
|
|
@@ -7149,7 +7211,8 @@ export declare class TransformNode extends Node_2 {
|
|
|
7149
7211
|
physicsBody: PhysicsBody
|
|
7150
7212
|
private _nativeRotationVersion;
|
|
7151
7213
|
private readonly _nativeRotationValues;
|
|
7152
7214
|
private _isSyncingRotationFromNative;
|
|
7153
|
-
private _sceneDisposeObserver?;
|
|
7154
7215
|
constructor(name: string, scene?: Scene, liteNode?: SceneNode);
|
|
7216
|
+
private _sceneDisposeObserver?;
|
|
7217
|
+
private _loadedSceneRegistered;
|
|
7155
7218
|
constructor(name: string, scene?: Scene, liteNode?: SceneNode);
|
|
7156
7219
|
getClassName(): string;
|
|
7157
7220
|
get position(): Vector3;
|
|
7158
7221
|
set position(value: Vector3);
|
|
@@ -7586,6 +7649,16 @@ export declare interface WebGPUEngineOptions extends AbstractEngineOptions {
|
|
|
7586
7649
|
canvasColorSpace?: PredefinedColorSpace;
|
|
7587
7650
|
}
|
|
7588
7651
|
|
|
7652
|
+
export declare class WebGPURenderPassCommandStream {
|
|
7653
|
+
constructor();
|
|
7654
|
+
}
|
|
7655
|
+
|
|
7656
|
+
export declare type WebGPURenderPassCommandStreamDisableReason = "protocol-mismatch" | "atomic-recording-unsupported" | "recorder-missing" | "recording-rejected" | "recording-threw";
|
|
7657
|
+
|
|
7658
|
+
export declare const WebGPURenderPassCommandStreamMaxDrawsPerBatch = 1024;
|
|
7659
|
+
|
|
7660
|
+
export declare const WebGPURenderPassCommandStreamProtocolVersion = 1;
|
|
7661
|
+
|
|
7589
7662
|
/** Babylon.js `WebXRCamera` — WebXR is not part of Babylon Lite. */
|
|
7590
7663
|
export declare class WebXRCamera {
|
|
7591
7664
|
constructor();
|