@babylonjs/lite-compat 1.7.0-preview → 1.9.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 +21 -20
- package/index.d.ts +314 -30
- package/index.js +472 -136
- package/index.js.map +1 -1
- package/{meshes-a59_KvbH.js → meshes-CPZtn6G5.js} +114 -16
- package/meshes-CPZtn6G5.js.map +1 -0
- package/navigation.d.ts +174 -12
- package/navigation.js +1 -1
- package/package.json +4 -4
- package/meshes-a59_KvbH.js.map +0 -1
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
|
|
118
|
-
|
|
|
119
|
-
| Math (`Vector*`, `Color*`, `Quaternion`, `Matrix`, `Plane`, `Ray`, `Frustum`, `Scalar`, `Axis`/`Space`)
|
|
120
|
-
| Engine (`WebGPUEngine`, `Engine`, `ThinEngine`, `NullEngine`)
|
|
121
|
-
| Scene (clear color, cameras/lights, fog, environment, observables, ready state)
|
|
122
|
-
| Cameras (`ArcRotateCamera`, `FreeCamera`/`Universal`/`Target`, `FollowCamera`, `GeospatialCamera`)
|
|
123
|
-
| Lights (`Hemispheric`, `Directional`, `Point`, `Spot`)
|
|
124
|
-
| Shadows (`ShadowGenerator` directional ESM/PCF, spot PCF)
|
|
125
|
-
| Meshes & geometry (class chain, `MeshBuilder` primitives, transforms, thin instances, `VertexData`)
|
|
126
|
-
| CSG / CSG2
|
|
127
|
-
| Gizmos (position/rotation/scale/bounding-box/light/camera + `GizmoManager`)
|
|
128
|
-
| Materials (`StandardMaterial`, `PBRMaterial`, metallic-rough / spec-gloss, `NodeMaterial`)
|
|
129
|
-
| Textures (`Texture`, `RawTexture`, `DynamicTexture`, `CubeTexture`)
|
|
130
|
-
| Animation (keyframe `Animation`, easing, `Animatable`, `AnimationGroup` incl. weighted/additive blend)
|
|
131
|
-
| Morph targets (`MorphTarget` / `MorphTargetManager`)
|
|
132
|
-
| Sprites (`SpriteManager` / `Sprite`)
|
|
133
|
-
| Behaviors / Actions (`AutoRotation`, `Framing`, `ActionManager`, conditions)
|
|
134
|
-
| Misc (`Observable`, `Tools`, `SmartArray`, `Tags`, gradients, `PerformanceMonitor`)
|
|
135
|
-
| Audio V2 (`AudioEngineV2`, `StaticSound`, `StreamingSound`, `AudioBus`, buses/sources/analyzer)
|
|
136
|
-
|
|
|
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 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
|
+
| 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
|
|
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';
|
|
@@ -206,8 +207,14 @@ export declare class AbstractMesh extends TransformNode {
|
|
|
206
207
|
private _material;
|
|
207
208
|
get receiveShadows(): boolean;
|
|
208
209
|
set receiveShadows(value: boolean);
|
|
209
210
|
setEnabled(enabled: boolean): void;
|
|
210
|
-
/**
|
|
211
|
-
|
|
211
|
+
/**
|
|
212
|
+
* Babylon.js `mesh.getBoundingInfo()` — local-space AABB of this mesh. Babylon
|
|
213
|
+
* Lite stores `boundMin`/`boundMax` (local space) on factory- and loader-built
|
|
214
|
+
* meshes; when absent (e.g. a placeholder mesh whose bounds were never computed)
|
|
215
|
+
* we fold the retained CPU positions through Lite's `computeAabb`. A mesh with
|
|
216
|
+
* no geometry returns a degenerate zero-size box.
|
|
217
|
+
*/
|
|
218
|
+
getBoundingInfo(): BoundingInfo;
|
|
212
219
|
/**
|
|
213
220
|
* Babylon.js `mesh.getVerticesData(kind)` — read back the CPU geometry buffer
|
|
214
221
|
* for `position` / `normal` / `uv`. Babylon Lite retains these on the mesh
|
|
@@ -849,7 +856,11 @@ export declare const Axis: {
|
|
|
849
856
|
|
|
850
857
|
/** Babylon.js `AxisDragGizmo` — drags the attached node along a single world axis. */
|
|
851
858
|
export declare class AxisDragGizmo extends GizmoBase {
|
|
852
859
|
private _attached;
|
|
853
|
-
constructor(dragAxis: Vector3, color: Color3, layer: UtilityLayerRenderer);
|
|
860
|
+
constructor(dragAxis: Vector3, color: Color3, layer: UtilityLayerRenderer);
|
|
854
861
|
/** Babylon.js `IAxisDragGizmo.isEnabled` — when false the gizmo is non-interactive
|
|
862
|
+
* (no drag, and no GPU hover picking), while its meshes stay visible and keep
|
|
863
|
+
* following the attached node. Toggles the underlying Lite pointer-drag. */
|
|
864
|
+
get isEnabled(): boolean;
|
|
865
|
+
set isEnabled(value: boolean);
|
|
855
866
|
get attachedMesh(): AbstractMesh | null;
|
|
856
867
|
set attachedMesh(value: AbstractMesh | null);
|
|
857
868
|
get attachedNode(): Node_2 | null;
|
|
@@ -859,7 +870,9 @@ export declare class AxisDragGizmo extends GizmoBase {
|
|
|
859
870
|
private _attached;
|
|
860
871
|
|
|
861
872
|
/** Babylon.js `AxisScaleGizmo` — scales the attached node along a single axis. */
|
|
862
873
|
export declare class AxisScaleGizmo extends GizmoBase {
|
|
863
874
|
private _attached;
|
|
864
|
-
constructor(dragAxis: Vector3, color: Color3, layer: UtilityLayerRenderer);
|
|
875
|
+
constructor(dragAxis: Vector3, color: Color3, layer: UtilityLayerRenderer);
|
|
865
876
|
/** Babylon.js `IAxisScaleGizmo.isEnabled` — toggles interactivity (drag + hover pick). */
|
|
877
|
+
get isEnabled(): boolean;
|
|
878
|
+
set isEnabled(value: boolean);
|
|
866
879
|
get attachedMesh(): AbstractMesh | null;
|
|
867
880
|
set attachedMesh(value: AbstractMesh | null);
|
|
868
881
|
get attachedNode(): Node_2 | null;
|
|
@@ -1110,6 +1123,9 @@ declare type CompatMaterial = StandardMaterial | PBRMaterial | NodeMaterial | Gr
|
|
|
1110
1123
|
|
|
1111
1124
|
declare type CompatMaterial_2 = StandardMaterial | PBRMaterial | NodeMaterial;
|
|
1112
1125
|
|
|
1126
|
+
/** Babylon.js `ComputeOverlayCssTransform` — HTML overlay interaction is unsupported by the compat layer. */
|
|
1127
|
+
export declare function ComputeOverlayCssTransform(): never;
|
|
1128
|
+
|
|
1113
1129
|
/** Base class for action conditions. */
|
|
1114
1130
|
export declare abstract class Condition {
|
|
1115
1131
|
abstract isValid(): boolean;
|
|
@@ -1247,8 +1263,7 @@ export declare class CubeTexture {
|
|
|
1247
1263
|
coordinatesMode: number;
|
|
1248
1264
|
name: string;
|
|
1249
1265
|
gammaSpace: boolean;
|
|
1250
|
-
level: number;
|
|
1251
|
-
/** Fires when the cube map is "ready" (resolved on a microtask in this compat layer). */
|
|
1266
|
+
level: number;
|
|
1252
1267
|
/** Fires when the cube map is "ready" (resolved on a microtask in this compat layer). */
|
|
1253
1268
|
readonly onLoadObservable: Observable<CubeTexture>;
|
|
1254
1269
|
private _ready;
|
|
1255
1270
|
constructor(url: string, _scene?: unknown, _extensions?: unknown, _noMipmap?: boolean, _files?: unknown, onLoad?: (() => void) | null, _onError?: unknown, _format?: unknown, _prefiltered?: boolean);
|
|
@@ -1555,6 +1570,9 @@ export declare class GeospatialCamera extends Camera {
|
|
|
1555
1570
|
constructor(name: str
|
|
1556
1571
|
attachControl(canvas: HTMLCanvasElement, _noPreventDefault?: boolean): void;
|
|
1557
1572
|
}
|
|
1558
1573
|
|
|
1574
|
+
/** Babylon.js `GetElementPixelFromUv` — HTML overlay raycast interaction is unsupported by the compat layer. */
|
|
1575
|
+
export declare function GetElementPixelFromUv(): never;
|
|
1576
|
+
|
|
1559
1577
|
/** Shared base for compat gizmos (Babylon.js `Gizmo`). */
|
|
1560
1578
|
declare abstract class GizmoBase {
|
|
1561
1579
|
protected constructor(layer: UtilityLayerRenderer);
|
|
1562
1580
|
abstract get attachedMesh(): AbstractMesh | null;
|
|
@@ -1674,13 +1692,73 @@ declare interface GroundOptions {
|
|
|
1674
1692
|
subdivisions?: number;
|
|
1675
1693
|
}
|
|
1676
1694
|
|
|
1695
|
+
/**
|
|
1696
|
+
* Babylon.js-shaped Havok V2 physics plugin, backed by Babylon Lite's native
|
|
1697
|
+
* `createHavokWorld` API.
|
|
1698
|
+
*
|
|
1699
|
+
* Construct it exactly as in Babylon.js and pass it to {@link Scene.enablePhysics}:
|
|
1700
|
+
* ```ts
|
|
1701
|
+
* const hknp = await HavokPhysics();
|
|
1702
|
+
* scene.enablePhysics(new Vector3(0, -9.81, 0), new HavokPlugin(true, hknp));
|
|
1703
|
+
* ```
|
|
1704
|
+
*
|
|
1705
|
+
* The first constructor argument, `useDeltaForWorldStep` (default `true`,
|
|
1706
|
+
* matching Babylon.js), selects delta-driven stepping: the world advances by the
|
|
1707
|
+
* elapsed real time each frame, so the simulation runs at the same real-time
|
|
1708
|
+
* speed regardless of the display refresh rate (issue #332). Pass `false` for the
|
|
1709
|
+
* legacy fixed `1/60`-per-frame behaviour.
|
|
1710
|
+
*
|
|
1711
|
+
* Bodies are still created with the native `createPhysicsAggregate` /
|
|
1712
|
+
* `createPhysicsBody` API against {@link world}; the Babylon.js `PhysicsAggregate`
|
|
1713
|
+
* class is not wrapped.
|
|
1714
|
+
*/
|
|
1677
1715
|
export declare class HavokPlugin {
|
|
1678
|
-
|
|
1679
|
-
|
|
1716
|
+
/** Name of the plugin. */
|
|
1717
|
+
readonly name: string;
|
|
1680
1718
|
/** The native Lite physics world, created when the plugin is attached to a scene. */
|
|
1719
|
+
world: PhysicsWorld | null;
|
|
1681
1720
|
constructor(useDeltaForWorldStep?: boolean, hpInjection?: unknown);
|
|
1721
|
+
/** Whether the plugin has a usable Havok module. */
|
|
1722
|
+
isSupported(): boolean;
|
|
1723
|
+
/** Babylon.js physics plugin version (Havok is V2). */
|
|
1724
|
+
getPluginVersion(): number;
|
|
1725
|
+
/** Set the fixed timestep used when delta stepping is disabled. Matches Babylon.js. */
|
|
1726
|
+
setTimeStep(timeStep: number): void;
|
|
1727
|
+
/** Get the fixed timestep. Matches Babylon.js. */
|
|
1728
|
+
getTimeStep(): number;
|
|
1729
|
+
/** Set the world gravity. */
|
|
1730
|
+
setGravity(gravity: Vec3Like, worldPosition?: Vec3Like): void;
|
|
1731
|
+
/**
|
|
1732
|
+
* Manual single-step entry point. Babylon Lite drives world stepping
|
|
1733
|
+
* internally (once per rendered frame, via the scene's before-render hook),
|
|
1734
|
+
* so calling this directly is unsupported — use {@link Scene.enablePhysics}.
|
|
1735
|
+
*/
|
|
1736
|
+
executeStep(): never;
|
|
1737
|
+
/** Release the native physics world. */
|
|
1738
|
+
dispose(): void;
|
|
1682
1739
|
|
|
1683
|
-
/**
|
|
1740
|
+
/**
|
|
1741
|
+
* Babylon.js `HDRCubeTexture` — a Radiance `.hdr` (RGBE) equirectangular panorama
|
|
1742
|
+
* used as an environment / IBL source. Like {@link CubeTexture} this is a
|
|
1743
|
+
* lightweight handle that records the `.hdr` URL; the actual GPU work (equirect →
|
|
1744
|
+
* prefiltered cubemap + irradiance SH + BRDF LUT) happens when it is assigned to
|
|
1745
|
+
* `scene.environmentTexture` and the engine starts, at which point the scene
|
|
1746
|
+
* routes it through Babylon Lite's native `loadHdrEnvironment`.
|
|
1747
|
+
*/
|
|
1684
1748
|
export declare class HDRCubeTexture {
|
|
1685
|
-
|
|
1749
|
+
/** Source URL of the `.hdr` panorama. */
|
|
1750
|
+
readonly url: string;
|
|
1751
|
+
/** Requested cubemap face size (BJS `size`); forwarded to Lite's `faceSize`. */
|
|
1752
|
+
readonly size: number;
|
|
1753
|
+
/** Babylon.js `coordinatesMode` (skybox = 5). Recorded for API parity. */
|
|
1754
|
+
coordinatesMode: number;
|
|
1755
|
+
name: string;
|
|
1756
|
+
gammaSpace: boolean;
|
|
1757
|
+
level: number;
|
|
1686
1758
|
/** Fires when the HDR environment is "ready" (resolved on a microtask). */
|
|
1759
|
+
readonly onLoadObservable: Observable<HDRCubeTexture>;
|
|
1760
|
+
private _ready;
|
|
1761
|
+
constructor(url: string, _sceneOrEngine?: unknown, size?: number, _noMipmap?: boolean, _generateHarmonics?: boolean, _gammaSpace?: boolean, _prefilterOnLoad?: boolean, onLoad?: (() => void) | null);
|
|
1762
|
+
/** Babylon.js `BaseTexture.isReady()`. */
|
|
1763
|
+
isReady(): boolean;
|
|
1764
|
+
dispose(): void;
|
|
1687
1765
|
}
|
|
1688
1766
|
|
|
1689
1767
|
export declare class HemisphericLight extends Light {
|
|
1690
1768
|
constructor(name: string, direction: Vector3, scene?: Scene);
|
|
@@ -1701,6 +1779,18 @@ export declare class HighlightLayer {
|
|
|
1701
1779
|
constructor();
|
|
1702
1780
|
}
|
|
1703
1781
|
|
|
1782
|
+
export declare class HtmlInteractionManager {
|
|
1783
|
+
constructor();
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
export declare class HtmlRaycastInteractionManager {
|
|
1787
|
+
constructor();
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
export declare class HtmlTexture {
|
|
1791
|
+
constructor();
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1704
1794
|
/** Babylon.js `IAbstractSoundOptions` (subset). */
|
|
1705
1795
|
export declare interface IAbstractSoundOptions extends Partial<IVolumeAudioOptions> {
|
|
1706
1796
|
/** Play immediately once ready. Defaults to `false`. */
|
|
@@ -1780,6 +1870,31 @@ export declare interface IGPUPickingInfo {
|
|
|
1780
1870
|
thinInstanceIndex?: number;
|
|
1781
1871
|
}
|
|
1782
1872
|
|
|
1873
|
+
/** Module shape of an HTML-in-canvas polyfill (shape-only stub). */
|
|
1874
|
+
export declare interface IHtmlInCanvasPolyfillModule {
|
|
1875
|
+
[key: string]: unknown;
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
/** Options accepted by Babylon.js `HtmlInteractionManager` (shape-only stub). */
|
|
1879
|
+
export declare interface IHtmlInteractionManagerOptions {
|
|
1880
|
+
[key: string]: unknown;
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
/** Options accepted by Babylon.js `HtmlRaycastInteractionManager` (shape-only stub). */
|
|
1884
|
+
export declare interface IHtmlRaycastInteractionManagerOptions {
|
|
1885
|
+
[key: string]: unknown;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
/** Options accepted by Babylon.js `HtmlTexture` (shape-only stub for type parity). */
|
|
1889
|
+
export declare interface IHtmlTextureOptions {
|
|
1890
|
+
[key: string]: unknown;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
/** Options accepted by `InstallHtmlInCanvasPolyfill` (shape-only stub). */
|
|
1894
|
+
export declare interface IInstallHtmlInCanvasPolyfillOptions {
|
|
1895
|
+
[key: string]: unknown;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1783
1898
|
/**
|
|
1784
1899
|
* Babylon.js `ImageProcessingConfiguration` — only the tone-mapping constants are
|
|
1785
1900
|
* surfaced (the live exposure/contrast/tone-mapping toggle is exposed through
|
|
@@ -1821,11 +1936,20 @@ export declare class IncrementValueAction extends Action {
|
|
|
1821
1936
|
/** Babylon.js `InitializeCSG2Async()` — load the Manifold runtime before any `CSG2` use. */
|
|
1822
1937
|
export declare function InitializeCSG2Async(): Promise<void>;
|
|
1823
1938
|
|
|
1939
|
+
/** Babylon.js `InstallHtmlInCanvasPolyfill` — the HTML-in-canvas polyfill is unsupported by the compat layer. */
|
|
1940
|
+
export declare function InstallHtmlInCanvasPolyfill(): never;
|
|
1941
|
+
|
|
1824
1942
|
/** Babylon.js `InstancedMesh` — hardware instances are not modelled; use thin instances. */
|
|
1825
1943
|
export declare class InstancedMesh {
|
|
1826
1944
|
constructor();
|
|
1827
1945
|
}
|
|
1828
1946
|
|
|
1947
|
+
/** Babylon.js `IsHtmlInCanvasSupportedNatively` — the HTML-in-canvas feature is unsupported by the compat layer. */
|
|
1948
|
+
export declare function IsHtmlInCanvasSupportedNatively(): never;
|
|
1949
|
+
|
|
1950
|
+
/** Babylon.js `IsHtmlInCanvasUploadSupported` — HTML texture upload is unsupported by the compat layer. */
|
|
1951
|
+
export declare function IsHtmlInCanvasUploadSupported(): never;
|
|
1952
|
+
|
|
1829
1953
|
/** Babylon.js `ISoundSourceOptions` (subset). */
|
|
1830
1954
|
export declare interface ISoundSourceOptions extends Partial<IVolumeAudioOptions> {
|
|
1831
1955
|
/** Name. */
|
|
@@ -2350,22 +2474,28 @@ declare class NodeMaterialBlockProxy {
|
|
|
2350
2474
|
|
|
2351
2475
|
/**
|
|
2352
2476
|
* Babylon.js's `NullEngine` — a headless engine with no GPU device, used to run
|
|
2353
|
-
* scene logic (animations, observables, frame timing) without
|
|
2354
|
-
*
|
|
2355
|
-
*
|
|
2356
|
-
*
|
|
2357
|
-
*
|
|
2358
|
-
*
|
|
2359
|
-
*
|
|
2360
|
-
*
|
|
2477
|
+
* scene logic (animations, observables, physics stepping, frame timing) without
|
|
2478
|
+
* rendering. Backed by Babylon Lite's real device-less headless engine
|
|
2479
|
+
* (`createNullEngine`): scenes constructed against it build a Lite scene context
|
|
2480
|
+
* with **no** frame-graph render task (`defaultRenderTask: false`), so no swapchain
|
|
2481
|
+
* or GPU resource is ever allocated. The compat `NullEngine` drives a pure-JS
|
|
2482
|
+
* `requestAnimationFrame` loop that advances each scene by the wall-clock delta
|
|
2483
|
+
* between frames via Lite's `stepScene` (which fires the scene's `onBeforeRender`
|
|
2484
|
+
* callbacks — CPU animations,
|
|
2485
|
+
* physics steps, user logic). Only the device-less simulation surface works; adding
|
|
2486
|
+
* meshes with materials (whose deferred GPU builders need a device) is unsupported,
|
|
2487
|
+
* matching Babylon.js's `NullEngine` limitations. Extends {@link WebGPUEngine} so it
|
|
2488
|
+
* is accepted everywhere a compat engine is (e.g. `new Scene(engine)`).
|
|
2361
2489
|
*/
|
|
2362
2490
|
export declare class NullEngine extends WebGPUEngine {
|
|
2363
2491
|
constructor();
|
|
2364
2492
|
/** No GPU device to acquire. */
|
|
2365
2493
|
initAsync(): Promise<void>;
|
|
2366
2494
|
/**
|
|
2367
|
-
* Drive a pure-JS frame loop: each tick advances every registered scene
|
|
2368
|
-
*
|
|
2495
|
+
* Drive a pure-JS frame loop: each tick advances every registered scene by the
|
|
2496
|
+
* wall-clock delta between frames through Lite's `stepScene` (which fires the scene's before-render
|
|
2497
|
+
* callbacks: CPU animations, physics, render observables), then runs the user
|
|
2498
|
+
* callback(s). No GPU work is recorded or submitted.
|
|
2369
2499
|
*/
|
|
2370
2500
|
runRenderLoop(callback: () => void): void;
|
|
2371
2501
|
|
|
@@ -2534,10 +2664,10 @@ export declare class PBRMaterial extends PushMaterial {
|
|
|
2534
2664
|
constructor(name: st
|
|
2535
2665
|
* environment assigned to a material is routed to the owning scene's
|
|
2536
2666
|
* environment (the dominant single-IBL case Babylon.js scenes use).
|
|
2537
2667
|
*/
|
|
2538
|
-
get environmentTexture(): CubeTexture | null;
|
|
2539
|
-
set environmentTexture(value: CubeTexture | null);
|
|
2540
|
-
get reflectionTexture(): CubeTexture | null;
|
|
2541
|
-
set reflectionTexture(value: CubeTexture | null);
|
|
2668
|
+
get environmentTexture(): CubeTexture | HDRCubeTexture | null;
|
|
2669
|
+
set environmentTexture(value: CubeTexture | HDRCubeTexture | null);
|
|
2670
|
+
get reflectionTexture(): CubeTexture | HDRCubeTexture | null;
|
|
2671
|
+
set reflectionTexture(value: CubeTexture | HDRCubeTexture | null);
|
|
2542
2672
|
|
|
2543
2673
|
/**
|
|
2544
2674
|
* Babylon.js `PBRMetallicRoughnessMaterial` — a simplified façade over
|
|
@@ -2609,10 +2739,69 @@ export declare class PhysicsBody {
|
|
|
2609
2739
|
constructor();
|
|
2610
2740
|
}
|
|
2611
2741
|
|
|
2742
|
+
/** Type of a Physics V2 constraint. Values match Babylon.js `PhysicsConstraintType`. */
|
|
2743
|
+
export declare enum PhysicsConstraintType {
|
|
2744
|
+
BALL_AND_SOCKET = 1,
|
|
2745
|
+
DISTANCE = 2,
|
|
2746
|
+
HINGE = 3,
|
|
2747
|
+
SLIDER = 4,
|
|
2748
|
+
LOCK = 5,
|
|
2749
|
+
PRISMATIC = 6,
|
|
2750
|
+
SIX_DOF = 7
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2753
|
+
/**
|
|
2754
|
+
* Babylon.js-shaped Physics V2 engine wrapper returned by
|
|
2755
|
+
* {@link Scene.getPhysicsEngine}. Holds the active {@link HavokPlugin} and the
|
|
2756
|
+
* world gravity, exposing the common Babylon.js `IPhysicsEngine` surface.
|
|
2757
|
+
*/
|
|
2758
|
+
export declare class PhysicsEngine {
|
|
2612
2759
|
/** Current world gravity. */
|
|
2760
|
+
gravity: Vec3Like;
|
|
2761
|
+
constructor(plugin: HavokPlugin, gravity: Vec3Like);
|
|
2762
|
+
/** The underlying physics plugin. */
|
|
2763
|
+
getPhysicsPlugin(): HavokPlugin;
|
|
2764
|
+
/** Physics engine plugin version (Havok is V2). */
|
|
2765
|
+
getPluginVersion(): number;
|
|
2766
|
+
/** Set the world gravity. */
|
|
2767
|
+
setGravity(gravity: Vec3Like): void;
|
|
2768
|
+
/** Set the fixed timestep. */
|
|
2769
|
+
setTimeStep(newTimeStep: number): void;
|
|
2770
|
+
/** Get the fixed timestep. */
|
|
2771
|
+
getTimeStep(): number;
|
|
2772
|
+
/** Release the underlying physics world. */
|
|
2773
|
+
dispose(): void;
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2776
|
+
/** How a body moves. Values match Babylon.js `PhysicsMotionType`. */
|
|
2777
|
+
export declare enum PhysicsMotionType {
|
|
2778
|
+
STATIC = 0,
|
|
2779
|
+
ANIMATED = 1,
|
|
2780
|
+
DYNAMIC = 2
|
|
2781
|
+
}
|
|
2782
|
+
|
|
2783
|
+
/** How a moved transform node is propagated to its body before each step. Values match Babylon.js `PhysicsPrestepType`. */
|
|
2784
|
+
export declare enum PhysicsPrestepType {
|
|
2785
|
+
DISABLED = 0,
|
|
2786
|
+
TELEPORT = 1,
|
|
2787
|
+
ACTION = 2
|
|
2788
|
+
}
|
|
2789
|
+
|
|
2613
2790
|
export declare class PhysicsShape {
|
|
2614
2791
|
constructor();
|
|
2615
2792
|
}
|
|
2616
2793
|
|
|
2794
|
+
/** The type of a Havok physics collision shape. Values match Babylon.js `PhysicsShapeType`. */
|
|
2795
|
+
export declare enum PhysicsShapeType {
|
|
2796
|
+
SPHERE = 0,
|
|
2797
|
+
CAPSULE = 1,
|
|
2798
|
+
CYLINDER = 2,
|
|
2799
|
+
BOX = 3,
|
|
2800
|
+
CONVEX_HULL = 4,
|
|
2801
|
+
CONTAINER = 5,
|
|
2802
|
+
MESH = 6,
|
|
2803
|
+
HEIGHTFIELD = 7
|
|
2804
|
+
}
|
|
2805
|
+
|
|
2617
2806
|
/** A pickable compat mesh: a regular `Mesh` or a `GaussianSplattingMesh`. */
|
|
2618
2807
|
declare type PickableMesh = Mesh | GaussianSplattingMesh;
|
|
2619
2808
|
|
|
@@ -2641,7 +2830,9 @@ export declare class Plane {
|
|
|
2641
2830
|
|
|
2642
2831
|
/** Babylon.js `PlaneDragGizmo` — drags the attached node within a plane. */
|
|
2643
2832
|
export declare class PlaneDragGizmo extends GizmoBase {
|
|
2644
2833
|
private _attached;
|
|
2645
|
-
constructor(dragPlaneNormal: Vector3, color: Color3, layer: UtilityLayerRenderer);
|
|
2834
|
+
constructor(dragPlaneNormal: Vector3, color: Color3, layer: UtilityLayerRenderer);
|
|
2646
2835
|
/** Babylon.js `IPlaneDragGizmo.isEnabled` — toggles interactivity (drag + hover pick). */
|
|
2836
|
+
get isEnabled(): boolean;
|
|
2837
|
+
set isEnabled(value: boolean);
|
|
2647
2838
|
get attachedMesh(): AbstractMesh | null;
|
|
2648
2839
|
set attachedMesh(value: AbstractMesh | null);
|
|
2649
2840
|
get attachedNode(): Node_2 | null;
|
|
@@ -2657,7 +2848,9 @@ declare interface PlaneOptions {
|
|
|
2657
2848
|
|
|
2658
2849
|
/** Babylon.js `PlaneRotationGizmo` — rotates the attached node about a plane normal. */
|
|
2659
2850
|
export declare class PlaneRotationGizmo extends GizmoBase {
|
|
2660
2851
|
private _attached;
|
|
2661
|
-
constructor(planeNormal: Vector3, color: Color3, layer: UtilityLayerRenderer);
|
|
2852
|
+
constructor(planeNormal: Vector3, color: Color3, layer: UtilityLayerRenderer);
|
|
2662
2853
|
/** Babylon.js `IPlaneRotationGizmo.isEnabled` — toggles interactivity (drag + hover pick). */
|
|
2854
|
+
get isEnabled(): boolean;
|
|
2855
|
+
set isEnabled(value: boolean);
|
|
2663
2856
|
get attachedMesh(): AbstractMesh | null;
|
|
2664
2857
|
set attachedMesh(value: AbstractMesh | null);
|
|
2665
2858
|
get attachedNode(): Node_2 | null;
|
|
@@ -2684,7 +2877,16 @@ export declare class PointsCloudSystem {
|
|
|
2684
2877
|
}
|
|
2685
2878
|
|
|
2686
2879
|
export declare class PositionGizmo extends GizmoBase {
|
|
2687
2880
|
private _attached;
|
|
2881
|
+
private _xGizmo;
|
|
2882
|
+
private _yGizmo;
|
|
2883
|
+
private _zGizmo;
|
|
2688
2884
|
constructor(layer: UtilityLayerRenderer);
|
|
2885
|
+
/** Babylon.js `PositionGizmo.xGizmo/yGizmo/zGizmo` — the per-axis drag sub-gizmos.
|
|
2886
|
+
* Exposed so callers can toggle interactivity per axis (e.g. `xGizmo.isEnabled = false`
|
|
2887
|
+
* for a display-only gizmo). Wrappers are cached so identity is stable. */
|
|
2888
|
+
get xGizmo(): AxisDragGizmo;
|
|
2889
|
+
get yGizmo(): AxisDragGizmo;
|
|
2890
|
+
get zGizmo(): AxisDragGizmo;
|
|
2689
2891
|
/** Babylon.js `Gizmo.updateGizmoRotationToMatchAttachedMesh` — orient widgets to the node's local axes. */
|
|
2690
2892
|
set updateGizmoRotationToMatchAttachedMesh(value: boolean);
|
|
2691
2893
|
get attachedMesh(): AbstractMesh | null;
|
|
@@ -2783,6 +2985,40 @@ export declare class RawTexture extends BaseTexture {
|
|
|
2783
2985
|
static CreateRGBATexture(data: Uint8Array, width: number, height: number, scene: Scene): RawTexture;
|
|
2784
2986
|
}
|
|
2785
2987
|
|
|
2988
|
+
/**
|
|
2989
|
+
* Babylon.js `RawTexture3D` — a volumetric texture created from raw RGBA8 pixel
|
|
2990
|
+
* bytes (the common case being a colour-grading LUT / colour cube). Backed by
|
|
2991
|
+
* Babylon Lite's `createTexture3DFromPixels`; the GPU handle is available
|
|
2992
|
+
* synchronously after construction.
|
|
2993
|
+
*
|
|
2994
|
+
* Babylon Lite's 3D-texture path is RGBA8-only, so the `format` argument is
|
|
2995
|
+
* recorded for API parity but the upload always treats `data` as tightly-packed
|
|
2996
|
+
* `width * height * depth * 4` RGBA bytes (x fastest, then y, then z).
|
|
2997
|
+
*/
|
|
2998
|
+
export declare class RawTexture3D extends BaseTexture {
|
|
2999
|
+
/** Babylon.js texture format (recorded for parity; Lite uploads RGBA8). */
|
|
3000
|
+
format: number;
|
|
3001
|
+
private readonly _scene;
|
|
3002
|
+
/** Babylon.js `RawTexture3D.is3D` — always true for a 3D texture. */
|
|
3003
|
+
readonly is3D = true;
|
|
3004
|
+
constructor(data: ArrayBufferView | null, width: number, height: number, depth: number,
|
|
3005
|
+
/** Babylon.js texture format (recorded for parity; Lite uploads RGBA8). */
|
|
3006
|
+
format: number, scene: Scene, _generateMipMaps?: boolean, _invertY?: boolean, _samplingMode?: number, _textureType?: number, _creationFlags?: number);
|
|
3007
|
+
getClassName(): string;
|
|
3008
|
+
/** Gets the width of the texture. */
|
|
3009
|
+
get width(): number;
|
|
3010
|
+
/** Gets the height of the texture. */
|
|
3011
|
+
get height(): number;
|
|
3012
|
+
/** Gets the depth of the texture. */
|
|
3013
|
+
get depth(): number;
|
|
3014
|
+
/**
|
|
3015
|
+
* Replace the texture's pixel contents. Babylon Lite has no in-place 3D update,
|
|
3016
|
+
* so the volume is re-uploaded (a fresh Lite 3D texture handle).
|
|
3017
|
+
*/
|
|
3018
|
+
update(data: ArrayBufferView): void;
|
|
3019
|
+
whenReadyAsync(): Promise<void>;
|
|
3020
|
+
}
|
|
3021
|
+
|
|
2786
3022
|
export declare class Ray {
|
|
2787
3023
|
origin: Vector3;
|
|
2788
3024
|
direction: Vector3;
|
|
@@ -2815,7 +3051,14 @@ export declare class RenderTargetTexture {
|
|
|
2815
3051
|
}
|
|
2816
3052
|
|
|
2817
3053
|
export declare class RotationGizmo extends GizmoBase {
|
|
2818
3054
|
private _attached;
|
|
3055
|
+
private _xGizmo;
|
|
3056
|
+
private _yGizmo;
|
|
3057
|
+
private _zGizmo;
|
|
2819
3058
|
constructor(layer: UtilityLayerRenderer);
|
|
3059
|
+
/** Babylon.js `RotationGizmo.xGizmo/yGizmo/zGizmo` — the per-plane rotation sub-gizmos. */
|
|
3060
|
+
get xGizmo(): PlaneRotationGizmo;
|
|
3061
|
+
get yGizmo(): PlaneRotationGizmo;
|
|
3062
|
+
get zGizmo(): PlaneRotationGizmo;
|
|
2820
3063
|
/** Babylon.js `Gizmo.updateGizmoRotationToMatchAttachedMesh` — orient widgets to the node's local axes. */
|
|
2821
3064
|
set updateGizmoRotationToMatchAttachedMesh(value: boolean);
|
|
2822
3065
|
get attachedMesh(): AbstractMesh | null;
|
|
@@ -2838,7 +3081,14 @@ export declare const Scalar: {
|
|
|
2838
3081
|
};
|
|
2839
3082
|
|
|
2840
3083
|
export declare class ScaleGizmo extends GizmoBase {
|
|
2841
3084
|
private _attached;
|
|
3085
|
+
private _xGizmo;
|
|
3086
|
+
private _yGizmo;
|
|
3087
|
+
private _zGizmo;
|
|
2842
3088
|
constructor(layer: UtilityLayerRenderer);
|
|
3089
|
+
/** Babylon.js `ScaleGizmo.xGizmo/yGizmo/zGizmo` — the per-axis scale sub-gizmos. */
|
|
3090
|
+
get xGizmo(): AxisScaleGizmo;
|
|
3091
|
+
get yGizmo(): AxisScaleGizmo;
|
|
3092
|
+
get zGizmo(): AxisScaleGizmo;
|
|
2843
3093
|
/** Babylon.js `Gizmo.updateGizmoRotationToMatchAttachedMesh` — orient widgets to the node's local axes. */
|
|
2844
3094
|
set updateGizmoRotationToMatchAttachedMesh(value: boolean);
|
|
2845
3095
|
get attachedMesh(): AbstractMesh | null;
|
|
@@ -2963,8 +3213,8 @@ export declare class Scene extends AbstractScene {
|
|
|
2963
3213
|
/** Babylon.js fog-mode c
|
|
2964
3214
|
*/
|
|
2965
3215
|
get clipPlane(): Plane | null;
|
|
2966
3216
|
set clipPlane(value: Plane | null);
|
|
2967
|
-
get environmentTexture(): CubeTexture | null;
|
|
2968
|
-
set environmentTexture(value: CubeTexture | null);
|
|
3217
|
+
get environmentTexture(): CubeTexture | HDRCubeTexture | null;
|
|
3218
|
+
set environmentTexture(value: CubeTexture | HDRCubeTexture | null);
|
|
2969
3219
|
/**
|
|
2970
3220
|
* Babylon.js `scene.createDefaultEnvironment` — adds an IBL skybox and ground.
|
|
2971
3221
|
* Babylon Lite performs this through `loadEnvironment` (deferred to engine start),
|
|
@@ -2980,7 +3230,7 @@ export declare class Scene extends AbstractScene {
|
|
|
2980
3230
|
/** Babylon.js fog-mode c
|
|
2981
3231
|
* loaded `.env` specular cubemap as an HDR skybox, so this records the env URL (if
|
|
2982
3232
|
* not already set) and flags a skybox-from-environment load at engine start.
|
|
2983
3233
|
*/
|
|
2984
|
-
createDefaultSkybox(texture?: CubeTexture, _pbr?: boolean, scale?: number, _blur?: number, _setGlobalEnv?: boolean): {
|
|
3234
|
+
createDefaultSkybox(texture?: CubeTexture | HDRCubeTexture, _pbr?: boolean, scale?: number, _blur?: number, _setGlobalEnv?: boolean): {
|
|
2985
3235
|
dispose(): void;
|
|
2986
3236
|
};
|
|
2987
3237
|
/** Create and activate a default arc-rotate camera framing the scene. */
|
|
2988
3238
|
createDefaultCamera(_createArcRotateCamera?: boolean, _replace?: boolean, _attachControl?: boolean): Camera;
|
|
@@ -2999,7 +3249,28 @@ export declare class Scene extends AbstractScene {
|
|
|
2999
3249
|
/** Babylon.js fog-mode c
|
|
3000
3250
|
/** Synchronous CPU picking — unsupported. Babylon Lite uses async GPU picking. */
|
|
3001
3251
|
pick(): never;
|
|
3002
3252
|
/** Synchronous ray picking — unsupported. */
|
|
3003
|
-
pickWithRay(): never;
|
|
3253
|
+
pickWithRay(): never;
|
|
3004
3254
|
/**
|
|
3255
|
+
* Babylon.js `scene.enablePhysics(gravity, plugin)`. Wires the given Havok V2
|
|
3256
|
+
* {@link HavokPlugin} to this scene, creating the native Lite physics world and
|
|
3257
|
+
* registering per-frame stepping. The plugin's `useDeltaForWorldStep` flag
|
|
3258
|
+
* controls whether the world advances by elapsed frame time (refresh-rate
|
|
3259
|
+
* independent — issue #332) or a fixed `1/60` step.
|
|
3260
|
+
*
|
|
3261
|
+
* Bodies are created with the native `createPhysicsAggregate` /
|
|
3262
|
+
* `createPhysicsBody` API against `scene.getPhysicsEngine().getPhysicsPlugin().world`.
|
|
3263
|
+
* @returns `true` once physics is enabled.
|
|
3264
|
+
*/
|
|
3265
|
+
enablePhysics(gravity?: {
|
|
3266
|
+
x: number;
|
|
3267
|
+
y: number;
|
|
3268
|
+
z: number;
|
|
3269
|
+
} | null, plugin?: HavokPlugin): boolean;
|
|
3270
|
+
/** Babylon.js `scene.getPhysicsEngine()` — the active Physics V2 engine, or `null`. */
|
|
3271
|
+
getPhysicsEngine(): PhysicsEngine | null;
|
|
3272
|
+
/** Babylon.js `scene.isPhysicsEnabled()`. */
|
|
3273
|
+
isPhysicsEnabled(): boolean;
|
|
3274
|
+
/** Babylon.js `scene.disablePhysicsEngine()` — release the active physics world. */
|
|
3275
|
+
disablePhysicsEngine(): void;
|
|
3005
3276
|
/**
|
|
3006
3277
|
* Babylon.js `scene.beginDirectAnimation(target, animations, from, to, loop, speedRatio?)`.
|
|
3007
3278
|
* Drives the given `Animation`s on the CPU each frame, writing onto the target's
|
|
@@ -3698,6 +3969,9 @@ export declare class TransformNode extends Node_2 {
|
|
|
3698
3969
|
constructor(name: string
|
|
3699
3970
|
|
|
3700
3971
|
export declare function transformNormal(vector: Vector3, transformation: Matrix): Vector3;
|
|
3701
3972
|
|
|
3973
|
+
/** Babylon.js `UninstallHtmlInCanvasPolyfill` — the HTML-in-canvas polyfill is unsupported by the compat layer. */
|
|
3974
|
+
export declare function UninstallHtmlInCanvasPolyfill(): never;
|
|
3975
|
+
|
|
3702
3976
|
/** Babylon.js `UniversalCamera` — touch-friendly free camera. */
|
|
3703
3977
|
export declare class UniversalCamera extends FreeCamera {
|
|
3704
3978
|
getClassName(): string;
|
|
@@ -3706,6 +3980,9 @@ export declare class UniversalCamera extends FreeCamera {
|
|
|
3706
3980
|
/** Throw a {@link LiteCompatError} for an unsupported API. */
|
|
3707
3981
|
export declare function unsupported(api: string, detail?: string): never;
|
|
3708
3982
|
|
|
3983
|
+
/** Babylon.js `UploadHtmlElementToTexture` — HTML texture upload is unsupported by the compat layer. */
|
|
3984
|
+
export declare function UploadHtmlElementToTexture(): never;
|
|
3985
|
+
|
|
3709
3986
|
/** Babylon.js `UtilityLayerRenderer` — the overlay scene gizmos render into. */
|
|
3710
3987
|
export declare class UtilityLayerRenderer {
|
|
3711
3988
|
private _registered;
|
|
3712
3989
|
constructor(scene: Scene);
|
|
3713
3990
|
dispose(): void;
|
|
@@ -3728,6 +4005,13 @@ export declare const ValueConditionOperators: {
|
|
|
3728
4005
|
readonly IsLesser: 3;
|
|
3729
4006
|
};
|
|
3730
4007
|
|
|
4008
|
+
/** Minimal `{x, y, z}` view shared by the compat `Vector3` and Lite's `Vec3`. */
|
|
4009
|
+
declare interface Vec3Like {
|
|
4010
|
+
x: number;
|
|
4011
|
+
y: number;
|
|
4012
|
+
z: number;
|
|
4013
|
+
}
|
|
4014
|
+
|
|
3731
4015
|
export declare class Vector2 {
|
|
3732
4016
|
x: number;
|
|
3733
4017
|
y: number;
|