@babylonjs/loaders 5.24.0 → 5.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. package/STL/stlFileLoader.d.ts +4 -4
  2. package/STL/stlFileLoader.js +4 -4
  3. package/STL/stlFileLoader.js.map +1 -1
  4. package/glTF/1.0/glTFBinaryExtension.d.ts +1 -1
  5. package/glTF/1.0/glTFBinaryExtension.js +1 -1
  6. package/glTF/1.0/glTFBinaryExtension.js.map +1 -1
  7. package/glTF/1.0/glTFLoader.d.ts +3 -3
  8. package/glTF/1.0/glTFLoader.js +3 -3
  9. package/glTF/1.0/glTFLoader.js.map +1 -1
  10. package/glTF/1.0/glTFLoaderInterfaces.d.ts +45 -45
  11. package/glTF/1.0/glTFLoaderInterfaces.js +8 -8
  12. package/glTF/1.0/glTFLoaderInterfaces.js.map +1 -1
  13. package/glTF/1.0/glTFLoaderUtils.d.ts +1 -1
  14. package/glTF/1.0/glTFLoaderUtils.js +1 -1
  15. package/glTF/1.0/glTFLoaderUtils.js.map +1 -1
  16. package/glTF/1.0/glTFMaterialsCommonExtension.d.ts +1 -1
  17. package/glTF/1.0/glTFMaterialsCommonExtension.js +1 -1
  18. package/glTF/1.0/glTFMaterialsCommonExtension.js.map +1 -1
  19. package/glTF/2.0/Extensions/EXT_lights_image_based.d.ts +5 -8
  20. package/glTF/2.0/Extensions/EXT_lights_image_based.js +4 -7
  21. package/glTF/2.0/Extensions/EXT_lights_image_based.js.map +1 -1
  22. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.d.ts +3 -7
  23. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js +3 -7
  24. package/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js.map +1 -1
  25. package/glTF/2.0/Extensions/EXT_meshopt_compression.d.ts +3 -6
  26. package/glTF/2.0/Extensions/EXT_meshopt_compression.js +3 -6
  27. package/glTF/2.0/Extensions/EXT_meshopt_compression.js.map +1 -1
  28. package/glTF/2.0/Extensions/EXT_texture_webp.d.ts +3 -7
  29. package/glTF/2.0/Extensions/EXT_texture_webp.js +3 -7
  30. package/glTF/2.0/Extensions/EXT_texture_webp.js.map +1 -1
  31. package/glTF/2.0/Extensions/ExtrasAsMetadata.d.ts +5 -15
  32. package/glTF/2.0/Extensions/ExtrasAsMetadata.js +5 -15
  33. package/glTF/2.0/Extensions/ExtrasAsMetadata.js.map +1 -1
  34. package/glTF/2.0/Extensions/KHR_animation_pointer.d.ts +14 -35
  35. package/glTF/2.0/Extensions/KHR_animation_pointer.data.d.ts +133 -0
  36. package/glTF/2.0/Extensions/KHR_animation_pointer.data.js +169 -0
  37. package/glTF/2.0/Extensions/KHR_animation_pointer.data.js.map +1 -0
  38. package/glTF/2.0/Extensions/KHR_animation_pointer.js +56 -208
  39. package/glTF/2.0/Extensions/KHR_animation_pointer.js.map +1 -1
  40. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.d.ts +3 -7
  41. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js +3 -7
  42. package/glTF/2.0/Extensions/KHR_draco_mesh_compression.js.map +1 -1
  43. package/glTF/2.0/Extensions/KHR_lights_punctual.d.ts +4 -8
  44. package/glTF/2.0/Extensions/KHR_lights_punctual.js +6 -9
  45. package/glTF/2.0/Extensions/KHR_lights_punctual.js.map +1 -1
  46. package/glTF/2.0/Extensions/KHR_materials_clearcoat.d.ts +3 -7
  47. package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +3 -7
  48. package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +1 -1
  49. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.d.ts +3 -7
  50. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js +3 -7
  51. package/glTF/2.0/Extensions/KHR_materials_emissive_strength.js.map +1 -1
  52. package/glTF/2.0/Extensions/KHR_materials_ior.d.ts +3 -7
  53. package/glTF/2.0/Extensions/KHR_materials_ior.js +3 -7
  54. package/glTF/2.0/Extensions/KHR_materials_ior.js.map +1 -1
  55. package/glTF/2.0/Extensions/KHR_materials_iridescence.d.ts +3 -7
  56. package/glTF/2.0/Extensions/KHR_materials_iridescence.js +3 -7
  57. package/glTF/2.0/Extensions/KHR_materials_iridescence.js.map +1 -1
  58. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.d.ts +3 -7
  59. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js +3 -7
  60. package/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js.map +1 -1
  61. package/glTF/2.0/Extensions/KHR_materials_sheen.d.ts +3 -7
  62. package/glTF/2.0/Extensions/KHR_materials_sheen.js +3 -7
  63. package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +1 -1
  64. package/glTF/2.0/Extensions/KHR_materials_specular.d.ts +3 -7
  65. package/glTF/2.0/Extensions/KHR_materials_specular.js +3 -7
  66. package/glTF/2.0/Extensions/KHR_materials_specular.js.map +1 -1
  67. package/glTF/2.0/Extensions/KHR_materials_translucency.d.ts +3 -7
  68. package/glTF/2.0/Extensions/KHR_materials_translucency.js +3 -7
  69. package/glTF/2.0/Extensions/KHR_materials_translucency.js.map +1 -1
  70. package/glTF/2.0/Extensions/KHR_materials_transmission.d.ts +3 -7
  71. package/glTF/2.0/Extensions/KHR_materials_transmission.js +3 -7
  72. package/glTF/2.0/Extensions/KHR_materials_transmission.js.map +1 -1
  73. package/glTF/2.0/Extensions/KHR_materials_unlit.d.ts +3 -7
  74. package/glTF/2.0/Extensions/KHR_materials_unlit.js +3 -7
  75. package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +1 -1
  76. package/glTF/2.0/Extensions/KHR_materials_variants.d.ts +4 -11
  77. package/glTF/2.0/Extensions/KHR_materials_variants.js +4 -11
  78. package/glTF/2.0/Extensions/KHR_materials_variants.js.map +1 -1
  79. package/glTF/2.0/Extensions/KHR_materials_volume.d.ts +3 -7
  80. package/glTF/2.0/Extensions/KHR_materials_volume.js +3 -7
  81. package/glTF/2.0/Extensions/KHR_materials_volume.js.map +1 -1
  82. package/glTF/2.0/Extensions/KHR_mesh_quantization.d.ts +2 -3
  83. package/glTF/2.0/Extensions/KHR_mesh_quantization.js +2 -3
  84. package/glTF/2.0/Extensions/KHR_mesh_quantization.js.map +1 -1
  85. package/glTF/2.0/Extensions/KHR_texture_basisu.d.ts +3 -7
  86. package/glTF/2.0/Extensions/KHR_texture_basisu.js +3 -7
  87. package/glTF/2.0/Extensions/KHR_texture_basisu.js.map +1 -1
  88. package/glTF/2.0/Extensions/KHR_texture_transform.d.ts +3 -7
  89. package/glTF/2.0/Extensions/KHR_texture_transform.js +3 -7
  90. package/glTF/2.0/Extensions/KHR_texture_transform.js.map +1 -1
  91. package/glTF/2.0/Extensions/KHR_xmp_json_ld.d.ts +2 -3
  92. package/glTF/2.0/Extensions/KHR_xmp_json_ld.js +2 -3
  93. package/glTF/2.0/Extensions/KHR_xmp_json_ld.js.map +1 -1
  94. package/glTF/2.0/Extensions/MSFT_audio_emitter.d.ts +6 -14
  95. package/glTF/2.0/Extensions/MSFT_audio_emitter.js +6 -14
  96. package/glTF/2.0/Extensions/MSFT_audio_emitter.js.map +1 -1
  97. package/glTF/2.0/Extensions/MSFT_lod.d.ts +8 -26
  98. package/glTF/2.0/Extensions/MSFT_lod.js +8 -26
  99. package/glTF/2.0/Extensions/MSFT_lod.js.map +1 -1
  100. package/glTF/2.0/Extensions/MSFT_minecraftMesh.d.ts +1 -1
  101. package/glTF/2.0/Extensions/MSFT_minecraftMesh.js +1 -1
  102. package/glTF/2.0/Extensions/MSFT_minecraftMesh.js.map +1 -1
  103. package/glTF/2.0/Extensions/MSFT_sRGBFactors.d.ts +1 -1
  104. package/glTF/2.0/Extensions/MSFT_sRGBFactors.js +1 -1
  105. package/glTF/2.0/Extensions/MSFT_sRGBFactors.js.map +1 -1
  106. package/glTF/2.0/glTFLoader.d.ts +55 -52
  107. package/glTF/2.0/glTFLoader.js +217 -91
  108. package/glTF/2.0/glTFLoader.js.map +1 -1
  109. package/glTF/2.0/glTFLoaderAnimation.d.ts +29 -0
  110. package/glTF/2.0/glTFLoaderAnimation.js +66 -0
  111. package/glTF/2.0/glTFLoaderAnimation.js.map +1 -0
  112. package/glTF/2.0/glTFLoaderExtension.d.ts +20 -7
  113. package/glTF/2.0/glTFLoaderExtension.js.map +1 -1
  114. package/glTF/2.0/glTFLoaderInterfaces.d.ts +58 -31
  115. package/glTF/2.0/glTFLoaderInterfaces.js.map +1 -1
  116. package/glTF/glTFFileLoader.d.ts +20 -53
  117. package/glTF/glTFFileLoader.js +17 -50
  118. package/glTF/glTFFileLoader.js.map +1 -1
  119. package/package.json +3 -3
  120. package/glTF/2.0/Extensions/KHR_animation_pointer.map.d.ts +0 -15
  121. package/glTF/2.0/Extensions/KHR_animation_pointer.map.js +0 -454
  122. package/glTF/2.0/Extensions/KHR_animation_pointer.map.js.map +0 -1
  123. package/glTF/2.0/glTFUtilities.d.ts +0 -7
  124. package/glTF/2.0/glTFUtilities.js +0 -23
  125. package/glTF/2.0/glTFUtilities.js.map +0 -1
