@babylonjs/lite-compat 1.8.0-preview → 1.10.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
@@ -114,26 +114,27 @@ overloads within a supported area may still be absent.
114
114
 
115
115
  ### `@babylonjs/core`
116
116
 
117
- | Feature area | Status | Notes |
118
- | ------------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------------------------------------------- |
119
- | Math (`Vector*`, `Color*`, `Quaternion`, `Matrix`, `Plane`, `Ray`, `Frustum`, `Scalar`, `Axis`/`Space`) | ✅ | `Angle` / `Curve3` / `Path3D` partial |
120
- | Engine (`WebGPUEngine`, `Engine`, `ThinEngine`, `NullEngine`) | ⚡ | async startup + render loop; `beginFrame`/`endFrame` and manual `scene.render()` unsupported |
121
- | Scene (clear color, cameras/lights, fog, environment, observables, ready state) | ⚡ | sync `scene.pick` unsupported (use async `GPUPicker`); some scene enumeration needs Lite core |
122
- | Cameras (`ArcRotateCamera`, `FreeCamera`/`Universal`/`Target`, `FollowCamera`, `GeospatialCamera`) | ✅ | XR / device-orientation / stereoscopic rigs unsupported |
123
- | Lights (`Hemispheric`, `Directional`, `Point`, `Spot`) | ✅ | `RectAreaLight` / clustered lights unsupported |
124
- | Shadows (`ShadowGenerator` directional ESM/PCF, spot PCF) | ⚡ | `CascadedShadowGenerator` falls back to single cascade |
125
- | Meshes & geometry (class chain, `MeshBuilder` primitives, transforms, thin instances, `VertexData`) | ⚡ | `CreateLines`/`CreateDecal`/`CreateText`, `InstancedMesh`, LOD/edges/outline, clone/instance unsupported |
126
- | CSG / CSG2 | ✅ | over Lite boolean ops |
127
- | Gizmos (position/rotation/scale/bounding-box/light/camera + `GizmoManager`) | ⚡ | over Lite gizmo suite |
128
- | Materials (`StandardMaterial`, `PBRMaterial`, metallic-rough / spec-gloss, `NodeMaterial`) | ⚡ | `ShaderMaterial` (GLSL), `MultiMaterial`, `BackgroundMaterial` unsupported |
129
- | Textures (`Texture`, `RawTexture`, `DynamicTexture`, `CubeTexture`) | ⚡ | `HDRCubeTexture` / `RenderTargetTexture` / `MirrorTexture` / `HtmlTexture` unsupported |
130
- | Animation (keyframe `Animation`, easing, `Animatable`, `AnimationGroup` incl. weighted/additive blend) | ⚡ | CPU evaluation; loaded glTF skeletal blending supported |
131
- | Morph targets (`MorphTarget` / `MorphTargetManager`) | ✅ | over Lite morph targets |
132
- | Sprites (`SpriteManager` / `Sprite`) | ⚡ | camera-facing billboards; `SpriteMap` / packed atlas unsupported |
133
- | Behaviors / Actions (`AutoRotation`, `Framing`, `ActionManager`, conditions) | ⚡ | `ActionManager` is manual-dispatch; drag behaviors need Lite core |
134
- | Misc (`Observable`, `Tools`, `SmartArray`, `Tags`, gradients, `PerformanceMonitor`) | ✅ | |
135
- | Audio V2 (`AudioEngineV2`, `StaticSound`, `StreamingSound`, `AudioBus`, buses/sources/analyzer) | ⚡ | over Lite's AudioV2 port; `MainAudioBus` spatial/analyzer and a second main bus unsupported |
136
- | Particles, post-processes, layers (glow/highlight), probes, physics, WebXR | ❌ | not in Babylon Lite — use native Lite `create*Task` / Havok-V2 functions |
117
+ | Feature area | Status | Notes |
118
+ | --------------------------------------------------------------------------------------------------------- | :----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
119
+ | Math (`Vector*`, `Color*`, `Quaternion`, `Matrix`, `Plane`, `Ray`, `Frustum`, `Scalar`, `Axis`/`Space`) | ✅ | `Angle` / `Curve3` / `Path3D` partial |
120
+ | Engine (`WebGPUEngine`, `Engine`, `ThinEngine`, `NullEngine`) | ⚡ | async startup + render loop; `beginFrame`/`endFrame` and manual `scene.render()` unsupported |
121
+ | Scene (clear color, cameras/lights, fog, environment, observables, ready state) | ⚡ | sync `scene.pick` unsupported (use async `GPUPicker`); some scene enumeration needs Lite core |
122
+ | Cameras (`ArcRotateCamera`, `FreeCamera`/`Universal`/`Target`, `FollowCamera`, `GeospatialCamera`) | ✅ | XR / device-orientation / stereoscopic rigs unsupported |
123
+ | Lights (`Hemispheric`, `Directional`, `Point`, `Spot`) | ✅ | `RectAreaLight` / clustered lights unsupported |
124
+ | Shadows (`ShadowGenerator` directional ESM/PCF, spot PCF) | ⚡ | `CascadedShadowGenerator` falls back to single cascade |
125
+ | Meshes & geometry (class chain, `MeshBuilder` primitives, transforms, thin instances, `VertexData`) | ⚡ | `CreateLines`/`CreateDecal`/`CreateText`, `InstancedMesh`, LOD/edges/outline, clone/instance unsupported |
126
+ | CSG / CSG2 | ✅ | over Lite boolean ops |
127
+ | Gizmos (position/rotation/scale/bounding-box/light/camera + `GizmoManager`) | ⚡ | over Lite gizmo suite; `isEnabled` toggles per-axis interactivity (display-only when disabled) |
128
+ | Materials (`StandardMaterial`, `PBRMaterial`, metallic-rough / spec-gloss, `NodeMaterial`) | ⚡ | `ShaderMaterial` (GLSL), `MultiMaterial`, `BackgroundMaterial` unsupported |
129
+ | Textures (`Texture`, `RawTexture`, `RawTexture3D`, `DynamicTexture`, `CubeTexture`, `HDRCubeTexture`) | ⚡ | `HDRCubeTexture` routes to native `loadHdrEnvironment`; `RenderTargetTexture` / `MirrorTexture` / `HtmlTexture` unsupported |
130
+ | Animation (keyframe `Animation`, easing, `Animatable`, `AnimationGroup` incl. weighted/additive blend) | ⚡ | CPU evaluation; loaded glTF skeletal blending supported |
131
+ | Morph targets (`MorphTarget` / `MorphTargetManager`) | ✅ | over Lite morph targets |
132
+ | Sprites (`SpriteManager` / `Sprite`) | ⚡ | camera-facing billboards; `SpriteMap` / packed atlas unsupported |
133
+ | Behaviors / Actions (`AutoRotation`, `Framing`, `ActionManager`, conditions) | ⚡ | `ActionManager` is manual-dispatch; drag / six-DoF / XR-oriented mesh behaviors throw |
134
+ | Misc (`Observable`, `Tools`, `SmartArray`, `Tags`, gradients, `PerformanceMonitor`) | ✅ | |
135
+ | Audio V2 (`AudioEngineV2`, `StaticSound`, `StreamingSound`, `AudioBus`, buses/sources/analyzer) | ⚡ | over Lite's AudioV2 port; `MainAudioBus` spatial/analyzer and a second main bus unsupported |
136
+ | Physics (`HavokPlugin`, `scene.enablePhysics`/`getPhysicsEngine`, `PhysicsShapeType`/`PhysicsMotionType`) | ⚡ | Havok V2 over Lite `createHavokWorld`; refresh-rate-independent `useDeltaForWorldStep`. Bodies via native `createPhysicsAggregate` (`PhysicsAggregate` class not wrapped) |
137
+ | Particles, post-processes, layers (glow/highlight), probes, WebXR | ❌ | not in Babylon Lite — use native Lite `create*Task` functions |
137
138
 
