@babylonjs/lite-compat 1.15.0-preview → 1.17.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/index.d.ts CHANGED
@@ -6,12 +6,14 @@ import { ClearCoatProps } from '@babylonjs/lite';
6
6
  import { EngineContext } from '@babylonjs/lite';
7
7
  import { EngineOptions } from '@babylonjs/lite';
8
8
  import { IridescenceProps } from '@babylonjs/lite';
9
+ import { LineMaterial } from '@babylonjs/lite';
9
10
  import { Mesh as Mesh_2 } from '@babylonjs/lite';
10
11
  import { PhysicsWorld } from '@babylonjs/lite';
11
12
  import { RenderCanvas } from '@babylonjs/lite';
12
13
  import { SceneNode } from '@babylonjs/lite';
13
14
  import { SheenProps } from '@babylonjs/lite';
14
15
  import { Texture2D } from '@babylonjs/lite';
16
+ import { Texture2DArray } from '@babylonjs/lite';
15
17
 
16
18
  /** Base class for an asset-loading task. Subclasses implement {@link runAsync}. */
17
19
  export declare abstract class AbstractAssetTask {
@@ -113,7 +115,8 @@ export declare abstract class AbstractEngine {
113
115
  protected readonly _scenes: Scene[];
114
116
  protected readonly _loopCallbacks: Array<() => void>;
115
117
  protected _initialized: boolean;
116
- private _started;
117
118
  /**
119
+ private _startupComplete;
120
+ private _startPromise;
118
121
  /**
119
122
  * Babylon.js `engine.useReverseDepthBuffer`. Babylon Lite owns its depth
120
123
  * configuration internally, so this is a settable no-op kept for API shape.
121
124
  */
@@ -197,7 +200,35 @@ export declare abstract class AbstractEngine {
197
200
  beginFrame(): never;
198
201
  /** Babylon.js manual frame-pump exit point — unsupported (Lite's frame graph owns the frame). */
199
202
  endFrame(): never;
203
+ /**
204
+ * Babylon.js `engine.currentSampleCount` — the MSAA sample count of the current render target.
205
+ * Babylon Lite manages MSAA internally and exposes no public sample-count accessor, so this
206
+ * needs a tree-shakeable Lite core addition before it can report a real value.
207
+ */
208
+ get currentSampleCount(): never;
209
+ /**
210
+ * Babylon.js `engine.getAlphaToCoverage()` — alpha-to-coverage state. Babylon Lite does not
211
+ * expose an engine-level alpha-to-coverage toggle, so this is unsupported.
212
+ */
213
+ getAlphaToCoverage(): never;
214
+ /**
215
+ * Babylon.js `engine.setAlphaToCoverage(enable)` — toggle alpha-to-coverage. Babylon Lite does
216
+ * not expose an engine-level alpha-to-coverage toggle, so this is unsupported.
217
+ */
218
+ setAlphaToCoverage(_enable: boolean): never;
219
+ /**
220
+ * Babylon.js `engine.updateTextureArrayLayerFromImageSource(texture, source, layer, invertY, premultiplyAlpha)`
221
+ * — the engine extension that uploads a decoded image source into one layer of a 2D array
222
+ * texture. Forwards to Babylon Lite's `uploadImageToArrayLayer`.
223
+ *
224
+ * Babylon.js passes an `InternalTexture`; the compat layer's equivalent handle is the Lite
225
+ * `Texture2DArray` returned by `RawTexture2DArray.getInternalTexture()`, so ported code that
226
+ * goes through `UploadImageToTexture2DArrayLayer` (which is exactly what Babylon.js's helper
227
+ * does) works unchanged.
228
+ */
229
+ updateTextureArrayLayerFromImageSource(texture: Texture2DArray, source: GPUCopyExternalImageSource, layer: number, invertY?: boolean, premultiplyAlpha?: boolean): void;
200
230
  private _start;
231
+ private _startCore;
201
232
  private _ensureInitialized;
202
233
  }
203
234
 
@@ -206,7 +237,7 @@ export declare abstract class AbstractEngine {
206
237
  * visibility, and shadow-receipt. Concrete meshes derive from this.
207
238
  */
208
239
  export declare class AbstractMesh extends TransformNode {
209
240
  private _material;
210
- private _visible;
241
+ protected _visible: boolean;
211
242
  constructor(name: string, lite: Mesh_2, scene?: Scene);
212
243
  getClassName(): string;
213
244
  get material(): CompatMaterial | null;
214
245
  set material(value: CompatMaterial | null);
@@ -214,19 +245,28 @@ export declare class AbstractMesh extends TransformNode {
214
245
  private _material;
215
246
  set isVisible(value: boolean);
216
247
  get receiveShadows(): boolean;
217
248
  set receiveShadows(value: boolean);
218
- setEnabled(enabled: boolean): void;
219
- /**
220
- * Babylon.js `mesh.getBoundingInfo()` — local-space AABB of this mesh. Babylon
221
- * Lite stores `boundMin`/`boundMax` (local space) on factory- and loader-built
222
- * meshes; when absent (e.g. a placeholder mesh whose bounds were never computed)
223
- * we fold the retained CPU positions through Lite's `computeAabb`. A mesh with
224
- * no geometry returns a degenerate zero-size box.
249
+ protected _onEffectiveEnabledStateChanged(enabled: boolean): void;
225
250
  /**
251
+ * Babylon.js `mesh.getBoundingInfo()` — the mesh's AABB. `minimum`/`maximum`
252
+ * are the local-space bounds; the returned `BoundingInfo`'s world members
253
+ * (`minimumWorld`/`maximumWorld`/`centerWorld`/…) are derived by transforming
254
+ * the eight local corners by the mesh's world matrix, so a mesh at (1,2,3)
255
+ * reports correctly-offset world bounds. Babylon Lite stores `boundMin`/
256
+ * `boundMax` (local space) on factory- and loader-built meshes; when absent
257
+ * (e.g. a placeholder mesh whose bounds were never computed) we fold the
258
+ * retained CPU positions through Lite's `computeAabb`. A mesh with no geometry
259
+ * returns a degenerate zero-size box.
226
260
  */
227
261
  getBoundingInfo(): BoundingInfo;
262
+ /** Compat handle over Babylon Lite's world matrix for bounds derivation. Returns
263
+ * `undefined` when the Lite node hasn't computed one (world bounds fall back to
264
+ * local). */
265
+ private _worldMatrixForBounds;
228
266
  /**
229
- * Babylon.js `mesh.getVerticesData(kind)` — read back the CPU geometry buffer
230
- * for `position` / `normal` / `uv`. Babylon Lite retains these on the mesh
231
- * (for picking + device-loss recovery); other kinds are not stored.
267
+ * Babylon.js `mesh.getVerticesData(kind)` — read back the CPU geometry buffer.
268
+ * `position` / `normal` / `uv` come from the buffers Babylon Lite retains on the
269
+ * mesh (for picking + device-loss recovery). Prefer the last compat-side value
270
+ * for `uv2` / `tangent` / `color`, falling back to attributes retained by Lite
271
+ * for loader- and factory-created meshes.
232
272
  */
233
273
  getVerticesData(kind: string): Float32Array | null;
234
274
  /**
@@ -237,8 +277,22 @@ export declare class AbstractMesh extends TransformNode {
237
277
  private _material;
238
278
  * (`matricesIndices`, etc.) are accepted but not applied (Babylon Lite drives
239
279
  * skinning through its own loaded-skeleton path).
240
280
  */
241
- setVerticesData(kind: string, data: number[] | Float32Array, _updatable?: boolean): void;
242
281
  private _lastColors;
243
- /** Babylon.js `mesh.getTotalVertices()` — vertex count from the position buffer. */
282
+ setVerticesData(kind: string, data: number[] | Float32Array, _updatable?: boolean): void;
283
+ /**
284
+ * Babylon.js `mesh.getIndices()` — read back the mesh's index (topology) buffer.
285
+ * Babylon Lite retains the indices on the mesh as a `Uint32Array` (for picking +
286
+ * device-loss recovery), so we return that directly; a mesh with no geometry
287
+ * returns `null`.
288
+ */
289
+ getIndices(_copyWhenShared?: boolean, forceCopy?: boolean): Uint32Array | null;
290
+ /**
291
+ * Babylon.js `mesh.setIndices(indices)` — replace the mesh's index (topology)
292
+ * buffer. Babylon Lite re-uploads the geometry in place via `resizeMeshGeometry`,
293
+ * keeping the existing position/normal/uv/tangent/color attributes and swapping
294
+ * only the indices. Returns the mesh for chaining.
295
+ */
296
+ setIndices(indices: number[] | Uint16Array | Uint32Array | Int32Array, _totalVertices?: number | null, _updatable?: boolean): this;
244
297
  private _lastTangents;
298
+ private _lastColors;
245
299
  /** Babylon.js `mesh.getTotalVertices()` — vertex count from the position buffer. */
246
300
  getTotalVertices(): number;
247
301
  /**
248
302
  * Babylon.js `mesh.refreshBoundingInfo()` — Babylon Lite recomputes a mesh's
@@ -246,15 +300,20 @@ export declare class AbstractMesh extends TransformNode {
246
300
  private _material;
247
301
  * no-op that returns the mesh for chaining. The deformed-pick options
248
302
  * (`applySkeleton` / `applyMorph`) are accepted for parity but not used.
249
303
  */
250
- refreshBoundingInfo(_options?: unknown): this;
251
- /**
304
+ refreshBoundingInfo(_options?: unknown): this;
252
305
  /**
253
306
  * Babylon.js `mesh.bakeCurrentTransformIntoVertices()` — fold the node's local
254
- * transform (position / rotation / scaling) into the CPU geometry and reset the
255
- * transform to identity. Babylon Lite has no built-in mesh-transform bake, so we
256
- * transform the retained CPU positions (full matrix) and normals (rotation only,
257
- * renormalized), re-upload via `resizeMeshGeometry`, then clear the transform.
307
+ * transform (position / rotation / scaling) into the CPU geometry via the shared
308
+ * {@link _bakeMatrix} helper, then reset the node transform to identity (the
309
+ * geometry now carries it).
258
310
  */
259
311
  bakeCurrentTransformIntoVertices(): this;
312
+ /**
313
+ * Babylon.js `mesh.bakeTransformIntoVertices(transform)` — fold an **arbitrary**
314
+ * matrix into the CPU geometry via the shared {@link _bakeMatrix} helper. Unlike
315
+ * {@link bakeCurrentTransformIntoVertices}, the node's own transform is **not**
316
+ * reset: the supplied matrix is independent of the node transform.
317
+ */
318
+ bakeTransformIntoVertices(transform: Matrix): this;
260
319
  dispose(): void;
261
320
  }
262
321
 
@@ -271,10 +330,14 @@ export declare abstract class AbstractNamedAudioNode extends AbstractAudioNode {
271
330
  }
272
331
 
273
332
  export declare abstract class AbstractScene {
274
333
  /**
275
- * Babylon.js `scene.meshes`. Babylon Lite does not expose a public scene-mesh
276
- * registry, so this tracks the meshes the compat layer creates against a scene
277
- * which need lookup (currently Gaussian-Splatting meshes surfaced through the
278
- * loader). Other primitives register with the Lite scene directly.
334
+ * Babylon.js `scene.meshes` — the compat mesh wrappers in the scene. Backed by the
335
+ * canonical {@link _meshWrappers} registry and kept in sync with the Lite-core-owned
336
+ * list: the core list ({@link _coreMeshList}) supplies authoritative membership and
337
+ * ordering, mapped back to each mesh's canonical wrapper so the returned handles are
338
+ * the right type and keep wrapper identity. Wrappers not yet mirrored into the core
339
+ * list (transform-only loader roots, primitives whose scene-add is deferred to engine
340
+ * start, and Gaussian-Splatting meshes that register their renderables outside
341
+ * `scene.meshes`) retain their registration positions.
279
342
  */
280
343
  get meshes(): TransformNode[];
281
344
  /** Babylon.js `scene.cameras` — every camera constructed against this scene. */
@@ -295,19 +358,18 @@ export declare abstract class AbstractScene {
295
358
  /**
296
359
  /** Babylon.js `scene.getMaterialById(id)` — first material whose `id` matches, else `null`. */
297
360
  getMaterialById(id: string): Material | null;
298
361
  /**
299
- * Babylon.js `scene.getMeshByName(name)`. Babylon Lite has no public scene-mesh
300
- * registry, so this searches the compat meshes tracked through `scene.meshes`
301
- * (currently meshes the loader surfaces, e.g. Gaussian-Splatting). Returns `null`
302
- * when not found, matching Babylon.js.
362
+ * Babylon.js `scene.getMeshByName(name)` — first mesh in {@link meshes} with a
363
+ * matching name, else `null`. Enumerates the full canonical mesh registry
364
+ * (primitives + loader-surfaced meshes), not just the loader-surfaced subset.
303
365
  */
304
366
  getMeshByName(name: string): TransformNode | null;
305
- /** Babylon.js `scene.getMeshById(id)` — first tracked mesh whose `id` matches, else `null`. */
367
+ /** Babylon.js `scene.getMeshById(id)` — first mesh whose `id` matches, else `null`. */
306
368
  getMeshById(id: string): TransformNode | null;
307
369
  /** Babylon.js legacy `scene.getMeshByID(id)` — alias of {@link getMeshById}. */
308
370
  getMeshByID(id: string): TransformNode | null;
309
- /** Babylon.js `scene.getNodeByName(name)` — searches tracked meshes, cameras, and lights. */
371
+ /** Babylon.js `scene.getNodeByName(name)` — searches meshes, cameras, and lights. */
310
372
  getNodeByName(name: string): Node_2 | null;
311
- /** Babylon.js `scene.getNodeById(id)` — searches tracked meshes, cameras, and lights by `id`. */
373
+ /** Babylon.js `scene.getNodeById(id)` — searches meshes, cameras, and lights by `id`. */
312
374
  getNodeById(id: string): Node_2 | null;
313
375
  }
314
376
 
@@ -707,12 +769,26 @@ export declare class ArcRotateCamera extends Camera {
707
769
  constructor(name: stri
708
770
  set lowerRadiusLimit(value: number | undefined);
709
771
  get upperRadiusLimit(): number | undefined;
710
772
  set upperRadiusLimit(value: number | undefined);
773
+ /** Wheel-zoom sensitivity (HIGHER = slower zoom). Babylon default 3. */
774
+ get wheelPrecision(): number;
775
+ set wheelPrecision(value: number);
776
+ /** Mouse-drag orbit sensitivity (HIGHER = slower rotation). Babylon default 1000. */
777
+ get angularSensibility(): number;
778
+ set angularSensibility(value: number);
779
+ /** Right-drag panning sensitivity in pixels-per-unit (LOWER = faster pan). Babylon default 50. */
780
+ get panningSensibility(): number;
781
+ set panningSensibility(value: number);
711
782
  attachControl(canvas: HTMLCanvasElement, _noPreventDefault?: boolean): void;
712
783
 
713
784
  export declare class AssetContainer {
714
785
  constructor(lite: AssetContainer_2);
715
786
  get animationGroups(): AnimationGroup_2[];
716
- /** Flat list of renderable meshes (Babylon.js-shaped handles over the loaded node tree). */
717
- get meshes(): LoadedMesh[];
787
+ /**
788
+ * Flat list of the loaded meshes as canonical, stable-identity compat `Mesh`
789
+ * handles (`__root__` at index 0, matching Babylon.js). Repeated reads return
790
+ * the same wrapper objects, and — once the container is added to a scene — the
791
+ * same handles `scene.meshes` exposes.
792
+ */
793
+ get meshes(): Mesh[];
718
794
  /** Add every entity, animation group, camera, and clear colour to the scene. */
719
795
  addAllToScene(scene: Scene): void;
720
796
  dispose(): void;
@@ -907,7 +983,12 @@ export declare class BaseSixDofDragBehavior {
907
983
  }
908
984
 
909
985
  export declare abstract class BaseTexture {
910
- name: string;
911
986
  getClassName(): string;
987
+ name: string;
912
988
  getClassName(): string;
913
989
  /**
990
+ * Babylon.js `BaseTexture.getInternalTexture()` — the backend texture handle. Babylon.js
991
+ * returns an `InternalTexture`; the compat layer's equivalent is the Lite texture handle,
992
+ * which is what the compat engine's texture methods accept.
993
+ */
994
+ getInternalTexture(): Texture2D | null;
914
995
  abstract whenReadyAsync(): Promise<void>;
915
996
  dispose(): void;
916
997
  }
@@ -950,18 +1031,28 @@ export declare class BouncingBehavior implements Behavior<ArcRotateCamera> {
950
1031
  }
951
1032
 
952
1033
  export declare class BoundingBox {
953
- minimum: Vector3;
954
- maximum: Vector3;
955
- center: Vector3;
956
- extendSize: Vector3;
957
- /** World-space AABB corners. Equal to `minimum`/`maximum` when the box is
958
- * already built in world space (as the loader's `getBoundingInfo` does). */
959
- minimumWorld: Vector3;
960
- maximumWorld: Vector3;
961
- /** The 8 corner points (min/max combinations). */
962
- vectors: Vector3[];
963
- constructor(min: Vector3, max: Vector3);
964
- intersectsPoint(point: Vector3): boolean;
1034
+ readonly minimum: Vector3;
1035
+ readonly maximum: Vector3;
1036
+ readonly center: Vector3;
1037
+ readonly extendSize: Vector3;
1038
+ /** Center of the AABB in world space. */
1039
+ readonly centerWorld: Vector3;
1040
+ /** Half-size of the AABB in world space (multiply by 2 for the full size). */
1041
+ readonly extendSizeWorld: Vector3;
1042
+ /** Minimum corner of the world-space AABB. */
1043
+ readonly minimumWorld: Vector3;
1044
+ /** Maximum corner of the world-space AABB. */
1045
+ readonly maximumWorld: Vector3;
1046
+ /** The 8 corner points in local space (min/max combinations). */
1047
+ readonly vectors: Vector3[];
1048
+ /** The 8 corner points transformed into world space. */
1049
+ readonly vectorsWorld: Vector3[];
1050
+ /** The three world-space axis directions of the box (rows of the world matrix). */
1051
+ readonly directions: Vector3[];
1052
+ private _worldMatrix;
1053
+ constructor(min: Vector3, max: Vector3, worldMatrix?: Matrix);
1054
+ reConstruct(min: Vector3, max: Vector3, worldMatrix?: Matrix): void;
1055
+ getWorldMatrix(): Matrix;
965
1056
  intersectsPoint(point: Vector3): boolean;
966
1057
  static Intersects(a: BoundingBox, b: BoundingBox): boolean;
967
1058
  }
968
1059
 
@@ -987,27 +1078,37 @@ export declare class BoundingBoxRenderer {
987
1078
  export declare class BoundingInfo {
988
1079
  boundingBox: BoundingBox;
989
1080
  boundingSphere: BoundingSphere;
990
- constructor(min: Vector3, max: Vector3);
1081
+ constructor(min: Vector3, max: Vector3, worldMatrix?: Matrix);
991
1082
  get minimum(): Vector3;
992
1083
  get maximum(): Vector3;
993
1084
  intersectsPoint(point: Vector3): boolean;
994
- /** World-matrix-aware reframe is not modelled here; reframe by rebuilding from transformed corners. */
995
- reConstruct(min: Vector3, max: Vector3, _worldMatrix?: Matrix): void;
1085
+ /** Babylon.js `BoundingInfo.update` — re-derive the world-space bounds from the
1086
+ * local geometry and a new world matrix. */
1087
+ update(worldMatrix: Matrix): void;
1088
+ /** Rebuild the local bounds and (optionally) re-derive world-space bounds from
1089
+ * the supplied world matrix, transforming all eight corners. */
1090
+ reConstruct(min: Vector3, max: Vector3, worldMatrix?: Matrix): void;
996
1091
  }
997
1092
 
998
1093
  export declare class BoundingSphere {
999
- center: Vector3;
1094
+ readonly center: Vector3;
1000
1095
  radius: number;
1001
- minimum: Vector3;
1002
- maximum: Vector3;
1003
- constructor(min: Vector3, max: Vector3);
1004
- intersectsPoint(point: Vector3): boolean;
1096
+ readonly centerWorld: Vector3;
1097
+ radiusWorld: number;
1098
+ readonly minimum: Vector3;
1099
+ readonly maximum: Vector3;
1100
+ private _worldMatrix;
1101
+ constructor(min: Vector3, max: Vector3, worldMatrix?: Matrix);
1102
+ reConstruct(min: Vector3, max: Vector3, worldMatrix?: Matrix): void;
1103
+ getWorldMatrix(): Matrix;
1005
1104
  intersectsPoint(point: Vector3): boolean;
1006
1105
  static Intersects(a: BoundingSphere, b: BoundingSphere): boolean;
1007
1106
  }
1008
1107
 
1009
1108
  declare interface BoxOptions {
1010
1109
  size?: number;
1011
1110
  width?: number;
1111
+ height?: number;
1112
+ depth?: number;
1012
1113
  }
1013
1114
 
1014
1115
  export declare class BVHFileLoader {
@@ -1135,7 +1236,7 @@ export declare class ColorGradient {
1135
1236
  constructor(gradient: number, color1: [number, number, number, number], color2?: [number, number, number, number] | undefined);
1136
1237
  }
1137
1238
 
1138
- declare type CompatMaterial = StandardMaterial | PBRMaterial | NodeMaterial | GridMaterial;
1239
+ declare type CompatMaterial = StandardMaterial | PBRMaterial | NodeMaterial | GridMaterial | LinesMaterial;
1139
1240
 
1140
1241
  declare type CompatMaterial_2 = StandardMaterial | PBRMaterial | NodeMaterial;
1141
1242
 
@@ -1162,12 +1263,18 @@ export declare const Constants: {
1162
1263
  readonly ALPHA_COMBINE: 2;
1163
1264
  readonly ALPHA_ONEONE: 6;
1164
1265
  readonly ALPHA_PREMULTIPLIED: 7;
1266
+ readonly ALPHA_REPLACE_COLOR: 21;
1165
1267
  readonly MATERIAL_OPAQUE: 0;
1166
1268
  readonly MATERIAL_ALPHATEST: 1;
1167
1269
  readonly MATERIAL_ALPHABLEND: 2;
1168
1270
  readonly TEXTURE_CLAMP_ADDRESSMODE: 0;
1169
1271
  readonly TEXTURE_WRAP_ADDRESSMODE: 1;
1170
1272
  readonly TEXTURE_MIRROR_ADDRESSMODE: 2;
1273
+ readonly TEXTURE_NEAREST_SAMPLINGMODE: 1;
1274
+ readonly TEXTURE_BILINEAR_SAMPLINGMODE: 2;
1275
+ readonly TEXTURE_TRILINEAR_SAMPLINGMODE: 3;
1276
+ readonly TEXTUREFORMAT_RGBA: 5;
1277
+ readonly TEXTURETYPE_UNSIGNED_BYTE: 0;
1171
1278
  };
1172
1279
 
1173
1280
  /** Babylon.js `CreateAudioBusAsync`. */
@@ -1188,6 +1295,12 @@ export declare function CreateDisc(name: string, options: object, scene: Scene):
1188
1295
  /** Babylon.js `CreateGround(name, options, scene)` (groundBuilder). */
1189
1296
  export declare function CreateGround(name: string, options: GroundOptions, scene: Scene): Mesh;
1190
1297
 
1298
+ /** Babylon.js `CreateLines(name, options, scene)` (linesBuilder). */
1299
+ export declare function CreateLines(name: string, options: LinesBuilderOptions, scene?: Scene | null): LinesMesh;
1300
+
1301
+ /** Babylon.js `CreateLineSystem(name, options, scene)` (linesBuilder). */
1302
+ export declare function CreateLineSystem(name: string, options: LineSystemBuilderOptions, scene?: Scene | null): LinesMesh;
1303
+
1191
1304
  /** Babylon.js `CreateMainAudioBusAsync`. */
1192
1305
  export declare function CreateMainAudioBusAsync(name: string, options?: Partial<IMainAudioBusOptions>, engine?: AudioEngineV2 | null): Promise<MainAudioBus>;
1193
1306
 
@@ -1212,6 +1325,35 @@ export declare function CreateSphere(name: string, options: SphereOptions, scene
1212
1325
  /** Babylon.js `CreateStreamingSoundAsync`. */
1213
1326
  export declare function CreateStreamingSoundAsync(name: string, source: HTMLMediaElement | string | string[], options?: Partial<IStreamingSoundOptions>, engine?: AudioEngineV2 | null): Promise<StreamingSound>;
1214
1327
 
1328
+ /**
1329
+ * Babylon.js `CreateTexture2DArrayFromImageUrlsAsync` — create a texture array and
1330
+ * fill each layer from a list of image URLs. Forwards to Lite's
1331
+ * `createTexture2DArrayFromUrls`, then wraps the result in a `RawTexture2DArray`.
1332
+ *
1333
+ * Lite's per-layer upload defaults to `invertY = true` (the Babylon.js *material*
1334
+ * convention); the Babylon.js helper defaults to `false`, so the flag is always
1335
+ * passed explicitly rather than left to the Lite default.
1336
+ */
1337
+ export declare function CreateTexture2DArrayFromImageUrlsAsync(scene: Scene, urls: readonly [string, ...string[]], options?: ICreateTexture2DArrayFromImageUrlsOptions): Promise<RawTexture2DArray>;
1338
+
1339
+ /**
1340
+ * Babylon.js `CreateTexture2DArrayFromKTX2Async` — decode a single multi-layer KTX2
1341
+ * container into a texture array. Forwards to Lite's `createTexture2DArrayFromKtx2`
1342
+ * (transcodes to RGBA8, uploads the base level, regenerates mips), then wraps the
1343
+ * result in a `RawTexture2DArray`.
1344
+ *
1345
+ * Babylon.js defaults `generateMipMaps` to `true`; that value is always passed
1346
+ * explicitly rather than left to any Lite default. Sampling and Y inversion are
1347
+ * forwarded to the Lite array handle.
1348
+ */
1349
+ export declare function CreateTexture2DArrayFromKTX2Async(scene: Scene, data: string | ArrayBufferView, options?: ICreateTexture2DArrayFromKTX2Options): Promise<RawTexture2DArray>;
1350
+
1351
+ /** Babylon.js `CreateTiledBox(name, options, scene)` (tiledBoxBuilder) — throwing stub (see `MeshBuilder.CreateTiledBox`). */
1352
+ export declare function CreateTiledBox(name?: string, options?: object, scene?: Scene): never;
1353
+
1354
+ /** Babylon.js `CreateTiledPlane(name, options, scene)` (tiledPlaneBuilder) — throwing stub (see `MeshBuilder.CreateTiledPlane`). */
1355
+ export declare function CreateTiledPlane(name?: string, options?: object, scene?: Scene): never;
1356
+
1215
1357
  /** Babylon.js `CreateTorus(name, options, scene)` (torusBuilder). */
1216
1358
  export declare function CreateTorus(name: string, options: object, scene: Scene): Mesh;
1217
1359
 
@@ -1272,19 +1414,21 @@ export declare class CSG2 {
1272
1414
  * actual GPU work happens when it is assigned to `scene.environmentTexture` and
1273
1415
  * the engine starts (see `Scene` env handling).
1274
1416
  */
1275
- export declare class CubeTexture {
1417
+ export declare class CubeTexture extends BaseTexture {
1276
1418
  /** Source URL of the (prefiltered) environment. */
1277
1419
  readonly url: string;
1278
1420
  /** Babylon.js `coordinatesMode` (skybox = 5). Recorded for API parity. */
1279
1421
  coordinatesMode: number;
1280
- name: string;
1281
1422
  gammaSpace: boolean;
1282
1423
  level: number;
1283
1424
  /** Fires when the cube map is "ready" (resolved on a microtask in this compat layer). */
1284
1425
  readonly onLoadObservable: Observable<CubeTexture>;
1285
1426
  private _ready;
1427
+ private readonly _readyPromise;
1286
1428
  constructor(url: string, _scene?: unknown, _extensions?: unknown, _noMipmap?: boolean, _files?: unknown, onLoad?: (() => void) | null, _onError?: unknown, _format?: unknown, _prefiltered?: boolean);
1429
+ getClassName(): string;
1287
1430
  /** Babylon.js `BaseTexture.isReady()`. */
1288
1431
  isReady(): boolean;
1432
+ whenReadyAsync(): Promise<void>;
1289
1433
  /** Babylon.js `CubeTexture.CreateFromPrefilteredData(url, scene)`. */
1290
1434
  static CreateFromPrefilteredData(url: string, scene?: unknown): CubeTexture;
1291
1435
  dispose(): void;
@@ -1538,7 +1682,17 @@ export declare class GamepadCamera extends UniversalCamera {
1538
1682
  * Babylon.js `GaussianSplattingMesh`. Derives from `TransformNode` so the loaded
1539
1683
  * cloud's `position` / `rotation` / `scaling` proxy onto the Lite splat node.
1540
1684
  */
1541
- export declare class GaussianSplattingMesh extends TransformNode {
1542
1685
  constructor(name: string, url?: string | null, scene?: Scene, _keepInRam?: boolean);
1686
+ export declare class GaussianSplattingMesh extends TransformNode {
1543
1687
  /**
1688
+ * Babylon.js `gs.safeOrbitCameraLimits` — safe-orbit camera limits parsed from the source
1689
+ * file's metadata (Adobe safe-orbit extension), or `null` when the file carries none.
1690
+ *
1691
+ * Babylon Lite's splat loaders (`loadSplat` / `loadSOG` / `loadSPZ`) do not parse the Adobe
1692
+ * safe-orbit metadata block, so this stays `null` — matching BJS's own default for a file
1693
+ * without the extension. Populating it from real metadata needs a (non-tree-shakeable) change
1694
+ * to Lite's splat loaders; the field is exposed here for shape parity so ported reads resolve.
1695
+ */
1696
+ safeOrbitCameraLimits: ISafeOrbitCameraLimits | null;
1697
+ constructor(name: string, url?: string | null, scene?: Scene, _keepInRam?: boolean);
1544
1698
  getClassName(): string;
1545
1699
  get position(): Vector3;
1546
1700
  set position(value: Vector3);
1547
1701
  get rotation(): Vector3;
@@ -1779,21 +1933,23 @@ export declare class HavokPlugin {
1779
1933
  * `scene.environmentTexture` and the engine starts, at which point the scene
1780
1934
  * routes it through Babylon Lite's native `loadHdrEnvironment`.
1781
1935
  */
1782
- export declare class HDRCubeTexture {
1936
+ export declare class HDRCubeTexture extends BaseTexture {
1783
1937
  /** Source URL of the `.hdr` panorama. */
1784
1938
  readonly url: string;
1785
1939
  /** Requested cubemap face size (BJS `size`); forwarded to Lite's `faceSize`. */
1786
1940
  readonly size: number;
1787
1941
  /** Babylon.js `coordinatesMode` (skybox = 5). Recorded for API parity. */
1788
1942
  coordinatesMode: number;
1789
- name: string;
1790
1943
  gammaSpace: boolean;
1791
1944
  level: number;
1792
1945
  /** Fires when the HDR environment is "ready" (resolved on a microtask). */
1793
1946
  readonly onLoadObservable: Observable<HDRCubeTexture>;
1794
1947
  private _ready;
1948
+ private readonly _readyPromise;
1795
1949
  constructor(url: string, _sceneOrEngine?: unknown, size?: number, _noMipmap?: boolean, _generateHarmonics?: boolean, _gammaSpace?: boolean, _prefilterOnLoad?: boolean, onLoad?: (() => void) | null);
1950
+ getClassName(): string;
1796
1951
  /** Babylon.js `BaseTexture.isReady()`. */
1797
1952
  isReady(): boolean;
1953
+ whenReadyAsync(): Promise<void>;
1798
1954
  dispose(): void;
1799
1955
  }
1800
1956
 
@@ -1892,6 +2048,28 @@ export declare interface IAudioParameterRampOptions {
1892
2048
  shape: AudioParameterRampShape;
1893
2049
  }
1894
2050
 
2051
+ /** Babylon.js `ICreateTexture2DArrayFromImageUrlsOptions`. */
2052
+ export declare interface ICreateTexture2DArrayFromImageUrlsOptions extends IUploadImageToTexture2DArrayLayerOptions {
2053
+ /** Generate a full mip chain (true by default). */
2054
+ generateMipMaps?: boolean;
2055
+ /** Sampling mode (recorded for parity; Lite uses trilinear). */
2056
+ samplingMode?: number;
2057
+ /** Texture type (recorded for parity; Lite uploads RGBA8). */
2058
+ textureType?: number;
2059
+ /** Options forwarded to `createImageBitmap` (recorded for parity). */
2060
+ imageBitmapOptions?: ImageBitmapOptions;
2061
+ }
2062
+
2063
+ /** Babylon.js `ICreateTexture2DArrayFromKTX2Options`. */
2064
+ export declare interface ICreateTexture2DArrayFromKTX2Options {
2065
+ /** Generate a full mip chain (true by default). */
2066
+ generateMipMaps?: boolean;
2067
+ /** Sampling mode (trilinear by default). */
2068
+ samplingMode?: number;
2069
+ /** Store the texture with the Y axis inverted (false by default). */
2070
+ invertY?: boolean;
2071
+ }
2072
+
1895
2073
  /** Result of a multi-point GPU pick. Mirrors Babylon.js `IGPUMultiPickingInfo`. */
1896
2074
  export declare interface IGPUMultiPickingInfo {
1897
2075
  meshes: Array<PickableMesh | null>;
@@ -1940,6 +2118,9 @@ export declare class ImageProcessingConfiguration {
1940
2118
  static readonly TONEMAPPING_KHR_PBR_NEUTRAL = 2;
1941
2119
  }
1942
2120
 
2121
+ /** The decoded image sources WebGPU (and therefore Lite) can upload into a layer. */
2122
+ declare type ImageSource = ImageBitmap | HTMLImageElement | HTMLCanvasElement | OffscreenCanvas | HTMLVideoElement | ImageData | VideoFrame;
2123
+
1943
2124
  /** Babylon.js `IMainAudioBusOptions`. */
1944
2125
  export declare interface IMainAudioBusOptions extends Partial<IVolumeAudioOptions> {
1945
2126
  }
@@ -1948,7 +2129,7 @@ export declare interface IMainAudioBusOptions extends Partial<IVolumeAudioOption
1948
2129
  export declare function ImportMeshAsync(source: string, scene: Scene, _options?: unknown): Promise<ImportResult>;
1949
2130
 
1950
2131
  declare interface ImportResult {
1951
- meshes: Array<LoadedMesh | GaussianSplattingMesh>;
2132
+ meshes: TransformNode[];
1952
2133
  particleSystems: unknown[];
1953
2134
  skeletons: unknown[];
1954
2135
  animationGroups: AnimationGroup_2[];
@@ -1982,6 +2163,18 @@ export declare class InterpolatingBehavior {
1982
2163
  constructor();
1983
2164
  }
1984
2165
 
2166
+ /**
2167
+ * Babylon.js `ISafeOrbitCameraLimits` — safe-orbit camera limits embedded in a Gaussian
2168
+ * Splatting file's metadata (Adobe safe-orbit extension). Exposed on the loaded mesh via
2169
+ * {@link GaussianSplattingMesh.safeOrbitCameraLimits} for shape parity with `@babylonjs/core`.
2170
+ */
2171
+ export declare interface ISafeOrbitCameraLimits {
2172
+ /** Minimum safe orbit radius (distance from the camera to its target), if the file specifies one. */
2173
+ radiusMin?: number;
2174
+ /** Safe elevation range as `[minElevation, maxElevation]` in radians, if the file specifies one. */
2175
+ elevationMinMax?: [number, number];
2176
+ }
2177
+
1985
2178
  /** Babylon.js `IsHtmlInCanvasSupportedNatively` — the HTML-in-canvas feature is unsupported by the compat layer. */
1986
2179
  export declare function IsHtmlInCanvasSupportedNatively(): never;
1987
2180
 
@@ -2104,6 +2297,14 @@ export declare interface IStreamingSoundPlayOptions {
2104
2297
  volume?: number;
2105
2298
  }
2106
2299
 
2300
+ /** Babylon.js `IUploadImageToTexture2DArrayLayerOptions`. */
2301
+ export declare interface IUploadImageToTexture2DArrayLayerOptions {
2302
+ /** Store the source with the Y axis inverted (false by default). */
2303
+ invertY?: boolean;
2304
+ /** Premultiply the source alpha (false by default). */
2305
+ premultiplyAlpha?: boolean;
2306
+ }
2307
+
2107
2308
  /** Babylon.js `IVolumeAudioOptions`. */
2108
2309
  export declare interface IVolumeAudioOptions {
2109
2310
  /** Volume / gain. Defaults to `1`. */
@@ -2150,15 +2351,7 @@ export declare abstract class Light extends Node_2 {
2150
2351
  protected constructor(n
2151
2352
  * carries `0`, but the getter still returns the logical value the caller set.
2152
2353
  */
2153
2354
  get intensity(): number;
2154
- set intensity(value: number);
2155
- /**
2156
- * Babylon.js `light.setEnabled(false)` — toggle the light's contribution.
2157
- * Babylon Lite has no per-light enable flag, so a disabled light is expressed
2158
- * by zeroing its intensity in the shared lights UBO (and restoring it on
2159
- * re-enable). The logical intensity value is preserved across the toggle.
2160
- */
2161
- setEnabled(value: boolean): void;
2162
- /** Detach this light's shadow generator (compat for `light.shadowEnabled = false`). */
2355
+ set intensity(value: number);
2163
2356
  /** Detach this light's shadow generator (compat for `light.shadowEnabled = false`). */
2164
2357
  set shadowEnabled(enabled: boolean);
2165
2358
  dispose(): void;
2166
2359
  }
@@ -2179,8 +2372,49 @@ export declare class LightGizmo {
2179
2372
  private _attached;
2180
2373
  dispose(): void;
2181
2374
  }
2182
2375
 
2183
- export declare class LinesMesh {
2184
- constructor();
2376
+ declare interface LinesBuilderOptions {
2377
+ points: Vector3[];
2378
+ updatable?: boolean;
2379
+ instance?: LinesMesh | null;
2380
+ colors?: Color4[];
2381
+ useVertexAlpha?: boolean;
2382
+ material?: unknown;
2383
+ }
2384
+
2385
+ declare class LinesMaterial extends Material {
2386
+ readonly _lite: LineMaterial;
2387
+ constructor(name: string, lite: LineMaterial, scene?: Scene);
2388
+ getClassName(): string;
2389
+ clone(name: string): LinesMaterial;
2390
+ }
2391
+
2392
+ /** Babylon.js `LinesMesh` backed by a Babylon Lite line-system mesh. */
2393
+ export declare class LinesMesh extends Mesh {
2394
+ readonly useVertexColor: boolean;
2395
+ readonly useVertexAlpha: boolean;
2396
+ intersectionThreshold: number;
2397
+ private _lineMaterial;
2398
+ private readonly _color;
2399
+ private _alpha;
2400
+ private _suspendLineColorSync;
2401
+ constructor(name: string, sceneOrLite: Scene | Mesh_2, scene?: Scene, useVertexColor?: boolean, useVertexAlpha?: boolean);
2402
+ getClassName(): string;
2403
+ get color(): Color3;
2404
+ set color(value: Color3);
2405
+ get alpha(): number;
2406
+ set alpha(value: number);
2407
+ thinInstanceSetBuffer(kind: string, buffer: Float32Array | null, stride?: number): void;
2408
+ private _enableThinLineMaterial;
2409
+ private _syncLineColor;
2410
+ }
2411
+
2412
+ declare interface LineSystemBuilderOptions {
2413
+ lines: Vector3[][];
2414
+ updatable?: boolean;
2415
+ instance?: LinesMesh | null;
2416
+ colors?: Color4[][] | null;
2417
+ useVertexAlpha?: boolean;
2418
+ material?: unknown;
2185
2419
  }
2186
2420
 
2187
2421
  /**
@@ -2200,20 +2434,10 @@ export declare class LiteCompatError extends Error {
2200
2434
  export declare function LoadAssetContainerAsync(source: string, scene: Scene, _options?: unknown): Promise<AssetContainer>;
2201
2435
 
2202
2436
  /**
2203
- * A Babylon.js-shaped handle over a single loaded Babylon Lite mesh. Exposes the
2204
- * subset used by model-framing scenes: local bounding info, vertex data, and name.
2437
+ * Babylon.js `LoadImageToTexture2DArrayLayerAsync` — fetch/decode an image URL and
2438
+ * upload it into one layer. Forwards to Lite's `loadImageToArrayLayer`.
2205
2439
  */
2206
- declare class LoadedMesh {
2207
- readonly name: string;
2208
- private readonly _mesh;
2209
2440
  constructor(mesh: Mesh_2, container?: AssetContainer_2);
2210
2441
  /** Babylon.js `refreshBoundingInfo()` — bounds are read on demand, so this is a no-op. */
2211
- refreshBoundingInfo(_options?: unknown): LoadedMesh;
2212
- /** Babylon.js `getBoundingInfo()` — local-space AABB of this mesh (see module note). */
2213
- getBoundingInfo(): BoundingInfo;
2214
- /** Babylon.js `getVerticesData(kind)` — CPU position buffer (positions only). */
2215
- getVerticesData(kind: string): Float32Array | null;
2216
- /** Babylon.js `getTotalVertices()`. */
2217
- getTotalVertices(): number;
2218
- }
2442
+ export declare function LoadImageToTexture2DArrayLayerAsync(texture: RawTexture2DArray, url: string, layer: number, options?: IUploadImageToTexture2DArrayLayerOptions): Promise<void>;
2219
2443
 
2220
2444
  declare interface LockedTarget {
2221
2445
  position: {
@@ -2254,6 +2478,22 @@ export declare abstract class Material {
2254
2478
  set backFaceCulling(value: boolean);
2255
2479
  /** Wireframe rendering toggle (not honoured by all Lite materials). */
2256
2480
  wireframe: boolean;
2257
2481
  protected constructor(name: string, scene?: Scene);
2258
2482
  getClassName(): string;
2483
+ /**
2484
+ * Babylon.js `Material.clone(name)` — return a deep copy of this material under
2485
+ * a new name. Textures are **shared** by reference (matching Babylon.js), but the
2486
+ * clone gets its **own** Babylon Lite renderable (a fresh `_buildGroup` / UBO from
2487
+ * its factory) rather than aliasing the source's, so the two materials render and
2488
+ * dirty-track independently. Each concrete subclass copies its own property set.
2489
+ */
2490
+ abstract clone(name: string): Material;
2259
2491
  /** The scene this material was constructed against (Babylon.js `Material.getScene`). */
2492
+ getScene(): Scene | undefined;
2493
+ /**
2494
+ * The textures currently bound to this material (Babylon.js
2495
+ * `Material.getActiveTextures`). The base material owns no texture slots, so
2496
+ * this returns an empty array; each subclass overrides it to enumerate its own
2497
+ * slots and those of its extensions.
2498
+ */
2499
+ getActiveTextures(): BaseTexture[];
2260
2500
  protected _markDirty(): void;
2261
2501
  dispose(): void;
2262
2502
  }
2263
2503
 
@@ -2315,8 +2555,7 @@ export declare class Matrix {
2315
2555
  /** Babylon.js `Mesh` — a concrete renderable mesh with geometry. */
2316
2556
  export declare class Mesh extends AbstractMesh {
2317
2557
  constructor(name: string, sceneOrLite?: Scene | Mesh_2, scene?: Scene);
2318
- getClassName(): string;
2319
- private _morphTargetManager;
2558
+ getClassName(): string;
2320
2559
  private _morphTargetManager;
2321
2560
  /**
2322
2561
  * Babylon.js `mesh.morphTargetManager`. Babylon Lite builds morph GPU data via
2323
2562
  * `createMorphTargets` and stores it on the Lite mesh; the compat manager is
@@ -2345,10 +2584,43 @@ export declare class Mesh extends AbstractMesh {
2345
2584
  * API. Applied immediately to the Lite mesh (before the scene builds).
2346
2585
  */
2347
2586
  thinInstanceSetBuffer(kind: string, buffer: Float32Array | null, _stride?: number): void;
2348
- /** Deep mesh clone — not yet wrapped. */
2349
- clone(): never;
2587
+ /**
2588
+ * Babylon.js `mesh.clone(name, newParent?, doNotCloneChildren?)` — a new mesh
2589
+ * that shares this mesh's geometry. Forwards to Lite's `cloneTransformNode`,
2590
+ * which shares the `_gpu`/skeleton/morph/thin-instance resources with the clone
2591
+ * under ref-counting (so both meshes own the buffers and they survive until the
2592
+ * last is disposed). Babylon.js uses the requested name verbatim, derives clone
2593
+ * IDs from that name plus the source ID, and prefixes descendant names with the
2594
+ * root clone name. The source material is kept (BJS shares it by reference), and
2595
+ * the clone is registered with the same compat scene through its own wrapper.
2596
+ * An omitted or `null` `newParent` keeps the source parent.
2597
+ * `doNotCloneChildren` drops the descendants Lite always clones.
2598
+ */
2599
+ clone(name?: string, newParent?: Node_2 | null, doNotCloneChildren?: boolean): Mesh;
2600
+ private static _wrapCloneHierarchy;
2350
2601
  /** Level-of-detail — unsupported (no LOD system in Babylon Lite). */
2351
2602
  addLODLevel(): never;
2603
+ /**
2604
+ * Babylon.js `Mesh.MergeMeshes` — bake several meshes into one, transforming
2605
+ * each source's geometry by its world matrix. Signature:
2606
+ * `MergeMeshes(meshes, disposeSource?, allow32BitsIndices?, meshSubclass?, subdivideWithSubMeshes?, multiMultiMaterials?)`.
2607
+ * Uses the compat-local `mergeMeshGeometry`; the merged mesh lives at
2608
+ * identity (world transforms are baked in) and takes the first mesh's material.
2609
+ *
2610
+ * **Supported semantics** (everything else is rejected, never silently dropped):
2611
+ * - `disposeSource` (default `true`) — source meshes are disposed after merge.
2612
+ * - `allow32BitsIndices` — Lite indices are always uint32, so 32-bit is always
2613
+ * available. When `allow32BitsIndices` is falsy and the merged vertex count
2614
+ * reaches 65536, this returns `null`, exactly like Babylon.js.
2615
+ * - Positions, normals (world-transformed) and one UV set are carried.
2616
+ *
2617
+ * **Rejected** (throws `LiteCompatError`): `multiMultiMaterials` /
2618
+ * `subdivideWithSubMeshes` (Lite has no submesh / multi-material partitioning),
2619
+ * a supplied `meshSubclass` target, and sources carrying vertex colours,
2620
+ * tangents or a second UV set, or sources carrying skeleton, morph-target, or
2621
+ * vertex-animation data (Lite would have to drop them).
2622
+ */
2623
+ static MergeMeshes(meshes: (Mesh | null | undefined)[], disposeSource?: boolean, allow32BitsIndices?: boolean, meshSubclass?: Mesh, subdivideWithSubMeshes?: boolean, multiMultiMaterials?: boolean): Mesh | null;
2352
2624
  }
2353
2625
 
2354
2626
  /** Babylon.js `MeshBuilder` — factory namespace for primitive meshes. */
@@ -2374,11 +2646,13 @@ export declare const MeshBuilder: {
2374
2646
  CreateRibbon(name: string, options: object, scene: Scene): Mesh;
2375
2647
  CreateTube(name: string, options: object, scene: Scene): Mesh;
2376
2648
  ExtrudeShape(name: string, options: object, scene: Scene): Mesh;
2377
- CreateLines(): never;
2378
- CreateLineSystem(): never;
2649
+ CreateLines(name: string, options: LinesBuilderOptions, scene?: Scene | null): LinesMesh;
2650
+ CreateLineSystem(name: string, options: LineSystemBuilderOptions, scene?: Scene | null): LinesMesh;
2379
2651
  CreateDashedLines(): never;
2380
2652
  CreateDecal(): never;
2381
2653
  CreateText(): never;
2654
+ CreateTiledBox(_name?: string, _options?: object, _scene?: Scene): never;
2655
+ CreateTiledPlane(_name?: string, _options?: object, _scene?: Scene): never;
2382
2656
  };
2383
2657
 
2384
2658
  /** A compat mesh exposes its backing Lite mesh as `_lite`. */
@@ -2492,18 +2766,27 @@ declare abstract class Node_2 {
2492
2766
  * descendant nodes that are meshes (all descendants by default).
2493
2767
  */
2494
2768
  getChildMeshes(directDescendantsOnly?: boolean, predicate?: (node: Node_2) => boolean): Node_2[];
2495
- isEnabled(): boolean;
2496
- setEnabled(value: boolean): void;
2497
- isDisposed(): boolean;
2498
- dispose(): void;
2769
+ isEnabled(checkAncestors?: boolean): boolean;
2770
+ setEnabled(value: boolean): void;
2499
2771
  isDisposed(): boolean;
2772
+ dispose(doNotRecurse?: boolean): void;
2500
2773
  export { Node_2 as Node }
2501
2774
 
2502
2775
  export declare class NodeMaterial {
2503
2776
  name: string;
2504
2777
  backFaceCulling: boolean;
2505
2778
  private readonly _json;
2506
2779
  private readonly _textureOverrides;
2507
- constructor(name: string, _scene: Scene, json?: object | string);
2780
+ private readonly _scene;
2781
+ private readonly _pendingBindings;
2782
+ private _parsed;
2783
+ constructor(name: string, scene: Scene, json?: object | string);
2508
2784
  getClassName(): string;
2785
+ /**
2786
+ * Babylon.js `NodeMaterial.clone(name)`. Reuses the same NME source graph and the
2787
+ * captured per-block texture overrides (textures shared by reference, as
2788
+ * Babylon.js does), registering the clone with the scene so it parses/compiles its
2789
+ * own Lite node material (own renderable) at engine start.
2790
+ */
2791
+ clone(name: string): NodeMaterial;
2509
2792
  /** Babylon.js `getBlockByName(name)` — returns a proxy that captures texture overrides. */
2510
2793
  getBlockByName(name: string): NodeMaterialBlockProxy;
2511
2794
  /** Babylon.js `NodeMaterial.build()` — Lite builds during parse, so this is a no-op. */
2512
2795
  build(_verbose?: boolean): void;
2513
2796
  dispose(): void;
2514
2797
  /**
@@ -2524,6 +2807,43 @@ declare class NodeMaterialBlockProxy {
2524
2807
  get texture(): TextureLike | null;
2525
2808
  }
2526
2809
 
2810
+ /**
2811
+ * Babylon.js `NodeParticleSystemSet` — a Node Particle Editor graph. The compat
2812
+ * wrapper supports the load→build→start path used by ported scenes; the
2813
+ * programmatic graph-authoring surface throws.
2814
+ */
2815
+ export declare class NodeParticleSystemSet {
2816
+ name: string;
2527
2817
  constructor(name?: string);
2818
+ getClassName(): string;
2819
+ /**
2820
+ * Babylon.js `NodeParticleSystemSet.buildAsync(scene)` — compile the graph into
2821
+ * a live {@link ParticleSystemSet}. Forwards to Lite
2822
+ * `parseNodeParticleSetFromSnippet`, which parses and builds in one shot (from
2823
+ * the recorded snippet id or inline JSON).
2824
+ */
2825
+ buildAsync(scene: Scene, _verbose?: boolean): Promise<ParticleSystemSet>;
2826
+ /** Babylon.js `NodeParticleSystemSet.Parse(source)` — deserialize an inline graph. */
2827
+ static Parse(source: unknown): NodeParticleSystemSet;
2828
+ /**
2829
+ * Babylon.js `NodeParticleSystemSet.ParseFromSnippetAsync(snippetId)` — load a
2830
+ * graph from the snippet server. The network fetch is deferred to `buildAsync`
2831
+ * (Lite fuses fetch+parse+build), so this resolves immediately with the id.
2832
+ */
2833
+ static ParseFromSnippetAsync(snippetId: string, nodeParticleSet?: NodeParticleSystemSet): Promise<NodeParticleSystemSet>;
2834
+ /**
2835
+ * Babylon.js `NodeParticleSystemSet.ParseFromFileAsync(name, url)` — load a
2836
+ * serialized graph from a URL, then behave like {@link Parse}.
2837
+ */
2838
+ static ParseFromFileAsync(name: string, url: string, nodeParticleSet?: NodeParticleSystemSet): Promise<NodeParticleSystemSet>;
2839
+ /** Babylon.js `NodeParticleSystemSet.CreateDefault(name)`. Requires programmatic block authoring — not backed. */
2840
+ static CreateDefault(_name: string): NodeParticleSystemSet;
2841
+ get attachedBlocks(): never;
2842
+ getBlockByName(_name: string): never;
2843
+ serialize(): never;
2844
+ editAsync(): never;
2845
+ dispose(): void;
2846
+ }
2847
+
2528
2848
  /**
2529
2849
  * Babylon.js's `NullEngine` — a headless engine with no GPU device, used to run
2530
2850
  * scene logic (animations, observables, physics stepping, frame timing) without
@@ -2556,7 +2876,12 @@ export declare class OBJFileLoader {
2556
2876
  }
2557
2877
 
2558
2878
  export declare class Observable<T> {
2879
+ private _onObserverAdded?;
2880
+ notifyIfTriggered: boolean;
2559
2881
  private _observers;
2882
+ private _hasNotified;
2883
+ private _lastNotifiedValue;
2884
+ constructor(_onObserverAdded?: ((observer: ObserverCallback<T>) => void) | undefined, notifyIfTriggered?: boolean);
2560
2885
  add(callback: ObserverCallback<T>): ObserverCallback<T>;
2561
2886
  addOnce(callback: ObserverCallback<T>): ObserverCallback<T>;
2562
2887
  remove(callback: ObserverCallback<T> | null | undefined): boolean;
@@ -2564,6 +2889,7 @@ export declare class Observable<T> {
2564
2889
  notifyObservers(eventData?: T): void;
2565
2890
  hasObservers(): boolean;
2566
2891
  clear(): void;
2892
+ cleanLastNotifiedState(): void;
2567
2893
  }
2568
2894
 
2569
2895
  /**
@@ -2590,8 +2916,34 @@ export declare class ParticleSystem {
2590
2916
  constructor();
2591
2917
  }
2592
2918
 
2593
- export declare class ParticleSystemSet {
2594
- constructor();
2919
+ /**
2920
+ * Babylon.js `ParticleSystemSet` — the built output of an NPE graph. Backed by a
2921
+ * Lite `NodeParticleSet`; `start()` registers it as a live billboard system in the
2922
+ * scene. Directly constructing an empty set (`new ParticleSystemSet()`) is allowed
2923
+ * for parity but has no systems until produced by {@link NodeParticleSystemSet.buildAsync}.
2924
+ */
2925
+ export declare class ParticleSystemSet {
2595
2926
  private _started;
2927
+ getClassName(): string;
2928
+ /**
2929
+ * Babylon.js `ParticleSystemSet.systems` — the array of per-system
2930
+ * `ParticleSystem` handles. Not backed: Lite's node-particle runtime is a fused
2931
+ * struct-of-arrays simulation with no per-system BJS `ParticleSystem` object to
2932
+ * expose. Drive the set as a whole via {@link start} instead.
2933
+ */
2934
+ get systems(): never;
2935
+ /**
2936
+ * Babylon.js `ParticleSystemSet.start()` — begin all systems. Forwards to Lite
2937
+ * `registerNodeParticleSet`, which renders each system as a camera-facing
2938
+ * billboard and advances it once per frame. Idempotent.
2939
+ */
2940
+ start(): void;
2941
+ /**
2942
+ * Babylon.js `ParticleSystemSet.dispose()` — stop the systems. Lite exposes no
2943
+ * unregister for an already-registered billboard system, so this stops emission
2944
+ * on every built system (via `stopParticleSystem`); the last-emitted particles
2945
+ * finish their lifetime.
2946
+ */
2947
+ dispose(): void;
2596
2948
  }
2597
2949
 
2598
2950
  /** A 3D path with cumulative-distance queries over its points. */
@@ -2661,7 +3013,8 @@ export declare class PBRIridescenceConfiguration {
2661
3013
  set maximumThickness(value: number);
2662
3014
  }
2663
3015
 
2664
- export declare class PBRMaterial extends PushMaterial {
2665
3016
  constructor(name: string, scene?: Scene);
3017
+ export declare class PBRMaterial extends PushMaterial {
2666
3018
  private _albedoFactor;
3019
+ constructor(name: string, scene?: Scene);
2667
3020
  getClassName(): string;
2668
3021
  get albedoColor(): Color3;
2669
3022
  set albedoColor(value: Color3);
@@ -2673,6 +3026,11 @@ export declare class PBRMaterial extends PushMaterial {
2673
3026
  constructor(name: st
2674
3027
  get albedoTexture(): BaseTexture | null;
2675
3028
  set albedoTexture(texture: BaseTexture | null);
2676
3029
  private _albedoTexture;
3030
+ /**
3031
+ * Enumerate every bound PBR texture slot, including extension sub-configurations
3032
+ * (Babylon.js `PBRMaterial.getActiveTextures`).
3033
+ */
3034
+ getActiveTextures(): BaseTexture[];
2677
3035
  get metallic(): number;
2678
3036
  set metallic(value: number);
2679
3037
  get roughness(): number;
@@ -2718,8 +3076,15 @@ export declare class PBRMaterial extends PushMaterial {
2718
3076
  constructor(name: st
2719
3077
  */
2720
3078
  get environmentTexture(): CubeTexture | HDRCubeTexture | null;
2721
3079
  set environmentTexture(value: CubeTexture | HDRCubeTexture | null);
3080
+ private _environmentTexture;
2722
3081
  get reflectionTexture(): CubeTexture | HDRCubeTexture | null;
2723
- set reflectionTexture(value: CubeTexture | HDRCubeTexture | null);
3082
+ set reflectionTexture(value: CubeTexture | HDRCubeTexture | null);
2724
3083
  /**
3084
+ * Babylon.js `PBRMaterial.clone(name)`. Copies the albedo/metallic/roughness/
3085
+ * emissive state, shares the albedo texture reference, gives the clone independent
3086
+ * clearcoat/sheen/anisotropy/iridescence sub-configurations (sharing any nested
3087
+ * texture), and a fresh Lite PBR renderable.
3088
+ */
3089
+ clone(name: string): PBRMaterial;
2725
3090
 
2726
3091
  /**
2727
3092
  * Babylon.js `PBRMetallicRoughnessMaterial` — a simplified façade over
@@ -2730,6 +3095,7 @@ export declare class PBRMetallicRoughnessMaterial extends PBRMaterial {
2730
3095
  /** Alias of `albedoColor` (glTF "base color"). */
2731
3096
  get baseColor(): Color3;
2732
3097
  set baseColor(value: Color3);
3098
+ clone(name: string): PBRMetallicRoughnessMaterial;
2733
3099
  }
2734
3100
 
2735
3101
  /** Babylon.js `PBRSheenConfiguration` — the `pbr.sheen` sub-object over Lite `SheenProps`. */
@@ -2745,10 +3111,12 @@ export declare class PBRSheenConfiguration {
2745
3111
  set roughness(value: number);
2746
3112
  get color(): Color3;
2747
3113
  set color(value: Color3);
2748
- /** Babylon.js `sheen.texture`. Binds the Lite handle if the texture has resolved. */
2749
- set texture(value: {
2750
- _lite?: Texture2D;
2751
- } | null);
3114
+ /** Babylon.js `sheen.texture`. Retains the wrapper and binds the Lite handle if the texture has resolved. */
3115
+ get texture(): BaseTexture | null;
3116
+ set texture(value: BaseTexture | null);
3117
+ private _texture;
3118
+ /** Enumerate the sheen texture slot for `Material.getActiveTextures`. */
3119
+ getActiveTextures(): BaseTexture[];
2752
3120
  }
2753
3121
 
2754
3122
  /**
@@ -2765,6 +3133,7 @@ export declare class PBRSpecularGlossinessMaterial extends PBRMaterial {
2765
3133
  /** Maps glossiness → (1 - roughness). */
2766
3134
  get glossiness(): number;
2767
3135
  set glossiness(value: number);
3136
+ clone(name: string): PBRSpecularGlossinessMaterial;
2768
3137
  }
2769
3138
 
2770
3139
  /** Rolling FPS/frame-time monitor (Babylon.js `PerformanceMonitor`). */
@@ -2999,6 +3368,11 @@ export declare class Quaternion {
2999
3368
  * from the rotation part of `matrix`. Backed by Lite's `quatFromRotationMatrix`.
3000
3369
  */
3001
3370
  fromRotationMatrix(matrix: Matrix): this;
3371
+ /**
3372
+ * Babylon.js `Quaternion.toRotationMatrix` — write this quaternion's rotation
3373
+ * into `result`.
3374
+ */
3375
+ toRotationMatrix<T extends Matrix>(result: T): T;
3002
3376
  clone(): Quaternion;
3003
3377
  equals(other: Quaternion): boolean;
3004
3378
  asArray(): [number, number, number, number];
@@ -3039,6 +3413,51 @@ export declare class RawTexture extends BaseTexture {
3039
3413
  static CreateRGBATexture(data: Uint8Array, width: number, height: number, scene: Scene): RawTexture;
3040
3414
  }
3041
3415
 
3416
+ /**
3417
+ * Babylon.js `RawTexture2DArray` — a 2D array texture. Backed by Babylon Lite's
3418
+ * `Texture2DArray`.
3419
+ *
3420
+ * Both Babylon.js construction paths work: pass raw multi-layer RGBA8 bytes
3421
+ * (`data !== null`) for a CPU-generated array, or construct empty (`data = null`)
3422
+ * and fill layers from decoded image sources via
3423
+ * {@link UploadImageToTexture2DArrayLayer} /
3424
+ * {@link LoadImageToTexture2DArrayLayerAsync}, or build the whole array in one call
3425
+ * with {@link CreateTexture2DArrayFromImageUrlsAsync}.
3426
+ *
3427
+ * Babylon Lite's array path is RGBA8-only, so `format` / `textureType` /
3428
+ * `samplingMode` are recorded for API parity but the upload always treats `data` as
3429
+ * tightly-packed `width * height * depth * 4` RGBA bytes (layer-major). Raw-byte
3430
+ * uploads are not Y-flipped (matching the compat `RawTexture` / `RawTexture3D`
3431
+ * pixel paths), so `invertY` is recorded but not applied to `data`.
3432
+ */
3433
+ export declare class RawTexture2DArray extends BaseTexture {
3434
+ /** Babylon.js texture format (recorded for parity; Lite uploads RGBA8). */
3435
+ format: number;
3042
3436
  /** Babylon.js `RawTexture2DArray.is2DArray` — always true. */
3437
+ readonly is2DArray = true;
3043
3438
  constructor(data: ArrayBufferView | null, width: number, height: number, depth: number,
3439
+ /** Babylon.js texture format (recorded for parity; Lite uploads RGBA8). */
3440
+ format: number, scene: Scene, generateMipMaps?: boolean, _invertY?: boolean, _samplingMode?: number, _textureType?: number, _creationFlags?: number, _mipLevelCount?: number);
3441
+ getClassName(): string;
3442
+ /** Babylon.js `RawTexture2DArray.depth` — the number of array layers. */
3443
+ get depth(): number;
3444
+ /** The scene this texture belongs to (Babylon.js `ThinTexture.getScene`). */
3445
+ getScene(): Scene;
3446
+ /**
3447
+ * Babylon.js `RawTexture2DArray.getInternalTexture()` — the backend handle the compat
3448
+ * engine's texture methods accept (Lite's `Texture2DArray`).
3449
+ */
3450
+ getInternalTexture(): Texture2DArray | null;
3451
+ /** Babylon.js `RawTexture2DArray.update(data)` — replace the base mip of every layer. */
3452
+ update(data: ArrayBufferView): void;
3453
+ /**
3454
+ * Babylon.js `RawTexture2DArray.updateMipLevel(data, mipLevel)` — replace one mip level of
3455
+ * every layer. Level dimensions are `max(1, size >> mipLevel)`; writing level 0 of a
3456
+ * mipmapped array regenerates the rest of the chain, exactly as Babylon.js does.
3457
+ */
3458
+ updateMipLevel(data: ArrayBufferView, mipLevel: number): void;
3459
+ whenReadyAsync(): Promise<void>;
3044
3460
  /** Babylon.js `RawTexture2DArray.CreateRGBATexture` — RGBA raw-bytes factory. */
3461
+ static CreateRGBATexture(data: ArrayBufferView, width: number, height: number, depth: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: 3, type?: 0): RawTexture2DArray;
3462
+ }
3463
+
3045
3464
  /**
3046
3465
  * Babylon.js `RawTexture3D` — a volumetric texture created from raw RGBA8 pixel
3047
3466
  * bytes (the common case being a colour-grading LUT / colour cube). Backed by
@@ -3185,6 +3604,7 @@ export declare class Scene extends AbstractScene {
3185
3604
  /** Babylon.js fog-mode c
3186
3605
  private _fogDensity;
3187
3606
  private _fogColor;
3188
3607
  private _started;
3189
3608
  private _envTexture;
3609
+ private _brdfTexture;
3190
3610
  private _defaultEnvOptions;
3191
3611
  private readonly _shadowGenerators;
3192
3612
  private readonly _pendingTextures;
@@ -3198,7 +3618,7 @@ export declare class Scene extends AbstractScene {
3198
3618
  /** Babylon.js fog-mode c
3199
3619
  /** Babylon.js `scene.getClassName()`. */
3200
3620
  getClassName(): string;
3201
3621
  /** Babylon.js `scene.getUniqueId()` — the process-unique scene id. */
3202
- getUniqueId(): number;
3203
3622
  /**
3623
+ getUniqueId(): number;
3204
3624
  private _liteShadowGenerators;
3205
3625
  /**
3206
3626
  * Babylon.js `scene.defaultMaterial` — a shared `StandardMaterial` applied to
3207
3627
  * meshes that have no material assigned. Babylon Lite requires every mesh to
3208
3628
  * carry a material to render, so the mesh wrappers assign this lazily-created
@@ -3269,6 +3689,24 @@ export declare class Scene extends AbstractScene {
3269
3689
  /** Babylon.js fog-mode c
3270
3690
  set clipPlane(value: Plane | null);
3271
3691
  get environmentTexture(): CubeTexture | HDRCubeTexture | null;
3272
3692
  set environmentTexture(value: CubeTexture | HDRCubeTexture | null);
3693
+ /**
3694
+ * Babylon.js `scene.environmentBRDFTexture` — the BRDF lookup used by PBR materials.
3695
+ * Babylon.js defaults this to an embedded Base64 LUT and lets apps swap in one of the
3696
+ * published variants (e.g. `https://assets.babylonjs.com/environments/correlatedMSBRDF_RGBD.png`).
3697
+ *
3698
+ * Two deliberate divergences: the getter returns `null` while unset (Babylon.js
3699
+ * populates it with the decoded default once a PBR material is created, whereas Lite
3700
+ * keeps the default as an embedded data URL and never materialises a texture object),
3701
+ * and the assigned texture's own GPU upload goes unused because Babylon Lite decodes
3702
+ * the LUT itself, from the URL, as part of building the environment.
3703
+ */
3704
+ get environmentBRDFTexture(): BaseTexture | null;
3705
+ set environmentBRDFTexture(value: BaseTexture | null);
3706
+ /**
3707
+ * Resolve the BRDF LUT URL for the environment loaders: an app-supplied
3708
+ * `environmentBRDFTexture`, else the embedded Babylon.js-style default.
3709
+ */
3710
+ private _resolveBrdfUrl;
3273
3711
  /**
3274
3712
  * Babylon.js `scene.createDefaultEnvironment` — adds an IBL skybox and ground.
3275
3713
  * Babylon Lite performs this through `loadEnvironment` (deferred to engine start),
@@ -3734,7 +4172,15 @@ export declare class StandardMaterial extends PushMaterial {
3734
4172
  constructor(nam
3735
4173
  set emissiveTexture(texture: BaseTexture | null);
3736
4174
  private _diffuseTexture;
3737
4175
  private _bumpTexture;
3738
- private _emissiveTexture;
4176
+ private _emissiveTexture;
4177
+ /** Enumerate the standard-material texture slots that are bound (Babylon.js `getActiveTextures`). */
4178
+ getActiveTextures(): BaseTexture[];
3739
4179
  /**
4180
+ * Babylon.js `StandardMaterial.clone(name)`. Copies the diffuse/specular/emissive/
4181
+ * ambient colours and scalars, shares the diffuse/bump/emissive texture references,
4182
+ * and gives the clone its own Lite standard-material renderable.
4183
+ */
4184
+ clone(name: string): StandardMaterial;
4185
+ }
3740
4186
 
3741
4187
  /** Babylon.js `StaticSound` — a buffer-backed sound wrapping a Lite `StaticSound`. */
3742
4188
  export declare class StaticSound extends AbstractSound {
3743
4189
  private readonly _autoplay;
@@ -3882,6 +4328,7 @@ declare type TaskState = "init" | "running" | "done" | "error";
3882
4328
 
3883
4329
  export declare class Texture extends BaseTexture {
3884
4330
  private readonly _ready;
4331
+ private _onLoadObservable;
3885
4332
  /** Babylon.js sampling-mode constants (numeric parity). */
3886
4333
  static readonly NEAREST_SAMPLINGMODE = 1;
3887
4334
  static readonly BILINEAR_SAMPLINGMODE = 2;
@@ -3911,6 +4358,9 @@ export declare class Texture extends BaseTexture {
3911
4358
  */
3912
4359
  clone(): Texture;
3913
4360
  whenReadyAsync(): Promise<void>;
4361
+ /** Babylon.js `Texture.onLoadObservable`, allocated only when code subscribes. */
4362
+ get onLoadObservable(): Observable<Texture>;
4363
+ private _notifyLoadObservable;
3914
4364
  /** Babylon.js `BaseTexture.isReady()` — true once the GPU handle has resolved. */
3915
4365
  isReady(): boolean;
3916
4366
  /** Load a texture and resolve once its GPU handle is available. */
@@ -4043,6 +4493,14 @@ export declare function unsupported(api: string, detail?: string): never;
4043
4493
  /** Babylon.js `UploadHtmlElementToTexture` — HTML texture upload is unsupported by the compat layer. */
4044
4494
  export declare function UploadHtmlElementToTexture(): never;
4045
4495
 
4496
+ /**
4497
+ * Babylon.js `UploadImageToTexture2DArrayLayer` — upload a decoded image source
4498
+ * into one layer of a texture array. Routes through the engine's
4499
+ * `updateTextureArrayLayerFromImageSource` (as Babylon.js does), which forwards to
4500
+ * Lite's `uploadImageToArrayLayer`.
4501
+ */
4502
+ export declare function UploadImageToTexture2DArrayLayer(texture: RawTexture2DArray, source: ImageSource, layer: number, options?: IUploadImageToTexture2DArrayLayerOptions): void;
4503
+
4046
4504
  /** Babylon.js `UtilityLayerRenderer` — the overlay scene gizmos render into. */
4047
4505
  export declare class UtilityLayerRenderer {
4048
4506
  private _registered;
4049
4507
  constructor(scene: Scene);
4050
4508
  dispose(): void;