import { AssetPromise, Buffer, Entity, ResourceManager, TypedArray } from "@galacean/engine-core"; import { BufferDataRestoreInfo, GLTFContentRestorer } from "../../GLTFContentRestorer"; import { GLTFParams } from "../../GLTFLoader"; import { GLTFResource } from "../GLTFResource"; import type { IGLTF } from "../GLTFSchema"; import { GLTFParser } from "./GLTFParser"; /** * @internal */ export declare class GLTFParserContext { glTFResource: GLTFResource; resourceManager: ResourceManager; params: GLTFParams; private static readonly _parsers; static addParser(parserType: GLTFParserType, parser: GLTFParser): void; glTF: IGLTF; accessorBufferCache: Record; contentRestorer: GLTFContentRestorer; buffers?: ArrayBuffer[]; needAnimatorController: boolean; /** @internal */ _getPromises: AssetPromise[]; private _resourceCache; private _progress; /** @internal */ _setTaskCompleteProgress: (loaded: number, total: number) => void; /** @internal */ _setTaskDetailProgress: (url: string, loaded: number, total: number) => void; constructor(glTFResource: GLTFResource, resourceManager: ResourceManager, params: GLTFParams); get(type: GLTFParserType.Entity, index: number): Entity; get(type: GLTFParserType.Entity): Entity[]; get(type: GLTFParserType.Schema): AssetPromise; get(type: GLTFParserType.Validator): AssetPromise; get(type: GLTFParserType.AnimatorController): AssetPromise; get(type: GLTFParserType, index: number): AssetPromise; get(type: GLTFParserType): AssetPromise; parse(): AssetPromise; /** * @internal */ _onTaskDetail: (url: string, loaded: number, total: number) => void; /** * @internal */ _addTaskCompletePromise(taskPromise: AssetPromise): void; private _handleSubAsset; } /** * @internal */ export declare class BufferInfo { data: TypedArray; interleaved: boolean; stride: number; vertexBuffer: Buffer; vertexBindingInfos: Record; restoreInfo: BufferDataRestoreInfo; constructor(data: TypedArray, interleaved: boolean, stride: number); } export declare enum GLTFParserType { Schema = 0, Validator = 1, Scene = 2, Buffer = 3, BufferView = 4, Texture = 5, Material = 6, Mesh = 7, Entity = 8, Skin = 9, Animation = 10, AnimatorController = 11 } export declare function registerGLTFParser(pipeline: GLTFParserType): (Parser: new () => GLTFParser) => void;