138
139
  ### `@babylonjs/loaders`
139
140
 
@@ -141,7 +142,7 @@ overloads within a supported area may still be absent.
141
142
  | ---------------------------------------------------------------------------------------------- | :----: | --------------------------------------------------------------- |
142
143
  | glTF 2.0 (+ extensions), `.babylon` | ✅ | via Lite `loadGltf` / `loadBabylon` |
143
144
  | `SceneLoader` (`ImportMeshAsync` / `AppendAsync` / `LoadAssetContainerAsync`), `AssetsManager` | ⚡ | `AssetContainer` partial |
144
- | Gaussian Splatting (`.ply` / `.splat` / `.sog` / `.spz`) | ⚡ | via `GaussianSplattingMesh`; LOD-streaming variants unsupported |
145
+ | Gaussian Splatting (`.ply` / `.splat` / `.sog` / `.spz`) | ⚡ | via `GaussianSplattingMesh`; LOD-streaming + glTF-embedded (`KHR_gaussian_splatting`) variants unsupported |
145
146
  | `OBJ` / `STL` / `FBX` / `BVH` | ❌ | not in Lite — convert to glTF |
146
147
 
147
148
  ### `@babylonjs/addons` · `@recast-navigation/*`
package/index.d.ts CHANGED
@@ -7,6 +7,7 @@ import { EngineContext } from '@babylonjs/lite';
7
7
  import { EngineOptions } from '@babylonjs/lite';
8
8
  import { IridescenceProps } from '@babylonjs/lite';
9
9
  import { Mesh as Mesh_2 } from '@babylonjs/lite';
10
+ import { PhysicsWorld } from '@babylonjs/lite';
10
11
  import { RenderCanvas } from '@babylonjs/lite';
11
12
  import { SceneNode } from '@babylonjs/lite';
12
13
  import { SheenProps } from '@babylonjs/lite';
@@ -731,6 +732,10 @@ export declare class AssetsManager {
731
732
  loadAsync(): Promise<AbstractAssetTask[]>;
732
733
  }
733
734
 
735
+ export declare class AttachToBoxBehavior {
736
+ constructor();
737
+ }
738
+
734
739
  /** FFT window sizes accepted by the analyzer (mirrors `AudioAnalyzerFFTSizeType`). */
735
740
  export declare type AudioAnalyzerFFTSizeType = 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768;
736
741
 
