@babylonjs/lite-compat 1.24.0-preview → 1.26.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 +1 -1
- package/index.d.ts +296 -23
- package/index.js +1105 -144
- package/index.js.map +1 -1
- package/{meshes-CidWpEh8.js → meshes-nWGELV98.js} +141 -37
- package/meshes-nWGELV98.js.map +1 -0
- package/navigation.d.ts +156 -5
- package/navigation.js +1 -1
- package/package.json +4 -4
- package/meshes-CidWpEh8.js.map +0 -1
package/navigation.d.ts
CHANGED
|
@@ -7,6 +7,9 @@ import { Mesh } from '@babylonjs/lite';
|
|
|
7
7
|
import { NavCrowd } from '@babylonjs/lite';
|
|
8
8
|
import { NavigationPlugin } from '@babylonjs/lite';
|
|
9
9
|
import { ObstacleHandle } from '@babylonjs/lite';
|
|
10
|
+
import { PhysicsMassProperties } from '@babylonjs/lite';
|
|
11
|
+
import { PhysicsShape as PhysicsShape_2 } from '@babylonjs/lite';
|
|
12
|
+
import { PhysicsShapeParameters } from '@babylonjs/lite';
|
|
10
13
|
import { PhysicsWorld } from '@babylonjs/lite';
|
|
11
14
|
import { RenderCanvas } from '@babylonjs/lite';
|
|
12
15
|
import { SceneNode } from '@babylonjs/lite';
|
|
@@ -155,6 +158,8 @@ declare class AbstractMesh extends TransformNode {
|
|
|
155
158
|
private _material;
|
|
156
159
|
set material(value: CompatMaterial | null);
|
|
157
160
|
get isVisible(): boolean;
|
|
158
161
|
set isVisible(value: boolean);
|
|
162
|
+
get isPickable(): boolean;
|
|
163
|
+
set isPickable(value: boolean);
|
|
159
164
|
get receiveShadows(): boolean;
|
|
160
165
|
set receiveShadows(value: boolean);
|
|
161
166
|
protected _onEffectiveEnabledStateChanged(enabled: boolean): void;
|
|
162
167
|
/**
|
|
@@ -479,7 +484,8 @@ declare class BoundingSphere {
|
|
|
479
484
|
private _worldMatrix;
|
|
480
485
|
constructor(min: Vector3, max: Vector3, worldMatrix?: Matrix);
|
|
481
486
|
reConstruct(min: Vector3, max: Vector3, worldMatrix?: Matrix): void;
|
|
482
|
-
getWorldMatrix(): Matrix;
|
|
483
487
|
intersectsPoint(point: Vector3): boolean;
|
|
488
|
+
getWorldMatrix(): Matrix;
|
|
489
|
+
scale(factor: number): this;
|
|
484
490
|
intersectsPoint(point: Vector3): boolean;
|
|
485
491
|
static Intersects(a: BoundingSphere, b: BoundingSphere): boolean;
|
|
486
492
|
}
|
|
487
493
|
|
|
@@ -778,6 +784,8 @@ declare class Matrix {
|
|
|
778
784
|
constructor();
|
|
779
785
|
set(index: number, value: number): this;
|
|
780
786
|
copyFrom(source: Matrix): this;
|
|
787
|
+
maximizeInPlace(other: Matrix): this;
|
|
788
|
+
maximizeInPlaceFromFloats(m0: number, m1: number, m2: number, m3: number, m4: number, m5: number, m6: number, m7: number, m8: number, m9: number, m10: number, m11: number, m12: number, m13: number, m14: number, m15: number): this;
|
|
781
789
|
clone(): Matrix;
|
|
782
790
|
asArray(): Float32Array;
|
|
783
791
|
toArray(): number[];
|
|
@@ -940,7 +948,8 @@ declare abstract class Node_2 {
|
|
|
940
948
|
/** Process-unique numeric id, assigned at construction. */
|
|
941
949
|
readonly uniqueId: number;
|
|
942
950
|
/** Free-form user data slot (Babylon.js `Node.metadata`). */
|
|
943
|
-
metadata: unknown;
|
|
944
951
|
protected constructor(name: string, scene?: Scene);
|
|
952
|
+
metadata: unknown;
|
|
953
|
+
readonly onDisposeObservable: Observable<Node_2>;
|
|
945
954
|
protected constructor(name: string, scene?: Scene);
|
|
946
955
|
/** The runtime class name (overridden by each subclass). */
|
|
947
956
|
getClassName(): string;
|
|
948
957
|
/** The scene this node belongs to, if any. */
|
|
@@ -1177,6 +1186,33 @@ declare class PBRSheenConfiguration {
|
|
|
1177
1186
|
getActiveTextures(): BaseTexture[];
|
|
1178
1187
|
}
|
|
1179
1188
|
|
|
1189
|
+
/** Babylon.js-shaped rigid body backed by a Babylon Lite physics body. */
|
|
1190
|
+
declare class PhysicsBody {
|
|
1180
1191
|
readonly transformNode: TransformNode;
|
|
1192
|
+
private _disableSync;
|
|
1193
|
+
readonly startAsleep: boolean;
|
|
1194
|
+
constructor(transformNode: TransformNode, motionType: PhysicsMotionType, startsAsleep: boolean, scene: Scene);
|
|
1181
1195
|
getClassName(): string;
|
|
1196
|
+
get disablePreStep(): boolean;
|
|
1197
|
+
set disablePreStep(value: boolean);
|
|
1198
|
+
get disableSync(): boolean;
|
|
1199
|
+
set disableSync(value: boolean);
|
|
1200
|
+
get motionType(): PhysicsMotionType;
|
|
1201
|
+
set shape(value: PhysicsShape | null);
|
|
1202
|
+
get shape(): PhysicsShape | null;
|
|
1203
|
+
setMotionType(value: PhysicsMotionType): void;
|
|
1204
|
+
getMotionType(): PhysicsMotionType;
|
|
1205
|
+
setPrestepType(value: PhysicsPrestepType): void;
|
|
1206
|
+
getPrestepType(): PhysicsPrestepType;
|
|
1207
|
+
setMassProperties(properties: PhysicsMassProperties): void;
|
|
1208
|
+
setLinearVelocity(value: Vec3Like_2): void;
|
|
1209
|
+
getLinearVelocity(): Vector3;
|
|
1210
|
+
getLinearVelocityToRef(result: Vector3): void;
|
|
1211
|
+
setAngularVelocity(value: Vec3Like_2): void;
|
|
1212
|
+
getAngularVelocity(): Vector3;
|
|
1213
|
+
getAngularVelocityToRef(result: Vector3): void;
|
|
1214
|
+
applyImpulse(impulse: Vec3Like_2, location: Vec3Like_2): void;
|
|
1215
|
+
applyForce(force: Vec3Like_2, location: Vec3Like_2): void;
|
|
1216
|
+
dispose(): void;
|
|
1217
|
+
|
|
1182
1218
|
/**
|
|
1183
1219
|
* Babylon.js-shaped Physics V2 engine wrapper returned by
|
|
1184
1220
|
* {@link Scene.getPhysicsEngine}. Holds the active {@link HavokPlugin} and the
|
|
@@ -1199,6 +1235,80 @@ declare class PhysicsEngine {
|
|
|
1199
1235
|
/** Current world gravity. */
|
|
1200
1236
|
dispose(): void;
|
|
1201
1237
|
}
|
|
1202
1238
|
|
|
1239
|
+
declare interface PhysicShapeOptions {
|
|
1240
|
+
type?: PhysicsShapeType;
|
|
1241
|
+
parameters?: PhysicsShapeParameters;
|
|
1242
|
+
pluginData?: PhysicsShape_2;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
declare interface PhysicsMaterial {
|
|
1246
|
+
friction?: number;
|
|
1247
|
+
staticFriction?: number;
|
|
1248
|
+
restitution?: number;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
/** How a body moves. Values match Babylon.js `PhysicsMotionType`. */
|
|
1252
|
+
declare enum PhysicsMotionType {
|
|
1253
|
+
STATIC = 0,
|
|
1254
|
+
ANIMATED = 1,
|
|
1255
|
+
DYNAMIC = 2
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
/** How a moved transform node is propagated to its body before each step. Values match Babylon.js `PhysicsPrestepType`. */
|
|
1259
|
+
declare enum PhysicsPrestepType {
|
|
1260
|
+
DISABLED = 0,
|
|
1261
|
+
TELEPORT = 1,
|
|
1262
|
+
ACTION = 2
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
/** Babylon.js-shaped collision shape backed by a Babylon Lite physics shape. */
|
|
1266
|
+
declare class PhysicsShape {
|
|
1203
1267
|
constructor(options: PhysicShapeOptions, scene: Scene);
|
|
1204
1268
|
getClassName(): string;
|
|
1269
|
+
get type(): PhysicsShapeType;
|
|
1270
|
+
set filterMembershipMask(value: number);
|
|
1271
|
+
get filterMembershipMask(): number;
|
|
1272
|
+
set filterCollideMask(value: number);
|
|
1273
|
+
get filterCollideMask(): number;
|
|
1274
|
+
set material(value: PhysicsMaterial);
|
|
1275
|
+
get material(): PhysicsMaterial;
|
|
1276
|
+
set isTrigger(value: boolean);
|
|
1277
|
+
get isTrigger(): boolean;
|
|
1278
|
+
dispose(): void;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
/** The type of a Havok physics collision shape. Values match Babylon.js `PhysicsShapeType`. */
|
|
1282
|
+
declare enum PhysicsShapeType {
|
|
1283
|
+
SPHERE = 0,
|
|
1284
|
+
CAPSULE = 1,
|
|
1285
|
+
CYLINDER = 2,
|
|
1286
|
+
BOX = 3,
|
|
1287
|
+
CONVEX_HULL = 4,
|
|
1288
|
+
CONTAINER = 5,
|
|
1289
|
+
MESH = 6,
|
|
1290
|
+
HEIGHTFIELD = 7
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
/** Babylon.js-compatible result of a scene pick. */
|
|
1294
|
+
declare class PickingInfo {
|
|
1295
|
+
hit: boolean;
|
|
1296
|
+
distance: number;
|
|
1297
|
+
pickedPoint: Vector3 | null;
|
|
1298
|
+
pickedMesh: TransformNode | null;
|
|
1299
|
+
bu: number;
|
|
1300
|
+
bv: number;
|
|
1301
|
+
faceId: number;
|
|
1302
|
+
subMeshFaceId: number;
|
|
1303
|
+
subMeshId: number;
|
|
1304
|
+
pickedSprite: null;
|
|
1305
|
+
thinInstanceIndex: number;
|
|
1306
|
+
ray: Ray | null;
|
|
1307
|
+
originMesh: TransformNode | null;
|
|
1308
|
+
aimTransform: TransformNode | null;
|
|
1309
|
+
gripTransform: TransformNode | null;
|
|
1310
|
+
private _normal;
|
|
1311
|
+
private _worldNormal;
|
|
1205
1312
|
getNormal(useWorldCoordinates?: boolean, _useVerticesNormals?: boolean): Vector3 | null;
|
|
1313
|
+
getTextureCoordinates(_uvSet?: string): Vector2 | null;
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1206
1316
|
declare class Plane {
|
|
1207
1317
|
/** Normal x/y/z and signed distance `d` from the origin (`normal · p + d = 0`). */
|
|
1208
1318
|
normal: Vector3;
|
|
@@ -1265,6 +1375,20 @@ declare class Quaternion {
|
|
|
1265
1375
|
static Slerp(left: Quaternion, right: Quaternion, amount: number): Quaternion;
|
|
1266
1376
|
}
|
|
1267
1377
|
|
|
1378
|
+
declare class Ray {
|
|
1379
|
+
origin: Vector3;
|
|
1380
|
+
direction: Vector3;
|
|
1381
|
+
length: number;
|
|
1382
|
+
constructor(origin: Vector3, direction: Vector3, length?: number);
|
|
1383
|
+
clone(): Ray;
|
|
1384
|
+
/** Distance at which this ray crosses `plane`, or `null` if parallel / behind. */
|
|
1385
|
+
intersectsPlane(plane: Plane): number | null;
|
|
1386
|
+
/** True if this ray passes within `sphereRadius` of `spherePosition`. */
|
|
1387
|
+
intersectsSphere(spherePosition: Vector3, sphereRadius: number): boolean;
|
|
1388
|
+
static Zero(): Ray;
|
|
1389
|
+
static CreateNew(x: number, y: number, z: number, dx: number, dy: number, dz: number, length?: number): Ray;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1268
1392
|
/**
|
|
1269
1393
|
* Babylon.js `RecastJSCrowd` (subset) — owns crowd agents and syncs each agent's
|
|
1270
1394
|
* Babylon transform to the simulated position every frame, exactly like the addon.
|
|
@@ -1492,8 +1616,8 @@ declare class Scene extends AbstractScene {
|
|
|
1492
1616
|
/** Babylon.js fog-mode constant
|
|
1493
1617
|
isReady(): boolean;
|
|
1494
1618
|
/** Synchronous CPU picking — unsupported. Babylon Lite uses async GPU picking. */
|
|
1495
1619
|
pick(): never;
|
|
1496
|
-
/** Synchronous ray picking — unsupported. */
|
|
1497
|
-
pickWithRay(): never;
|
|
1498
1620
|
/**
|
|
1621
|
+
/** Synchronous CPU ray picking over Babylon Lite's scene-mesh picker. */
|
|
1622
|
+
pickWithRay(ray: Ray, predicate?: (mesh: TransformNode) => boolean, fastCheck?: boolean, trianglePredicate?: (p0: Vector3, p1: Vector3, p2: Vector3, ray: Ray) => boolean): PickingInfo;
|
|
1499
1623
|
/**
|
|
1500
1624
|
* Babylon.js `scene.enablePhysics(gravity, plugin)`. Wires the given Havok V2
|
|
1501
1625
|
* {@link HavokPlugin} to this scene, creating the native Lite physics world and
|
|
1502
1626
|
* registering per-frame stepping. The plugin's `useDeltaForWorldStep` flag
|
|
@@ -1587,7 +1711,7 @@ declare interface TextureLike {
|
|
|
1587
1711
|
* Wraps a Lite scene node (`_node`): either a standalone Lite transform node, or
|
|
1588
1712
|
* (for meshes) the Lite mesh itself, which also carries the transform.
|
|
1589
1713
|
*/
|
|
1590
|
-
declare class TransformNode extends Node_2 {
|
|
1591
1714
|
constructor(name: string, scene?: Scene, liteNode?: SceneNode);
|
|
1715
|
+
declare class TransformNode extends Node_2 {
|
|
1592
1716
|
physicsBody: PhysicsBody | null;
|
|
1593
1717
|
constructor(name: string, scene?: Scene, liteNode?: SceneNode);
|
|
1594
1718
|
getClassName(): string;
|
|
1595
1719
|
get position(): Vector3;
|
|
1596
1720
|
set position(value: Vector3);
|
|
@@ -1624,6 +1748,33 @@ declare interface Vec3Like_2 {
|
|
|
1624
1748
|
z: number;
|
|
1625
1749
|
}
|
|
1626
1750
|
|
|
1751
|
+
declare class Vector2 {
|
|
1752
|
+
x: number;
|
|
1753
|
+
y: number;
|
|
1754
|
+
constructor(x?: number, y?: number);
|
|
1755
|
+
set(x: number, y: number): this;
|
|
1756
|
+
copyFrom(source: Vector2): this;
|
|
1757
|
+
copyFromFloats(x: number, y: number): this;
|
|
1758
|
+
add(other: Vector2): Vector2;
|
|
1759
|
+
addInPlace(other: Vector2): this;
|
|
1760
|
+
subtract(other: Vector2): Vector2;
|
|
1761
|
+
scale(scale: number): Vector2;
|
|
1762
|
+
scaleInPlace(scale: number): this;
|
|
1763
|
+
length(): number;
|
|
1764
|
+
lengthSquared(): number;
|
|
1765
|
+
normalize(): this;
|
|
1766
|
+
normalizeToRef<T extends {
|
|
1767
|
+
x: number;
|
|
1768
|
+
y: number;
|
|
1769
|
+
}>(result: T): T;
|
|
1770
|
+
clone(): Vector2;
|
|
1771
|
+
equals(other: Vector2): boolean;
|
|
1772
|
+
asArray(): [number, number];
|
|
1773
|
+
static Zero(): Vector2;
|
|
1774
|
+
static One(): Vector2;
|
|
1775
|
+
static Dot(a: Vector2, b: Vector2): number;
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1627
1778
|
declare class Vector3 {
|
|
1628
1779
|
x: number;
|
|
1629
1780
|
y: number;
|
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,
|
|
5
|
+
import { V as Vector3, c as Mesh } from "./meshes-nWGELV98.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.26.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": "58678",
|
|
51
|
+
"sourceVersion": "69c8588f39454f94b6c1657193672cee9f03ee0e",
|
|
52
|
+
"builtAgainstLite": "1.26.0"
|
|
53
53
|
}
|
|
54
54
|
}
|