@babylonjs/lite-compat 1.31.0-preview → 1.31.1-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
@@ -127,6 +127,11 @@ declare abstract class AbstractEngine {
127
127
  * scoped API cannot reproduce the engine-wide state without a pipeline-owner lifecycle policy.
128
128
  */
129
129
  setAlphaToCoverage(_enable: boolean): never;
130
+ /**
131
+ * Babylon.js `engine.isOcclusionQueryVisible(query)` — Lite does not expose
132
+ * occlusion-query allocation, render-pass encoding, or asynchronous result state.
133
+ */
134
+ isOcclusionQueryVisible(_query: unknown): never;
130
135
  /**
131
136
  * Babylon.js `engine.updateTextureArrayLayerFromImageSource(texture, source, layer, invertY, premultiplyAlpha)`
132
137
  * — the engine extension that uploads a decoded image source into one layer of a 2D array
@@ -295,9 +300,8 @@ declare interface AgentTransform {
295
300
  }
296
301
 
297
302
  /**
298
- * Babylon.js `Animatable` — a running animation on a target, driven per-frame on
299
- * the CPU by evaluating each `Animation`'s keyframes and writing the result onto
300
- * the target's (dotted) property path.
303
+ * Babylon.js `Animatable` facade. Supported direct-animation tracks delegate to a
304
+ * native Lite property group; unsupported tracks retain the compat CPU evaluator.
301
305
  */
302
306
  declare class Animatable_2 {
303
307
  private readonly _target;
@@ -305,16 +309,26 @@ declare class Animatable_2 {
305
309
  private readonly _from;
306
310
  private readonly _to;
307
311
  private readonly _loop;
308
- masterFrame: number;
309
- speedRatio: number;
312
+ masterFrame: number;
310
313
  private _speedRatio;
311
314
  private _paused;
312
315
  private _stopped;
313
- constructor(_target: unknown, _animations: Animation_2[], _from: number, _to: number, _loop: boolean, speedRatio: number);
314
316
  goToFrame(frame: number): void;
317
+ private readonly _nativeManager;
318
+ private readonly _fallbackAnimations;
319
+ private readonly _fallbackFrames;
320
+ private readonly _fallbackElapsedFrames;
321
+ private readonly _fallbackRepeatCounts;
322
+ private readonly _completedFallbackAnimations;
323
+ constructor(target: unknown, animations: Animation_2[], from: number, to: number, loop: boolean, speedRatio: number);
315
324
  get speedRatio(): number;
325
+ set speedRatio(value: number);
316
326
  goToFrame(frame: number): void;
317
327
  pause(): void;
318
328
  restart(): void;
319
329
  stop(): void;
320
330
  get animationStarted(): boolean;
321
- private _apply;
331
+ private _applyFallback;
332
+ private _advanceFallback;
333
+ private _resetFallbackAnimation;
334
+ private _attachLite;
335
+ private _detachLite;
322
336
  }
323
337
 
324
338
  declare class Animation_2 {
@@ -328,16 +342,29 @@ declare class Animation_2 {
328
342
  static readonly ANIMATIONTYPE_QUATERNION: 2;
329
343
  static readonly ANIMATIONTYPE_MATRIX: 3;
330
344
  static readonly ANIMATIONTYPE_COLOR3: 4;
345
+ static readonly ANIMATIONTYPE_VECTOR2: 5;
346
+ static readonly ANIMATIONTYPE_COLOR4: 6;
331
347
  static readonly ANIMATIONLOOPMODE_RELATIVE: 0;
332
348
  static readonly ANIMATIONLOOPMODE_CYCLE: 1;
333
349
  static readonly ANIMATIONLOOPMODE_CONSTANT: 2;
334
350
  private _keys;
351
+ private _easingFunction;
335
352
  constructor(name: string, targetProperty: string, framePerSecond: number, dataType?: number, loopMode?: number);
336
353
  setKeys(keys: IAnimationKey[]): void;
337
354
  getKeys(): IAnimationKey[];
338
355
  getHighestFrame(): number;
339
- /** Linearly evaluate the animated value at `frame` (clamped to the key range). */
340
- evaluate(frame: number): number | number[];
356
+ /**
357
+ * Assigns the easing function used to transform each non-STEP segment's normalized progress.
358
+ * @param easingFunction - A Babylon.js-shaped easing object, or `null` to restore linear progress.
359
+ */
360
+ setEasingFunction(easingFunction: IEasingFunction | null): void;
361
+ /**
362
+ * Gets the easing function currently assigned to this animation.
363
+ * @returns The assigned easing object, or `null` when interpolation uses linear progress.
364
+ */
365
+ getEasingFunction(): IEasingFunction | null;
366
+ /** Evaluate the animated value at `frame`, clamped to the key range. */
367
+ evaluate(frame: number): AnimationValue;
341
368
  /** Babylon.js helper: build a one-shot float animation between two values. */
342
369
  static CreateAndStartAnimation(name: string, _target: unknown, targetProperty: string, framePerSecond: number, totalFrame: number, from: number, to: number): Animation_2;
343
370
  }
@@ -420,6 +447,8 @@ declare class AnimationGroup {
420
447
 
421
448
  declare type AnimationGroupState = "init" | "playing" | "paused" | "stopped";
422
449
 
450
+ declare type AnimationValue = number | number[] | IAnimationVectorValue;
451
+
423
452
  declare abstract class BaseTexture {
424
453
  name: string;
425
454
  getClassName(): string;
426
455
  /**
427
456
  * Babylon.js `BaseTexture.getInternalTexture()` — the backend texture handle. Babylon.js
@@ -762,11 +791,35 @@ declare class HDRCubeTexture extends BaseTexture {
762
791
 
763
792
  declare interface IAnimationKey {
764
793
  frame: number;
765
- value: number | number[];
794
+ value: AnimationValue;
766
795
  /** Babylon.js per-key interpolation hint (`AnimationKeyInterpolation`). */
767
796
  interpolation?: number;
768
797
  }
769
798
 
799
+ /** Structural vector/quaternion value accepted by Babylon.js animation keys. */
800
+ declare interface IAnimationVectorValue {
801
+ readonly x: number;
802
+ readonly y: number;
803
+ readonly z?: number;
804
+ readonly w?: number;
805
+ clone(): IAnimationVectorValue;
806
+ asArray(): number[];
807
+ }
808
+
809
+ /**
810
+ * Contract implemented by Babylon.js easing functions.
811
+ *
812
+ * Custom easing objects only need to transform a normalized segment gradient.
813
+ */
814
+ declare interface IEasingFunction {
815
+ /**
816
+ * Transform a segment-local gradient.
817
+ * @param gradient - Linear progress through the current keyframe segment.
818
+ * @returns The progress used for interpolation. Values are not clamped.
819
+ */
820
+ ease(gradient: number): number;
821
+ }
822
+
770
823
  /**
771
824
  * Minimal Babylon.js `ImageProcessingConfiguration` facade over Lite's image
772
825
  * processing state.
@@ -1701,8 +1754,8 @@ declare class Scene extends AbstractScene {
1701
1754
  /** Babylon.js fog-mode constant
1702
1755
  * Babylon.js `scene.animationGroups` / `scene.animatables`. Loaded glTF /
1703
1756
  * `.babylon` animation clips live on the Lite scene; `animationGroups` returns
1704
1757
  * BJS-shaped `AnimationGroup`s over them (so scenes can `goToFrame`/`pause`/`stop`
1705
- * to freeze a model at a deterministic frame). `animatables` surfaces the running
1706
- * CPU `Animatable`s started via `beginDirectAnimation`.
1758
+ * to freeze a model at a deterministic frame). `animatables` surfaces the
1759
+ * native-backed and fallback `Animatable`s started through the scene.
1707
1760
  */
1708
1761
  get animationGroups(): AnimationGroup[];
1709
1762
  /** Babylon.js `scene.getAnimationGroupByName(name)` — first loaded animation group with a matching name, else `null`. */
@@ -1726,8 +1779,7 @@ declare class Scene extends AbstractScene {
1726
1779
  /** Babylon.js fog-mode constant
1727
1780
  private readonly _pendingMorphBuilds;
1728
1781
  private _materialPluginsRequested;
1729
1782
  private readonly _pendingMaterialPluginReconciliations;
1730
- private readonly _runningAnimatables;
1731
- private readonly _animationGroupCache;
1732
1783
  private _ambientColor;
1784
+ private readonly _runningAnimatables;
1733
1785
  private readonly _animationGroupCache;
1734
1786
  private _ambientColor;
1735
1787
  private _environmentIntensity;
1736
1788
  private _imageProcessingConfiguration;
1737
1789
  /** Babylon.js `scene.uniqueId` — a process-unique numeric id. */
1738
1790
  readonly uniqueId: number;
@@ -1889,8 +1941,9 @@ declare class Scene extends AbstractScene {
1889
1941
  /** Babylon.js fog-mode constant
1890
1942
  disablePhysicsEngine(): void;
1891
1943
  /**
1892
1944
  * Babylon.js `scene.beginDirectAnimation(target, animations, from, to, loop, speedRatio?)`.
1893
- * Drives the given `Animation`s on the CPU each frame, writing onto the target's
1894
- * (dotted) property path. Returns an `Animatable` with `goToFrame`/`pause`/`stop`.
1945
+ * Delegates supported tracks to Babylon Lite property animation and retains
1946
+ * explicit compat evaluation only for unsupported tracks. Returns one facade
1947
+ * coordinating both subsets.
1895
1948
  */
1896
1949
  beginDirectAnimation(target: unknown, animations: Animation_2[], from: number, to: number, loop?: boolean, speedRatio?: number): Animatable_2;
1897
1950
  /**
1898
1951
  * Babylon.js `scene.beginAnimation(target, from, to, loop, speedRatio?)`. Runs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/lite-compat",
3
- "version": "1.31.0-preview",
3
+ "version": "1.31.1-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": "59904",
51
- "sourceVersion": "3ce8ae6d34945f4c32c73e357714ffa43be41584",
52
- "builtAgainstLite": "1.31.0"
50
+ "azureBuildId": "59978",
51
+ "sourceVersion": "7d66215c1c897734a3c2f25bdd15d0e7062ed8f4",
52
+ "builtAgainstLite": "1.31.1"
53
53
  }
54
54
  }