@babylonjs/lite-compat 1.34.0-preview → 1.35.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
@@ -117,17 +117,17 @@ overloads within a supported area may still be absent.
117
117
 
118
118
  | Feature area | Status | Notes |
119
119
  | ----------------------------------------------------------------------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
120
- | Math (`Vector*`, `Color*`, `Quaternion`, `Matrix`, `Plane`, `Ray`, `Frustum`, `Scalar`, `Axis`/`Space`, color temperature/white balance) | ✅ | `Angle` / `Curve3` / `Path3D` partial |
120
+ | Math (`Vector*`, `Color*`, `Quaternion`, `Matrix`, `Plane`, `Ray`, `Frustum`, `Scalar`, `Axis`/`Space`, color temperature/white balance) | ✅ | Includes handedness-correct `LookDirection` matrices/quaternions; `Angle` / `Curve3` / `Path3D` partial |
121
121
  | Engine (`WebGPUEngine`, `Engine`, `ThinEngine`, `NullEngine`) | ⚡ | async startup + render loop; `currentSampleCount` reports the active surface's MSAA count; `beginFrame`/`endFrame`, occlusion queries, engine-wide alpha-to-coverage, and manual `scene.render()` unsupported |
122
122
  | Compute + GPU buffers (`ComputeShader`, `StorageBuffer`, `UniformBuffer`) | ⚡ | WGSL compute, direct/indirect dispatch, storage buffers, and compute-oriented std140 uniform buffers forward to Lite; shader registries/preprocessing, texture bindings, in-frame immediate dispatch, and Effect-oriented UBO methods remain unsupported |
123
- | Scene (clear color, cameras/lights, fog, environment, observables, ready state) | ⚡ | sync `scene.pick` forwards to Lite's CPU triangle picker with thin-instance, predicate, normal, and UV detail; actively deformed meshes still require async `GPUPicker`; `scene.meshes` + `getMeshBy*`/`getNodeBy*` enumerate every mesh via a canonical wrapper registry; exposure/contrast/tone mapping are forwarded, while white balance and fluid rendering throw because Lite lacks their cross-cutting shader/render-pass subsystems |
123
+ | Scene (clear color, cameras/lights, fog, environment, observables, ready state) | ⚡ | `Node.accessibilityTag` forwards description, role, and ARIA metadata to Lite (DOM event handlers remain unsupported); sync `scene.pick` forwards to Lite's CPU triangle picker with thin-instance, predicate, normal, and UV detail; `scene.meshes` + `getMeshBy*`/`getNodeBy*` enumerate every mesh via a canonical wrapper registry; exposure/contrast/tone mapping are forwarded, while white balance and fluid rendering throw because Lite lacks their cross-cutting shader/render-pass subsystems |
124
124
  | Cameras (`ArcRotateCamera`, `FreeCamera`/`Universal`/`Target`, `FollowCamera`, `GeospatialCamera`) | ✅ | arc controls include pointer, wheel, touch, and BJS-default Arrow-key input; orthographic bounds and projection-mode switching forward to Lite; fully unconfigured orthographic extents use Lite's `halfHeight` + aspect-ratio derivation rather than Babylon.js render dimensions; XR / device-orientation / stereoscopic rigs unsupported |
