import { type IBufferView, type IAccessor, type INode, type IScene, type IMesh, type IMaterial, type ITexture, type IImage, type ISampler, type IAnimation, type IMeshPrimitive, type IGLTF, type ITextureInfo, type ISkin, type ICamera } from "babylonjs-gltf2interface"; import { type Nullable } from "@babylonjs/core/types.js"; import { type Node } from "@babylonjs/core/node.js"; import { type BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js"; import { Material } from "@babylonjs/core/Materials/material.js"; import { type Scene } from "@babylonjs/core/scene.js"; import { type IGLTFExporterExtensionV2 } from "./glTFExporterExtension.js"; import { GLTFMaterialExporter } from "./glTFMaterialExporter.js"; import { type IExportOptions } from "./glTFSerializer.js"; import { GLTFData } from "./glTFData.js"; import { BufferManager } from "./bufferManager.js"; /** @internal */ export declare class GLTFExporter { readonly _glTF: IGLTF; readonly _animations: IAnimation[]; readonly _accessors: IAccessor[]; readonly _bufferViews: IBufferView[]; readonly _cameras: ICamera[]; readonly _images: IImage[]; readonly _materials: IMaterial[]; readonly _meshes: IMesh[]; readonly _nodes: INode[]; readonly _samplers: ISampler[]; readonly _scenes: IScene[]; readonly _skins: ISkin[]; readonly _textures: ITexture[]; readonly _babylonScene: Scene; readonly _imageData: { [fileName: string]: Blob; }; /** * Baked animation sample rate */ private _animationSampleRate; private readonly _options; _shouldUseGlb: boolean; readonly _materialExporter: GLTFMaterialExporter; private readonly _extensions; readonly _bufferManager: BufferManager; private readonly _shouldExportNodeMap; private readonly _nodeMap; readonly _materialMap: Map; private readonly _camerasMap; private readonly _nodesCameraMap; private readonly _skinMap; private readonly _nodesSkinMap; readonly _materialNeedsUVsSet: Set; private static readonly _ExtensionNames; private static readonly _ExtensionFactories; private static readonly _ExtensionOrders; private _ApplyExtension; private _ApplyExtensions; _extensionsPostExportNodeAsync(context: string, node: INode, babylonNode: Node, nodeMap: Map, convertToRightHanded: boolean): Promise>; _extensionsPostExportMaterialAsync(context: string, material: IMaterial, babylonMaterial: Material): Promise>; /** * Get additional textures for a material * @param context The context when loading the asset * @param material The glTF material * @param babylonMaterial The Babylon.js material * @returns List of additional textures */ _extensionsPostExportMaterialAdditionalTexturesAsync(context: string, material: IMaterial, babylonMaterial: Material): Promise; _extensionsPostExportTextures(context: string, textureInfo: ITextureInfo, babylonTexture: BaseTexture): void; _extensionsPostExportMeshPrimitive(primitive: IMeshPrimitive): void; _extensionsPreGenerateBinaryAsync(): Promise; private _forEachExtensions; private _extensionsOnExporting; private _loadExtensions; constructor(babylonScene?: Nullable, options?: IExportOptions); dispose(): void; get options(): Required; static RegisterExtension(name: string, factory: (exporter: GLTFExporter) => IGLTFExporterExtensionV2, order?: number): void; static UnregisterExtension(name: string): boolean; private _generateJSON; generateGLTFAsync(glTFPrefix: string): Promise; private _generateBinaryAsync; /** * Pads the number to a multiple of 4 * @param num number to pad * @returns padded number */ private _getPadding; generateGLBAsync(glTFPrefix: string): Promise; private _setNodeTransformation; private _setCameraTransformation; private _listAvailableCameras; private _exportAndAssignCameras; private _listAvailableSkeletons; private _exportAndAssignSkeletons; private _exportSceneAsync; private _shouldExportNode; private _exportNodesAsync; private _collectBuffers; private _exportBuffers; /** * Processes a node to be exported to the glTF file * @returns A promise that resolves once the node has been exported * @internal */ private _exportNodeAsync; /** * Creates a glTF node from a Babylon.js node. If skipped, returns null. * @internal */ private _createNodeAsync; private _exportIndices; private _exportVertexBuffer; private _exportMaterialAsync; private _exportMeshAsync; }