KHR_animation_pointer.d.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
  2. import { GLTFLoader } from "../glTFLoader";
  3. import type { Nullable } from "@babylonjs/core/types.js";
  4. import type { Animation } from "@babylonjs/core/Animations/animation.js";
  5. import type { IAnimatable } from "@babylonjs/core/Animations/animatable.interface.js";
  6. import type { IAnimation, IAnimationChannel } from "../glTFLoaderInterfaces";
  7. /**
  8. * [Specification PR](https://github.com/KhronosGroup/glTF/pull/2147)
  9. * !!! Experimental Extension Subject to Changes !!!
  10. */
  11. export declare class KHR_animation_pointer implements IGLTFLoaderExtension {
  12. /**
  13. * The name of this extension.
  14. */
  15. readonly name = "KHR_animation_pointer";
  16. private _loader;
  17. private _pathToObjectConverter?;
  18. /**
  19. * @internal
  20. */
  21. constructor(loader: GLTFLoader);
  22. /**
  23. * Defines whether this extension is enabled.
  24. */
  25. get enabled(): boolean;
  26. /** @internal */
  27. dispose(): void;
  28. /**
  29. * Loads a glTF animation channel.
  30. * @param context The context when loading the asset
  31. * @param animationContext The context of the animation when loading the asset
  32. * @param animation The glTF animation property
  33. * @param channel The glTF animation channel property
  34. * @param onLoad Called for each animation loaded
  35. * @returns A void promise that resolves when the load is complete or null if not handled
  36. */
  37. _loadAnimationChannelAsync(context: string, animationContext: string, animation: IAnimation, channel: IAnimationChannel, onLoad: (babylonAnimatable: IAnimatable, babylonAnimation: Animation) => void): Nullable<Promise<void>>;
  38. }