@@ -0,0 +1,29 @@
1
+ import { Animation } from "@babylonjs/core/Animations/animation.js";
2
+ import { Quaternion, Vector3 } from "@babylonjs/core/Maths/math.vector.js";
3
+ import type { INode } from "./glTFLoaderInterfaces";
4
+ import type { IAnimatable } from "@babylonjs/core/Animations/animatable.interface.js";
5
+ export declare type GetValueFn = (target: any, source: Float32Array, offset: number, scale: number) => any;
6
+ export declare function getVector3(_target: any, source: Float32Array, offset: number, scale: number): Vector3;
7
+ export declare function getQuaternion(_target: any, source: Float32Array, offset: number, scale: number): Quaternion;
8
+ export declare function getWeights(target: INode, source: Float32Array, offset: number, scale: number): Array<number>;
9
+ export declare abstract class AnimationPropertyInfo {
10
+ readonly type: number;
11
+ readonly name: string;
12
+ readonly getValue: GetValueFn;
13
+ readonly getStride: (target: any) => number;
14
+ constructor(type: number, name: string, getValue: GetValueFn, getStride: (target: any) => number);
15
+ protected _buildAnimation(name: string, fps: number, keys: any[]): Animation;
16
+ abstract buildAnimations(target: any, name: string, fps: number, keys: any[], callback: (babylonAnimatable: IAnimatable, babylonAnimation: Animation) => void): void;
17
+ }
18
+ export declare class TransformNodeAnimationPropertyInfo extends AnimationPropertyInfo {
19
+ buildAnimations(target: INode, name: string, fps: number, keys: any[], callback: (babylonAnimatable: IAnimatable, babylonAnimation: Animation) => void): void;
20
+ }
21
+ export declare class WeightAnimationPropertyInfo extends AnimationPropertyInfo {
22
+ buildAnimations(target: INode, name: string, fps: number, keys: any[], callback: (babylonAnimatable: IAnimatable, babylonAnimation: Animation) => void): void;
23
+ }
24
+ export declare const nodeAnimationData: {
25
+ translation: TransformNodeAnimationPropertyInfo[];
26
+ rotation: TransformNodeAnimationPropertyInfo[];
27
+ scale: TransformNodeAnimationPropertyInfo[];
28
+ weights: WeightAnimationPropertyInfo[];
29
+ };
@@ -0,0 +1,66 @@
1
+ import { Animation } from "@babylonjs/core/Animations/animation.js";
2
+ import { Quaternion, Vector3 } from "@babylonjs/core/Maths/math.vector.js";
3
+ export function getVector3(_target, source, offset, scale) {
4
+ return Vector3.FromArray(source, offset).scaleInPlace(scale);
5
+ }
6
+ export function getQuaternion(_target, source, offset, scale) {
7
+ return Quaternion.FromArray(source, offset).scaleInPlace(scale);
8
+ }
9
+ export function getWeights(target, source, offset, scale) {
10
+ const value = new Array(target._numMorphTargets);
11
+ for (let i = 0; i < value.length; i++) {
12
+ value[i] = source[offset++] * scale;
13
+ }
14
+ return value;
15
+ }
16
+ export class AnimationPropertyInfo {
17
+ constructor(type, name, getValue, getStride) {
18
+ this.type = type;
19
+ this.name = name;
20
+ this.getValue = getValue;
21
+ this.getStride = getStride;
22
+ }
23
+ _buildAnimation(name, fps, keys) {
24
+ const babylonAnimation = new Animation(name, this.name, fps, this.type);
25
+ babylonAnimation.setKeys(keys);
26
+ return babylonAnimation;
27
+ }
28
+ }
29
+ export class TransformNodeAnimationPropertyInfo extends AnimationPropertyInfo {
30
+ buildAnimations(target, name, fps, keys, callback) {
31
+ callback(target._babylonTransformNode, this._buildAnimation(name, fps, keys));
32
+ }
33
+ }
34
+ export class WeightAnimationPropertyInfo extends AnimationPropertyInfo {
35
+ buildAnimations(target, name, fps, keys, callback) {
36
+ if (target._numMorphTargets) {
37
+ for (let targetIndex = 0; targetIndex < target._numMorphTargets; targetIndex++) {
38
+ const babylonAnimation = new Animation(`${name}_${targetIndex}`, this.name, fps, this.type);
39
+ babylonAnimation.setKeys(keys.map((key) => ({
40
+ frame: key.frame,
41
+ inTangent: key.inTangent ? key.inTangent[targetIndex] : undefined,
42
+ value: key.value[targetIndex],
43
+ outTangent: key.outTangent ? key.outTangent[targetIndex] : undefined,
44
+ interpolation: key.interpolation,
45
+ })));
46
+ if (target._primitiveBabylonMeshes) {
47
+ for (const babylonMesh of target._primitiveBabylonMeshes) {
48
+ if (babylonMesh.morphTargetManager) {
49
+ const morphTarget = babylonMesh.morphTargetManager.getTarget(targetIndex);
50
+ const babylonAnimationClone = babylonAnimation.clone();
51
+ morphTarget.animations.push(babylonAnimationClone);
52
+ callback(morphTarget, babylonAnimationClone);
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ export const nodeAnimationData = {
61
+ translation: [new TransformNodeAnimationPropertyInfo(Animation.ANIMATIONTYPE_VECTOR3, "position", getVector3, () => 3)],
62
+ rotation: [new TransformNodeAnimationPropertyInfo(Animation.ANIMATIONTYPE_QUATERNION, "rotationQuaternion", getQuaternion, () => 4)],
63
+ scale: [new TransformNodeAnimationPropertyInfo(Animation.ANIMATIONTYPE_VECTOR3, "scaling", getVector3, () => 3)],
64
+ weights: [new WeightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, "influence", getWeights, (target) => target._numMorphTargets)],
65
+ };
66
+ //# sourceMappingURL=glTFLoaderAnimation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glTFLoaderAnimation.js","sourceRoot":"","sources":["../../../../../../lts/loaders/generated/glTF/2.0/glTFLoaderAnimation.ts"],"names":[],"mappings":"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","sourcesContent":["import { Animation } from \"core/Animations/animation\";\r\nimport { Quaternion, Vector3 } from \"core/Maths/math.vector\";\r\nimport type { INode } from \"./glTFLoaderInterfaces\";\r\nimport type { IAnimatable } from \"core/Animations/animatable.interface\";\r\n\r\nexport type GetValueFn = (target: any, source: Float32Array, offset: number, scale: number) => any;\r\n\r\nexport function getVector3(_target: any, source: Float32Array, offset: number, scale: number): Vector3 {\r\n return Vector3.FromArray(source, offset).scaleInPlace(scale);\r\n}\r\n\r\nexport function getQuaternion(_target: any, source: Float32Array, offset: number, scale: number): Quaternion {\r\n return Quaternion.FromArray(source, offset).scaleInPlace(scale);\r\n}\r\n\r\nexport function getWeights(target: INode, source: Float32Array, offset: number, scale: number): Array<number> {\r\n const value = new Array<number>(target._numMorphTargets!);\r\n for (let i = 0; i < value.length; i++) {\r\n value[i] = source[offset++] * scale;\r\n }\r\n\r\n return value;\r\n}\r\n\r\nexport abstract class AnimationPropertyInfo {\r\n public constructor(public readonly type: number, public readonly name: string, public readonly getValue: GetValueFn, public readonly getStride: (target: any) => number) {}\r\n\r\n protected _buildAnimation(name: string, fps: number, keys: any[]): Animation {\r\n const babylonAnimation = new Animation(name, this.name, fps, this.type);\r\n babylonAnimation.setKeys(keys);\r\n return babylonAnimation;\r\n }\r\n\r\n public abstract buildAnimations(target: any, name: string, fps: number, keys: any[], callback: (babylonAnimatable: IAnimatable, babylonAnimation: Animation) => void): void;\r\n}\r\n\r\nexport class TransformNodeAnimationPropertyInfo extends AnimationPropertyInfo {\r\n public buildAnimations(target: INode, name: string, fps: number, keys: any[], callback: (babylonAnimatable: IAnimatable, babylonAnimation: Animation) => void): void {\r\n callback(target._babylonTransformNode!, this._buildAnimation(name, fps, keys));\r\n }\r\n}\r\n\r\nexport class WeightAnimationPropertyInfo extends AnimationPropertyInfo {\r\n public buildAnimations(target: INode, name: string, fps: number, keys: any[], callback: (babylonAnimatable: IAnimatable, babylonAnimation: Animation) => void): void {\r\n if (target._numMorphTargets) {\r\n for (let targetIndex = 0; targetIndex < target._numMorphTargets; targetIndex++) {\r\n const babylonAnimation = new Animation(`${name}_${targetIndex}`, this.name, fps, this.type);\r\n babylonAnimation.setKeys(\r\n keys.map((key) => ({\r\n frame: key.frame,\r\n inTangent: key.inTangent ? key.inTangent[targetIndex] : undefined,\r\n value: key.value[targetIndex],\r\n outTangent: key.outTangent ? key.outTangent[targetIndex] : undefined,\r\n interpolation: key.interpolation,\r\n }))\r\n );\r\n\r\n if (target._primitiveBabylonMeshes) {\r\n for (const babylonMesh of target._primitiveBabylonMeshes) {\r\n if (babylonMesh.morphTargetManager) {\r\n const morphTarget = babylonMesh.morphTargetManager.getTarget(targetIndex);\r\n const babylonAnimationClone = babylonAnimation.clone();\r\n morphTarget.animations.push(babylonAnimationClone);\r\n callback(morphTarget, babylonAnimationClone);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport const nodeAnimationData = {\r\n translation: [new TransformNodeAnimationPropertyInfo(Animation.ANIMATIONTYPE_VECTOR3, \"position\", getVector3, () => 3)],\r\n rotation: [new TransformNodeAnimationPropertyInfo(Animation.ANIMATIONTYPE_QUATERNION, \"rotationQuaternion\", getQuaternion, () => 4)],\r\n scale: [new TransformNodeAnimationPropertyInfo(Animation.ANIMATIONTYPE_VECTOR3, \"scaling\", getVector3, () => 3)],\r\n weights: [new WeightAnimationPropertyInfo(Animation.ANIMATIONTYPE_FLOAT, \"influence\", getWeights, (target) => target._numMorphTargets!)],\r\n};\r\n"]}
@@ -1,4 +1,5 @@
1
1
  import type { Nullable } from "@babylonjs/core/types.js";
2
+ import type { Animation } from "@babylonjs/core/Animations/animation.js";
2
3
  import type { AnimationGroup } from "@babylonjs/core/Animations/animationGroup.js";
3
4
  import type { Material } from "@babylonjs/core/Materials/material.js";
4
5
  import type { Camera } from "@babylonjs/core/Cameras/camera.js";
@@ -8,9 +9,10 @@ import type { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture
8
9
  import type { Mesh } from "@babylonjs/core/Meshes/mesh.js";
9
10
  import type { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
10
11
  import type { IDisposable } from "@babylonjs/core/scene.js";
11
- import type { IScene, INode, IMesh, ISkin, ICamera, IMeshPrimitive, IMaterial, ITextureInfo, IAnimation, ITexture, IBufferView, IBuffer } from "./glTFLoaderInterfaces";
12
+ import type { IScene, INode, IMesh, ISkin, ICamera, IMeshPrimitive, IMaterial, ITextureInfo, IAnimation, ITexture, IBufferView, IBuffer, IAnimationChannel } from "./glTFLoaderInterfaces";
12
13
  import type { IGLTFLoaderExtension as IGLTFBaseLoaderExtension } from "../glTFFileLoader";
13
14
  import type { IProperty } from "babylonjs-gltf2interface";
15
+ import type { IAnimatable } from "@babylonjs/core/Animations/animatable.interface.js";
14
16
  /**
15
17
  * Interface for a glTF loader extension.
16
18
  */
@@ -47,7 +49,7 @@ export interface IGLTFLoaderExtension extends IGLTFBaseLoaderExtension, IDisposa
47
49
  */
48
50
  loadCameraAsync?(context: string, camera: ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;
49
51
  /**
50
- * @hidden
52
+ * @internal
51
53
  * Define this method to modify the default behavior when loading vertex data for mesh primitives.
52
54
  * @param context The context when loading the asset
53
55
  * @param primitive The glTF mesh primitive property
@@ -55,7 +57,7 @@ export interface IGLTFLoaderExtension extends IGLTFBaseLoaderExtension, IDisposa
55
57
  */
56
58
  _loadVertexDataAsync?(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
57
59
  /**
58
- * @hidden
60
+ * @internal
59
61
  * Define this method to modify the default behavior when loading data for mesh primitives.
60
62
  * @param context The context when loading the asset
61
63
  * @param name The mesh name when loading the asset
@@ -67,7 +69,7 @@ export interface IGLTFLoaderExtension extends IGLTFBaseLoaderExtension, IDisposa
67
69
  */
68
70
  _loadMeshPrimitiveAsync?(context: string, name: string, node: INode, mesh: IMesh, primitive: IMeshPrimitive, assign: (babylonMesh: AbstractMesh) => void): Nullable<Promise<AbstractMesh>>;
69
71
  /**
70
- * @hidden
72
+ * @internal
71
73
  * Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.
72
74
  * @param context The context when loading the asset
73
75
  * @param material The glTF material property
@@ -100,7 +102,7 @@ export interface IGLTFLoaderExtension extends IGLTFBaseLoaderExtension, IDisposa
100
102
  */
101
103
  loadTextureInfoAsync?(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;
102
104
  /**
103
- * @hidden
105
+ * @internal
104
106
  * Define this method to modify the default behavior when loading textures.
105
107
  * @param context The context when loading the asset
106
108
  * @param texture The glTF texture property
@@ -116,7 +118,18 @@ export interface IGLTFLoaderExtension extends IGLTFBaseLoaderExtension, IDisposa
116
118
  */
117
119
  loadAnimationAsync?(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;
118
120
  /**
119
- * @hidden
121
+ * @internal
122
+ * Define this method to modify the default behvaior when loading animation channels.
123
+ * @param context The context when loading the asset
124
+ * @param animationContext The context of the animation when loading the asset
125
+ * @param animation The glTF animation property
126
+ * @param channel The glTF animation channel property
127
+ * @param onLoad Called for each animation loaded
128
+ * @returns A void promise that resolves when the load is complete or null if not handled
129
+ */
130
+ _loadAnimationChannelAsync?(context: string, animationContext: string, animation: IAnimation, channel: IAnimationChannel, onLoad: (babylonAnimatable: IAnimatable, babylonAnimation: Animation) => void): Nullable<Promise<void>>;
131
+ /**
132
+ * @internal
120
133
  * Define this method to modify the default behavior when loading skins.
121
134
  * @param context The context when loading the asset
122
135
  * @param node The glTF node property
@@ -125,7 +138,7 @@ export interface IGLTFLoaderExtension extends IGLTFBaseLoaderExtension, IDisposa
125
138
  */
126
139
  _loadSkinAsync?(context: string, node: INode, skin: ISkin): Nullable<Promise<void>>;
127
140
  /**
128
- * @hidden
141
+ * @internal
129
142
  * Define this method to modify the default behavior when loading uris.
130
143
  * @param context The context when loading the asset
131
144
  * @param property The glTF property associated with the uri
@@ -1 +1 @@
1
- {"version":3,"file":"glTFLoaderExtension.js","sourceRoot":"","sources":["../../../../../../lts/loaders/generated/glTF/2.0/glTFLoaderExtension.ts"],"names":[],"mappings":"","sourcesContent":["import type { Nullable } from \"core/types\";\r\nimport type { AnimationGroup } from \"core/Animations/animationGroup\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport type { Camera } from \"core/Cameras/camera\";\r\nimport type { Geometry } from \"core/Meshes/geometry\";\r\nimport type { TransformNode } from \"core/Meshes/transformNode\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport type { Mesh } from \"core/Meshes/mesh\";\r\nimport type { AbstractMesh } from \"core/Meshes/abstractMesh\";\r\nimport type { IDisposable } from \"core/scene\";\r\nimport type { IScene, INode, IMesh, ISkin, ICamera, IMeshPrimitive, IMaterial, ITextureInfo, IAnimation, ITexture, IBufferView, IBuffer } from \"./glTFLoaderInterfaces\";\r\nimport type { IGLTFLoaderExtension as IGLTFBaseLoaderExtension } from \"../glTFFileLoader\";\r\nimport type { IProperty } from \"babylonjs-gltf2interface\";\r\n\r\n/**\r\n * Interface for a glTF loader extension.\r\n */\r\nexport interface IGLTFLoaderExtension extends IGLTFBaseLoaderExtension, IDisposable {\r\n /**\r\n * Called after the loader state changes to LOADING.\r\n */\r\n onLoading?(): void;\r\n\r\n /**\r\n * Called after the loader state changes to READY.\r\n */\r\n onReady?(): void;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading scenes.\r\n * @param context The context when loading the asset\r\n * @param scene The glTF scene property\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n loadSceneAsync?(context: string, scene: IScene): Nullable<Promise<void>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading nodes.\r\n * @param context The context when loading the asset\r\n * @param node The glTF node property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon transform node when the load is complete or null if not handled\r\n */\r\n loadNodeAsync?(context: string, node: INode, assign: (babylonMesh: TransformNode) => void): Nullable<Promise<TransformNode>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading cameras.\r\n * @param context The context when loading the asset\r\n * @param camera The glTF camera property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled\r\n */\r\n loadCameraAsync?(context: string, camera: ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading vertex data for mesh primitives.\r\n * @param context The context when loading the asset\r\n * @param primitive The glTF mesh primitive property\r\n * @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled\r\n */\r\n _loadVertexDataAsync?(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading data for mesh primitives.\r\n * @param context The context when loading the asset\r\n * @param name The mesh name when loading the asset\r\n * @param node The glTF node when loading the asset\r\n * @param mesh The glTF mesh when loading the asset\r\n * @param primitive The glTF mesh primitive property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded mesh when the load is complete or null if not handled\r\n */\r\n _loadMeshPrimitiveAsync?(\r\n context: string,\r\n name: string,\r\n node: INode,\r\n mesh: IMesh,\r\n primitive: IMeshPrimitive,\r\n assign: (babylonMesh: AbstractMesh) => void\r\n ): Nullable<Promise<AbstractMesh>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled\r\n */\r\n _loadMaterialAsync?(\r\n context: string,\r\n material: IMaterial,\r\n babylonMesh: Nullable<Mesh>,\r\n babylonDrawMode: number,\r\n assign: (babylonMaterial: Material) => void\r\n ): Nullable<Promise<Material>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when creating materials.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param babylonDrawMode The draw mode for the Babylon material\r\n * @returns The Babylon material or null if not handled\r\n */\r\n createMaterial?(context: string, material: IMaterial, babylonDrawMode: number): Nullable<Material>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading material properties.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param babylonMaterial The Babylon material\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n loadMaterialPropertiesAsync?(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading texture infos.\r\n * @param context The context when loading the asset\r\n * @param textureInfo The glTF texture info property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled\r\n */\r\n loadTextureInfoAsync?(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading textures.\r\n * @param context The context when loading the asset\r\n * @param texture The glTF texture property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled\r\n */\r\n _loadTextureAsync?(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading animations.\r\n * @param context The context when loading the asset\r\n * @param animation The glTF animation property\r\n * @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled\r\n */\r\n loadAnimationAsync?(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading skins.\r\n * @param context The context when loading the asset\r\n * @param node The glTF node property\r\n * @param skin The glTF skin property\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n _loadSkinAsync?(context: string, node: INode, skin: ISkin): Nullable<Promise<void>>;\r\n\r\n /**\r\n * @hidden\r\n * Define this method to modify the default behavior when loading uris.\r\n * @param context The context when loading the asset\r\n * @param property The glTF property associated with the uri\r\n * @param uri The uri to load\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n _loadUriAsync?(context: string, property: IProperty, uri: string): Nullable<Promise<ArrayBufferView>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading buffer views.\r\n * @param context The context when loading the asset\r\n * @param bufferView The glTF buffer view property\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n loadBufferViewAsync?(context: string, bufferView: IBufferView): Nullable<Promise<ArrayBufferView>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading buffers.\r\n * @param context The context when loading the asset\r\n * @param buffer The glTF buffer property\r\n * @param byteOffset The byte offset to load\r\n * @param byteLength The byte length to load\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n loadBufferAsync?(context: string, buffer: IBuffer, byteOffset: number, byteLength: number): Nullable<Promise<ArrayBufferView>>;\r\n}\r\n"]}
1
+ {"version":3,"file":"glTFLoaderExtension.js","sourceRoot":"","sources":["../../../../../../lts/loaders/generated/glTF/2.0/glTFLoaderExtension.ts"],"names":[],"mappings":"","sourcesContent":["import type { Nullable } from \"core/types\";\r\nimport type { Animation } from \"core/Animations/animation\";\r\nimport type { AnimationGroup } from \"core/Animations/animationGroup\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport type { Camera } from \"core/Cameras/camera\";\r\nimport type { Geometry } from \"core/Meshes/geometry\";\r\nimport type { TransformNode } from \"core/Meshes/transformNode\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport type { Mesh } from \"core/Meshes/mesh\";\r\nimport type { AbstractMesh } from \"core/Meshes/abstractMesh\";\r\nimport type { IDisposable } from \"core/scene\";\r\nimport type {\r\n IScene,\r\n INode,\r\n IMesh,\r\n ISkin,\r\n ICamera,\r\n IMeshPrimitive,\r\n IMaterial,\r\n ITextureInfo,\r\n IAnimation,\r\n ITexture,\r\n IBufferView,\r\n IBuffer,\r\n IAnimationChannel,\r\n} from \"./glTFLoaderInterfaces\";\r\nimport type { IGLTFLoaderExtension as IGLTFBaseLoaderExtension } from \"../glTFFileLoader\";\r\nimport type { IProperty } from \"babylonjs-gltf2interface\";\r\nimport type { IAnimatable } from \"core/Animations/animatable.interface\";\r\n\r\n/**\r\n * Interface for a glTF loader extension.\r\n */\r\nexport interface IGLTFLoaderExtension extends IGLTFBaseLoaderExtension, IDisposable {\r\n /**\r\n * Called after the loader state changes to LOADING.\r\n */\r\n onLoading?(): void;\r\n\r\n /**\r\n * Called after the loader state changes to READY.\r\n */\r\n onReady?(): void;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading scenes.\r\n * @param context The context when loading the asset\r\n * @param scene The glTF scene property\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n loadSceneAsync?(context: string, scene: IScene): Nullable<Promise<void>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading nodes.\r\n * @param context The context when loading the asset\r\n * @param node The glTF node property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon transform node when the load is complete or null if not handled\r\n */\r\n loadNodeAsync?(context: string, node: INode, assign: (babylonMesh: TransformNode) => void): Nullable<Promise<TransformNode>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading cameras.\r\n * @param context The context when loading the asset\r\n * @param camera The glTF camera property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled\r\n */\r\n loadCameraAsync?(context: string, camera: ICamera, assign: (babylonCamera: Camera) => void): Nullable<Promise<Camera>>;\r\n\r\n /**\r\n * @internal\r\n * Define this method to modify the default behavior when loading vertex data for mesh primitives.\r\n * @param context The context when loading the asset\r\n * @param primitive The glTF mesh primitive property\r\n * @returns A promise that resolves with the loaded geometry when the load is complete or null if not handled\r\n */\r\n _loadVertexDataAsync?(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;\r\n\r\n /**\r\n * @internal\r\n * Define this method to modify the default behavior when loading data for mesh primitives.\r\n * @param context The context when loading the asset\r\n * @param name The mesh name when loading the asset\r\n * @param node The glTF node when loading the asset\r\n * @param mesh The glTF mesh when loading the asset\r\n * @param primitive The glTF mesh primitive property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded mesh when the load is complete or null if not handled\r\n */\r\n _loadMeshPrimitiveAsync?(\r\n context: string,\r\n name: string,\r\n node: INode,\r\n mesh: IMesh,\r\n primitive: IMeshPrimitive,\r\n assign: (babylonMesh: AbstractMesh) => void\r\n ): Nullable<Promise<AbstractMesh>>;\r\n\r\n /**\r\n * @internal\r\n * Define this method to modify the default behavior when loading materials. Load material creates the material and then loads material properties.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon material when the load is complete or null if not handled\r\n */\r\n _loadMaterialAsync?(\r\n context: string,\r\n material: IMaterial,\r\n babylonMesh: Nullable<Mesh>,\r\n babylonDrawMode: number,\r\n assign: (babylonMaterial: Material) => void\r\n ): Nullable<Promise<Material>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when creating materials.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param babylonDrawMode The draw mode for the Babylon material\r\n * @returns The Babylon material or null if not handled\r\n */\r\n createMaterial?(context: string, material: IMaterial, babylonDrawMode: number): Nullable<Material>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading material properties.\r\n * @param context The context when loading the asset\r\n * @param material The glTF material property\r\n * @param babylonMaterial The Babylon material\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n loadMaterialPropertiesAsync?(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading texture infos.\r\n * @param context The context when loading the asset\r\n * @param textureInfo The glTF texture info property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled\r\n */\r\n loadTextureInfoAsync?(context: string, textureInfo: ITextureInfo, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;\r\n\r\n /**\r\n * @internal\r\n * Define this method to modify the default behavior when loading textures.\r\n * @param context The context when loading the asset\r\n * @param texture The glTF texture property\r\n * @param assign A function called synchronously after parsing the glTF properties\r\n * @returns A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled\r\n */\r\n _loadTextureAsync?(context: string, texture: ITexture, assign: (babylonTexture: BaseTexture) => void): Nullable<Promise<BaseTexture>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading animations.\r\n * @param context The context when loading the asset\r\n * @param animation The glTF animation property\r\n * @returns A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled\r\n */\r\n loadAnimationAsync?(context: string, animation: IAnimation): Nullable<Promise<AnimationGroup>>;\r\n\r\n /**\r\n * @internal\r\n * Define this method to modify the default behvaior when loading animation channels.\r\n * @param context The context when loading the asset\r\n * @param animationContext The context of the animation when loading the asset\r\n * @param animation The glTF animation property\r\n * @param channel The glTF animation channel property\r\n * @param onLoad Called for each animation loaded\r\n * @returns A void promise that resolves when the load is complete or null if not handled\r\n */\r\n _loadAnimationChannelAsync?(\r\n context: string,\r\n animationContext: string,\r\n animation: IAnimation,\r\n channel: IAnimationChannel,\r\n onLoad: (babylonAnimatable: IAnimatable, babylonAnimation: Animation) => void\r\n ): Nullable<Promise<void>>;\r\n\r\n /**\r\n * @internal\r\n * Define this method to modify the default behavior when loading skins.\r\n * @param context The context when loading the asset\r\n * @param node The glTF node property\r\n * @param skin The glTF skin property\r\n * @returns A promise that resolves when the load is complete or null if not handled\r\n */\r\n _loadSkinAsync?(context: string, node: INode, skin: ISkin): Nullable<Promise<void>>;\r\n\r\n /**\r\n * @internal\r\n * Define this method to modify the default behavior when loading uris.\r\n * @param context The context when loading the asset\r\n * @param property The glTF property associated with the uri\r\n * @param uri The uri to load\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n _loadUriAsync?(context: string, property: IProperty, uri: string): Nullable<Promise<ArrayBufferView>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading buffer views.\r\n * @param context The context when loading the asset\r\n * @param bufferView The glTF buffer view property\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n loadBufferViewAsync?(context: string, bufferView: IBufferView): Nullable<Promise<ArrayBufferView>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when loading buffers.\r\n * @param context The context when loading the asset\r\n * @param buffer The glTF buffer property\r\n * @param byteOffset The byte offset to load\r\n * @param byteLength The byte length to load\r\n * @returns A promise that resolves with the loaded data when the load is complete or null if not handled\r\n */\r\n loadBufferAsync?(context: string, buffer: IBuffer, byteOffset: number, byteLength: number): Nullable<Promise<ArrayBufferView>>;\r\n}\r\n"]}
@@ -21,9 +21,9 @@ export interface IArrayItem {
21
21
  * Loader interface with additional members.
22
22
  */
23
23
  export interface IAccessor extends GLTF2.IAccessor, IArrayItem {
24
- /** @hidden */
24
+ /** @internal */
25
25
  _data?: Promise<ArrayBufferView>;
26
- /** @hidden */
26
+ /** @internal */
27
27
  _babylonVertexBuffer?: {
28
28
  [kind: string]: Promise<VertexBuffer>;
29
29
  };
@@ -33,63 +33,61 @@ export interface IAccessor extends GLTF2.IAccessor, IArrayItem {
33
33
  */
34
34
  export interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {
35
35
  }
36
- /** @hidden */
36
+ /** @internal */
37
37
  export interface _IAnimationSamplerData {
38
+ /** @internal */
38
39
  input: Float32Array;
40
+ /** @internal */
39
41
  interpolation: GLTF2.AnimationSamplerInterpolation;
42
+ /** @internal */
40
43
  output: Float32Array;
41
44
  }
42
45
  /**
43
46
  * Loader interface with additional members.
44
47
  */
45
48
  export interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {
46
- /** @hidden */
49
+ /** @internal */
47
50
  _data?: Promise<_IAnimationSamplerData>;
48
51
  }
49
52
  /**
50
53
  * Loader interface with additional members.
51
54
  */
52
55
  export interface IAnimation extends GLTF2.IAnimation, IArrayItem {
56
+ /** @internal */
53
57
  channels: IAnimationChannel[];
58
+ /** @internal */
54
59
  samplers: IAnimationSampler[];
55
- /** @hidden */
60
+ /** @internal */
56
61
  _babylonAnimationGroup?: AnimationGroup;
57
62
  }
58
63
  /**
59
64
  * Loader interface with additional members.
60
65
  */
61
66
  export interface IBuffer extends GLTF2.IBuffer, IArrayItem {
62
- /** @hidden */
67
+ /** @internal */
63
68
  _data?: Promise<ArrayBufferView>;
64
69
  }
65
70
  /**
66
71
  * Loader interface with additional members.
67
72
  */
68
73
  export interface IBufferView extends GLTF2.IBufferView, IArrayItem {
69
- /** @hidden */
74
+ /** @internal */
70
75
  _data?: Promise<ArrayBufferView>;
71
- /** @hidden */
76
+ /** @internal */
72
77
  _babylonBuffer?: Promise<Buffer>;
73
78
  }
74
- /**
75
- * Loader interface with additional members.
76
- */
77
- export interface IKHRLight extends GLTF2.IKHRLightsPunctual_Light {
78
- /** @hidden */
79
- _babylonLight: Light;
80
- }
81
79
  /**
82
80
  * Loader interface with additional members.
83
81
  */
84
82
  export interface ICamera extends GLTF2.ICamera, IArrayItem {
85
- /** @hidden */
86
- _babylonCamera: Camera;
83
+ /** @internal */
84
+ _babylonCamera?: Camera;
87
85
  }
88
86
  /**
89
87
  * Loader interface with additional members.
90
88
  */
91
89
  export interface IImage extends GLTF2.IImage, IArrayItem {
92
- /** @hidden */
90
+ /** @internal */
93
91
  _data?: Promise<ArrayBufferView>;
94
92
  }
95
93
  /**
@@ -106,18 +104,24 @@ export interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionT
106
104
  * Loader interface with additional members.
107
105
  */
108
106
  export interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {
107
+ /** @internal */
109
108
  baseColorTexture?: ITextureInfo;
109
+ /** @internal */
110
110
  metallicRoughnessTexture?: ITextureInfo;
111
111
  }
112
112
  /**
113
113
  * Loader interface with additional members.
114
114
  */
115
115
  export interface IMaterial extends GLTF2.IMaterial, IArrayItem {
116
+ /** @internal */
116
117
  pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;
118
+ /** @internal */
117
119
  normalTexture?: IMaterialNormalTextureInfo;
120
+ /** @internal */
118
121
  occlusionTexture?: IMaterialOcclusionTextureInfo;
122
+ /** @internal */
119
123
  emissiveTexture?: ITextureInfo;
120
- /** @hidden */
124
+ /** @internal */
121
125
  _data?: {
122
126
  [babylonDrawMode: number]: {
123
127
  babylonMaterial: Material;
@@ -130,13 +134,14 @@ export interface IMaterial extends GLTF2.IMaterial, IArrayItem {
130
134
  * Loader interface with additional members.
131
135
  */
132
136
  export interface IMesh extends GLTF2.IMesh, IArrayItem {
137
+ /** @internal */
133
138
  primitives: IMeshPrimitive[];
134
139
  }
135
140
  /**
136
141
  * Loader interface with additional members.
137
142
  */
138
143
  export interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {
139
- /** @hidden */
144
+ /** @internal */
140
145
  _instanceData?: {
141
146
  babylonSourceMesh: Mesh;
142
147
  promise: Promise<any>;
@@ -146,31 +151,33 @@ export interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {
146
151
  * Loader interface with additional members.
147
152
  */
148
153
  export interface INode extends GLTF2.INode, IArrayItem {
149
- /**
150
- * The parent glTF node.
151
- */
154
+ /** @internal */
152
155
  parent?: INode;
153
- /** @hidden */
156
+ /** @internal */
154
157
  _babylonTransformNode?: TransformNode;
155
- /** @hidden */
158
+ /** @internal */
156
159
  _babylonTransformNodeForSkin?: TransformNode;
157
- /** @hidden */
160
+ /** @internal */
158
161
  _primitiveBabylonMeshes?: AbstractMesh[];
159
- /** @hidden */
162
+ /** @internal */
160
163
  _numMorphTargets?: number;
161
164
  }
162
- /** @hidden */
165
+ /** @internal */
163
166
  export interface _ISamplerData {
167
+ /** @internal */
164
168
  noMipMaps: boolean;
169
+ /** @internal */
165
170
  samplingMode: number;
171
+ /** @internal */
166
172
  wrapU: number;
173
+ /** @internal */
167
174
  wrapV: number;
168
175
  }
169
176
  /**
170
177
  * Loader interface with additional members.
171
178
  */
172
179
  export interface ISampler extends GLTF2.ISampler, IArrayItem {
173
- /** @hidden */
180
+ /** @internal */
174
181
  _data?: _ISamplerData;
175
182
  }
176
183
  /**
@@ -182,7 +189,7 @@ export interface IScene extends GLTF2.IScene, IArrayItem {
182
189
  * Loader interface with additional members.
183
190
  */
184
191
  export interface ISkin extends GLTF2.ISkin, IArrayItem {
185
- /** @hidden */
192
+ /** @internal */
186
193
  _data?: {
187
194
  babylonSkeleton: Skeleton;
188
195
  promise: Promise<void>;
@@ -192,7 +199,7 @@ export interface ISkin extends GLTF2.ISkin, IArrayItem {
192
199
  * Loader interface with additional members.
193
200
  */
194
201
  export interface ITexture extends GLTF2.ITexture, IArrayItem {
195
- /** @hidden */
202
+ /** @internal */
196
203
  _textureInfo: ITextureInfo;
197
204
  }
198
205
  /**
@@ -206,17 +213,37 @@ export interface ITextureInfo extends GLTF2.ITextureInfo {
206
213
  * Loader interface with additional members.
207
214
  */
208
215
  export interface IGLTF extends GLTF2.IGLTF {
216
+ /** @internal */
209
217
  accessors?: IAccessor[];
218
+ /** @internal */
210
219
  animations?: IAnimation[];
220
+ /** @internal */
211
221
  buffers?: IBuffer[];
222
+ /** @internal */
212
223
  bufferViews?: IBufferView[];
224
+ /** @internal */
213
225
  cameras?: ICamera[];
226
+ /** @internal */
214
227
  images?: IImage[];
228
+ /** @internal */
215
229
  materials?: IMaterial[];
230
+ /** @internal */
216
231
  meshes?: IMesh[];
232
+ /** @internal */
217
233
  nodes?: INode[];
234
+ /** @internal */
218
235
  samplers?: ISampler[];
236
+ /** @internal */
219
237
  scenes?: IScene[];
238
+ /** @internal */
220
239
  skins?: ISkin[];
240
+ /** @internal */
221
241
  textures?: ITexture[];
222
242
  }
243
+ /**
244
+ * Loader interface with additional members.
245
+ */
246
+ export interface IKHRLightsPunctual_Light extends GLTF2.IKHRLightsPunctual_Light, IArrayItem {
247
+ /** @hidden */
248
+ _babylonLight?: Light;
249
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"glTFLoaderInterfaces.js","sourceRoot":"","sources":["../../../../../../lts/loaders/generated/glTF/2.0/glTFLoaderInterfaces.ts"],"names":[],"mappings":"","sourcesContent":["import type { AnimationGroup } from \"core/Animations/animationGroup\";\r\nimport type { Skeleton } from \"core/Bones/skeleton\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport type { TransformNode } from \"core/Meshes/transformNode\";\r\nimport type { Buffer, VertexBuffer } from \"core/Buffers/buffer\";\r\nimport type { AbstractMesh } from \"core/Meshes/abstractMesh\";\r\nimport type { Mesh } from \"core/Meshes/mesh\";\r\nimport type { Camera } from \"core/Cameras/camera\";\r\nimport type { Light } from \"core/Lights/light\";\r\n\r\nimport type * as GLTF2 from \"babylonjs-gltf2interface\";\r\n\r\n/**\r\n * Loader interface with an index field.\r\n */\r\nexport interface IArrayItem {\r\n /**\r\n * The index of this item in the array.\r\n */\r\n index: number;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAccessor extends GLTF2.IAccessor, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<ArrayBufferView>;\r\n\r\n /** @hidden */\r\n _babylonVertexBuffer?: { [kind: string]: Promise<VertexBuffer> };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {}\r\n\r\n/** @hidden */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport interface _IAnimationSamplerData {\r\n input: Float32Array;\r\n interpolation: GLTF2.AnimationSamplerInterpolation;\r\n output: Float32Array;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<_IAnimationSamplerData>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAnimation extends GLTF2.IAnimation, IArrayItem {\r\n channels: IAnimationChannel[];\r\n samplers: IAnimationSampler[];\r\n\r\n /** @hidden */\r\n _babylonAnimationGroup?: AnimationGroup;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IBuffer extends GLTF2.IBuffer, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<ArrayBufferView>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IBufferView extends GLTF2.IBufferView, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<ArrayBufferView>;\r\n\r\n /** @hidden */\r\n _babylonBuffer?: Promise<Buffer>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IKHRLight extends GLTF2.IKHRLightsPunctual_Light {\r\n /** @hidden */\r\n _babylonLight: Light;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ICamera extends GLTF2.ICamera, IArrayItem {\r\n /** @hidden */\r\n _babylonCamera: Camera;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IImage extends GLTF2.IImage, IArrayItem {\r\n /** @hidden */\r\n _data?: Promise<ArrayBufferView>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterialNormalTextureInfo extends GLTF2.IMaterialNormalTextureInfo, ITextureInfo {}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {\r\n baseColorTexture?: ITextureInfo;\r\n metallicRoughnessTexture?: ITextureInfo;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterial extends GLTF2.IMaterial, IArrayItem {\r\n pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;\r\n normalTexture?: IMaterialNormalTextureInfo;\r\n occlusionTexture?: IMaterialOcclusionTextureInfo;\r\n emissiveTexture?: ITextureInfo;\r\n\r\n /** @hidden */\r\n _data?: {\r\n [babylonDrawMode: number]: {\r\n babylonMaterial: Material;\r\n babylonMeshes: AbstractMesh[];\r\n promise: Promise<void>;\r\n };\r\n };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMesh extends GLTF2.IMesh, IArrayItem {\r\n primitives: IMeshPrimitive[];\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {\r\n /** @hidden */\r\n _instanceData?: {\r\n babylonSourceMesh: Mesh;\r\n promise: Promise<any>;\r\n };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface INode extends GLTF2.INode, IArrayItem {\r\n /**\r\n * The parent glTF node.\r\n */\r\n parent?: INode;\r\n\r\n /** @hidden */\r\n _babylonTransformNode?: TransformNode;\r\n\r\n /** @hidden */\r\n _babylonTransformNodeForSkin?: TransformNode;\r\n\r\n /** @hidden */\r\n _primitiveBabylonMeshes?: AbstractMesh[];\r\n\r\n /** @hidden */\r\n _numMorphTargets?: number;\r\n}\r\n\r\n/** @hidden */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport interface _ISamplerData {\r\n noMipMaps: boolean;\r\n samplingMode: number;\r\n wrapU: number;\r\n wrapV: number;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ISampler extends GLTF2.ISampler, IArrayItem {\r\n /** @hidden */\r\n _data?: _ISamplerData;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IScene extends GLTF2.IScene, IArrayItem {}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ISkin extends GLTF2.ISkin, IArrayItem {\r\n /** @hidden */\r\n _data?: {\r\n babylonSkeleton: Skeleton;\r\n promise: Promise<void>;\r\n };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ITexture extends GLTF2.ITexture, IArrayItem {\r\n /** @hidden */\r\n _textureInfo: ITextureInfo;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ITextureInfo extends GLTF2.ITextureInfo {\r\n /** false or undefined if the texture holds color data (true if data are roughness, normal, ...) */\r\n nonColorData?: boolean;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IGLTF extends GLTF2.IGLTF {\r\n accessors?: IAccessor[];\r\n animations?: IAnimation[];\r\n buffers?: IBuffer[];\r\n bufferViews?: IBufferView[];\r\n cameras?: ICamera[];\r\n images?: IImage[];\r\n materials?: IMaterial[];\r\n meshes?: IMesh[];\r\n nodes?: INode[];\r\n samplers?: ISampler[];\r\n scenes?: IScene[];\r\n skins?: ISkin[];\r\n textures?: ITexture[];\r\n}\r\n"]}
1
+ {"version":3,"file":"glTFLoaderInterfaces.js","sourceRoot":"","sources":["../../../../../../lts/loaders/generated/glTF/2.0/glTFLoaderInterfaces.ts"],"names":[],"mappings":"","sourcesContent":["import type { AnimationGroup } from \"core/Animations/animationGroup\";\r\nimport type { Skeleton } from \"core/Bones/skeleton\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport type { TransformNode } from \"core/Meshes/transformNode\";\r\nimport type { Buffer, VertexBuffer } from \"core/Buffers/buffer\";\r\nimport type { AbstractMesh } from \"core/Meshes/abstractMesh\";\r\nimport type { Mesh } from \"core/Meshes/mesh\";\r\nimport type { Camera } from \"core/Cameras/camera\";\r\nimport type { Light } from \"core/Lights/light\";\r\n\r\nimport type * as GLTF2 from \"babylonjs-gltf2interface\";\r\n\r\n/**\r\n * Loader interface with an index field.\r\n */\r\nexport interface IArrayItem {\r\n /**\r\n * The index of this item in the array.\r\n */\r\n index: number;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAccessor extends GLTF2.IAccessor, IArrayItem {\r\n /** @internal */\r\n _data?: Promise<ArrayBufferView>;\r\n\r\n /** @internal */\r\n _babylonVertexBuffer?: { [kind: string]: Promise<VertexBuffer> };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAnimationChannel extends GLTF2.IAnimationChannel, IArrayItem {}\r\n\r\n/** @internal */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport interface _IAnimationSamplerData {\r\n /** @internal */\r\n input: Float32Array;\r\n\r\n /** @internal */\r\n interpolation: GLTF2.AnimationSamplerInterpolation;\r\n\r\n /** @internal */\r\n output: Float32Array;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAnimationSampler extends GLTF2.IAnimationSampler, IArrayItem {\r\n /** @internal */\r\n _data?: Promise<_IAnimationSamplerData>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IAnimation extends GLTF2.IAnimation, IArrayItem {\r\n /** @internal */\r\n channels: IAnimationChannel[];\r\n\r\n /** @internal */\r\n samplers: IAnimationSampler[];\r\n\r\n /** @internal */\r\n _babylonAnimationGroup?: AnimationGroup;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IBuffer extends GLTF2.IBuffer, IArrayItem {\r\n /** @internal */\r\n _data?: Promise<ArrayBufferView>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IBufferView extends GLTF2.IBufferView, IArrayItem {\r\n /** @internal */\r\n _data?: Promise<ArrayBufferView>;\r\n\r\n /** @internal */\r\n _babylonBuffer?: Promise<Buffer>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ICamera extends GLTF2.ICamera, IArrayItem {\r\n /** @internal */\r\n _babylonCamera?: Camera;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IImage extends GLTF2.IImage, IArrayItem {\r\n /** @internal */\r\n _data?: Promise<ArrayBufferView>;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterialNormalTextureInfo extends GLTF2.IMaterialNormalTextureInfo, ITextureInfo {}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterialOcclusionTextureInfo extends GLTF2.IMaterialOcclusionTextureInfo, ITextureInfo {}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterialPbrMetallicRoughness extends GLTF2.IMaterialPbrMetallicRoughness {\r\n /** @internal */\r\n baseColorTexture?: ITextureInfo;\r\n\r\n /** @internal */\r\n metallicRoughnessTexture?: ITextureInfo;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMaterial extends GLTF2.IMaterial, IArrayItem {\r\n /** @internal */\r\n pbrMetallicRoughness?: IMaterialPbrMetallicRoughness;\r\n\r\n /** @internal */\r\n normalTexture?: IMaterialNormalTextureInfo;\r\n\r\n /** @internal */\r\n occlusionTexture?: IMaterialOcclusionTextureInfo;\r\n\r\n /** @internal */\r\n emissiveTexture?: ITextureInfo;\r\n\r\n /** @internal */\r\n _data?: {\r\n [babylonDrawMode: number]: {\r\n babylonMaterial: Material;\r\n babylonMeshes: AbstractMesh[];\r\n promise: Promise<void>;\r\n };\r\n };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMesh extends GLTF2.IMesh, IArrayItem {\r\n /** @internal */\r\n primitives: IMeshPrimitive[];\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IMeshPrimitive extends GLTF2.IMeshPrimitive, IArrayItem {\r\n /** @internal */\r\n _instanceData?: {\r\n babylonSourceMesh: Mesh;\r\n promise: Promise<any>;\r\n };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface INode extends GLTF2.INode, IArrayItem {\r\n /** @internal */\r\n parent?: INode;\r\n\r\n /** @internal */\r\n _babylonTransformNode?: TransformNode;\r\n\r\n /** @internal */\r\n _babylonTransformNodeForSkin?: TransformNode;\r\n\r\n /** @internal */\r\n _primitiveBabylonMeshes?: AbstractMesh[];\r\n\r\n /** @internal */\r\n _numMorphTargets?: number;\r\n}\r\n\r\n/** @internal */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport interface _ISamplerData {\r\n /** @internal */\r\n noMipMaps: boolean;\r\n\r\n /** @internal */\r\n samplingMode: number;\r\n\r\n /** @internal */\r\n wrapU: number;\r\n\r\n /** @internal */\r\n wrapV: number;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ISampler extends GLTF2.ISampler, IArrayItem {\r\n /** @internal */\r\n _data?: _ISamplerData;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IScene extends GLTF2.IScene, IArrayItem {}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ISkin extends GLTF2.ISkin, IArrayItem {\r\n /** @internal */\r\n _data?: {\r\n babylonSkeleton: Skeleton;\r\n promise: Promise<void>;\r\n };\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ITexture extends GLTF2.ITexture, IArrayItem {\r\n /** @internal */\r\n _textureInfo: ITextureInfo;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface ITextureInfo extends GLTF2.ITextureInfo {\r\n /** false or undefined if the texture holds color data (true if data are roughness, normal, ...) */\r\n nonColorData?: boolean;\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\nexport interface IGLTF extends GLTF2.IGLTF {\r\n /** @internal */\r\n accessors?: IAccessor[];\r\n\r\n /** @internal */\r\n animations?: IAnimation[];\r\n\r\n /** @internal */\r\n buffers?: IBuffer[];\r\n\r\n /** @internal */\r\n bufferViews?: IBufferView[];\r\n\r\n /** @internal */\r\n cameras?: ICamera[];\r\n\r\n /** @internal */\r\n images?: IImage[];\r\n\r\n /** @internal */\r\n materials?: IMaterial[];\r\n\r\n /** @internal */\r\n meshes?: IMesh[];\r\n\r\n /** @internal */\r\n nodes?: INode[];\r\n\r\n /** @internal */\r\n samplers?: ISampler[];\r\n\r\n /** @internal */\r\n scenes?: IScene[];\r\n\r\n /** @internal */\r\n skins?: ISkin[];\r\n\r\n /** @internal */\r\n textures?: ITexture[];\r\n}\r\n\r\n/**\r\n * Loader interface with additional members.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport interface IKHRLightsPunctual_Light extends GLTF2.IKHRLightsPunctual_Light, IArrayItem {\r\n /** @hidden */\r\n _babylonLight?: Light;\r\n}\r\n"]}