gltfPathToObjectConverter.d.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. import type { IObjectInfo, IPathToObjectConverter } from "@babylonjs/core/ObjectModel/objectModelInterfaces.js";
  2. import type { IGLTF } from "../glTFLoaderInterfaces";
  3. /**
  4. * A converter that takes a glTF Object Model JSON Pointer
  5. * and transforms it into an ObjectAccessorContainer, allowing
  6. * objects referenced in the glTF to be associated with their
  7. * respective Babylon.js objects.
  8. */
  9. export declare class GLTFPathToObjectConverter<T> implements IPathToObjectConverter<T> {
  10. private _gltf;
  11. private _infoTree;
  12. constructor(_gltf: IGLTF, _infoTree: any);
  13. /**
  14. * The pointer string is represented by a [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901).
  15. * <animationPointer> := /<rootNode>/<assetIndex>/<propertyPath>
  16. * <rootNode> := "nodes" | "materials" | "meshes" | "cameras" | "extensions"
  17. * <assetIndex> := <digit> | <name>
  18. * <propertyPath> := <extensionPath> | <standardPath>
  19. * <extensionPath> := "extensions"/<name>/<standardPath>
  20. * <standardPath> := <name> | <name>/<standardPath>
  21. * <name> := W+
  22. * <digit> := D+
  23. *
  24. * Examples:
  25. * - "/nodes/0/rotation"
  26. * - "/materials/2/emissiveFactor"
  27. * - "/materials/2/pbrMetallicRoughness/baseColorFactor"
  28. * - "/materials/2/extensions/KHR_materials_emissive_strength/emissiveStrength"
  29. *
  30. * @param path The path to convert
  31. * @returns The object and info associated with the path
  32. */
  33. convert(path: string): IObjectInfo<T>;
  34. }