@babylonjs/lite-compat 1.33.0-preview → 1.34.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 CHANGED
@@ -127,8 +127,8 @@ overloads within a supported area may still be absent.
127
127
  | Meshes & geometry (class chain, `MeshBuilder` primitives, transforms, thin instances, `clone`, `VertexData`, `Mesh.MergeMeshes`) | ⚡ | `CreateLines`/`CreateLineSystem` support fixed-topology line lists and RGBA point colors; `CreateDashedLines` supports uniform-color dashed line lists; mesh-blending tag helpers and validated mesh metadata forward to native Lite; `MergeMeshes` bakes positions/normals/UVs and rejects unsupported attributes/animation; polygon/extruded-polygon, decal/text/tiled builders, `GreasedLine*` (thick lines), `InstancedMesh`, LOD/edges/outline, and hardware instances 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`) | ⚡ | `clone(name)` shares textures with its own renderable; fixed-slot custom WGSL `MaterialPluginBase` injection is supported (`#include`, regex replacement, and custom UBO/sampler hooks are not), while `DitheredTileFadeMaterialPlugin`, GLSL `ShaderMaterial`, `MultiMaterial`, `BackgroundMaterial`, and `OpenPBRMaterial` remain unsupported |
131
- | Textures (`Texture`, `RawTexture`, `RawTexture2DArray`, `RawTexture3D`, `DynamicTexture`, `HtmlTexture`, `CubeTexture`, `HDRCubeTexture`) | ⚡ | `HDRCubeTexture` routes to native `loadHdrEnvironment`; `RawTexture2DArray` supports raw bytes, image sources/URLs, and single-file KTX2 arrays; `RawTexture3D` supports base-level RGBA8 volumes but not mip generation; `HtmlTexture` forwards native Lite DOM capture/update; `RenderTargetTexture` / `MirrorTexture` unsupported |
130
+ | Materials (`StandardMaterial`, `PBRMaterial`, metallic-rough / spec-gloss, `NodeMaterial`) | ⚡ | `clone(name)` shares textures with its own renderable; fixed-slot custom WGSL `MaterialPluginBase` injection is supported (`#include`, regex replacement, and custom UBO/sampler hooks are not), while `DitheredTileFadeMaterialPlugin`, BJS-preprocessed `ShaderMaterial`, `MultiMaterial`, `BackgroundMaterial`, and `OpenPBRMaterial` remain unsupported |
131
+ | Textures (`Texture`, `RawTexture`, `RawTexture2DArray`, `RawTexture3D`, `DynamicTexture`, `HtmlTexture`, `ExternalTexture`, cube textures) | ⚡ | `ExternalTexture` wraps Lite's native external-video texture; `HDRCubeTexture` routes to native `loadHdrEnvironment`; `RawTexture2DArray` supports raw bytes, image sources/URLs, and single-file KTX2 arrays; `RawTexture3D` supports base-level RGBA8 volumes but not mip generation; `HtmlTexture` forwards native Lite DOM capture/update; `RenderTargetTexture` / `MirrorTexture` 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 |
134
134
  | Sprites (`SpriteManager` / `Sprite`) | ⚡ | camera-facing billboards; `SpriteMap` / packed atlas unsupported |
@@ -149,7 +149,7 @@ overloads within a supported area may still be absent.
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
151
  | `SceneLoader` (`ImportMeshAsync` / `AppendAsync` / `LoadAssetContainerAsync`), `AssetsManager` | ⚡ | `AssetContainer` partial |
152
- | Gaussian Splatting (`.ply` / `.splat` / `.sog` / `.spz`) | ⚡ | via `GaussianSplattingMesh` and the binary-data `SPLATFileLoader` plugin surface; detached containers, unpackaged/streaming SOG, replaceable decoder policies, and full glTF-embedded (`KHR_gaussian_splatting`) variants remain unsupported |
152
+ | Gaussian Splatting (`.ply` / `.splat` / `.sog` / `.spz`) | ⚡ | `GaussianSplattingMesh` wraps eager Lite loaders; BJS `GaussianSplattingStream` resolves to a named stub because Lite's URL-only streamer has different budget, transform, cancellation, and compound-hosting semantics |
153
153
  | `OBJ` / `STL` / `FBX` / `BVH` | ❌ | parser/materializer subsystems are not in Lite — convert to glTF |
154
154
 
155
155
  ### `@babylonjs/addons` · `@recast-navigation/*`
