@babylonjs/lite-compat 1.32.0-preview → 1.34.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/navigation.d.ts CHANGED
@@ -37,11 +37,11 @@ declare abstract class AbstractEngine {
37
37
  */
38
38
  useReverseDepthBuffer: boolean;
39
39
  /** Babylon.js `engine.onResizeObservable` — fires after `resize()` / `setSize()`. */
40
- readonly onResizeObservable: Observable<AbstractEngine>;
41
40
  constructor(canvas: RenderCanvas, options?: ({
42
- antialias?: boolean;
43
- adaptToDeviceRatio?: boolean;
44
- useLargeWorldRendering?: boolean;
45
- } & EngineOptions) | boolean);
41
+ readonly onResizeObservable: Observable<AbstractEngine>;
42
+ /** Babylon.js context-loss signal, forwarded from Lite's device-loss subscription. */
43
+ readonly onContextLostObservable: Observable<AbstractEngine>;
44
+ /** Babylon.js context-restored signal. Lite does not expose a completed-recovery event, so this remains shape-only. */
45
+ readonly onContextRestoredObservable: Observable<AbstractEngine>;
46
46
  constructor(canvas: RenderCanvas, options?: WebGPUEngineOptions | boolean);
47
47
  /** Acquire the GPU device and build the Lite engine context. */
48
48
  initAsync(): Promise<void>;
49
49
  getRenderingCanvas(): RenderCanvas;
@@ -1050,6 +1050,10 @@ declare class Mesh_2 extends AbstractMesh {
1050
1050
  static CreateCylinder(name: string, height: number, diameterTop: number, diameterBottom: number, tessellation: number, _subdivisions: number, scene: Scene): Mesh_2;
1051
1051
  /** Legacy `Mesh.CreateTorus(name, diameter, thickness, tessellation, scene)`. */
1052
1052
  static CreateTorus(name: string, diameter: number, thickness: number, tessellation: number, scene: Scene): Mesh_2;
1053
+ /** Legacy `Mesh.CreatePolygon(name, shape, scene, holes?, updatable?, sideOrientation?, earcutInjection?)`. */
1054
+ static CreatePolygon(_name: string, _shape: Vector3[], _scene: Scene, _holes?: Vector3[][], _updatable?: boolean, _sideOrientation?: number, _earcutInjection?: unknown): never;
1055
+ /** Legacy `Mesh.ExtrudePolygon(name, shape, depth, scene, holes?, updatable?, sideOrientation?, earcutInjection?)`. */
1056
+ static ExtrudePolygon(_name: string, _shape: Vector3[], _depth: number, _scene: Scene, _holes?: Vector3[][], _updatable?: boolean, _sideOrientation?: number, _earcutInjection?: unknown): never;
1053
1057
  /** Hardware-instanced copy — unsupported. Use native thin instances instead. */
1054
1058
  createInstance(): never;
1055
1059
  /**
@@ -1097,6 +1101,8 @@ declare class Mesh_2 extends AbstractMesh {
1097
1101
  static MergeMeshes(meshes: (Mesh_2 | null | undefined)[], disposeSource?: boolean, allow32BitsIndices?: boolean, meshSubclass?: Mesh_2, subdivideWithSubMeshes?: boolean, multiMultiMaterials?: boolean): Mesh_2 | null;
1098
1102
  }
1099
1103
 
1104
+ declare type MeshPredicate = (mesh: AbstractMesh, thinInstanceIndex: number) => boolean;
1105
+
1100
1106
  /** Babylon.js `MorphTarget` — a single named morph influence with absolute target geometry. */
1101
1107
  declare class MorphTarget {
1102
1108
  name: string;
1103
1109
  private _influence;
@@ -1577,8 +1583,11 @@ declare class PickingInfo {
1577
1583
  aimTransform: TransformNode | null;
1578
1584
  gripTransform: TransformNode | null;
1579
1585
  private _normal;
1580
- private _worldNormal;
1581
1586
  getNormal(useWorldCoordinates?: boolean, _useVerticesNormals?: boolean): Vector3 | null;
1582
- getTextureCoordinates(_uvSet?: string): Vector2 | null;
1587
+ private _worldNormal;
1588
+ private _faceNormal;
1589
+ private _faceWorldNormal;
1590
+ private _uv;
1583
1591
  getNormal(useWorldCoordinates?: boolean, useVerticesNormals?: boolean): Vector3 | null;
1592
+ getTextureCoordinates(uvSet?: string): Vector2 | null;
1584
1593
  }
1585
1594
 
1586
1595
  declare class Plane {
@@ -1909,14 +1918,14 @@ declare class Scene extends AbstractScene {
1909
1918
  /** Babylon.js fog-mode constant
1910
1919
  /** Babylon.js synchronous readiness check — always ready in the compat layer. */
1911
1920
  isReady(): boolean;
1912
1921
  /** Babylon.js synchronous screen-coordinate picking over Lite's CPU ray picker. */
1913
- pick(x: number, y: number, predicate?: (mesh: AbstractMesh) => boolean, fastCheck?: boolean, camera?: Camera | null, trianglePredicate?: (p0: Vector3, p1: Vector3, p2: Vector3, ray: Ray) => boolean): PickingInfo;
1922
+ pick(x: number, y: number, predicate?: MeshPredicate, fastCheck?: boolean, camera?: Camera | null, trianglePredicate?: TrianglePickingPredicate): PickingInfo;
1914
1923
  /**
1915
1924
  * Babylon.js `Scene.createPickingRay` — translate CSS coordinates and camera
1916
1925
  * transforms into Lite's reverse-Z unprojection helper.
1917
1926
  */
1918
1927
  createPickingRay(x: number, y: number, world?: Matrix | null, camera?: Camera | null, cameraViewSpace?: boolean): Ray;
1919
1928
  /** Synchronous CPU ray picking over Babylon Lite's scene-mesh picker. */
1920
- pickWithRay(ray: Ray, predicate?: (mesh: AbstractMesh) => boolean, fastCheck?: boolean, trianglePredicate?: (p0: Vector3, p1: Vector3, p2: Vector3, ray: Ray) => boolean): PickingInfo;
1921
1929
  /**
1930
+ pickWithRay(ray: Ray, predicate?: MeshPredicate, fastCheck?: boolean, trianglePredicate?: TrianglePickingPredicate): PickingInfo;
1922
1931
  /**
1923
1932
  * Babylon.js `scene.enablePhysics(gravity, plugin)`. Wires the given Havok V2
1924
1933
  * {@link HavokPlugin} to this scene, creating the native Lite physics world and
1925
1934
  * registering per-frame stepping. The plugin's `useDeltaForWorldStep` flag
@@ -2074,6 +2083,8 @@ declare class TransformNode extends Node_2 {
2074
2083
  physicsBody: PhysicsBody | null
2075
2084
  setParent(parent: Node_2 | null): TransformNode;
2076
2085
  protected _applyParent(parent: Node_2 | null): void;
2077
2086
 
2087
+ declare type TrianglePickingPredicate = (p0: Vector3, p1: Vector3, p2: Vector3, ray: Ray, i0: number, i1: number, i2: number) => boolean;
2088
+
2078
2089
  declare interface Vec3Like {
2079
2090
  x: number;
2080
2091
  y: number;
@@ -2212,4 +2223,13 @@ export declare function WaitForFullTileCacheUpdate(navMesh: unknown, _tileCache?
2212
2223
  declare class WebGPUEngine extends AbstractEngine {
2213
2224
  }
2214
2225
 
2226
+ /** Babylon.js `WebGPUEngineOptions` subset accepted by the compat engine. */
2227
+ declare interface WebGPUEngineOptions extends EngineOptions {
2228
+ antialias?: boolean;
2229
+ adaptToDeviceRatio?: boolean;
2230
+ useLargeWorldRendering?: boolean;
2231
+ canvasToneMapping?: GPUCanvasToneMapping;
2232
+ canvasColorSpace?: PredefinedColorSpace;
2233
+ }
2234
+
2215
2235
  export { }
package/navigation.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S as registerMeshAtStart, _ as Mesh, q as Vector3 } from "./meshes-Ds66ewr9.js";
1
+ import { D as registerMeshAtStart, Q as Vector3, b as Mesh } from "./meshes-BLcUDvXV.js";
2
2
  import { addAgent, addBoxObstacle, addCylinderObstacle, agentGoto, computePath, createDebugNavMeshGeometry, createMeshFromData, createNavCrowd, createNavMesh, createNavigationPluginAsync, getAgentPosition, getClosestPoint, raycast, removeObstacle, updateNavCrowd, updateNavMeshObstacles } from "@babylonjs/lite";
3
3
  //#region src/navigation/navigation.ts
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/lite-compat",
3
- "version": "1.32.0-preview",
3
+ "version": "1.34.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": "60048",
51
- "sourceVersion": "2e064d88ec7422af946f8ec7f089ac6519f99295",
52
- "builtAgainstLite": "1.32.0"
50
+ "azureBuildId": "60698",
51
+ "sourceVersion": "22bd82496ecbb38f7bbd4107ef5eca40c2897bd0",
52
+ "builtAgainstLite": "1.34.0"
53
53
  }
54
54
  }