@@ -855,7 +860,11 @@ export declare const Axis: {
855
860
 
856
861
  /** Babylon.js `AxisDragGizmo` — drags the attached node along a single world axis. */
857
862
  export declare class AxisDragGizmo extends GizmoBase {
858
863
  private _attached;
859
- constructor(dragAxis: Vector3, color: Color3, layer: UtilityLayerRenderer);
864
+ constructor(dragAxis: Vector3, color: Color3, layer: UtilityLayerRenderer);
860
865
  /** Babylon.js `IAxisDragGizmo.isEnabled` — when false the gizmo is non-interactive
866
+ * (no drag, and no GPU hover picking), while its meshes stay visible and keep
867
+ * following the attached node. Toggles the underlying Lite pointer-drag. */
868
+ get isEnabled(): boolean;
869
+ set isEnabled(value: boolean);
861
870
  get attachedMesh(): AbstractMesh | null;
862
871
  set attachedMesh(value: AbstractMesh | null);
863
872
  get attachedNode(): Node_2 | null;
@@ -865,7 +874,9 @@ export declare class AxisDragGizmo extends GizmoBase {
865
874
  private _attached;
866
875
 
867
876
  /** Babylon.js `AxisScaleGizmo` — scales the attached node along a single axis. */
868
877
  export declare class AxisScaleGizmo extends GizmoBase {
869
878
  private _attached;
870
- constructor(dragAxis: Vector3, color: Color3, layer: UtilityLayerRenderer);
879
+ constructor(dragAxis: Vector3, color: Color3, layer: UtilityLayerRenderer);
871
880
  /** Babylon.js `IAxisScaleGizmo.isEnabled` — toggles interactivity (drag + hover pick). */
881
+ get isEnabled(): boolean;
882
+ set isEnabled(value: boolean);
872
883
  get attachedMesh(): AbstractMesh | null;
873
884
  set attachedMesh(value: AbstractMesh | null);
874
885
  get attachedNode(): Node_2 | null;
@@ -883,6 +894,10 @@ export declare class BackgroundMaterial {
883
894
  constructor();
884
895
  }
885
896
 
897
+ export declare class BaseSixDofDragBehavior {
898
+ constructor();
899
+ }
900
+
886
901
  export declare abstract class BaseTexture {
887
902
  name: string;
888
903
  getClassName(): string;
889
904
  abstract whenReadyAsync(): Promise<void>;
@@ -1256,8 +1271,7 @@ export declare class CubeTexture {
1256
1271
  coordinatesMode: number;
1257
1272
  name: string;
1258
1273
  gammaSpace: boolean;
1259
- level: number;
1260
- /** Fires when the cube map is "ready" (resolved on a microtask in this compat layer). */
1274
+ level: number;
1261
1275
  /** Fires when the cube map is "ready" (resolved on a microtask in this compat layer). */
1262
1276
  readonly onLoadObservable: Observable<CubeTexture>;
1263
1277
  private _ready;
1264
1278
  constructor(url: string, _scene?: unknown, _extensions?: unknown, _noMipmap?: boolean, _files?: unknown, onLoad?: (() => void) | null, _onError?: unknown, _format?: unknown, _prefiltered?: boolean);
@@ -1444,6 +1458,10 @@ export declare class FactorGradient {
1444
1458
  getFactor(): number;
1445
1459
  }
1446
1460
 
1461
+ export declare class FadeInOutBehavior {
1462
+ constructor();
1463
+ }
1464
+
1447
1465
  export declare class FBXFileLoader {
1448
1466
  constructor();
1449
1467
  }
@@ -1453,6 +1471,10 @@ export declare class FlyCamera extends TargetCamera {
1453
1471
  getClassName(): string;
1454
1472
  }
1455
1473
 
1474
+ export declare class FollowBehavior {
1475
+ constructor();
1476
+ }
1477
+
1456
1478
  /**
1457
1479
  * Babylon.js `FollowCamera` — follows a `lockedTarget` at a fixed radius /
1458
1480
  * height / rotation offset, updated each frame via the scene's before-render hook.
@@ -1564,6 +1586,10 @@ export declare class GeospatialCamera extends Camera {
1564
1586
  constructor(name: str
1565
1587
  attachControl(canvas: HTMLCanvasElement, _noPreventDefault?: boolean): void;
1566
1588
  }
1567
1589
 
1590
+ export declare class GeospatialClippingBehavior {
1591
+ constructor();
1592
+ }
1593
+
1568
1594
  /** Babylon.js `GetElementPixelFromUv` — HTML overlay raycast interaction is unsupported by the compat layer. */
1569
1595
  export declare function GetElementPixelFromUv(): never;
1570
1596
 
@@ -1686,13 +1712,77 @@ declare interface GroundOptions {
1686
1712
  subdivisions?: number;
1687
1713
  }
1688
1714
 
1689
- export declare class HavokPlugin {
1715
+ export declare class HandConstraintBehavior {
1690
1716
  constructor();
1691
1717
  }
1692
1718
 
1693
- /** Babylon.js `HDRCubeTexture` — see {@link CubeTexture}; use native `loadHdrEnvironment`. */
1719
+ /**
1720
+ * Babylon.js-shaped Havok V2 physics plugin, backed by Babylon Lite's native
1721
+ * `createHavokWorld` API.
1722
+ *
1723
+ * Construct it exactly as in Babylon.js and pass it to {@link Scene.enablePhysics}:
1724
+ * ```ts
1725
+ * const hknp = await HavokPhysics();
1726
+ * scene.enablePhysics(new Vector3(0, -9.81, 0), new HavokPlugin(true, hknp));
1727
+ * ```
1728
+ *
1729
+ * The first constructor argument, `useDeltaForWorldStep` (default `true`,
1730
+ * matching Babylon.js), selects delta-driven stepping: the world advances by the
1731
+ * elapsed real time each frame, so the simulation runs at the same real-time
1732
+ * speed regardless of the display refresh rate (issue #332). Pass `false` for the
1733
+ * legacy fixed `1/60`-per-frame behaviour.
1734
+ *
1735
+ * Bodies are still created with the native `createPhysicsAggregate` /
1736
+ * `createPhysicsBody` API against {@link world}; the Babylon.js `PhysicsAggregate`
1737
+ * class is not wrapped.
1738
+ */
1739
+ export declare class HavokPlugin {
1740
+ /** Name of the plugin. */
1741
+ readonly name: string;
1694
1742
  /** The native Lite physics world, created when the plugin is attached to a scene. */
1743
+ world: PhysicsWorld | null;
1695
1744
  constructor(useDeltaForWorldStep?: boolean, hpInjection?: unknown);
1745
+ /** Whether the plugin has a usable Havok module. */
1746
+ isSupported(): boolean;
1747
+ /** Babylon.js physics plugin version (Havok is V2). */
1748
+ getPluginVersion(): number;
1749
+ /** Set the fixed timestep used when delta stepping is disabled. Matches Babylon.js. */
1750
+ setTimeStep(timeStep: number): void;
1751
+ /** Get the fixed timestep. Matches Babylon.js. */
1752
+ getTimeStep(): number;
1753
+ /** Set the world gravity. */
1754
+ setGravity(gravity: Vec3Like, worldPosition?: Vec3Like): void;
1755
+ /**
1756
+ * Manual single-step entry point. Babylon Lite drives world stepping
1757
+ * internally (once per rendered frame, via the scene's before-render hook),
1758
+ * so calling this directly is unsupported — use {@link Scene.enablePhysics}.
1759
+ */
1760
+ executeStep(): never;
1761
+ /** Release the native physics world. */
1762
+ dispose(): void;
1763
+
1764
+ /**
1765
+ * Babylon.js `HDRCubeTexture` — a Radiance `.hdr` (RGBE) equirectangular panorama
1766
+ * used as an environment / IBL source. Like {@link CubeTexture} this is a
1767
+ * lightweight handle that records the `.hdr` URL; the actual GPU work (equirect →
1768
+ * prefiltered cubemap + irradiance SH + BRDF LUT) happens when it is assigned to
1769
+ * `scene.environmentTexture` and the engine starts, at which point the scene
1770
+ * routes it through Babylon Lite's native `loadHdrEnvironment`.
1771
+ */
1696
1772
  export declare class HDRCubeTexture {
1697
- constructor();
1773
+ /** Source URL of the `.hdr` panorama. */
1774
+ readonly url: string;
1775
+ /** Requested cubemap face size (BJS `size`); forwarded to Lite's `faceSize`. */
1776
+ readonly size: number;
1777
+ /** Babylon.js `coordinatesMode` (skybox = 5). Recorded for API parity. */
1778
+ coordinatesMode: number;
1779
+ name: string;
1780
+ gammaSpace: boolean;
1781
+ level: number;
1698
1782
  /** Fires when the HDR environment is "ready" (resolved on a microtask). */
1783
+ readonly onLoadObservable: Observable<HDRCubeTexture>;
1784
+ private _ready;
1785
+ constructor(url: string, _sceneOrEngine?: unknown, size?: number, _noMipmap?: boolean, _generateHarmonics?: boolean, _gammaSpace?: boolean, _prefilterOnLoad?: boolean, onLoad?: (() => void) | null);
1786
+ /** Babylon.js `BaseTexture.isReady()`. */
1787
+ isReady(): boolean;
1788
+ dispose(): void;
1699
1789
  }
1700
1790
 
1701
1791
  export declare class HemisphericLight extends Light {
1702
1792
  constructor(name: string, direction: Vector3, scene?: Scene);
@@ -1878,6 +1968,10 @@ export declare class InstancedMesh {
1878
1968
  constructor();
1879
1969
  }
1880
1970
 
1971
+ export declare class InterpolatingBehavior {
1972
+ constructor();
1973
+ }
1974
+
1881
1975
  /** Babylon.js `IsHtmlInCanvasSupportedNatively` — the HTML-in-canvas feature is unsupported by the compat layer. */
1882
1976
  export declare function IsHtmlInCanvasSupportedNatively(): never;
1883
1977
 
@@ -2344,6 +2438,10 @@ export declare class MultiMaterial {
2344
2438
  constructor();
2345
2439
  }
2346
2440
 
2441
+ export declare class MultiPointerScaleBehavior {
2442
+ constructor();
2443
+ }
2444
+
2347
2445
  declare abstract class Node_2 {
2348
2446
  name: string;
2349
2447
  /** String id. Defaults to the name (Babylon.js parity). */
@@ -2408,22 +2506,28 @@ declare class NodeMaterialBlockProxy {
2408
2506
 
2409
2507
  /**
2410
2508
  * Babylon.js's `NullEngine` — a headless engine with no GPU device, used to run
2411
- * scene logic (animations, observables, frame timing) without rendering. Babylon
2412
- * Lite has no headless context, so the compat `NullEngine` builds nothing on the
2413
- * GPU: it drives a pure-JS `requestAnimationFrame` loop that advances each scene's
2414
- * CPU animations and fires its before/after-render observables. Scenes constructed
2415
- * against it skip the Lite scene-context build (see `Scene`'s headless branch), so
2416
- * only the deviceless surface (CPU animations, manual 2D-canvas drawing, etc.)
2417
- * works — there is no WebGPU rendering. Extends {@link WebGPUEngine} so it is
2418
- * accepted everywhere a compat engine is (e.g. `new Scene(engine)`).
2509
+ * scene logic (animations, observables, physics stepping, frame timing) without
2510
+ * rendering. Backed by Babylon Lite's real device-less headless engine
2511
+ * (`createNullEngine`): scenes constructed against it build a Lite scene context
2512
+ * with **no** frame-graph render task (`defaultRenderTask: false`), so no swapchain
2513
+ * or GPU resource is ever allocated. The compat `NullEngine` drives a pure-JS
2514
+ * `requestAnimationFrame` loop that advances each scene by the wall-clock delta
2515
+ * between frames via Lite's `stepScene` (which fires the scene's `onBeforeRender`
2516
+ * callbacks — CPU animations,
2517
+ * physics steps, user logic). Only the device-less simulation surface works; adding
2518
+ * meshes with materials (whose deferred GPU builders need a device) is unsupported,
2519
+ * matching Babylon.js's `NullEngine` limitations. Extends {@link WebGPUEngine} so it
2520
+ * is accepted everywhere a compat engine is (e.g. `new Scene(engine)`).
2419
2521
  */
2420
2522
  export declare class NullEngine extends WebGPUEngine {
2421
2523
  constructor();
2422
2524
  /** No GPU device to acquire. */
2423
2525
  initAsync(): Promise<void>;
2424
2526
  /**
2425
- * Drive a pure-JS frame loop: each tick advances every registered scene's CPU
2426
- * animations + render observables, then runs the user callback(s). No GPU work.
2527
+ * Drive a pure-JS frame loop: each tick advances every registered scene by the
2528
+ * wall-clock delta between frames through Lite's `stepScene` (which fires the scene's before-render
2529
+ * callbacks: CPU animations, physics, render observables), then runs the user
2530
+ * callback(s). No GPU work is recorded or submitted.
2427
2531
  */
2428
2532
  runRenderLoop(callback: () => void): void;
2429
2533
 
@@ -2592,10 +2696,10 @@ export declare class PBRMaterial extends PushMaterial {
2592
2696
  constructor(name: st
2593
2697
  * environment assigned to a material is routed to the owning scene's
2594
2698
  * environment (the dominant single-IBL case Babylon.js scenes use).
2595
2699
  */
2596
- get environmentTexture(): CubeTexture | null;
2597
- set environmentTexture(value: CubeTexture | null);
2598
- get reflectionTexture(): CubeTexture | null;
2599
- set reflectionTexture(value: CubeTexture | null);
2700
+ get environmentTexture(): CubeTexture | HDRCubeTexture | null;
2701
+ set environmentTexture(value: CubeTexture | HDRCubeTexture | null);
2702
+ get reflectionTexture(): CubeTexture | HDRCubeTexture | null;
2703
+ set reflectionTexture(value: CubeTexture | HDRCubeTexture | null);
2600
2704
 
2601
2705
  /**
2602
2706
  * Babylon.js `PBRMetallicRoughnessMaterial` — a simplified façade over
@@ -2667,10 +2771,69 @@ export declare class PhysicsBody {
2667
2771
  constructor();
2668
2772
  }
2669
2773
 
2774
+ /** Type of a Physics V2 constraint. Values match Babylon.js `PhysicsConstraintType`. */
2775
+ export declare enum PhysicsConstraintType {
2776
+ BALL_AND_SOCKET = 1,
2777
+ DISTANCE = 2,
2778
+ HINGE = 3,
2779
+ SLIDER = 4,
2780
+ LOCK = 5,
2781
+ PRISMATIC = 6,
2782
+ SIX_DOF = 7
2783
+ }
2784
+
2785
+ /**
2786
+ * Babylon.js-shaped Physics V2 engine wrapper returned by
2787
+ * {@link Scene.getPhysicsEngine}. Holds the active {@link HavokPlugin} and the
2788
+ * world gravity, exposing the common Babylon.js `IPhysicsEngine` surface.
2789
+ */
2790
+ export declare class PhysicsEngine {
2670
2791
  /** Current world gravity. */
2792
+ gravity: Vec3Like;
2793
+ constructor(plugin: HavokPlugin, gravity: Vec3Like);
2794
+ /** The underlying physics plugin. */
2795
+ getPhysicsPlugin(): HavokPlugin;
2796
+ /** Physics engine plugin version (Havok is V2). */
2797
+ getPluginVersion(): number;
2798
+ /** Set the world gravity. */
2799
+ setGravity(gravity: Vec3Like): void;
2800
+ /** Set the fixed timestep. */
2801
+ setTimeStep(newTimeStep: number): void;
2802
+ /** Get the fixed timestep. */
2803
+ getTimeStep(): number;
2804
+ /** Release the underlying physics world. */
2805
+ dispose(): void;
2806
+ }
2807
+
2808
+ /** How a body moves. Values match Babylon.js `PhysicsMotionType`. */
2809
+ export declare enum PhysicsMotionType {
2810
+ STATIC = 0,
2811
+ ANIMATED = 1,
2812
+ DYNAMIC = 2
2813
+ }
2814
+
2815
+ /** How a moved transform node is propagated to its body before each step. Values match Babylon.js `PhysicsPrestepType`. */
2816
+ export declare enum PhysicsPrestepType {
2817
+ DISABLED = 0,
2818
+ TELEPORT = 1,
2819
+ ACTION = 2
2820
+ }
2821
+
2671
2822
  export declare class PhysicsShape {
2672
2823
  constructor();
2673
2824
  }
2674
2825
 
2826
+ /** The type of a Havok physics collision shape. Values match Babylon.js `PhysicsShapeType`. */
2827
+ export declare enum PhysicsShapeType {
2828
+ SPHERE = 0,
2829
+ CAPSULE = 1,
2830
+ CYLINDER = 2,
2831
+ BOX = 3,
2832
+ CONVEX_HULL = 4,
2833
+ CONTAINER = 5,
2834
+ MESH = 6,
2835
+ HEIGHTFIELD = 7
2836
+ }
2837
+
2675
2838
  /** A pickable compat mesh: a regular `Mesh` or a `GaussianSplattingMesh`. */
2676
2839
  declare type PickableMesh = Mesh | GaussianSplattingMesh;
2677
2840
 
@@ -2699,7 +2862,9 @@ export declare class Plane {
2699
2862
 
2700
2863
  /** Babylon.js `PlaneDragGizmo` — drags the attached node within a plane. */
2701
2864
  export declare class PlaneDragGizmo extends GizmoBase {
2702
2865
  private _attached;
2703
- constructor(dragPlaneNormal: Vector3, color: Color3, layer: UtilityLayerRenderer);
2866
+ constructor(dragPlaneNormal: Vector3, color: Color3, layer: UtilityLayerRenderer);
2704
2867
  /** Babylon.js `IPlaneDragGizmo.isEnabled` — toggles interactivity (drag + hover pick). */
2868
+ get isEnabled(): boolean;
2869
+ set isEnabled(value: boolean);
2705
2870
  get attachedMesh(): AbstractMesh | null;
2706
2871
  set attachedMesh(value: AbstractMesh | null);
2707
2872
  get attachedNode(): Node_2 | null;
@@ -2715,7 +2880,9 @@ declare interface PlaneOptions {
2715
2880
 
2716
2881
  /** Babylon.js `PlaneRotationGizmo` — rotates the attached node about a plane normal. */
2717
2882
  export declare class PlaneRotationGizmo extends GizmoBase {
2718
2883
  private _attached;
2719
- constructor(planeNormal: Vector3, color: Color3, layer: UtilityLayerRenderer);
2884
+ constructor(planeNormal: Vector3, color: Color3, layer: UtilityLayerRenderer);
2720
2885
  /** Babylon.js `IPlaneRotationGizmo.isEnabled` — toggles interactivity (drag + hover pick). */
2886
+ get isEnabled(): boolean;
2887
+ set isEnabled(value: boolean);
2721
2888
  get attachedMesh(): AbstractMesh | null;
2722
2889
  set attachedMesh(value: AbstractMesh | null);
2723
2890
  get attachedNode(): Node_2 | null;
@@ -2723,6 +2890,10 @@ export declare class PlaneRotationGizmo extends GizmoBase {
2723
2890
  private _attache
2724
2891
  dispose(): void;
2725
2892
  }
2726
2893
 
2894
+ export declare class PointerDragBehavior {
2895
+ constructor();
2896
+ }
2897
+
2727
2898
  export declare class PointLight extends Light {
2728
2899
  constructor(name: string, position: Vector3, scene?: Scene);
2729
2900
  getClassName(): string;
2730
2901
  get intensity(): number;
@@ -2742,7 +2913,16 @@ export declare class PointsCloudSystem {
2742
2913
  }
2743
2914
 
2744
2915
  export declare class PositionGizmo extends GizmoBase {
2745
2916
  private _attached;
2917
+ private _xGizmo;
2918
+ private _yGizmo;
2919
+ private _zGizmo;
2746
2920
  constructor(layer: UtilityLayerRenderer);
2921
+ /** Babylon.js `PositionGizmo.xGizmo/yGizmo/zGizmo` — the per-axis drag sub-gizmos.
2922
+ * Exposed so callers can toggle interactivity per axis (e.g. `xGizmo.isEnabled = false`
2923
+ * for a display-only gizmo). Wrappers are cached so identity is stable. */
2924
+ get xGizmo(): AxisDragGizmo;
2925
+ get yGizmo(): AxisDragGizmo;
2926
+ get zGizmo(): AxisDragGizmo;
2747
2927
  /** Babylon.js `Gizmo.updateGizmoRotationToMatchAttachedMesh` — orient widgets to the node's local axes. */
2748
2928
  set updateGizmoRotationToMatchAttachedMesh(value: boolean);
2749
2929
  get attachedMesh(): AbstractMesh | null;
@@ -2841,6 +3021,40 @@ export declare class RawTexture extends BaseTexture {
2841
3021
  static CreateRGBATexture(data: Uint8Array, width: number, height: number, scene: Scene): RawTexture;
2842
3022
  }
2843
3023
 
3024
+ /**
3025
+ * Babylon.js `RawTexture3D` — a volumetric texture created from raw RGBA8 pixel
3026
+ * bytes (the common case being a colour-grading LUT / colour cube). Backed by
3027
+ * Babylon Lite's `createTexture3DFromPixels`; the GPU handle is available
3028
+ * synchronously after construction.
3029
+ *
3030
+ * Babylon Lite's 3D-texture path is RGBA8-only, so the `format` argument is
3031
+ * recorded for API parity but the upload always treats `data` as tightly-packed
3032
+ * `width * height * depth * 4` RGBA bytes (x fastest, then y, then z).
3033
+ */
3034
+ export declare class RawTexture3D extends BaseTexture {
3035
+ /** Babylon.js texture format (recorded for parity; Lite uploads RGBA8). */
3036
+ format: number;
3037
+ private readonly _scene;
3038
+ /** Babylon.js `RawTexture3D.is3D` — always true for a 3D texture. */
3039
+ readonly is3D = true;
3040
+ constructor(data: ArrayBufferView | null, width: number, height: number, depth: number,
3041
+ /** Babylon.js texture format (recorded for parity; Lite uploads RGBA8). */
3042
+ format: number, scene: Scene, _generateMipMaps?: boolean, _invertY?: boolean, _samplingMode?: number, _textureType?: number, _creationFlags?: number);
3043
+ getClassName(): string;
3044
+ /** Gets the width of the texture. */
3045
+ get width(): number;
3046
+ /** Gets the height of the texture. */
3047
+ get height(): number;
3048
+ /** Gets the depth of the texture. */
3049
+ get depth(): number;
3050
+ /**
3051
+ * Replace the texture's pixel contents. Babylon Lite has no in-place 3D update,
3052
+ * so the volume is re-uploaded (a fresh Lite 3D texture handle).
3053
+ */
3054
+ update(data: ArrayBufferView): void;
3055
+ whenReadyAsync(): Promise<void>;
3056
+ }
3057
+
2844
3058
  export declare class Ray {
2845
3059
  origin: Vector3;
2846
3060
  direction: Vector3;
@@ -2873,7 +3087,14 @@ export declare class RenderTargetTexture {
2873
3087
  }
2874
3088
 
2875
3089
  export declare class RotationGizmo extends GizmoBase {
2876
3090
  private _attached;
3091
+ private _xGizmo;
3092
+ private _yGizmo;
3093
+ private _zGizmo;
2877
3094
  constructor(layer: UtilityLayerRenderer);
3095
+ /** Babylon.js `RotationGizmo.xGizmo/yGizmo/zGizmo` — the per-plane rotation sub-gizmos. */
3096
+ get xGizmo(): PlaneRotationGizmo;
3097
+ get yGizmo(): PlaneRotationGizmo;
3098
+ get zGizmo(): PlaneRotationGizmo;
2878
3099
  /** Babylon.js `Gizmo.updateGizmoRotationToMatchAttachedMesh` — orient widgets to the node's local axes. */
2879
3100
  set updateGizmoRotationToMatchAttachedMesh(value: boolean);
2880
3101
  get attachedMesh(): AbstractMesh | null;
@@ -2896,7 +3117,14 @@ export declare const Scalar: {
2896
3117
  };
2897
3118
 
2898
3119
  export declare class ScaleGizmo extends GizmoBase {
2899
3120
  private _attached;
3121
+ private _xGizmo;
3122
+ private _yGizmo;
3123
+ private _zGizmo;
2900
3124
  constructor(layer: UtilityLayerRenderer);
3125
+ /** Babylon.js `ScaleGizmo.xGizmo/yGizmo/zGizmo` — the per-axis scale sub-gizmos. */
3126
+ get xGizmo(): AxisScaleGizmo;
3127
+ get yGizmo(): AxisScaleGizmo;
3128
+ get zGizmo(): AxisScaleGizmo;
2901
3129
  /** Babylon.js `Gizmo.updateGizmoRotationToMatchAttachedMesh` — orient widgets to the node's local axes. */
2902
3130
  set updateGizmoRotationToMatchAttachedMesh(value: boolean);
2903
3131
  get attachedMesh(): AbstractMesh | null;
@@ -3021,8 +3249,8 @@ export declare class Scene extends AbstractScene {
3021
3249
  /** Babylon.js fog-mode c
3022
3250
  */
3023
3251
  get clipPlane(): Plane | null;
3024
3252
  set clipPlane(value: Plane | null);
3025
- get environmentTexture(): CubeTexture | null;
3026
- set environmentTexture(value: CubeTexture | null);
3253
+ get environmentTexture(): CubeTexture | HDRCubeTexture | null;
3254
+ set environmentTexture(value: CubeTexture | HDRCubeTexture | null);
3027
3255
  /**
3028
3256
  * Babylon.js `scene.createDefaultEnvironment` — adds an IBL skybox and ground.
3029
3257
  * Babylon Lite performs this through `loadEnvironment` (deferred to engine start),
@@ -3038,7 +3266,7 @@ export declare class Scene extends AbstractScene {
3038
3266
  /** Babylon.js fog-mode c
3039
3267
  * loaded `.env` specular cubemap as an HDR skybox, so this records the env URL (if
3040
3268
  * not already set) and flags a skybox-from-environment load at engine start.
3041
3269
  */
3042
- createDefaultSkybox(texture?: CubeTexture, _pbr?: boolean, scale?: number, _blur?: number, _setGlobalEnv?: boolean): {
3270
+ createDefaultSkybox(texture?: CubeTexture | HDRCubeTexture, _pbr?: boolean, scale?: number, _blur?: number, _setGlobalEnv?: boolean): {
3043
3271
  dispose(): void;
3044
3272
  };
3045
3273
  /** Create and activate a default arc-rotate camera framing the scene. */
3046
3274
  createDefaultCamera(_createArcRotateCamera?: boolean, _replace?: boolean, _attachControl?: boolean): Camera;
@@ -3057,7 +3285,28 @@ export declare class Scene extends AbstractScene {
3057
3285
  /** Babylon.js fog-mode c
3058
3286
  /** Synchronous CPU picking — unsupported. Babylon Lite uses async GPU picking. */
3059
3287
  pick(): never;
3060
3288
  /** Synchronous ray picking — unsupported. */
3061
- pickWithRay(): never;
3289
+ pickWithRay(): never;
3062
3290
  /**
3291
+ * Babylon.js `scene.enablePhysics(gravity, plugin)`. Wires the given Havok V2
3292
+ * {@link HavokPlugin} to this scene, creating the native Lite physics world and
3293
+ * registering per-frame stepping. The plugin's `useDeltaForWorldStep` flag
3294
+ * controls whether the world advances by elapsed frame time (refresh-rate
3295
+ * independent — issue #332) or a fixed `1/60` step.
3296
+ *
3297
+ * Bodies are created with the native `createPhysicsAggregate` /
3298
+ * `createPhysicsBody` API against `scene.getPhysicsEngine().getPhysicsPlugin().world`.
3299
+ * @returns `true` once physics is enabled.
3300
+ */
3301
+ enablePhysics(gravity?: {
3302
+ x: number;
3303
+ y: number;
3304
+ z: number;
3305
+ } | null, plugin?: HavokPlugin): boolean;
3306
+ /** Babylon.js `scene.getPhysicsEngine()` — the active Physics V2 engine, or `null`. */
3307
+ getPhysicsEngine(): PhysicsEngine | null;
3308
+ /** Babylon.js `scene.isPhysicsEnabled()`. */
3309
+ isPhysicsEnabled(): boolean;
3310
+ /** Babylon.js `scene.disablePhysicsEngine()` — release the active physics world. */
3311
+ disablePhysicsEngine(): void;
3063
3312
  /**
3064
3313
  * Babylon.js `scene.beginDirectAnimation(target, animations, from, to, loop, speedRatio?)`.
3065
3314
  * Drives the given `Animation`s on the CPU each frame, writing onto the target's
@@ -3178,6 +3427,10 @@ export declare class SineEase extends EasingFunction {
3178
3427
  easeInCore(gradient: number): number;
3179
3428
  }
3180
3429
 
3430
+ export declare class SixDofDragBehavior {
3431
+ constructor();
3432
+ }
3433
+
3181
3434
  /** Babylon.js-compatible `Size` and `Viewport` (pure JS). */
3182
3435
  export declare class Size {
3183
3436
  width: number;
@@ -3577,6 +3830,10 @@ export declare class StringDictionary<T> {
3577
3830
  forEach(callback: (key: string, value: T) => void): void;
3578
3831
  }
3579
3832
 
3833
+ export declare class SurfaceMagnetismBehavior {
3834
+ constructor();
3835
+ }
3836
+
3580
3837
  declare interface Taggable {
3581
3838
  _tags?: Record<string, true>;
3582
3839
  }
@@ -3792,6 +4049,13 @@ export declare const ValueConditionOperators: {
3792
4049
  readonly IsLesser: 3;
3793
4050
  };
3794
4051
 
4052
+ /** Minimal `{x, y, z}` view shared by the compat `Vector3` and Lite's `Vec3`. */
4053
+ declare interface Vec3Like {
4054
+ x: number;
4055
+ y: number;
4056
+ z: number;
4057
+ }
4058
+
3795
4059
  export declare class Vector2 {
3796
4060
  x: number;
3797
4061
  y: number;