import GLTFShader from "../Parser/Schema/GLTFShader"; import GLTFImage from "../Parser/Schema/GLTFImage"; import GLTF from "../Parser/Schema/GLTF"; /** * Provides resolving resource dependency while parsing gltf file. */ export default class ResourceResolver { private _rootPath; baseDirectory: string; binaryGLTFBuffer: ArrayBuffer; tf: GLTF; constructor(_rootPath: string); loadGLTFFile(): Promise; /** * Load image from specified url or dataURL. * @param {string} url [description] * @return {Promise} [description] */ loadImage(image: GLTFImage): Promise; /** * Load buffer from specified url or dataURL. * @return {Promise} [description] */ loadBuffer(url: string): Promise; /** * Load string from specified url or dataURL * @param {string} url [description] * @return {Promise} [description] */ loadShader(shader: GLTFShader): Promise; /** * Convert data url string into array buffer * @param {string} dataUri [description] * @return {ArrayBuffer} [description] */ private _dataUriToArrayBuffer(dataUri); /** * Convert data uri into image element * @param {string} dataUrl [description] * @return {Promise} [description] */ private _dataUriToImage(dataUrl); private _dataUriToText(dataUrl); private _ensureCorrectSize(image); private _bufferToString(arr); private _smallBufferToString(arr); /** * Check specified url is dataUrl or not * @param {string} dataUrl [description] * @return {boolean} [description] */ private _isDataUrl(dataUrl); /** * Get directiory location from specified url * @param {string} url [description] * @return {string} [description] */ private _getBaseDir(url); }