125
- | Lights (`Hemispheric`, `Directional`, `Point`, `Spot`) | ✅ | `ClusteredLightContainer` clusters point lights (⚡ partial); `RectAreaLight` unsupported |
125
+ | Lights (`Hemispheric`, `Directional`, `Point`, `Spot`) | ✅ | `ClusteredLightContainer` clusters unshadowed point lights before engine start (⚡ partial); clustered spot lights and `RectAreaLight` unsupported |
126
126
  | Shadows (`ShadowGenerator` directional ESM/PCF, spot PCF) | ⚡ | `CascadedShadowGenerator` uses Lite's native 2–4 cascade CSM |
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`, BJS-preprocessed `ShaderMaterial`, `MultiMaterial`, `BackgroundMaterial`, and `OpenPBRMaterial` remain 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 Gaussian-splat visualization plugins, `DitheredTileFadeMaterialPlugin`, BJS-preprocessed `ShaderMaterial`, `MultiMaterial`, `BackgroundMaterial`, and `OpenPBRMaterial` remain unsupported |
131
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 |
package/index.d.ts CHANGED
@@ -532,6 +532,10 @@ export declare class AbstractStereoAudio {
532
532
  set pan(value: number);
533
533
  }
534
534
 
535
+ declare type AccessibilityAria = "aria-autocomplete" | "aria-checked" | "aria-disabled" | "aria-errormessage" | "aria-expanded" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-label" | "aria-level" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-placeholder" | "aria-pressed" | "aria-readonly" | "aria-required" | "aria-selected" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "aria-busy" | "aria-live" | "aria-relevant" | "aria-atomic" | "aria-dropeffect" | "aria-grabbed" | "aria-activedescendant" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-describedby" | "aria-description" | "aria-details" | "aria-flowto" | "aria-labelledby" | "aria-owns" | "aria-posinset" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-setsize";
536
+
537
+ declare type AccessibilityRole = "toolbar" | "tooltip" | "feed" | "math" | "presentation" | "none" | "note" | "application" | "article" | "cell" | "columnheader" | "definition" | "directory" | "document" | "figure" | "group" | "heading" | "img" | "list" | "listitem" | "meter" | "row" | "rowgroup" | "rowheader" | "separator" | "table" | "term" | "scrollbar" | "searchbox" | "slider" | "spinbutton" | "switch" | "tab" | "tabpanel" | "treeitem" | "combobox" | "menu" | "menubar" | "tablist" | "tree" | "treegrid" | "banner" | "complementary" | "contentinfo" | "form" | "main" | "navigation" | "region" | "search" | "alert" | "log" | "marquee" | "status" | "timer" | "alertdialog" | "dialog";
538
+
535
539
  /** Base class for actions. `execute` is implemented by subclasses. */
536
540
  export declare abstract class Action {
537
541
  trigger: number;
@@ -1312,15 +1316,14 @@ export declare class CircleEase extends EasingFunction {
1312
1316
  export declare class ClusteredLightContainer extends Light {
1313
1317
  private _maxRange;
1314
1318
  private _selfIntensity;
1315
1319
  /**
1316
- * True if a point/spot light can be clustered by this container. Babylon Lite
1317
- * clusters point lights only.
1320
+ * True if this point light can be represented by Lite's clustered payload.
1318
1321
  */
1319
1322
  static IsLightSupported(light: Light): boolean;
1320
1323
  /**
1321
1324
  * Creates a new clustered light container.
1322
1325
  *
1323
1326
  * @param name - The container's node name.
1324
- * @param lights - Initial lights to cluster (point lights).
1327
+ * @param lights - Initial point lights to cluster.
1325
1328
  * @param scene - Owning scene; when supplied the container is registered and
1326
1329
  * built into the Lite scene at engine start.
1327
1330
  */
@@ -1348,7 +1351,7 @@ export declare class ClusteredLightContainer extends Light {
1348
1351
  private _maxRan
1349
1352
  */
1350
1353
  get maxRange(): number;
1351
1354
  set maxRange(value: number);
1352
- /** Babylon.js `container.addLight(light)`. Only point lights are clustered. */
1355
+ /** Babylon.js `container.addLight(light)`. */
1353
1356
  addLight(light: Light): void;
1354
1357
  /**
1355
1358
  * Babylon.js `container.removeLight(light)`. Returns the index the light held
@@ -2241,6 +2244,19 @@ export declare class GamepadCamera extends UniversalCamera {
2241
2244
  getClassName(): string;
2242
2245
  }
2243
2246
 
2247
+ export declare class GaussianSplattingDebugMaterialPlugin extends MaterialPluginBase {
2244
2248
  constructor(material: GaussianSplattingMaterial);
2249
+ }
2250
+
2251
+ export declare class GaussianSplattingGpuPickingMaterialPlugin extends MaterialPluginBase {
2252
+ static EncodeIdToColor(id: number): [number, number, number];
2245
2253
  constructor(material: GaussianSplattingMaterial, _maxPartCount?: number);
2254
+ }
2255
+
2256
+ export declare class GaussianSplattingMaterial extends PushMaterial {
2246
2257
  constructor(name: string, scene?: Scene);
2258
+ clone(_name: string): GaussianSplattingMaterial;
2259
+ }
2260
+
2261
+ export declare const GaussianSplattingMaxPartCount = 128;
2262
+
2247
2263
  /**
2248
2264
  * Babylon.js `GaussianSplattingMesh`. Derives from `TransformNode` so the loaded
2249
2265
  * cloud's `position` / `rotation` / `scaling` proxy onto the Lite splat node.
@@ -2285,6 +2301,13 @@ export declare class GaussianSplattingMesh extends TransformNode {
2285
2301
  /**
2286
2302
  /** Babylon.js `gs.bakeCurrentTransformIntoVertices()` — fold the node transform into the splat data. */
2287
2303
  bakeCurrentTransformIntoVertices(): void;
2288
2304
 
2305
+ export declare class GaussianSplattingOverdrawMaterialPlugin extends MaterialPluginBase {
2289
2306
  constructor(material: GaussianSplattingMaterial);
2307
+ get isEnabled(): boolean;
2308
+ set isEnabled(_value: boolean);
2309
+ get intensity(): number;
2310
+ set intensity(_value: number);
2311
+ }
2312
+
2290
2313
  export declare class GaussianSplattingPartProxyMesh extends Mesh {
2291
2314
  readonly compoundSplatMesh: GaussianSplattingMesh;
2292
2315
  private readonly _partIndex;
2293
2316
  private _visibility;
@@ -2302,6 +2325,16 @@ export declare class GaussianSplattingPartProxyMesh extends Mesh {
2302
2325
  updatePartMetadata(_vertexCount: number, _splatsDataOffset: number, _shDataOffset?: number): never;
2303
2326
  }
2304
2327
 
2328
+ export declare class GaussianSplattingSizeMaterialPlugin extends MaterialPluginBase {
2305
2329
  constructor(material: GaussianSplattingMaterial);
2330
+ get isEnabled(): boolean;
2331
+ set isEnabled(_value: boolean);
2332
+ get sizeScale(): number;
2333
+ set sizeScale(_value: number);
2334
+ }
2335
+
2336
+ export declare class GaussianSplattingSolidColorMaterialPlugin extends MaterialPluginBase {
2306
2337
  constructor(material: GaussianSplattingMaterial, _partColors: Color3[], _maxPartCount?: number);
2338
+ }
2339
+
2307
2340
  /** Babylon.js `GaussianSplattingStream` exact-shape stub pending a compatible Lite construction contract. */
2308
2341
  export declare class GaussianSplattingStream extends GaussianSplattingMesh {
2309
2342
  static IsLODMetadata(data: unknown): data is ISOGLODMetadata;
@@ -2381,6 +2414,10 @@ export declare class GeospatialClippingBehavior {
2381
2414
  /** Babylon.js `GetElementPixelFromUv` — HTML overlay raycast interaction is unsupported by the compat layer. */
2382
2415
  export declare function GetElementPixelFromUv(): never;
2383
2416
 
2417
+ export declare function GetGaussianSplattingMaxPartCount(engine: AbstractEngine): number;
2418
+
2419
+ export declare function GetPartIndexVaryingDeclaration(shaderLanguage: ShaderLanguage): string;
2420
+
2384
2421
  export declare function GetPointsCount(..._args: unknown[]): never;
2385
2422
 
2386
2423
  /**
@@ -2849,6 +2886,17 @@ export declare interface IAbstractSoundOptions extends Partial<IVolumeAudioOptio
2849
2886
  outBus?: PrimaryAudioBus;
2850
2887
  }
2851
2888
 
2889
+ export declare interface IAccessibilityTag {
2890
+ description?: string;
2891
+ eventHandler?: {
2892
+ [K in keyof HTMLElementEventMap]: (event?: Event) => void;
2893
+ };
2894
+ role?: AccessibilityRole;
2895
+ aria?: {
2896
+ [K in AccessibilityAria]: any;
2897
+ };
2898
+ }
2899
+
2852
2900
  export declare interface IAnimationKey {
2853
2901
  frame: number;
2854
2902
  value: AnimationValue;
@@ -2989,6 +3037,28 @@ export declare interface IFlowGraphValidationResult {
2989
3037
  issuesByBlock: Map<string, IFlowGraphValidationIssue[]>;
2990
3038
  }
2991
3039
 
3040
+ export declare interface IGaussianSplattingDebugOptions {
3041
+ clippingBox: {
3042
+ min: Vector3;
3043
+ max: Vector3;
3044
+ } | null;
3045
+ opacityCulling: {
3046
+ min: number;
3047
+ max: number;
3048
+ } | null;
3049
+ sizeCulling: {
3050
+ min: number;
3051
+ max: number;
3052
+ } | null;
3053
+ opacityScale: number;
3054
+ opacitySaturate: boolean;
3055
+ shDc: boolean;
3056
+ shOrder1: boolean;
3057
+ shOrder2: boolean;
3058
+ shOrder3: boolean;
3059
+ shOrder4: boolean;
3060
+ }
3061
+
2992
3062
  export declare interface IGaussianSplattingStreamingPart {
2993
3063
  readonly proxy: GaussianSplattingPartProxyMesh;
2994
3064
  readonly partIndex: number;
@@ -3714,6 +3784,14 @@ export declare class Matrix {
3714
3784
  static RotationZ(angle: number): Matrix;
3715
3785
  /** Babylon.js `Matrix.LookAtLH(eye, target, up)` — left-handed view matrix. */
3716
3786
  static LookAtLH(eye: Vector3, target: Vector3, up: Vector3): Matrix;
3787
+ /** Babylon.js `Matrix.LookDirectionLH(forward, up)` orientation matrix. */
3788
+ static LookDirectionLH(forward: Vector3, up: Vector3): Matrix;
3789
+ /** Babylon.js `Matrix.LookDirectionLHToRef(forward, up, result)`. */
3790
+ static LookDirectionLHToRef<T extends Matrix>(forward: Vector3, up: Vector3, result: T): T;
3791
+ /** Babylon.js `Matrix.LookDirectionRH(forward, up)` orientation matrix. */
3792
+ static LookDirectionRH(forward: Vector3, up: Vector3): Matrix;
3793
+ /** Babylon.js `Matrix.LookDirectionRHToRef(forward, up, result)`. */
3794
+ static LookDirectionRHToRef<T extends Matrix>(forward: Vector3, up: Vector3, result: T): T;
3717
3795
  /** Babylon.js `Matrix.OrthoOffCenterLH(left, right, bottom, top, znear, zfar, halfZRange?)` — LH ortho projection. */
3718
3796
  static OrthoOffCenterLH(left: number, right: number, bottom: number, top: number, znear: number, zfar: number, _halfZRange?: boolean): Matrix;
3719
3797
  /**
@@ -3968,14 +4046,16 @@ declare abstract class Node_2 {
3968
4046
  readonly uniqueId: number;
3969
4047
  /** Free-form user data slot (Babylon.js `Node.metadata`). */
3970
4048
  metadata: unknown;
3971
- readonly onDisposeObservable: Observable<Node_2>;
3972
4049
  protected constructor(name: string, scene?: Scene);
4050
+ readonly onDisposeObservable: Observable<Node_2>;
4051
+ onAccessibilityTagChangedObservable: Observable<IAccessibilityTag | null>;
3973
4052
  protected constructor(name: string, scene?: Scene);
3974
4053
  /** The runtime class name (overridden by each subclass). */
3975
4054
  getClassName(): string;
3976
4055
  /** The scene this node belongs to, if any. */
3977
4056
  getScene(): Scene | undefined;
3978
4057
  /** The engine backing this node's scene, if any. */
3979
4058
  getEngine(): WebGPUEngine | undefined;
3980
- get parent(): Node_2 | null;
4059
+ get accessibilityTag(): IAccessibilityTag | null;
4060
+ set accessibilityTag(value: IAccessibilityTag | null);
3981
4061
  get parent(): Node_2 | null;
3982
4062
  set parent(value: Node_2 | null);
3983
4063
  /**
3984
4064
  * Babylon.js `node.getDescendants(directDescendantsOnly?, predicate?)` — the
3985
4065
  * nodes parented (directly or transitively) under this one, optionally filtered.
@@ -5034,6 +5114,15 @@ export declare class Quaternion {
5034
5114
  * `matrix` into `result`. Backed by Lite's `createQuatFromRotationMat4`.
5035
5115
  */
5036
5116
  static FromRotationMatrixToRef(matrix: Matrix, result: Quaternion): Quaternion;
5117
+ /** Babylon.js `Quaternion.FromLookDirectionLH(forward, up)`. */
5118
+ static FromLookDirectionLH(forward: Vector3, up: Vector3): Quaternion;
5119
+ /** Babylon.js `Quaternion.FromLookDirectionLHToRef(forward, up, result)`. */
5120
+ static FromLookDirectionLHToRef<T extends Quaternion>(forward: Vector3, up: Vector3, result: T): T;
5121
+ /** Babylon.js `Quaternion.FromLookDirectionRH(forward, up)`. */
5122
+ static FromLookDirectionRH(forward: Vector3, up: Vector3): Quaternion;
5123
+ /** Babylon.js `Quaternion.FromLookDirectionRHToRef(forward, up, result)`. */
5124
+ static FromLookDirectionRHToRef<T extends Quaternion>(forward: Vector3, up: Vector3, result: T): T;
5125
+ private static _FromRotationStorageToRef;
5037
5126
  static FromEulerAngles(x: number, y: number, z: number): Quaternion;
5038
5127
  static RotationYawPitchRoll(yaw: number, pitch: number, roll: number): Quaternion;
5039
5128
  static RotationAxis(axis: Vector3, angle: number): Quaternion;
@@ -5196,6 +5285,18 @@ export declare function RegisterEnginesWebGPUExtensionsEngineTexture2DArrayImage
5196
5285
 
5197
5286
  export declare function RegisterFluidRenderer(): void;
5198
5287
 
5288
+ export declare function RegisterGaussianSplattingDebugMaterialPlugin(): void;
5289
+
5290
+ export declare function RegisterGaussianSplattingGpuPickingMaterialPlugin(): void;
5291
+
5292
+ export declare function RegisterGaussianSplattingMaterial(): void;
5293
+
5294
+ export declare function RegisterGaussianSplattingOverdrawMaterialPlugin(): void;
5295
+
5296
+ export declare function RegisterGaussianSplattingSizeMaterialPlugin(): void;
5297
+
5298
+ export declare function RegisterGaussianSplattingSolidColorMaterialPlugin(): void;
5299
+
5199
5300
  export declare function RegisterGreasedLinePluginMaterial(..._args: unknown[]): never;
5200
5301
 
5201
5302
  /** Babylon.js pure-module registration hook. */