@babylonjs/lite-compat 1.14.0-preview → 1.16.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 +10 -8
- package/brdf-lut-data-BFfYlW71.js +5 -0
- package/brdf-lut-data-BFfYlW71.js.map +1 -0
- package/index.d.ts +503 -97
- package/index.js +1277 -497
- package/index.js.map +1 -1
- package/{meshes-CPZtn6G5.js → meshes-DduMsRJk.js} +691 -104
- package/meshes-DduMsRJk.js.map +1 -0
- package/navigation.d.ts +264 -78
- package/navigation.js +1 -1
- package/package.json +4 -4
- package/meshes-CPZtn6G5.js.map +0 -1
package/navigation.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { RenderCanvas } from '@babylonjs/lite';
|
|
|
11
11
|
import { SceneNode } from '@babylonjs/lite';
|
|
12
12
|
import { SheenProps } from '@babylonjs/lite';
|
|
13
13
|
import { Texture2D } from '@babylonjs/lite';
|
|
14
|
+
import { Texture2DArray } from '@babylonjs/lite';
|
|
14
15
|
|
|
15
16
|
declare abstract class AbstractEngine {
|
|
16
17
|
/**
|
|
@@ -25,7 +26,8 @@ declare abstract class AbstractEngine {
|
|
|
25
26
|
protected readonly _scenes: Scene[];
|
|
26
27
|
protected readonly _loopCallbacks: Array<() => void>;
|
|
27
28
|
protected _initialized: boolean;
|
|
28
|
-
private _started;
|
|
29
29
|
/**
|
|
30
|
+
private _startupComplete;
|
|
31
|
+
private _startPromise;
|
|
30
32
|
/**
|
|
31
33
|
* Babylon.js `engine.useReverseDepthBuffer`. Babylon Lite owns its depth
|
|
32
34
|
* configuration internally, so this is a settable no-op kept for API shape.
|
|
33
35
|
*/
|
|
@@ -109,7 +111,35 @@ declare abstract class AbstractEngine {
|
|
|
109
111
|
beginFrame(): never;
|
|
110
112
|
/** Babylon.js manual frame-pump exit point — unsupported (Lite's frame graph owns the frame). */
|
|
111
113
|
endFrame(): never;
|
|
114
|
+
/**
|
|
115
|
+
* Babylon.js `engine.currentSampleCount` — the MSAA sample count of the current render target.
|
|
116
|
+
* Babylon Lite manages MSAA internally and exposes no public sample-count accessor, so this
|
|
117
|
+
* needs a tree-shakeable Lite core addition before it can report a real value.
|
|
118
|
+
*/
|
|
119
|
+
get currentSampleCount(): never;
|
|
120
|
+
/**
|
|
121
|
+
* Babylon.js `engine.getAlphaToCoverage()` — alpha-to-coverage state. Babylon Lite does not
|
|
122
|
+
* expose an engine-level alpha-to-coverage toggle, so this is unsupported.
|
|
123
|
+
*/
|
|
124
|
+
getAlphaToCoverage(): never;
|
|
125
|
+
/**
|
|
126
|
+
* Babylon.js `engine.setAlphaToCoverage(enable)` — toggle alpha-to-coverage. Babylon Lite does
|
|
127
|
+
* not expose an engine-level alpha-to-coverage toggle, so this is unsupported.
|
|
128
|
+
*/
|
|
129
|
+
setAlphaToCoverage(_enable: boolean): never;
|
|
130
|
+
/**
|
|
131
|
+
* Babylon.js `engine.updateTextureArrayLayerFromImageSource(texture, source, layer, invertY, premultiplyAlpha)`
|
|
132
|
+
* — the engine extension that uploads a decoded image source into one layer of a 2D array
|
|
133
|
+
* texture. Forwards to Babylon Lite's `uploadImageToArrayLayer`.
|
|
134
|
+
*
|
|
135
|
+
* Babylon.js passes an `InternalTexture`; the compat layer's equivalent handle is the Lite
|
|
136
|
+
* `Texture2DArray` returned by `RawTexture2DArray.getInternalTexture()`, so ported code that
|
|
137
|
+
* goes through `UploadImageToTexture2DArrayLayer` (which is exactly what Babylon.js's helper
|
|
138
|
+
* does) works unchanged.
|
|
139
|
+
*/
|
|
140
|
+
updateTextureArrayLayerFromImageSource(texture: Texture2DArray, source: GPUCopyExternalImageSource, layer: number, invertY?: boolean, premultiplyAlpha?: boolean): void;
|
|
112
141
|
private _start;
|
|
142
|
+
private _startCore;
|
|
113
143
|
private _ensureInitialized;
|
|
114
144
|
}
|
|
115
145
|
|
|
@@ -118,7 +148,7 @@ declare abstract class AbstractEngine {
|
|
|
118
148
|
* visibility, and shadow-receipt. Concrete meshes derive from this.
|
|
119
149
|
*/
|
|
120
150
|
declare class AbstractMesh extends TransformNode {
|
|
121
151
|
private _material;
|
|
122
|
-
|
|
152
|
+
protected _visible: boolean;
|
|
123
153
|
constructor(name: string, lite: Mesh, scene?: Scene);
|
|
124
154
|
getClassName(): string;
|
|
125
155
|
get material(): CompatMaterial | null;
|
|
126
156
|
set material(value: CompatMaterial | null);
|
|
@@ -126,19 +156,28 @@ declare class AbstractMesh extends TransformNode {
|
|
|
126
156
|
private _material;
|
|
127
157
|
set isVisible(value: boolean);
|
|
128
158
|
get receiveShadows(): boolean;
|
|
129
159
|
set receiveShadows(value: boolean);
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Babylon.js `mesh.getBoundingInfo()` — local-space AABB of this mesh. Babylon
|
|
133
|
-
* Lite stores `boundMin`/`boundMax` (local space) on factory- and loader-built
|
|
134
|
-
* meshes; when absent (e.g. a placeholder mesh whose bounds were never computed)
|
|
135
|
-
* we fold the retained CPU positions through Lite's `computeAabb`. A mesh with
|
|
136
|
-
* no geometry returns a degenerate zero-size box.
|
|
160
|
+
protected _onEffectiveEnabledStateChanged(enabled: boolean): void;
|
|
137
161
|
/**
|
|
162
|
+
* Babylon.js `mesh.getBoundingInfo()` — the mesh's AABB. `minimum`/`maximum`
|
|
163
|
+
* are the local-space bounds; the returned `BoundingInfo`'s world members
|
|
164
|
+
* (`minimumWorld`/`maximumWorld`/`centerWorld`/…) are derived by transforming
|
|
165
|
+
* the eight local corners by the mesh's world matrix, so a mesh at (1,2,3)
|
|
166
|
+
* reports correctly-offset world bounds. Babylon Lite stores `boundMin`/
|
|
167
|
+
* `boundMax` (local space) on factory- and loader-built meshes; when absent
|
|
168
|
+
* (e.g. a placeholder mesh whose bounds were never computed) we fold the
|
|
169
|
+
* retained CPU positions through Lite's `computeAabb`. A mesh with no geometry
|
|
170
|
+
* returns a degenerate zero-size box.
|
|
138
171
|
*/
|
|
139
172
|
getBoundingInfo(): BoundingInfo;
|
|
173
|
+
/** Compat handle over Babylon Lite's world matrix for bounds derivation. Returns
|
|
174
|
+
* `undefined` when the Lite node hasn't computed one (world bounds fall back to
|
|
175
|
+
* local). */
|
|
176
|
+
private _worldMatrixForBounds;
|
|
140
177
|
/**
|
|
141
|
-
* Babylon.js `mesh.getVerticesData(kind)` — read back the CPU geometry buffer
|
|
142
|
-
*
|
|
143
|
-
* (for picking + device-loss recovery)
|
|
178
|
+
* Babylon.js `mesh.getVerticesData(kind)` — read back the CPU geometry buffer.
|
|
179
|
+
* `position` / `normal` / `uv` come from the buffers Babylon Lite retains on the
|
|
180
|
+
* mesh (for picking + device-loss recovery). Prefer the last compat-side value
|
|
181
|
+
* for `uv2` / `tangent` / `color`, falling back to attributes retained by Lite
|
|
182
|
+
* for loader- and factory-created meshes.
|
|
144
183
|
*/
|
|
145
184
|
getVerticesData(kind: string): Float32Array | null;
|
|
146
185
|
/**
|
|
@@ -149,8 +188,22 @@ declare class AbstractMesh extends TransformNode {
|
|
|
149
188
|
private _material;
|
|
150
189
|
* (`matricesIndices`, etc.) are accepted but not applied (Babylon Lite drives
|
|
151
190
|
* skinning through its own loaded-skeleton path).
|
|
152
191
|
*/
|
|
153
|
-
setVerticesData(kind: string, data: number[] | Float32Array, _updatable?: boolean): void;
|
|
154
192
|
private _lastColors;
|
|
155
|
-
|
|
193
|
+
setVerticesData(kind: string, data: number[] | Float32Array, _updatable?: boolean): void;
|
|
194
|
+
/**
|
|
195
|
+
* Babylon.js `mesh.getIndices()` — read back the mesh's index (topology) buffer.
|
|
196
|
+
* Babylon Lite retains the indices on the mesh as a `Uint32Array` (for picking +
|
|
197
|
+
* device-loss recovery), so we return that directly; a mesh with no geometry
|
|
198
|
+
* returns `null`.
|
|
199
|
+
*/
|
|
200
|
+
getIndices(_copyWhenShared?: boolean, forceCopy?: boolean): Uint32Array | null;
|
|
201
|
+
/**
|
|
202
|
+
* Babylon.js `mesh.setIndices(indices)` — replace the mesh's index (topology)
|
|
203
|
+
* buffer. Babylon Lite re-uploads the geometry in place via `resizeMeshGeometry`,
|
|
204
|
+
* keeping the existing position/normal/uv/tangent/color attributes and swapping
|
|
205
|
+
* only the indices. Returns the mesh for chaining.
|
|
206
|
+
*/
|
|
207
|
+
setIndices(indices: number[] | Uint16Array | Uint32Array | Int32Array, _totalVertices?: number | null, _updatable?: boolean): this;
|
|
156
208
|
private _lastTangents;
|
|
209
|
+
private _lastColors;
|
|
157
210
|
/** Babylon.js `mesh.getTotalVertices()` — vertex count from the position buffer. */
|
|
158
211
|
getTotalVertices(): number;
|
|
159
212
|
/**
|
|
160
213
|
* Babylon.js `mesh.refreshBoundingInfo()` — Babylon Lite recomputes a mesh's
|
|
@@ -158,23 +211,32 @@ declare class AbstractMesh extends TransformNode {
|
|
|
158
211
|
private _material;
|
|
159
212
|
* no-op that returns the mesh for chaining. The deformed-pick options
|
|
160
213
|
* (`applySkeleton` / `applyMorph`) are accepted for parity but not used.
|
|
161
214
|
*/
|
|
162
|
-
refreshBoundingInfo(_options?: unknown): this;
|
|
163
|
-
/**
|
|
215
|
+
refreshBoundingInfo(_options?: unknown): this;
|
|
164
216
|
/**
|
|
165
217
|
* Babylon.js `mesh.bakeCurrentTransformIntoVertices()` — fold the node's local
|
|
166
|
-
* transform (position / rotation / scaling) into the CPU geometry
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
* renormalized), re-upload via `resizeMeshGeometry`, then clear the transform.
|
|
218
|
+
* transform (position / rotation / scaling) into the CPU geometry via the shared
|
|
219
|
+
* {@link _bakeMatrix} helper, then reset the node transform to identity (the
|
|
220
|
+
* geometry now carries it).
|
|
170
221
|
*/
|
|
171
222
|
bakeCurrentTransformIntoVertices(): this;
|
|
223
|
+
/**
|
|
224
|
+
* Babylon.js `mesh.bakeTransformIntoVertices(transform)` — fold an **arbitrary**
|
|
225
|
+
* matrix into the CPU geometry via the shared {@link _bakeMatrix} helper. Unlike
|
|
226
|
+
* {@link bakeCurrentTransformIntoVertices}, the node's own transform is **not**
|
|
227
|
+
* reset: the supplied matrix is independent of the node transform.
|
|
228
|
+
*/
|
|
229
|
+
bakeTransformIntoVertices(transform: Matrix): this;
|
|
172
230
|
dispose(): void;
|
|
173
231
|
}
|
|
174
232
|
|
|
175
233
|
declare abstract class AbstractScene {
|
|
176
234
|
/**
|
|
177
|
-
* Babylon.js `scene.meshes
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
235
|
+
* Babylon.js `scene.meshes` — the compat mesh wrappers in the scene. Backed by the
|
|
236
|
+
* canonical {@link _meshWrappers} registry and kept in sync with the Lite-core-owned
|
|
237
|
+
* list: the core list ({@link _coreMeshList}) supplies authoritative membership and
|
|
238
|
+
* ordering, mapped back to each mesh's canonical wrapper so the returned handles are
|
|
239
|
+
* the right type and keep wrapper identity. Wrappers not yet mirrored into the core
|
|
240
|
+
* list (transform-only loader roots, primitives whose scene-add is deferred to engine
|
|
241
|
+
* start, and Gaussian-Splatting meshes that register their renderables outside
|
|
242
|
+
* `scene.meshes`) retain their registration positions.
|
|
181
243
|
*/
|
|
182
244
|
get meshes(): TransformNode[];
|
|
183
245
|
/** Babylon.js `scene.cameras` — every camera constructed against this scene. */
|
|
@@ -195,19 +257,18 @@ declare abstract class AbstractScene {
|
|
|
195
257
|
/**
|
|
196
258
|
/** Babylon.js `scene.getMaterialById(id)` — first material whose `id` matches, else `null`. */
|
|
197
259
|
getMaterialById(id: string): Material | null;
|
|
198
260
|
/**
|
|
199
|
-
* Babylon.js `scene.getMeshByName(name)
|
|
200
|
-
*
|
|
201
|
-
* (
|
|
202
|
-
* when not found, matching Babylon.js.
|
|
261
|
+
* Babylon.js `scene.getMeshByName(name)` — first mesh in {@link meshes} with a
|
|
262
|
+
* matching name, else `null`. Enumerates the full canonical mesh registry
|
|
263
|
+
* (primitives + loader-surfaced meshes), not just the loader-surfaced subset.
|
|
203
264
|
*/
|
|
204
265
|
getMeshByName(name: string): TransformNode | null;
|
|
205
|
-
/** Babylon.js `scene.getMeshById(id)` — first
|
|
266
|
+
/** Babylon.js `scene.getMeshById(id)` — first mesh whose `id` matches, else `null`. */
|
|
206
267
|
getMeshById(id: string): TransformNode | null;
|
|
207
268
|
/** Babylon.js legacy `scene.getMeshByID(id)` — alias of {@link getMeshById}. */
|
|
208
269
|
getMeshByID(id: string): TransformNode | null;
|
|
209
|
-
/** Babylon.js `scene.getNodeByName(name)` — searches
|
|
270
|
+
/** Babylon.js `scene.getNodeByName(name)` — searches meshes, cameras, and lights. */
|
|
210
271
|
getNodeByName(name: string): Node_2 | null;
|
|
211
|
-
/** Babylon.js `scene.getNodeById(id)` — searches
|
|
272
|
+
/** Babylon.js `scene.getNodeById(id)` — searches meshes, cameras, and lights by `id`. */
|
|
212
273
|
getNodeById(id: string): Node_2 | null;
|
|
213
274
|
}
|
|
214
275
|
|
|
@@ -356,45 +417,68 @@ declare class AnimationGroup {
|
|
|
356
417
|
declare type AnimationGroupState = "init" | "playing" | "paused" | "stopped";
|
|
357
418
|
|
|
358
419
|
declare abstract class BaseTexture {
|
|
359
|
-
name: string;
|
|
360
420
|
getClassName(): string;
|
|
421
|
+
name: string;
|
|
361
422
|
getClassName(): string;
|
|
362
423
|
/**
|
|
424
|
+
* Babylon.js `BaseTexture.getInternalTexture()` — the backend texture handle. Babylon.js
|
|
425
|
+
* returns an `InternalTexture`; the compat layer's equivalent is the Lite texture handle,
|
|
426
|
+
* which is what the compat engine's texture methods accept.
|
|
427
|
+
*/
|
|
428
|
+
getInternalTexture(): Texture2D | null;
|
|
363
429
|
abstract whenReadyAsync(): Promise<void>;
|
|
364
430
|
dispose(): void;
|
|
365
431
|
}
|
|
366
432
|
|
|
367
433
|
declare class BoundingBox {
|
|
368
|
-
minimum: Vector3;
|
|
369
|
-
maximum: Vector3;
|
|
370
|
-
center: Vector3;
|
|
371
|
-
extendSize: Vector3;
|
|
372
|
-
/**
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
434
|
+
readonly minimum: Vector3;
|
|
435
|
+
readonly maximum: Vector3;
|
|
436
|
+
readonly center: Vector3;
|
|
437
|
+
readonly extendSize: Vector3;
|
|
438
|
+
/** Center of the AABB in world space. */
|
|
439
|
+
readonly centerWorld: Vector3;
|
|
440
|
+
/** Half-size of the AABB in world space (multiply by 2 for the full size). */
|
|
441
|
+
readonly extendSizeWorld: Vector3;
|
|
442
|
+
/** Minimum corner of the world-space AABB. */
|
|
443
|
+
readonly minimumWorld: Vector3;
|
|
444
|
+
/** Maximum corner of the world-space AABB. */
|
|
445
|
+
readonly maximumWorld: Vector3;
|
|
446
|
+
/** The 8 corner points in local space (min/max combinations). */
|
|
447
|
+
readonly vectors: Vector3[];
|
|
448
|
+
/** The 8 corner points transformed into world space. */
|
|
449
|
+
readonly vectorsWorld: Vector3[];
|
|
450
|
+
/** The three world-space axis directions of the box (rows of the world matrix). */
|
|
451
|
+
readonly directions: Vector3[];
|
|
452
|
+
private _worldMatrix;
|
|
453
|
+
constructor(min: Vector3, max: Vector3, worldMatrix?: Matrix);
|
|
454
|
+
reConstruct(min: Vector3, max: Vector3, worldMatrix?: Matrix): void;
|
|
455
|
+
getWorldMatrix(): Matrix;
|
|
380
456
|
intersectsPoint(point: Vector3): boolean;
|
|
381
457
|
static Intersects(a: BoundingBox, b: BoundingBox): boolean;
|
|
382
458
|
}
|
|
383
459
|
|
|
384
460
|
declare class BoundingInfo {
|
|
385
461
|
boundingBox: BoundingBox;
|
|
386
462
|
boundingSphere: BoundingSphere;
|
|
387
|
-
constructor(min: Vector3, max: Vector3);
|
|
463
|
+
constructor(min: Vector3, max: Vector3, worldMatrix?: Matrix);
|
|
388
464
|
get minimum(): Vector3;
|
|
389
465
|
get maximum(): Vector3;
|
|
390
466
|
intersectsPoint(point: Vector3): boolean;
|
|
391
|
-
/**
|
|
392
|
-
|
|
467
|
+
/** Babylon.js `BoundingInfo.update` — re-derive the world-space bounds from the
|
|
468
|
+
* local geometry and a new world matrix. */
|
|
469
|
+
update(worldMatrix: Matrix): void;
|
|
470
|
+
/** Rebuild the local bounds and (optionally) re-derive world-space bounds from
|
|
471
|
+
* the supplied world matrix, transforming all eight corners. */
|
|
472
|
+
reConstruct(min: Vector3, max: Vector3, worldMatrix?: Matrix): void;
|
|
393
473
|
}
|
|
394
474
|
|
|
395
475
|
declare class BoundingSphere {
|
|
396
|
-
center: Vector3;
|
|
476
|
+
readonly center: Vector3;
|
|
397
477
|
radius: number;
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
478
|
+
readonly centerWorld: Vector3;
|
|
479
|
+
radiusWorld: number;
|
|
480
|
+
readonly minimum: Vector3;
|
|
481
|
+
readonly maximum: Vector3;
|
|
482
|
+
private _worldMatrix;
|
|
483
|
+
constructor(min: Vector3, max: Vector3, worldMatrix?: Matrix);
|
|
484
|
+
reConstruct(min: Vector3, max: Vector3, worldMatrix?: Matrix): void;
|
|
485
|
+
getWorldMatrix(): Matrix;
|
|
402
486
|
intersectsPoint(point: Vector3): boolean;
|
|
403
487
|
static Intersects(a: BoundingSphere, b: BoundingSphere): boolean;
|
|
404
488
|
}
|
|
405
489
|
|
|
@@ -639,15 +723,7 @@ declare abstract class Light extends Node_2 {
|
|
|
639
723
|
protected constructor(name: st
|
|
640
724
|
* carries `0`, but the getter still returns the logical value the caller set.
|
|
641
725
|
*/
|
|
642
726
|
get intensity(): number;
|
|
643
|
-
set intensity(value: number);
|
|
644
|
-
/**
|
|
645
|
-
* Babylon.js `light.setEnabled(false)` — toggle the light's contribution.
|
|
646
|
-
* Babylon Lite has no per-light enable flag, so a disabled light is expressed
|
|
647
|
-
* by zeroing its intensity in the shared lights UBO (and restoring it on
|
|
648
|
-
* re-enable). The logical intensity value is preserved across the toggle.
|
|
649
|
-
*/
|
|
650
|
-
setEnabled(value: boolean): void;
|
|
651
|
-
/** Detach this light's shadow generator (compat for `light.shadowEnabled = false`). */
|
|
727
|
+
set intensity(value: number);
|
|
652
728
|
/** Detach this light's shadow generator (compat for `light.shadowEnabled = false`). */
|
|
653
729
|
set shadowEnabled(enabled: boolean);
|
|
654
730
|
dispose(): void;
|
|
655
731
|
}
|
|
@@ -663,6 +739,22 @@ declare abstract class Material {
|
|
|
663
739
|
set backFaceCulling(value: boolean);
|
|
664
740
|
/** Wireframe rendering toggle (not honoured by all Lite materials). */
|
|
665
741
|
wireframe: boolean;
|
|
666
742
|
protected constructor(name: string, scene?: Scene);
|
|
667
743
|
getClassName(): string;
|
|
744
|
+
/**
|
|
745
|
+
* Babylon.js `Material.clone(name)` — return a deep copy of this material under
|
|
746
|
+
* a new name. Textures are **shared** by reference (matching Babylon.js), but the
|
|
747
|
+
* clone gets its **own** Babylon Lite renderable (a fresh `_buildGroup` / UBO from
|
|
748
|
+
* its factory) rather than aliasing the source's, so the two materials render and
|
|
749
|
+
* dirty-track independently. Each concrete subclass copies its own property set.
|
|
750
|
+
*/
|
|
751
|
+
abstract clone(name: string): Material;
|
|
668
752
|
/** The scene this material was constructed against (Babylon.js `Material.getScene`). */
|
|
753
|
+
getScene(): Scene | undefined;
|
|
754
|
+
/**
|
|
755
|
+
* The textures currently bound to this material (Babylon.js
|
|
756
|
+
* `Material.getActiveTextures`). The base material owns no texture slots, so
|
|
757
|
+
* this returns an empty array; each subclass overrides it to enumerate its own
|
|
758
|
+
* slots and those of its extensions.
|
|
759
|
+
*/
|
|
760
|
+
getActiveTextures(): BaseTexture[];
|
|
669
761
|
protected _markDirty(): void;
|
|
670
762
|
dispose(): void;
|
|
671
763
|
}
|
|
672
764
|
|
|
@@ -724,8 +816,7 @@ declare class Matrix {
|
|
|
724
816
|
/** Babylon.js `Mesh` — a concrete renderable mesh with geometry. */
|
|
725
817
|
declare class Mesh_2 extends AbstractMesh {
|
|
726
818
|
constructor(name: string, sceneOrLite?: Scene | Mesh, scene?: Scene);
|
|
727
|
-
getClassName(): string;
|
|
728
|
-
private _morphTargetManager;
|
|
819
|
+
getClassName(): string;
|
|
729
820
|
private _morphTargetManager;
|
|
730
821
|
/**
|
|
731
822
|
* Babylon.js `mesh.morphTargetManager`. Babylon Lite builds morph GPU data via
|
|
732
823
|
* `createMorphTargets` and stores it on the Lite mesh; the compat manager is
|
|
@@ -754,10 +845,43 @@ declare class Mesh_2 extends AbstractMesh {
|
|
|
754
845
|
* API. Applied immediately to the Lite mesh (before the scene builds).
|
|
755
846
|
*/
|
|
756
847
|
thinInstanceSetBuffer(kind: string, buffer: Float32Array | null, _stride?: number): void;
|
|
757
|
-
/**
|
|
758
|
-
|
|
848
|
+
/**
|
|
849
|
+
* Babylon.js `mesh.clone(name, newParent?, doNotCloneChildren?)` — a new mesh
|
|
850
|
+
* that shares this mesh's geometry. Forwards to Lite's `cloneTransformNode`,
|
|
851
|
+
* which shares the `_gpu`/skeleton/morph/thin-instance resources with the clone
|
|
852
|
+
* under ref-counting (so both meshes own the buffers and they survive until the
|
|
853
|
+
* last is disposed). Babylon.js uses the requested name verbatim, derives clone
|
|
854
|
+
* IDs from that name plus the source ID, and prefixes descendant names with the
|
|
855
|
+
* root clone name. The source material is kept (BJS shares it by reference), and
|
|
856
|
+
* the clone is registered with the same compat scene through its own wrapper.
|
|
857
|
+
* An omitted or `null` `newParent` keeps the source parent.
|
|
858
|
+
* `doNotCloneChildren` drops the descendants Lite always clones.
|
|
859
|
+
*/
|
|
860
|
+
clone(name?: string, newParent?: Node_2 | null, doNotCloneChildren?: boolean): Mesh_2;
|
|
861
|
+
private static _wrapCloneHierarchy;
|
|
759
862
|
/** Level-of-detail — unsupported (no LOD system in Babylon Lite). */
|
|
760
863
|
addLODLevel(): never;
|
|
864
|
+
/**
|
|
865
|
+
* Babylon.js `Mesh.MergeMeshes` — bake several meshes into one, transforming
|
|
866
|
+
* each source's geometry by its world matrix. Signature:
|
|
867
|
+
* `MergeMeshes(meshes, disposeSource?, allow32BitsIndices?, meshSubclass?, subdivideWithSubMeshes?, multiMultiMaterials?)`.
|
|
868
|
+
* Uses the compat-local `mergeMeshGeometry`; the merged mesh lives at
|
|
869
|
+
* identity (world transforms are baked in) and takes the first mesh's material.
|
|
870
|
+
*
|
|
871
|
+
* **Supported semantics** (everything else is rejected, never silently dropped):
|
|
872
|
+
* - `disposeSource` (default `true`) — source meshes are disposed after merge.
|
|
873
|
+
* - `allow32BitsIndices` — Lite indices are always uint32, so 32-bit is always
|
|
874
|
+
* available. When `allow32BitsIndices` is falsy and the merged vertex count
|
|
875
|
+
* reaches 65536, this returns `null`, exactly like Babylon.js.
|
|
876
|
+
* - Positions, normals (world-transformed) and one UV set are carried.
|
|
877
|
+
*
|
|
878
|
+
* **Rejected** (throws `LiteCompatError`): `multiMultiMaterials` /
|
|
879
|
+
* `subdivideWithSubMeshes` (Lite has no submesh / multi-material partitioning),
|
|
880
|
+
* a supplied `meshSubclass` target, and sources carrying vertex colours,
|
|
881
|
+
* tangents or a second UV set, or sources carrying skeleton, morph-target, or
|
|
882
|
+
* vertex-animation data (Lite would have to drop them).
|
|
883
|
+
*/
|
|
884
|
+
static MergeMeshes(meshes: (Mesh_2 | null | undefined)[], disposeSource?: boolean, allow32BitsIndices?: boolean, meshSubclass?: Mesh_2, subdivideWithSubMeshes?: boolean, multiMultiMaterials?: boolean): Mesh_2 | null;
|
|
761
885
|
}
|
|
762
886
|
|
|
763
887
|
/** Babylon.js `MorphTarget` — a single named morph influence with absolute target geometry. */
|
|
@@ -824,17 +948,26 @@ declare abstract class Node_2 {
|
|
|
824
948
|
* descendant nodes that are meshes (all descendants by default).
|
|
825
949
|
*/
|
|
826
950
|
getChildMeshes(directDescendantsOnly?: boolean, predicate?: (node: Node_2) => boolean): Node_2[];
|
|
827
|
-
isEnabled(): boolean;
|
|
828
|
-
setEnabled(value: boolean): void;
|
|
829
|
-
isDisposed(): boolean;
|
|
830
|
-
dispose(): void;
|
|
951
|
+
isEnabled(checkAncestors?: boolean): boolean;
|
|
952
|
+
setEnabled(value: boolean): void;
|
|
831
953
|
isDisposed(): boolean;
|
|
954
|
+
dispose(doNotRecurse?: boolean): void;
|
|
832
955
|
|
|
833
956
|
declare class NodeMaterial {
|
|
834
957
|
name: string;
|
|
835
958
|
backFaceCulling: boolean;
|
|
836
959
|
private readonly _json;
|
|
837
960
|
private readonly _textureOverrides;
|
|
838
|
-
|
|
961
|
+
private readonly _scene;
|
|
962
|
+
private readonly _pendingBindings;
|
|
963
|
+
private _parsed;
|
|
964
|
+
constructor(name: string, scene: Scene, json?: object | string);
|
|
839
965
|
getClassName(): string;
|
|
966
|
+
/**
|
|
967
|
+
* Babylon.js `NodeMaterial.clone(name)`. Reuses the same NME source graph and the
|
|
968
|
+
* captured per-block texture overrides (textures shared by reference, as
|
|
969
|
+
* Babylon.js does), registering the clone with the scene so it parses/compiles its
|
|
970
|
+
* own Lite node material (own renderable) at engine start.
|
|
971
|
+
*/
|
|
972
|
+
clone(name: string): NodeMaterial;
|
|
840
973
|
/** Babylon.js `getBlockByName(name)` — returns a proxy that captures texture overrides. */
|
|
841
974
|
getBlockByName(name: string): NodeMaterialBlockProxy;
|
|
842
975
|
/** Babylon.js `NodeMaterial.build()` — Lite builds during parse, so this is a no-op. */
|
|
843
976
|
build(_verbose?: boolean): void;
|
|
844
977
|
dispose(): void;
|
|
845
978
|
/**
|
|
@@ -856,7 +989,12 @@ declare class NodeMaterialBlockProxy {
|
|
|
856
989
|
}
|
|
857
990
|
|
|
858
991
|
declare class Observable<T> {
|
|
992
|
+
private _onObserverAdded?;
|
|
993
|
+
notifyIfTriggered: boolean;
|
|
859
994
|
private _observers;
|
|
995
|
+
private _hasNotified;
|
|
996
|
+
private _lastNotifiedValue;
|
|
997
|
+
constructor(_onObserverAdded?: ((observer: ObserverCallback<T>) => void) | undefined, notifyIfTriggered?: boolean);
|
|
860
998
|
add(callback: ObserverCallback<T>): ObserverCallback<T>;
|
|
861
999
|
addOnce(callback: ObserverCallback<T>): ObserverCallback<T>;
|
|
862
1000
|
remove(callback: ObserverCallback<T> | null | undefined): boolean;
|
|
@@ -864,6 +1002,7 @@ declare class Observable<T> {
|
|
|
864
1002
|
notifyObservers(eventData?: T): void;
|
|
865
1003
|
hasObservers(): boolean;
|
|
866
1004
|
clear(): void;
|
|
1005
|
+
cleanLastNotifiedState(): void;
|
|
867
1006
|
}
|
|
868
1007
|
|
|
869
1008
|
/**
|
|
@@ -929,7 +1068,8 @@ declare class PBRIridescenceConfiguration {
|
|
|
929
1068
|
set maximumThickness(value: number);
|
|
930
1069
|
}
|
|
931
1070
|
|
|
932
|
-
declare class PBRMaterial extends PushMaterial {
|
|
933
1071
|
constructor(name: string, scene?: Scene);
|
|
1072
|
+
declare class PBRMaterial extends PushMaterial {
|
|
934
1073
|
private _albedoFactor;
|
|
1074
|
+
constructor(name: string, scene?: Scene);
|
|
935
1075
|
getClassName(): string;
|
|
936
1076
|
get albedoColor(): Color3;
|
|
937
1077
|
set albedoColor(value: Color3);
|
|
@@ -941,6 +1081,11 @@ declare class PBRMaterial extends PushMaterial {
|
|
|
941
1081
|
constructor(name: string, s
|
|
942
1082
|
get albedoTexture(): BaseTexture | null;
|
|
943
1083
|
set albedoTexture(texture: BaseTexture | null);
|
|
944
1084
|
private _albedoTexture;
|
|
1085
|
+
/**
|
|
1086
|
+
* Enumerate every bound PBR texture slot, including extension sub-configurations
|
|
1087
|
+
* (Babylon.js `PBRMaterial.getActiveTextures`).
|
|
1088
|
+
*/
|
|
1089
|
+
getActiveTextures(): BaseTexture[];
|
|
945
1090
|
get metallic(): number;
|
|
946
1091
|
set metallic(value: number);
|
|
947
1092
|
get roughness(): number;
|
|
@@ -986,8 +1131,15 @@ declare class PBRMaterial extends PushMaterial {
|
|
|
986
1131
|
constructor(name: string, s
|
|
987
1132
|
*/
|
|
988
1133
|
get environmentTexture(): CubeTexture | HDRCubeTexture | null;
|
|
989
1134
|
set environmentTexture(value: CubeTexture | HDRCubeTexture | null);
|
|
1135
|
+
private _environmentTexture;
|
|
990
1136
|
get reflectionTexture(): CubeTexture | HDRCubeTexture | null;
|
|
991
|
-
set reflectionTexture(value: CubeTexture | HDRCubeTexture | null);
|
|
1137
|
+
set reflectionTexture(value: CubeTexture | HDRCubeTexture | null);
|
|
992
1138
|
/**
|
|
1139
|
+
* Babylon.js `PBRMaterial.clone(name)`. Copies the albedo/metallic/roughness/
|
|
1140
|
+
* emissive state, shares the albedo texture reference, gives the clone independent
|
|
1141
|
+
* clearcoat/sheen/anisotropy/iridescence sub-configurations (sharing any nested
|
|
1142
|
+
* texture), and a fresh Lite PBR renderable.
|
|
1143
|
+
*/
|
|
1144
|
+
clone(name: string): PBRMaterial;
|
|
993
1145
|
|
|
994
1146
|
/** Babylon.js `PBRSheenConfiguration` — the `pbr.sheen` sub-object over Lite `SheenProps`. */
|
|
995
1147
|
declare class PBRSheenConfiguration {
|
|
@@ -1002,10 +1154,12 @@ declare class PBRSheenConfiguration {
|
|
|
1002
1154
|
set roughness(value: number);
|
|
1003
1155
|
get color(): Color3;
|
|
1004
1156
|
set color(value: Color3);
|
|
1005
|
-
/** Babylon.js `sheen.texture`.
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1157
|
+
/** Babylon.js `sheen.texture`. Retains the wrapper and binds the Lite handle if the texture has resolved. */
|
|
1158
|
+
get texture(): BaseTexture | null;
|
|
1159
|
+
set texture(value: BaseTexture | null);
|
|
1160
|
+
private _texture;
|
|
1161
|
+
/** Enumerate the sheen texture slot for `Material.getActiveTextures`. */
|
|
1162
|
+
getActiveTextures(): BaseTexture[];
|
|
1009
1163
|
}
|
|
1010
1164
|
|
|
1011
1165
|
/**
|
|
@@ -1070,6 +1224,11 @@ declare class Quaternion {
|
|
|
1070
1224
|
* from the rotation part of `matrix`. Backed by Lite's `quatFromRotationMatrix`.
|
|
1071
1225
|
*/
|
|
1072
1226
|
fromRotationMatrix(matrix: Matrix): this;
|
|
1227
|
+
/**
|
|
1228
|
+
* Babylon.js `Quaternion.toRotationMatrix` — write this quaternion's rotation
|
|
1229
|
+
* into `result`.
|
|
1230
|
+
*/
|
|
1231
|
+
toRotationMatrix<T extends Matrix>(result: T): T;
|
|
1073
1232
|
clone(): Quaternion;
|
|
1074
1233
|
equals(other: Quaternion): boolean;
|
|
1075
1234
|
asArray(): [number, number, number, number];
|
|
@@ -1182,6 +1341,7 @@ declare class Scene extends AbstractScene {
|
|
|
1182
1341
|
/** Babylon.js fog-mode constant
|
|
1183
1342
|
private _fogDensity;
|
|
1184
1343
|
private _fogColor;
|
|
1185
1344
|
private _started;
|
|
1186
1345
|
private _envTexture;
|
|
1346
|
+
private _brdfTexture;
|
|
1187
1347
|
private _defaultEnvOptions;
|
|
1188
1348
|
private readonly _shadowGenerators;
|
|
1189
1349
|
private readonly _pendingTextures;
|
|
@@ -1195,7 +1355,7 @@ declare class Scene extends AbstractScene {
|
|
|
1195
1355
|
/** Babylon.js fog-mode constant
|
|
1196
1356
|
/** Babylon.js `scene.getClassName()`. */
|
|
1197
1357
|
getClassName(): string;
|
|
1198
1358
|
/** Babylon.js `scene.getUniqueId()` — the process-unique scene id. */
|
|
1199
|
-
getUniqueId(): number;
|
|
1200
1359
|
/**
|
|
1360
|
+
getUniqueId(): number;
|
|
1201
1361
|
private _liteShadowGenerators;
|
|
1202
1362
|
/**
|
|
1203
1363
|
* Babylon.js `scene.defaultMaterial` — a shared `StandardMaterial` applied to
|
|
1204
1364
|
* meshes that have no material assigned. Babylon Lite requires every mesh to
|
|
1205
1365
|
* carry a material to render, so the mesh wrappers assign this lazily-created
|
|
@@ -1266,6 +1426,24 @@ declare class Scene extends AbstractScene {
|
|
|
1266
1426
|
/** Babylon.js fog-mode constant
|
|
1267
1427
|
set clipPlane(value: Plane | null);
|
|
1268
1428
|
get environmentTexture(): CubeTexture | HDRCubeTexture | null;
|
|
1269
1429
|
set environmentTexture(value: CubeTexture | HDRCubeTexture | null);
|
|
1430
|
+
/**
|
|
1431
|
+
* Babylon.js `scene.environmentBRDFTexture` — the BRDF lookup used by PBR materials.
|
|
1432
|
+
* Babylon.js defaults this to an embedded Base64 LUT and lets apps swap in one of the
|
|
1433
|
+
* published variants (e.g. `https://assets.babylonjs.com/environments/correlatedMSBRDF_RGBD.png`).
|
|
1434
|
+
*
|
|
1435
|
+
* Two deliberate divergences: the getter returns `null` while unset (Babylon.js
|
|
1436
|
+
* populates it with the decoded default once a PBR material is created, whereas Lite
|
|
1437
|
+
* keeps the default as an embedded data URL and never materialises a texture object),
|
|
1438
|
+
* and the assigned texture's own GPU upload goes unused because Babylon Lite decodes
|
|
1439
|
+
* the LUT itself, from the URL, as part of building the environment.
|
|
1440
|
+
*/
|
|
1441
|
+
get environmentBRDFTexture(): BaseTexture | null;
|
|
1442
|
+
set environmentBRDFTexture(value: BaseTexture | null);
|
|
1443
|
+
/**
|
|
1444
|
+
* Resolve the BRDF LUT URL for the environment loaders: an app-supplied
|
|
1445
|
+
* `environmentBRDFTexture`, else the embedded Babylon.js-style default.
|
|
1446
|
+
*/
|
|
1447
|
+
private _resolveBrdfUrl;
|
|
1270
1448
|
/**
|
|
1271
1449
|
* Babylon.js `scene.createDefaultEnvironment` — adds an IBL skybox and ground.
|
|
1272
1450
|
* Babylon Lite performs this through `loadEnvironment` (deferred to engine start),
|
|
@@ -1374,7 +1552,15 @@ declare class StandardMaterial extends PushMaterial {
|
|
|
1374
1552
|
constructor(name: stri
|
|
1375
1553
|
set emissiveTexture(texture: BaseTexture | null);
|
|
1376
1554
|
private _diffuseTexture;
|
|
1377
1555
|
private _bumpTexture;
|
|
1378
|
-
private _emissiveTexture;
|
|
1556
|
+
private _emissiveTexture;
|
|
1557
|
+
/** Enumerate the standard-material texture slots that are bound (Babylon.js `getActiveTextures`). */
|
|
1558
|
+
getActiveTextures(): BaseTexture[];
|
|
1379
1559
|
/**
|
|
1560
|
+
* Babylon.js `StandardMaterial.clone(name)`. Copies the diffuse/specular/emissive/
|
|
1561
|
+
* ambient colours and scalars, shares the diffuse/bump/emissive texture references,
|
|
1562
|
+
* and gives the clone its own Lite standard-material renderable.
|
|
1563
|
+
*/
|
|
1564
|
+
clone(name: string): StandardMaterial;
|
|
1565
|
+
}
|
|
1380
1566
|
|
|
1381
1567
|
declare interface TextureLike {
|
|
1382
1568
|
_lite?: Texture2D;
|
package/navigation.js
CHANGED
|
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import { createNavigationPluginAsync, updateNavCrowd, getAgentPosition, addAgent, agentGoto, createNavMesh, addCylinderObstacle, addBoxObstacle, removeObstacle, updateNavMeshObstacles, createDebugNavMeshGeometry, createMeshFromData, addToScene, getClosestPoint, computePath, raycast, createNavCrowd } from "@babylonjs/lite";
|
|
5
|
-
import { V as Vector3, a as Mesh } from "./meshes-
|
|
5
|
+
import { V as Vector3, a as Mesh } from "./meshes-DduMsRJk.js";
|
|
6
6
|
class RecastJSCrowd {
|
|
7
7
|
constructor(lite, plugin, scene) {
|
|
8
8
|
/** @internal */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babylonjs/lite-compat",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0-preview",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Opt-in Babylon.js-shaped compatibility layer implemented on top of the Babylon Lite public API. Provides a migration runway from Babylon.js to Babylon Lite.",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"babylonLiteRelease": {
|
|
50
|
-
"azureBuildId": "
|
|
51
|
-
"sourceVersion": "
|
|
52
|
-
"builtAgainstLite": "1.
|
|
50
|
+
"azureBuildId": "57306",
|
|
51
|
+
"sourceVersion": "17779086faef2e3e6a107febd9e89ecfca21b573",
|
|
52
|
+
"builtAgainstLite": "1.16.0"
|
|
53
53
|
}
|
|
54
54
|
}
|