package/index.d.ts CHANGED
@@ -132,11 +132,11 @@ export declare abstract class AbstractEngine {
132
132
  */
133
133
  useReverseDepthBuffer: boolean;
134
134
  /** Babylon.js `engine.onResizeObservable` — fires after `resize()` / `setSize()`. */
135
- readonly onResizeObservable: Observable<AbstractEngine>;
136
135
  constructor(canvas: RenderCanvas, options?: ({
137
- antialias?: boolean;
138
- adaptToDeviceRatio?: boolean;
139
- useLargeWorldRendering?: boolean;
140
- } & EngineOptions) | boolean);
136
+ readonly onResizeObservable: Observable<AbstractEngine>;
137
+ /** Babylon.js context-loss signal, forwarded from Lite's device-loss subscription. */
138
+ readonly onContextLostObservable: Observable<AbstractEngine>;
139
+ /** Babylon.js context-restored signal. Lite does not expose a completed-recovery event, so this remains shape-only. */
140
+ readonly onContextRestoredObservable: Observable<AbstractEngine>;
141
141
  constructor(canvas: RenderCanvas, options?: WebGPUEngineOptions | boolean);
142
142
  /** Acquire the GPU device and build the Lite engine context. */
143
143
  initAsync(): Promise<void>;
144
144
  getRenderingCanvas(): RenderCanvas;
@@ -595,11 +595,9 @@ export declare const ActionManagerTriggers: {
595
595
  readonly OnEveryFrameTrigger: 14;
596
596
  };
597
597
 
598
- /** Babylon.js `AddGaussianSplattingStreamPart` — appends a streamed LOD part to a GS compound mesh. */
599
- export declare function AddGaussianSplattingStreamPart(..._args: unknown[]): never;
598
+ export declare function AddGaussianSplattingStreamPart(_compound: GaussianSplattingMesh, _name: string, _metadata: ISOGLODMetadata, _rootUrl: string, _options?: IGaussianSplattingStreamOptions): never;
600
599
 
601
- /** Babylon.js `AddGaussianSplattingStreamPartAsync` — async variant of {@link AddGaussianSplattingStreamPart}. */
602
- export declare function AddGaussianSplattingStreamPartAsync(..._args: unknown[]): never;
600
+ export declare function AddGaussianSplattingStreamPartAsync(_compound: GaussianSplattingMesh, _name: string, _metadata: ISOGLODMetadata, _rootUrl: string, _options?: IGaussianSplattingStreamOptions): Promise<GaussianSplattingPartProxyMesh>;
603
601
 
604
602
  export declare class AmmoJSPlugin {
605
603
  constructor();
@@ -1910,10 +1908,57 @@ export declare class EdgesRenderer {
1910
1908
  constructor();
1911
1909
  }
1912
1910
 
1911
+ export declare class Effect {
1912
+ constructor();
1913
+ isReady(): never;
1914
+ getEngine(): AbstractEngine;
1915
+ getCompilationError(): string;
1916
+ setTexture(_channel: string, _texture: BaseTexture): never;
1917
+ setFloat(_uniformName: string, _value: number): never;
1918
+ }
1919
+
1913
1920
  export declare class EffectLayer {
1914
1921
  constructor();
1915
1922
  }
1916
1923
 
1924
+ export declare class EffectWrapper {
1925
+ static ForceGLSL: boolean;
1926
+ static RegisterShaderCodeProcessing(_effectWrapperName: string | null, _customShaderCodeProcessing?: EffectWrapperCustomShaderCodeProcessing): never;
1927
+ constructor(_options: EffectWrapperCreationOptions);
1928
+ }
1929
+
1930
+ export declare interface EffectWrapperCreationOptions {
1931
+ engine?: AbstractEngine;
1932
+ fragmentShader?: string;
1933
+ useShaderStore?: boolean;
1934
+ vertexShader?: string;
1935
+ vertexUrl?: string;
1936
+ attributeNames?: string[];
1937
+ uniformNames?: string[];
1938
+ uniforms?: string[] | null;
1939
+ samplerNames?: string[];
1940
+ samplers?: string[] | null;
1941
+ uniformBuffers?: string[] | null;
1942
+ defines?: string | string[] | null;
1943
+ indexParameters?: any;
1944
+ blockCompilation?: boolean;
1945
+ onCompiled?: ((effect: Effect) => void) | null;
1946
+ onError?: (effect: Effect, errors: string) => void;
1947
+ name?: string;
1948
+ shaderLanguage?: ShaderLanguage;
1949
+ extraInitializations?: (useWebGPU: boolean, list: Promise<any>[]) => void;
1950
+ extraInitializationsAsync?: () => Promise<void>;
1951
+ useAsPostProcess?: boolean;
1952
+ allowEmptySourceTexture?: boolean;
1953
+ }
1954
+
1955
+ export declare type EffectWrapperCustomShaderCodeProcessing = {
1956
+ processCodeAfterIncludes?: (postProcessName: string, shaderType: string, code: string) => string;
1957
+ processFinalCode?: (postProcessName: string, shaderType: string, code: string) => string;
1958
+ defineCustomBindings?: (postProcessName: string, defines: string | null, uniforms: string[], samplers: string[]) => string | null;
1959
+ bindCustomBindings?: (postProcessName: string, effect: Effect) => void;
1960
+ };
1961
+
1917
1962
  export declare class ElasticEase extends EasingFunction {
1918
1963
  oscillations: number;
1919
1964
  springiness: number;
@@ -1946,6 +1991,20 @@ export declare class ExponentialEase extends EasingFunction {
1946
1991
  easeInCore(gradient: number): number;
1947
1992
  }
1948
1993
 
1994
+ /** Babylon.js `ExternalTexture` over Lite's caller-owned video wrapper. */
1995
+ export declare class ExternalTexture {
1996
+ private readonly _video;
1949
1997
  useMipMaps: boolean;
1998
+ readonly type = 16;
1999
+ readonly format = 4294967295;
2000
+ readonly uniqueId: number;
2001
+ static IsExternalTexture(texture: unknown): texture is ExternalTexture;
2002
+ constructor(_video: HTMLVideoElement);
2003
+ getClassName(): string;
2004
+ get underlyingResource(): HTMLVideoElement;
2005
+ isReady(): boolean;
2006
+ dispose(): void;
2007
+ }
2008
+
1950
2009
  /** Babylon.js `ExtrudePolygon(name, options, scene?, earcutInjection?)` — throwing stub (see `MeshBuilder.ExtrudePolygon`). */
1951
2010
  export declare function ExtrudePolygon(name: string, options: PolygonBuilderOptions, scene?: Scene | null, earcutInjection?: unknown): never;
1952
2011
 
@@ -2141,6 +2200,11 @@ export declare class FrameGraphMeshBlendingTask {
2141
2200
  constructor(..._args: unknown[]);
2142
2201
  }
2143
2202
 
2203
+ /** Babylon.js 9.29 frame-graph min/max reduction task. */
2204
+ export declare class FrameGraphMinMaxReducerTask {
2205
+ constructor(..._args: unknown[]);
2206
+ }
2207
+
2144
2208
  /** Frames an `ArcRotateCamera` on a target by setting its radius (no zoom tween). */
2145
2209
  export declare class FramingBehavior implements Behavior<ArcRotateCamera> {
2146
2210
  readonly name = "Framing";
@@ -2221,15 +2285,54 @@ export declare class GaussianSplattingMesh extends TransformNode {
2221
2285
  /**
2222
2286
  /** Babylon.js `gs.bakeCurrentTransformIntoVertices()` — fold the node transform into the splat data. */
2223
2287
  bakeCurrentTransformIntoVertices(): void;
2224
2288
 
2225
- export declare class GaussianSplattingStream {
2226
- constructor(..._args: unknown[]);
2289
+ export declare class GaussianSplattingPartProxyMesh extends Mesh {
2290
+ readonly compoundSplatMesh: GaussianSplattingMesh;
2227
2291
  private readonly _partIndex;
2292
+ private _visibility;
2293
+ constructor(name: string, _scene: Scene | null, compoundSplatMesh: GaussianSplattingMesh, partIndex: number, _boundingInfo: BoundingInfo, vertexCount: number, splatsDataOffset: number, shDataOffset?: number);
2294
+ get partIndex(): number;
2295
+ get proxiedMesh(): GaussianSplattingMesh;
2296
+ getClassName(): string;
2297
+ get isVisible(): boolean;
2298
+ set isVisible(value: boolean);
2299
+ get visibility(): number;
2300
+ set visibility(value: number);
2301
+ updateBoundingInfoFromPartData(): never;
2302
+ updateBoundingInfoFromProxiedMesh(): never;
2303
+ updatePartIndex(_newPartIndex: number): never;
2304
+ updatePartMetadata(_vertexCount: number, _splatsDataOffset: number, _shDataOffset?: number): never;
2305
+ }
2306
+
2307
+ /** Babylon.js `GaussianSplattingStream` exact-shape stub pending a compatible Lite construction contract. */
2308
+ export declare class GaussianSplattingStream extends GaussianSplattingMesh {
2309
+ static IsLODMetadata(data: unknown): data is ISOGLODMetadata;
2310
+ constructor(name: string, _metadata: ISOGLODMetadata, _rootUrl: string, scene: Scene, _options?: IGaussianSplattingStreamOptions);
2311
+ getClassName(): string;
2312
+ isReady(_completeCheck?: boolean): never;
2313
+ get streamingPartProxy(): never;
2314
+ whenPartReadyAsync(): Promise<never>;
2315
+ whenSettledAsync(_stableFrames?: number): Promise<never>;
2316
+ get maxDetailLod(): never;
2317
+ set maxDetailLod(_value: number);
2318
+ get splatBudget(): never;
2319
+ set splatBudget(_value: number);
2320
+ get effectiveSplatBudget(): never;
2321
+ get residentSplatBudget(): never;
2228
2322
  get minimumResidentSplats(): never;
2323
+ get lod0SplatCount(): GaussianSplattingStreamLod0SplatCount;
2324
+ getBudgetDemand(): never;
2325
+ setBudgetAllocation(_splats: number | null): never;
2326
+ get maxLodLevel(): never;
2327
+ get frustumCulling(): never;
2328
+ set frustumCulling(_value: boolean);
2329
+ get debugDisplay(): never;
2330
+ set debugDisplay(_value: boolean);
2331
+ get debugLodSource(): never;
2332
+ set debugLodSource(_value: GaussianSplattingStreamDebugLodSource);
2333
+ evaluateOptimalLods(_camera?: unknown): never;
2229
2334
  }
2230
2335
 
2231
- /** Babylon.js `GaussianSplattingStreamDebugLodSource` — LOD debug source selector (shape-only stub for type parity). */
2232
2336
  export declare type GaussianSplattingStreamDebugLodSource = "optimal" | "current";
2233
2337
 
2234
- /** Babylon.js finest-LOD splat-count resolution state. */
2235
2338
  export declare type GaussianSplattingStreamLod0SplatCount = Readonly<{
2236
2339
  status: "pending";
2237
2340
  }> | Readonly<{
@@ -2886,14 +2989,58 @@ export declare interface IFlowGraphValidationResult {
2886
2989
  issuesByBlock: Map<string, IFlowGraphValidationIssue[]>;
2887
2990
  }
2888
2991
 
2889
- /** Babylon.js `IGaussianSplattingStreamingPart` — a streamed part of a GS compound mesh (shape-only stub for type parity). */
2890
2992
  export declare interface IGaussianSplattingStreamingPart {
2891
- [key: string]: unknown;
2993
+ readonly proxy: GaussianSplattingPartProxyMesh;
2994
+ readonly partIndex: number;
2995
+ readonly base: number;
2996
+ readonly capacity: number;
2997
+ readonly centersTexture: BaseTexture | null;
2998
+ readonly covariancesATexture: BaseTexture | null;
2999
+ readonly covariancesBTexture: BaseTexture | null;
3000
+ readonly colorsTexture: BaseTexture | null;
3001
+ readonly splatPositions: Float32Array | null;
3002
+ readonly mrtAtlas: unknown | null;
3003
+ readonly shMrtAtlas: unknown[] | null;
3004
+ readonly rotMrtAtlas: unknown | null;
3005
+ readonly atlasWidth: number;
3006
+ readonly isDepthSortSettled: boolean;
3007
+ setActiveRanges(localRanges: readonly {
3008
+ offset: number;
3009
+ count: number;
3010
+ }[] | null): void;
3011
+ writeSplats(localOffset: number, count: number, splatsData: ArrayBuffer | ArrayBufferView): void;
3012
+ postPositionsRange(localOffset: number, count: number): void;
3013
+ expandBounds(min: Vector3, max: Vector3): void;
3014
+ notifyDataChanged(): void;
3015
+ onBeforeAtlasRebuild(callback: (oldAtlas: unknown) => void): () => void;
3016
+ onAfterAtlasRebuild(callback: (newAtlas: unknown) => void): () => void;
2892
3017
  }
2893
3018
 
2894
- /** Babylon.js `IGaussianSplattingStreamOptions` — GS LOD stream options (shape-only stub for type parity). */
2895
3019
  export declare interface IGaussianSplattingStreamOptions {
2896
- [key: string]: unknown;
3020
+ deflateURL?: string;
3021
+ fflate?: unknown;
3022
+ debugDisplay?: boolean;
3023
+ debugLodSource?: GaussianSplattingStreamDebugLodSource;
3024
+ lodBaseDistance?: number;
3025
+ lodMultiplier?: number;
3026
+ lodBehindPenalty?: number;
3027
+ lodRangeMin?: number;
3028
+ lodRangeMax?: number;
3029
+ maxDecodesPerFrame?: number;
3030
+ lodCooldownFrames?: number;
3031
+ lodUpdateInterval?: number;
3032
+ lodUpdateDistance?: number;
3033
+ maxDetailLod?: number;
3034
+ frustumCulling?: boolean;
3035
+ maxConcurrentDownloads?: number;
3036
+ maxDownloadRetries?: number;
3037
+ memoryBudgetMb?: number;
3038
+ maxResidentSplats?: number;
3039
+ evictionCooldownFrames?: number;
3040
+ splatBudget?: number | "auto";
3041
+ hostCompound?: GaussianSplattingMesh;
3042
+ decodeSh?: boolean;
3043
+ needsRotationScale?: boolean;
2897
3044
  }
2898
3045
 
2899
3046
  /** Result of a multi-point GPU pick. Mirrors Babylon.js `IGPUMultiPickingInfo`. */
@@ -3101,9 +3248,27 @@ export declare function IsHtmlInCanvasSupportedNatively(): never;
3101
3248
  /** Babylon.js `IsHtmlInCanvasUploadSupported` — kept in lockstep with the unavailable upload helper. */
3102
3249
  export declare function IsHtmlInCanvasUploadSupported(engine: AbstractEngine): boolean;
3103
3250
 
3104
- /** Babylon.js `ISOGLODMetadata` — SOG LOD octree metadata (shape-only stub for type parity). */
3251
+ declare interface ISOGLODEntry {
3252
+ file: number;
3253
+ offset: number;
3254
+ count: number;
3255
+ }
3256
+
3257
+ /** Babylon.js parsed PlayCanvas-style `lod-meta.json` shape. */
3105
3258
  export declare interface ISOGLODMetadata {
3106
- [key: string]: unknown;
3259
+ lodLevels: number;
3260
+ filenames: string[];
3261
+ environment?: string;
3262
+ tree: ISOGLODNode;
3263
+ }
3264
+
3265
+ declare interface ISOGLODNode {
3266
+ bound: {
3267
+ min: number[];
3268
+ max: number[];
3269
+ };
3270
+ children?: ISOGLODNode[];
3271
+ lods?: Record<string, ISOGLODEntry>;
3107
3272
  }
3108
3273
 
3109
3274
  /** Babylon.js `ISoundSourceOptions` (subset). */
@@ -3916,6 +4081,11 @@ export declare class NodeRenderGraphMeshBlendingPostProcessBlock {
3916
4081
  constructor(..._args: unknown[]);
3917
4082
  }
3918
4083
 
4084
+ /** Babylon.js 9.29 node-render-graph min/max reduction block. */
4085
+ export declare class NodeRenderGraphMinMaxReducerBlock {
4086
+ constructor(..._args: unknown[]);
4087
+ }
4088
+
3919
4089
  /**
3920
4090
  * Babylon.js's `NullEngine` — a headless engine with no GPU device, used to run
3921
4091
  * scene logic (animations, observables, physics stepping, frame timing) without
@@ -5033,6 +5203,9 @@ export declare function RegisterImageProcessingConfiguration(): void;
5033
5203
 
5034
5204
  export declare function RegisterMeshBlendingPostProcessBlock(): never;
5035
5205
 
5206
+ /** Babylon.js 9.29 node-render-graph registration function. */
5207
+ export declare function RegisterMinMaxReducerBlock(): never;
5208
+
5036
5209
  export declare function RegisterOpenpbrMaterial(): void;
5037
5210
 
5038
5211
  /**
@@ -6609,6 +6782,15 @@ export declare class VirtualJoystick {
6609
6782
  export declare class WebGPUEngine extends AbstractEngine {
6610
6783
  }
6611
6784
 
6785
+ /** Babylon.js `WebGPUEngineOptions` subset accepted by the compat engine. */
6786
+ export declare interface WebGPUEngineOptions extends EngineOptions {
6787
+ antialias?: boolean;
6788
+ adaptToDeviceRatio?: boolean;
6789
+ useLargeWorldRendering?: boolean;
6790
+ canvasToneMapping?: GPUCanvasToneMapping;
6791
+ canvasColorSpace?: PredefinedColorSpace;
6792
+ }
6793
+
6612
6794
  /** Babylon.js `WebXRCamera` — WebXR is not part of Babylon Lite. */
6613
6795
  export declare class WebXRCamera {
6614
6796
  constructor();