@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 CHANGED
@@ -134,7 +134,7 @@ overloads within a supported area may still be absent.
134
134
  | Behaviors / Actions (`AutoRotation`, `Framing`, `ActionManager`, conditions) | ⚡ | `ActionManager` is manual-dispatch; drag / six-DoF / XR-oriented mesh behaviors throw |
135
135
  | Misc (`Observable`, `Tools`, `SmartArray`, `Tags`, gradients, `PerformanceMonitor`) | ✅ | |
136
136
  | Audio V2 (`AudioEngineV2`, `StaticSound`, `StreamingSound`, `AudioBus`, buses/sources/analyzer) | ⚡ | over Lite's AudioV2 port; `MainAudioBus` spatial/analyzer and a second main bus unsupported |
137
- | Physics (`HavokPlugin`, `scene.enablePhysics`/`getPhysicsEngine`, `PhysicsShapeType`/`PhysicsMotionType`) | ⚡ | Havok V2 over Lite `createHavokWorld`; refresh-rate-independent `useDeltaForWorldStep`. Bodies via native `createPhysicsAggregate` (`PhysicsAggregate` class not wrapped) |
137
+ | Physics (`HavokPlugin`, `scene.enablePhysics`/`getPhysicsEngine`, `PhysicsAggregate`/`PhysicsBody`/`PhysicsShape`) | ⚡ | Native Havok V2 forwarding for common body/shape operations; unrecognized shape/motion/prestep enum values throw at the compat boundary |
138
138
  | Particles (`NodeParticleSystemSet` / `ParticleSystemSet` — Node Particle Editor) | ⚡ | NPE snippet/JSON graphs: `Parse`/`ParseFromSnippetAsync` → `buildAsync` → `start`, incl. per-system `set.systems[i]` runtime (`start`/`animate`/`updateSpeed`/`particleTexture`). Imperative classic/GPU/solid `ParticleSystem` construction + programmatic block authoring unsupported |
139
139
  | Post-processes, layers (glow/highlight), probes, WebXR | ❌ | not in Babylon Lite — use native Lite `create*Task` functions |
140
140
 
package/index.d.ts CHANGED
@@ -8,6 +8,9 @@ import { EngineOptions } from '@babylonjs/lite';
8
8
  import { IridescenceProps } from '@babylonjs/lite';
9
9
  import { LineMaterial } from '@babylonjs/lite';
10
10
  import { Mesh as Mesh_2 } from '@babylonjs/lite';
11
+ import { PhysicsMassProperties } from '@babylonjs/lite';
12
+ import { PhysicsShape as PhysicsShape_2 } from '@babylonjs/lite';
13
+ import { PhysicsShapeParameters } from '@babylonjs/lite';
11
14
  import { PhysicsWorld } from '@babylonjs/lite';
12
15
  import { RenderCanvas } from '@babylonjs/lite';
13
16
  import { SceneNode } from '@babylonjs/lite';
