babylonjs-serializers 5.32.1 → 5.32.2

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.
@@ -237,7 +237,6 @@ declare module BABYLON {
237
237
  * @internal
238
238
  */
239
239
  export class KHR_texture_transform implements IGLTFExporterExtensionV2 {
240
- private _recordedTextures;
241
240
  /** Name of this extension */
242
241
  readonly name = "KHR_texture_transform";
243
242
  /** Defines whether this extension is enabled */
@@ -251,13 +250,7 @@ declare module BABYLON {
251
250
  /** @internal */
252
251
  get wasUsed(): boolean;
253
252
  postExportTexture?(context: string, textureInfo: BABYLON.GLTF2.ITextureInfo, babylonTexture: Texture): void;
254
- preExportTextureAsync(context: string, babylonTexture: Texture): Promise<Texture>;
255
- /**
256
- * Transform the babylon texture by the offset, rotation and scale parameters using a procedural texture
257
- * @param babylonTexture
258
- * @param scene
259
- */
260
- private _textureTransformTextureAsync;
253
+ preExportTextureAsync(context: string, babylonTexture: Texture): Promise<Nullable<Texture>>;
261
254
  }
262
255
 
263
256
 
@@ -565,12 +558,12 @@ declare module BABYLON {
565
558
  */
566
559
  _imageData: {
567
560
  [fileName: string]: {
568
- data: Uint8Array;
561
+ data: ArrayBuffer;
569
562
  mimeType: BABYLON.GLTF2.ImageMimeType;
570
563
  };
571
564
  };
572
565
  protected _orderedImageData: Array<{
573
- data: Uint8Array;
566
+ data: ArrayBuffer;
574
567
  mimeType: BABYLON.GLTF2.ImageMimeType;
575
568
  }>;
576
569
  /**
@@ -955,7 +948,7 @@ declare module BABYLON {
955
948
  * @param mimeType The mime-type of the generated image
956
949
  * @returns A promise that resolves with the exported texture
957
950
  */
958
- preExportTextureAsync?(context: string, babylonTexture: Nullable<Texture>, mimeType: BABYLON.GLTF2.ImageMimeType): Promise<Texture>;
951
+ preExportTextureAsync?(context: string, babylonTexture: Nullable<Texture>, mimeType: BABYLON.GLTF2.ImageMimeType): Promise<Nullable<Texture>>;
959
952
  /**
960
953
  * Define this method to get notified when a texture info is created
961
954
  * @param context The context when loading the asset
@@ -1024,6 +1017,7 @@ declare module BABYLON {
1024
1017
  * Mapping to store textures
1025
1018
  */
1026
1019
  private _textureMap;
1020
+ private _internalTextureToImage;
1027
1021
  /**
1028
1022
  * Numeric tolerance value
1029
1023
  */
@@ -1096,7 +1090,7 @@ declare module BABYLON {
1096
1090
  * @param mimeType mimetype of the image
1097
1091
  * @returns base64 image string
1098
1092
  */
1099
- private _createBase64FromCanvasAsync;
1093
+ private _getImageDataAsync;
1100
1094
  /**
1101
1095
  * Generates a white texture based on the specified width and height
1102
1096
  * @param width width of the texture in pixels
@@ -1158,9 +1152,8 @@ declare module BABYLON {
1158
1152
  * @returns glTF PBR Metallic Roughness factors
1159
1153
  */
1160
1154
  private _convertMetalRoughFactorsToMetallicRoughnessAsync;
1161
- private _getGLTFTextureSampler;
1155
+ private _getTextureSampler;
1162
1156
  private _getGLTFTextureWrapMode;
1163
- private _getGLTFTextureWrapModesSampler;
1164
1157
  /**
1165
1158
  * Convert a PBRMaterial (Specular/Glossiness) to Metallic Roughness factors
1166
1159
  * @param babylonPBRMaterial BJS PBR Metallic Roughness Material
@@ -1187,16 +1180,9 @@ declare module BABYLON {
1187
1180
  */
1188
1181
  _exportTextureAsync(babylonTexture: BaseTexture, mimeType: BABYLON.GLTF2.ImageMimeType): Promise<Nullable<BABYLON.GLTF2.ITextureInfo>>;
1189
1182
  _exportTextureInfoAsync(babylonTexture: BaseTexture, mimeType: BABYLON.GLTF2.ImageMimeType): Promise<Nullable<BABYLON.GLTF2.ITextureInfo>>;
1190
- /**
1191
- * Builds a texture from base64 string
1192
- * @param base64Texture base64 texture string
1193
- * @param baseTextureName Name to use for the texture
1194
- * @param mimeType image mime type for the texture
1195
- * @param texCoordIndex
1196
- * @param samplerIndex
1197
- * @returns glTF texture info, or null if the texture format is not supported
1198
- */
1199
- private _getTextureInfoFromBase64;
1183
+ private _exportImage;
1184
+ private _exportTextureInfo;
1185
+ private _exportTextureSampler;
1200
1186
  }
1201
1187
 
1202
1188
 
@@ -1357,13 +1343,6 @@ declare module BABYLON {
1357
1343
 
1358
1344
 
1359
1345
 
1360
- /** @internal */
1361
- export var textureTransformPixelShader: {
1362
- name: string;
1363
- shader: string;
1364
- };
1365
-
1366
-
1367
1346
  /** @internal */
1368
1347
  export var __IGLTFExporterExtension: number;
1369
1348
  /**