babylonjs-loaders 6.36.0 → 6.37.0

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.
@@ -839,39 +839,40 @@ declare module BABYLON.GLTF2.Loader.Extensions {
839
839
 
840
840
 
841
841
 
842
- }
843
- declare module BABYLON {
844
-
845
- }
846
- declare module BABYLON.GLTF2.Loader.Extensions {
847
-
848
-
849
-
850
842
  }
851
843
  declare module BABYLON {
852
844
 
853
845
  }
854
846
  declare module BABYLON.GLTF2.Loader.Extensions {
855
847
  /**
856
- * @internal
857
- * Converts a glTF Interactivity Extension to a serialized flow graph.
858
- * @param gltf the interactivity data
859
- * @returns a serialized flow graph
848
+ * A converter that takes a glTF Object Model JSON Pointer
849
+ * and transforms it into an ObjectAccessorContainer, allowing
850
+ * objects referenced in the glTF to be associated with their
851
+ * respective Babylon.js objects.
860
852
  */
861
- export function convertGLTFToSerializedFlowGraph(gltf: BABYLON.GLTF2.IKHRInteractivity): ISerializedFlowGraph;
862
-
863
-
864
-
865
- }
866
- declare module BABYLON {
867
-
868
- }
869
- declare module BABYLON.GLTF2.Loader.Extensions {
870
- export var camerasExtension: {
871
- shouldProcess(path: FlowGraphPath): boolean;
872
- processGet(path: FlowGraphPath, context: FlowGraphContext): any;
873
- processSet(path: FlowGraphPath, context: FlowGraphContext, value: any): void;
874
- };
853
+ export class GLTFPathToObjectConverter<T> implements IPathToObjectConverter<T> {
854
+ private _gltf;
855
+ private _infoTree;
856
+ constructor(_gltf: BABYLON.GLTF2.Loader.IGLTF, _infoTree: any);
857
+ /**
858
+ * The pointer string is represented by a [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901).
859
+ * <animationPointer> := /<rootNode>/<assetIndex>/<propertyPath>
860
+ * <rootNode> := "nodes" | "materials" | "meshes" | "cameras" | "extensions"
861
+ * <assetIndex> := <digit> | <name>
862
+ * <propertyPath> := <extensionPath> | <standardPath>
863
+ * <extensionPath> := "extensions"/<name>/<standardPath>
864
+ * <standardPath> := <name> | <name>/<standardPath>
865
+ * <name> := W+
866
+ * <digit> := D+
867
+ *
868
+ * Examples:
869
+ * - "/nodes/0/rotation"
870
+ * - "/materials/2/emissiveFactor"
871
+ * - "/materials/2/pbrMetallicRoughness/baseColorFactor"
872
+ * - "/materials/2/extensions/KHR_materials_emissive_strength/emissiveStrength"
873
+ */
874
+ convert(path: string): IObjectInfo<T>;
875
+ }
875
876
 
876
877
 
877
878
 
@@ -880,8 +881,7 @@ declare module BABYLON {
880
881
 
881
882
  }
882
883
  declare module BABYLON.GLTF2.Loader.Extensions {
883
- export var interactivityPathExensions: IPathExtension[];
884
-
884
+
885
885
 
886
886
 
887
887
  }
@@ -889,11 +889,13 @@ declare module BABYLON {
889
889
 
890
890
  }
891
891
  declare module BABYLON.GLTF2.Loader.Extensions {
892
- export var pbrMaterialExtension: {
893
- shouldProcess(path: FlowGraphPath): boolean;
894
- processGet(path: FlowGraphPath, context: FlowGraphContext): any;
895
- processSet(path: FlowGraphPath, context: FlowGraphContext, value: any): void;
896
- };
892
+ /**
893
+ * @internal
894
+ * Converts a glTF Interactivity Extension to a serialized flow graph.
895
+ * @param gltf the interactivity data
896
+ * @returns a serialized flow graph
897
+ */
898
+ export function convertGLTFToSerializedFlowGraph(gltf: BABYLON.GLTF2.IKHRInteractivity): ISerializedFlowGraph;
897
899
 
898
900
 
899
901
 
@@ -902,7 +904,12 @@ declare module BABYLON {
902
904
 
903
905
  }
904
906
  declare module BABYLON.GLTF2.Loader.Extensions {
905
- export var transformNodeExtension: IPathExtension;
907
+ /**
908
+ * Class to convert an interactivity pointer path to a smart object
909
+ */
910
+ export class InteractivityPathToObjectConverter extends BABYLON.GLTF2.Loader.Extensions.GLTFPathToObjectConverter<IObjectAccessor> {
911
+ constructor(gltf: BABYLON.GLTF2.Loader.IGLTF);
912
+ }
906
913
 
907
914
 
908
915
 
@@ -933,6 +940,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
933
940
  */
934
941
  readonly name = "KHR_animation_pointer";
935
942
  private _loader;
943
+ private _pathToObjectConverter?;
936
944
  /**
937
945
  * @internal
938
946
  */
@@ -953,24 +961,6 @@ declare module BABYLON.GLTF2.Loader.Extensions {
953
961
  * @returns A void promise that resolves when the load is complete or null if not handled
954
962
  */
955
963
  _loadAnimationChannelAsync(context: string, animationContext: string, animation: BABYLON.GLTF2.Loader.IAnimation, channel: BABYLON.GLTF2.Loader.IAnimationChannel, onLoad: (babylonAnimatable: IAnimatable, babylonAnimation: Animation) => void): Nullable<Promise<void>>;
956
- /**
957
- * The pointer string is represented by a [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901).
958
- * <animationPointer> := /<rootNode>/<assetIndex>/<propertyPath>
959
- * <rootNode> := "nodes" | "materials" | "meshes" | "cameras" | "extensions"
960
- * <assetIndex> := <digit> | <name>
961
- * <propertyPath> := <extensionPath> | <standardPath>
962
- * <extensionPath> := "extensions"/<name>/<standardPath>
963
- * <standardPath> := <name> | <name>/<standardPath>
964
- * <name> := W+
965
- * <digit> := D+
966
- *
967
- * Examples:
968
- * - "/nodes/0/rotation"
969
- * - "/materials/2/emissiveFactor"
970
- * - "/materials/2/pbrMetallicRoughness/baseColorFactor"
971
- * - "/materials/2/extensions/KHR_materials_emissive_strength/emissiveStrength"
972
- */
973
- private _parseAnimationPointer;
974
964
  }
975
965
 
976
966
 
@@ -1180,6 +1170,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
1180
1170
  * Defines whether this extension is enabled.
1181
1171
  */
1182
1172
  enabled: boolean;
1173
+ private _pathConverter?;
1183
1174
  /**
1184
1175
  * @internal
1185
1176
  * @param _loader
@@ -2314,7 +2305,7 @@ declare module BABYLON.GLTF2 {
2314
2305
  * @param onLoad Called for each animation loaded
2315
2306
  * @returns A void promise that resolves when the load is complete
2316
2307
  */
2317
- _loadAnimationChannelFromTargetInfoAsync(context: string, animationContext: string, animation: BABYLON.GLTF2.Loader.IAnimation, channel: BABYLON.GLTF2.Loader.IAnimationChannel, targetInfo: IAnimationTargetInfo, onLoad: (babylonAnimatable: IAnimatable, babylonAnimation: Animation) => void): Promise<void>;
2308
+ _loadAnimationChannelFromTargetInfoAsync(context: string, animationContext: string, animation: BABYLON.GLTF2.Loader.IAnimation, channel: BABYLON.GLTF2.Loader.IAnimationChannel, targetInfo: IObjectInfo<BABYLON.GLTF2.AnimationPropertyInfo[]>, onLoad: (babylonAnimatable: IAnimatable, babylonAnimation: Animation) => void): Promise<void>;
2318
2309
  private _loadAnimationSamplerAsync;
2319
2310
  /**
2320
2311
  * Loads a glTF buffer.