@@ -243,6 +246,8 @@ export declare class AbstractMesh extends TransformNode {
243
246
  private _material;
244
247
  set material(value: CompatMaterial | null);
245
248
  get isVisible(): boolean;
246
249
  set isVisible(value: boolean);
250
+ get isPickable(): boolean;
251
+ set isPickable(value: boolean);
247
252
  get receiveShadows(): boolean;
248
253
  set receiveShadows(value: boolean);
249
254
  protected _onEffectiveEnabledStateChanged(enabled: boolean): void;
250
255
  /**
@@ -795,6 +800,7 @@ export declare class AssetContainer {
795
800
  constructor(lite: AssetContainer_2);
796
801
  * same handles `scene.meshes` exposes.
797
802
  */
798
803
  get meshes(): Mesh[];
804
+ get skeletons(): Skeleton[];
799
805
  /** Add every entity, animation group, camera, and clear colour to the scene. */
800
806
  addAllToScene(scene: Scene): void;
801
807
  dispose(): void;
@@ -1014,7 +1020,15 @@ export declare const BloomEffect: new () => never;
1014
1020
  export declare const BlurPostProcess: new () => never;
1015
1021
 
1016
1022
  export declare class Bone {
1017
- constructor();
1023
+ private _enabled;
1024
+ readonly name: string;
1018
1025
  constructor(_name?: string, _skeleton?: Skeleton);
1019
1026
  getName(): string;
1027
+ getSkeleton(): Skeleton;
1028
+ setPosition(position: Vector3, space?: number): this;
1029
+ setRotationQuaternion(rotation: Quaternion, space?: number): this;
1030
+ setScale(scale: Vector3): this;
1031
+ setEnabled(value: boolean): void;
1032
+ isEnabled(): boolean;
1033
+ returnToRest(): void;
1020
1034
  }
1021
1035
 
1022
1036
  export declare class BounceEase extends EasingFunction {
@@ -1106,7 +1120,8 @@ export declare class BoundingSphere {
1106
1120
  private _worldMatrix;
1107
1121
  constructor(min: Vector3, max: Vector3, worldMatrix?: Matrix);
1108
1122
  reConstruct(min: Vector3, max: Vector3, worldMatrix?: Matrix): void;
1109
- getWorldMatrix(): Matrix;
1110
1123
  intersectsPoint(point: Vector3): boolean;
1124
+ getWorldMatrix(): Matrix;
1125
+ scale(factor: number): this;
1111
1126
  intersectsPoint(point: Vector3): boolean;
1112
1127
  static Intersects(a: BoundingSphere, b: BoundingSphere): boolean;
1113
1128
  }
1114
1129
 
@@ -1173,6 +1188,27 @@ declare interface CellSize {
1173
1188
  height: number;
1174
1189
  }
1175
1190
 
1191
+ export declare interface CharacterShapeOptions {
1192
+ shape?: PhysicsShape;
1193
+ capsuleHeight?: number;
1194
+ capsuleRadius?: number;
1195
+ }
1196
+
1197
+ /** Contact state of a physics character against its supporting surface. */
1198
+ export declare enum CharacterSupportedState {
1199
+ UNSUPPORTED = 0,
1200
+ SLIDING = 1,
1201
+ SUPPORTED = 2
1202
+ }
1203
+
1204
+ export declare interface CharacterSurfaceInfo {
1205
+ isSurfaceDynamic: boolean;
1206
+ supportedState: CharacterSupportedState;
1207
+ averageSurfaceNormal: Vector3;
1208
+ averageSurfaceVelocity: Vector3;
1209
+ averageAngularSurfaceVelocity: Vector3;
1210
+ }
1211
+
1176
1212
  export declare const ChromaticAberrationPostProcess: new () => never;
1177
1213
 
1178
1214
  export declare class CircleEase extends EasingFunction {
@@ -2262,6 +2298,13 @@ export declare interface IAudioParameterRampOptions {
2262
2298
  shape: AudioParameterRampShape;
2263
2299
  }
2264
2300
 
2301
+ export declare interface ICharacterControllerCollisionEvent {
2302
+ collider: PhysicsBody;
2303
+ colliderIndex: number;
2304
+ impulse: Vector3;
2305
+ impulsePosition: Vector3;
2306
+ }
2307
+
2265
2308
  /** Babylon.js `ICreateTexture2DArrayFromImageUrlsOptions`. */
2266
2309
  export declare interface ICreateTexture2DArrayFromImageUrlsOptions extends IUploadImageToTexture2DArrayLayerOptions {
2267
2310
  /** Generate a full mip chain (true by default). */
@@ -2355,7 +2398,7 @@ export declare function ImportMeshAsync(source: string, scene: Scene, _options?:
2355
2398
  declare interface ImportResult {
2356
2399
  meshes: TransformNode[];
2357
2400
  particleSystems: unknown[];
2358
- skeletons: unknown[];
2401
+ skeletons: Skeleton[];
2359
2402
  animationGroups: AnimationGroup_2[];
2360
2403
  transformNodes: unknown[];
2361
2404
  lights: unknown[];
@@ -2735,6 +2778,8 @@ export declare class Matrix {
2735
2778
  constructor();
2736
2779
  set(index: number, value: number): this;
2737
2780
  copyFrom(source: Matrix): this;
2781
+ maximizeInPlace(other: Matrix): this;
2782
+ 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;
2738
2783
  clone(): Matrix;
2739
2784
  asArray(): Float32Array;
2740
2785
  toArray(): number[];
@@ -2976,7 +3021,8 @@ declare abstract class Node_2 {
2976
3021
  /** Process-unique numeric id, assigned at construction. */
2977
3022
  readonly uniqueId: number;
2978
3023
  /** Free-form user data slot (Babylon.js `Node.metadata`). */
2979
- metadata: unknown;
2980
3024
  protected constructor(name: string, scene?: Scene);
3025
+ metadata: unknown;
3026
+ readonly onDisposeObservable: Observable<Node_2>;
2981
3027
  protected constructor(name: string, scene?: Scene);
2982
3028
  /** The runtime class name (overridden by each subclass). */
2983
3029
  getClassName(): string;
2984
3030
  /** The scene this node belongs to, if any. */
@@ -3453,12 +3499,121 @@ export declare class PerformanceMonitor {
3453
3499
  reset(): void;
3454
3500
  }
3455
3501
 
3502
+ /** Babylon.js aggregate convenience object backed by Lite's native aggregate factory. */
3456
3503
  export declare class PhysicsAggregate {
3457
- constructor();
3504
+ readonly transformNode: TransformNode;
3505
+ readonly type: PhysicsShapeType | PhysicsShape;
3506
+ readonly body: PhysicsBody;
3507
+ readonly shape: PhysicsShape;
3508
+ readonly material: PhysicsMaterial;
3458
3509
  constructor(transformNode: TransformNode, type: PhysicsShapeType | PhysicsShape, options?: PhysicsAggregateParameters, scene?: Scene);
3510
+ dispose(): void;
3459
3511
  }
3460
3512
 
3461
- export declare class PhysicsBody {
3462
- constructor();
3513
+ export declare interface PhysicsAggregateParameters {
3514
+ mass: number;
3515
+ friction?: number;
3516
+ staticFriction?: number;
3517
+ restitution?: number;
3518
+ radius?: number;
3519
+ pointA?: Vec3Like;
3520
+ pointB?: Vec3Like;
3521
+ extents?: Vec3Like;
3522
+ rotation?: {
3523
+ x: number;
3524
+ y: number;
3525
+ z: number;
3526
+ w: number;
3527
+ };
3528
+ center?: Vec3Like;
3529
+ mesh?: Mesh;
3530
+ startAsleep?: boolean;
3531
+ isTriggerShape?: boolean;
3532
+ }
3533
+
3534
+ /** Babylon.js-shaped rigid body backed by a Babylon Lite physics body. */
3535
+ export declare class PhysicsBody {
3463
3536
  readonly transformNode: TransformNode;
3537
+ private _disableSync;
3538
+ readonly startAsleep: boolean;
3539
+ constructor(transformNode: TransformNode, motionType: PhysicsMotionType, startsAsleep: boolean, scene: Scene);
3464
3540
  getClassName(): string;
3541
+ get disablePreStep(): boolean;
3542
+ set disablePreStep(value: boolean);
3543
+ get disableSync(): boolean;
3544
+ set disableSync(value: boolean);
3545
+ get motionType(): PhysicsMotionType;
3546
+ set shape(value: PhysicsShape | null);
3547
+ get shape(): PhysicsShape | null;
3548
+ setMotionType(value: PhysicsMotionType): void;
3549
+ getMotionType(): PhysicsMotionType;
3550
+ setPrestepType(value: PhysicsPrestepType): void;
3551
+ getPrestepType(): PhysicsPrestepType;
3552
+ setMassProperties(properties: PhysicsMassProperties): void;
3553
+ setLinearVelocity(value: Vec3Like): void;
3554
+ getLinearVelocity(): Vector3;
3555
+ getLinearVelocityToRef(result: Vector3): void;
3556
+ setAngularVelocity(value: Vec3Like): void;
3557
+ getAngularVelocity(): Vector3;
3558
+ getAngularVelocityToRef(result: Vector3): void;
3559
+ applyImpulse(impulse: Vec3Like, location: Vec3Like): void;
3560
+ applyForce(force: Vec3Like, location: Vec3Like): void;
3561
+ dispose(): void;
3562
+
3563
+ /**
3564
+ * Babylon.js-shaped character controller backed by Lite's native, tree-shakeable
3565
+ * Havok character controller.
3566
+ */
3567
+ export declare class PhysicsCharacterController {
3465
3568
  readonly onTriggerCollisionObservable: Observable<ICharacterControllerCollisionEvent>;
3569
+ private _shape;
3570
+ private _up;
3571
+ private _maxStepHeight;
3572
+ private _footOffset;
3573
+ private _disposed;
3574
+ constructor(position: Vector3, characterShapeOptions: CharacterShapeOptions, scene: Scene);
3575
+ get shape(): PhysicsShape;
3576
+ set shape(_value: PhysicsShape);
3577
+ get shapeOptions(): CharacterShapeOptions;
3578
+ setShapeOptions(options: CharacterShapeOptions, preserveFootPosition?: boolean): void;
3579
+ getPosition(): Vector3;
3580
+ setPosition(position: Vector3): void;
3581
+ getVelocity(): Vector3;
3582
+ setVelocity(velocity: Vector3): void;
3583
+ moveWithCollisions(displacement: Vector3): void;
3584
+ integrate(deltaTime: number, surfaceInfo: CharacterSurfaceInfo, gravity: Vector3): void;
3585
+ checkSupport(deltaTime: number, direction: Vector3): CharacterSurfaceInfo;
3586
+ checkSupportToRef(deltaTime: number, direction: Vector3, result: CharacterSurfaceInfo): void;
3587
+ calculateMovement(deltaTime: number, forwardWorld: Vector3, surfaceNormal: Vector3, currentVelocity: Vector3, surfaceVelocity: Vector3, desiredVelocity: Vector3, upWorld: Vector3): Vector3;
3588
+ calculateMovementToRef(deltaTime: number, forwardWorld: Vector3, surfaceNormal: Vector3, currentVelocity: Vector3, surfaceVelocity: Vector3, desiredVelocity: Vector3, upWorld: Vector3, result: Vector3): boolean;
3589
+ dispose(): void;
3590
+ get up(): Vector3;
3591
+ set up(value: Vector3);
3592
+ get maxStepHeight(): number;
3593
+ set maxStepHeight(value: number);
3594
+ get footOffset(): number;
3595
+ set footOffset(value: number);
3596
+ private _notifyCollision;
3597
+ get keepDistance(): number;
3598
+ set keepDistance(value: number);
3599
+ get keepContactTolerance(): number;
3600
+ set keepContactTolerance(value: number);
3601
+ get maxCastIterations(): number;
3602
+ set maxCastIterations(value: number);
3603
+ get penetrationRecoverySpeed(): number;
3604
+ set penetrationRecoverySpeed(value: number);
3605
+ get staticFriction(): number;
3606
+ set staticFriction(value: number);
3607
+ get dynamicFriction(): number;
3608
+ set dynamicFriction(value: number);
3609
+ get maxSlopeCosine(): number;
3610
+ set maxSlopeCosine(value: number);
3611
+ get maxCharacterSpeedForSolver(): number;
3612
+ set maxCharacterSpeedForSolver(value: number);
3613
+ get characterStrength(): number;
3614
+ set characterStrength(value: number);
3615
+ get acceleration(): number;
3616
+ set acceleration(value: number);
3617
+ get maxAcceleration(): number;
3618
+ set maxAcceleration(value: number);
3619
+ get characterMass(): number;
3620
+ set characterMass(value: number);
3466
3621
  }
3467
3622
 
3468
3623
  /** Type of a Physics V2 constraint. Values match Babylon.js `PhysicsConstraintType`. */
@@ -3494,6 +3649,18 @@ export declare class PhysicsEngine {
3494
3649
  /** Current world gravity. */
3495
3650
  dispose(): void;
3496
3651
  }
3497
3652
 
3653
+ export declare interface PhysicShapeOptions {
3654
+ type?: PhysicsShapeType;
3655
+ parameters?: PhysicsShapeParameters;
3656
+ pluginData?: PhysicsShape_2;
3657
+ }
3658
+
3659
+ export declare interface PhysicsMaterial {
3660
+ friction?: number;
3661
+ staticFriction?: number;
3662
+ restitution?: number;
3663
+ }
3664
+
3498
3665
  /** How a body moves. Values match Babylon.js `PhysicsMotionType`. */
3499
3666
  export declare enum PhysicsMotionType {
3500
3667
  STATIC = 0,
@@ -3508,8 +3675,18 @@ export declare enum PhysicsPrestepType {
3508
3675
  ACTION = 2
3509
3676
  }
3510
3677
 
3511
- export declare class PhysicsShape {
3512
- constructor();
3678
+ /** Babylon.js-shaped collision shape backed by a Babylon Lite physics shape. */
3679
+ export declare class PhysicsShape {
3513
3680
  constructor(options: PhysicShapeOptions, scene: Scene);
3514
3681
  getClassName(): string;
3682
+ get type(): PhysicsShapeType;
3683
+ set filterMembershipMask(value: number);
3684
+ get filterMembershipMask(): number;
3685
+ set filterCollideMask(value: number);
3686
+ get filterCollideMask(): number;
3687
+ set material(value: PhysicsMaterial);
3688
+ get material(): PhysicsMaterial;
3689
+ set isTrigger(value: boolean);
3690
+ get isTrigger(): boolean;
3691
+ dispose(): void;
3515
3692
  }
3516
3693
 
3517
3694
  /** The type of a Havok physics collision shape. Values match Babylon.js `PhysicsShapeType`. */
@@ -3527,6 +3704,28 @@ export declare enum PhysicsShapeType {
3527
3704
  /** A pickable compat mesh: a regular `Mesh` or a `GaussianSplattingMesh`. */
3528
3705
  declare type PickableMesh = Mesh | GaussianSplattingMesh;
3529
3706
 
3707
+ /** Babylon.js-compatible result of a scene pick. */
3708
+ export declare class PickingInfo {
3709
+ hit: boolean;
3710
+ distance: number;
3711
+ pickedPoint: Vector3 | null;
3712
+ pickedMesh: TransformNode | null;
3713
+ bu: number;
3714
+ bv: number;
3715
+ faceId: number;
3716
+ subMeshFaceId: number;
3717
+ subMeshId: number;
3718
+ pickedSprite: null;
3719
+ thinInstanceIndex: number;
3720
+ ray: Ray | null;
3721
+ originMesh: TransformNode | null;
3722
+ aimTransform: TransformNode | null;
3723
+ gripTransform: TransformNode | null;
3724
+ private _normal;
3725
+ private _worldNormal;
3530
3726
  getNormal(useWorldCoordinates?: boolean, _useVerticesNormals?: boolean): Vector3 | null;
3727
+ getTextureCoordinates(_uvSet?: string): Vector2 | null;
3728
+ }
3729
+
3531
3730
  declare type PickListItem = PickableMesh | {
3532
3731
  mesh: PickableMesh;
3533
3732
  material?: unknown;
@@ -3600,6 +3799,44 @@ export declare class PointsCloudSystem {
3600
3799
  constructor();
3601
3800
  }
3602
3801
 
3802
+ /** Babylon.js-compatible polar-coordinate value object. */
3803
+ export declare class Polar {
3804
+ radius: number;
3805
+ theta: number;
3806
+ constructor(radius: number, theta: number);
3807
+ getClassName(): string;
3808
+ toString(): string;
3809
+ asArray(): number[];
3810
+ addToRef(polar: Polar, ref: Polar): Polar;
3811
+ add(polar: Polar): Polar;
3812
+ addInPlace(polar: Polar): this;
3813
+ addInPlaceFromFloats(radius: number, theta: number): this;
3814
+ subtractToRef(polar: Polar, ref: Polar): Polar;
3815
+ subtract(polar: Polar): Polar;
3816
+ subtractInPlace(polar: Polar): this;
3817
+ subtractFromFloatsToRef(radius: number, theta: number, ref: Polar): Polar;
3818
+ subtractFromFloats(radius: number, theta: number): Polar;
3819
+ multiplyToRef(polar: Polar, ref: Polar): Polar;
3820
+ multiply(polar: Polar): Polar;
3821
+ multiplyInPlace(polar: Polar): this;
3822
+ divideToRef(polar: Polar, ref: Polar): Polar;
3823
+ divide(polar: Polar): Polar;
3824
+ divideInPlace(polar: Polar): this;
3825
+ clone(): Polar;
3826
+ copyFrom(source: Polar): this;
3827
+ copyFromFloats(radius: number, theta: number): this;
3828
+ scaleToRef(scale: number, ref: Polar): Polar;
3829
+ scale(scale: number): Polar;
3830
+ scaleInPlace(scale: number): this;
3831
+ set(radius: number, theta: number): this;
3832
+ setAll(value: number): this;
3833
+ toVector2ToRef(ref: Vector2): Vector2;
3834
+ toVector2(): Vector2;
3835
+ static FromVector2ToRef(vector: Vector2, ref: Polar): Polar;
3836
+ static FromVector2(vector: Vector2): Polar;
3837
+ static FromArray(array: number[]): Polar;
3838
+ }
3839
+
3603
3840
  export declare class PositionGizmo extends GizmoBase {
3604
3841
  private _attached;
3605
3842
  private _xGizmo;
3606
3843
  private _yGizmo;
@@ -4052,8 +4289,8 @@ export declare class Scene extends AbstractScene {
4052
4289
  /** Babylon.js fog-mode c
4053
4290
  isReady(): boolean;
4054
4291
  /** Synchronous CPU picking — unsupported. Babylon Lite uses async GPU picking. */
4055
4292
  pick(): never;
4056
- /** Synchronous ray picking — unsupported. */
4057
- pickWithRay(): never;
4058
4293
  /**
4294
+ /** Synchronous CPU ray picking over Babylon Lite's scene-mesh picker. */
4295
+ pickWithRay(ray: Ray, predicate?: (mesh: TransformNode) => boolean, fastCheck?: boolean, trianglePredicate?: (p0: Vector3, p1: Vector3, p2: Vector3, ray: Ray) => boolean): PickingInfo;
4059
4296
  /**
4060
4297
  * Babylon.js `scene.enablePhysics(gravity, plugin)`. Wires the given Havok V2
4061
4298
  * {@link HavokPlugin} to this scene, creating the native Lite physics world and
4062
4299
  * registering per-frame stepping. The plugin's `useDeltaForWorldStep` flag
@@ -4211,18 +4448,11 @@ export declare class Size {
4211
4448
  static Zero(): Size;
4212
4449
  }
4213
4450
 
4214
- /**
4215
- * Throwing stubs for additional Babylon.js core/loaders symbols that Babylon
4216
- * Lite either does not implement, or exposes only through a different native API
4217
- * that the compat layer does not wrap 1:1.
4218
- *
4219
- * Every stub throws {@link LiteCompatError} on use with a pointer to the native
4220
- * Babylon Lite alternative where one exists. This keeps the completeness
4221
- * invariant — every core/loaders symbol resolves to an import and fails loudly
4222
- * rather than silently.
4223
- */
4224
4451
  export declare class Skeleton {
4225
- constructor();
4452
+ readonly name: string;
4453
+ readonly id: string;
4454
+ readonly bones: Bone[];
4226
4455
  constructor(_name?: string, _id?: string, _scene?: Scene);
4227
4456
  getBoneIndexByName(name: string): number;
4457
+ getBoneByName(name: string): Bone | null;
4228
4458
  }
4229
4459
 
4230
4460
  /**
@@ -4316,6 +4546,45 @@ declare interface SphereOptions {
4316
4546
  segments?: number;
4317
4547
  }
4318
4548
 
4549
+ /** Babylon.js-compatible spherical-coordinate value object. */
4550
+ export declare class Spherical {
4551
+ radius: number;
4552
+ theta: number;
4553
+ phi: number;
4554
+ constructor(radius: number, theta: number, phi: number);
4555
+ getClassName(): string;
4556
+ toString(): string;
4557
+ asArray(): number[];
4558
+ addToRef(spherical: Spherical, ref: Spherical): Spherical;
4559
+ add(spherical: Spherical): Spherical;
4560
+ addInPlace(spherical: Spherical): this;
4561
+ addInPlaceFromFloats(radius: number, theta: number, phi: number): this;
4562
+ subtractToRef(spherical: Spherical, ref: Spherical): Spherical;
4563
+ subtract(spherical: Spherical): Spherical;
4564
+ subtractInPlace(spherical: Spherical): this;
4565
+ subtractFromFloatsToRef(radius: number, theta: number, phi: number, ref: Spherical): Spherical;
4566
+ subtractFromFloats(radius: number, theta: number, phi: number): Spherical;
4567
+ multiplyToRef(spherical: Spherical, ref: Spherical): Spherical;
4568
+ multiply(spherical: Spherical): Spherical;
4569
+ multiplyInPlace(spherical: Spherical): this;
4570
+ divideToRef(spherical: Spherical, ref: Spherical): Spherical;
4571
+ divide(spherical: Spherical): Spherical;
4572
+ divideInPlace(spherical: Spherical): this;
4573
+ clone(): Spherical;
4574
+ copyFrom(source: Spherical): this;
4575
+ copyFromFloats(radius: number, theta: number, phi: number): this;
4576
+ scaleToRef(scale: number, ref: Spherical): Spherical;
4577
+ scale(scale: number): Spherical;
4578
+ scaleInPlace(scale: number): this;
4579
+ set(radius: number, theta: number, phi: number): this;
4580
+ setAll(value: number): this;
4581
+ toVector3ToRef(ref: Vector3): Vector3;
4582
+ toVector3(): Vector3;
4583
+ static FromVector3ToRef(vector: Vector3, ref: Spherical): Spherical;
4584
+ static FromVector3(vector: Vector3): Spherical;
4585
+ static FromArray(array: number[]): Spherical;
4586
+ }
4587
+
4319
4588
  export declare class SpotLight extends Light {
4320
4589
  constructor(name: string, position: Vector3, direction: Vector3, angle: number, exponent: number, scene?: Scene);
4321
4590
  getClassName(): string;
4322
4591
  get angle(): number;
@@ -4773,7 +5042,7 @@ export declare function transformCoordinates(vector: Vector3, transformation: Ma
4773
5042
  * Wraps a Lite scene node (`_node`): either a standalone Lite transform node, or
4774
5043
  * (for meshes) the Lite mesh itself, which also carries the transform.
4775
5044
  */
4776
- export declare class TransformNode extends Node_2 {
4777
5045
  constructor(name: string, scene?: Scene, liteNode?: SceneNode);
5046
+ export declare class TransformNode extends Node_2 {
4778
5047
  physicsBody: PhysicsBody | null;
4779
5048
  constructor(name: string, scene?: Scene, liteNode?: SceneNode);
4780
5049
  getClassName(): string;
4781
5050
  get position(): Vector3;
4782
5051
  set position(value: Vector3);
@@ -4865,6 +5134,10 @@ export declare class Vector2 {
4865
5134
  length(): number;
4866
5135
  lengthSquared(): number;
4867
5136
  normalize(): this;
5137
+ normalizeToRef<T extends {
5138
+ x: number;
5139
+ y: number;
5140
+ }>(result: T): T;
4868
5141
  clone(): Vector2;
4869
5142
  equals(other: Vector2): boolean;
4870
5143
  asArray(): [number, number];