babylon.glTF1FileLoader.d.ts 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  1. declare module BABYLON {
  2. enum GLTFLoaderCoordinateSystemMode {
  3. AUTO = 0,
  4. PASS_THROUGH = 1,
  5. FORCE_RIGHT_HANDED = 2,
  6. }
  7. interface IGLTFLoaderData {
  8. json: Object;
  9. bin: ArrayBufferView;
  10. }
  11. interface IGLTFLoader {
  12. importMeshAsync: (meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void) => void;
  13. loadAsync: (scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: () => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void) => void;
  14. }
  15. class GLTFFileLoader implements ISceneLoaderPluginAsync {
  16. static CreateGLTFLoaderV1: (parent: GLTFFileLoader) => IGLTFLoader;
  17. static CreateGLTFLoaderV2: (parent: GLTFFileLoader) => IGLTFLoader;
  18. static HomogeneousCoordinates: boolean;
  19. static IncrementalLoading: boolean;
  20. coordinateSystemMode: GLTFLoaderCoordinateSystemMode;
  21. onTextureLoaded: (texture: BaseTexture) => void;
  22. onMaterialLoaded: (material: Material) => void;
  23. /**
  24. * Let the user decides if he needs to process the material (like precompilation) before affecting it to meshes
  25. */
  26. onBeforeMaterialReadyAsync: (material: Material, targetMesh: AbstractMesh, isLOD: boolean, callback: () => void) => void;
  27. /**
  28. * Raised when all LODs are complete (or if there is no LOD and model is complete)
  29. */
  30. onComplete: () => void;
  31. /**
  32. * Raised when first LOD complete (or if there is no LOD and model is complete)
  33. */
  34. onFirstLODComplete: () => void;
  35. name: string;
  36. extensions: ISceneLoaderPluginExtensions;
  37. importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onSuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void): void;
  38. loadAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onSuccess: () => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void): void;
  39. canDirectLoad(data: string): boolean;
  40. private static _parse(data, onError);
  41. private _getLoader(loaderData, onError);
  42. private static _parseBinary(data, onError);
  43. private static _parseV1(binaryReader, onError);
  44. private static _parseV2(binaryReader, onError);
  45. private static _parseVersion(version);
  46. private static _compareVersion(a, b);
  47. private static _decodeBufferToText(view);
  48. }
  49. }
  50. declare module BABYLON.GLTF1 {
  51. /**
  52. * Enums
  53. */
  54. enum EComponentType {
  55. BYTE = 5120,
  56. UNSIGNED_BYTE = 5121,
  57. SHORT = 5122,
  58. UNSIGNED_SHORT = 5123,
  59. FLOAT = 5126,
  60. }
  61. enum EShaderType {
  62. FRAGMENT = 35632,
  63. VERTEX = 35633,
  64. }
  65. enum EParameterType {
  66. BYTE = 5120,
  67. UNSIGNED_BYTE = 5121,
  68. SHORT = 5122,
  69. UNSIGNED_SHORT = 5123,
  70. INT = 5124,
  71. UNSIGNED_INT = 5125,
  72. FLOAT = 5126,
  73. FLOAT_VEC2 = 35664,
  74. FLOAT_VEC3 = 35665,
  75. FLOAT_VEC4 = 35666,
  76. INT_VEC2 = 35667,
  77. INT_VEC3 = 35668,
  78. INT_VEC4 = 35669,
  79. BOOL = 35670,
  80. BOOL_VEC2 = 35671,
  81. BOOL_VEC3 = 35672,
  82. BOOL_VEC4 = 35673,
  83. FLOAT_MAT2 = 35674,
  84. FLOAT_MAT3 = 35675,
  85. FLOAT_MAT4 = 35676,
  86. SAMPLER_2D = 35678,
  87. }
  88. enum ETextureWrapMode {
  89. CLAMP_TO_EDGE = 33071,
  90. MIRRORED_REPEAT = 33648,
  91. REPEAT = 10497,
  92. }
  93. enum ETextureFilterType {
  94. NEAREST = 9728,
  95. LINEAR = 9728,
  96. NEAREST_MIPMAP_NEAREST = 9984,
  97. LINEAR_MIPMAP_NEAREST = 9985,
  98. NEAREST_MIPMAP_LINEAR = 9986,
  99. LINEAR_MIPMAP_LINEAR = 9987,
  100. }
  101. enum ETextureFormat {
  102. ALPHA = 6406,
  103. RGB = 6407,
  104. RGBA = 6408,
  105. LUMINANCE = 6409,
  106. LUMINANCE_ALPHA = 6410,
  107. }
  108. enum ECullingType {
  109. FRONT = 1028,
  110. BACK = 1029,
  111. FRONT_AND_BACK = 1032,
  112. }
  113. enum EBlendingFunction {
  114. ZERO = 0,
  115. ONE = 1,
  116. SRC_COLOR = 768,
  117. ONE_MINUS_SRC_COLOR = 769,
  118. DST_COLOR = 774,
  119. ONE_MINUS_DST_COLOR = 775,
  120. SRC_ALPHA = 770,
  121. ONE_MINUS_SRC_ALPHA = 771,
  122. DST_ALPHA = 772,
  123. ONE_MINUS_DST_ALPHA = 773,
  124. CONSTANT_COLOR = 32769,
  125. ONE_MINUS_CONSTANT_COLOR = 32770,
  126. CONSTANT_ALPHA = 32771,
  127. ONE_MINUS_CONSTANT_ALPHA = 32772,
  128. SRC_ALPHA_SATURATE = 776,
  129. }
  130. /**
  131. * Interfaces
  132. */
  133. interface IGLTFProperty {
  134. extensions?: Object;
  135. extras?: Object;
  136. }
  137. interface IGLTFChildRootProperty extends IGLTFProperty {
  138. name?: string;
  139. }
  140. interface IGLTFAccessor extends IGLTFChildRootProperty {
  141. bufferView: string;
  142. byteOffset: number;
  143. byteStride: number;
  144. count: number;
  145. type: string;
  146. componentType: EComponentType;
  147. max?: number[];
  148. min?: number[];
  149. name?: string;
  150. }
  151. interface IGLTFBufferView extends IGLTFChildRootProperty {
  152. buffer: string;
  153. byteOffset: number;
  154. byteLength: number;
  155. byteStride: number;
  156. target?: number;
  157. }
  158. interface IGLTFBuffer extends IGLTFChildRootProperty {
  159. uri: string;
  160. byteLength?: number;
  161. type?: string;
  162. }
  163. interface IGLTFShader extends IGLTFChildRootProperty {
  164. uri: string;
  165. type: EShaderType;
  166. }
  167. interface IGLTFProgram extends IGLTFChildRootProperty {
  168. attributes: string[];
  169. fragmentShader: string;
  170. vertexShader: string;
  171. }
  172. interface IGLTFTechniqueParameter {
  173. type: number;
  174. count?: number;
  175. semantic?: string;
  176. node?: string;
  177. value?: number | boolean | string | Array<any>;
  178. source?: string;
  179. babylonValue?: any;
  180. }
  181. interface IGLTFTechniqueCommonProfile {
  182. lightingModel: string;
  183. texcoordBindings: Object;
  184. parameters?: Array<any>;
  185. }
  186. interface IGLTFTechniqueStatesFunctions {
  187. blendColor?: number[];
  188. blendEquationSeparate?: number[];
  189. blendFuncSeparate?: number[];
  190. colorMask: boolean[];
  191. cullFace: number[];
  192. }
  193. interface IGLTFTechniqueStates {
  194. enable: number[];
  195. functions: IGLTFTechniqueStatesFunctions;
  196. }
  197. interface IGLTFTechnique extends IGLTFChildRootProperty {
  198. parameters: Object;
  199. program: string;
  200. attributes: Object;
  201. uniforms: Object;
  202. states: IGLTFTechniqueStates;
  203. }
  204. interface IGLTFMaterial extends IGLTFChildRootProperty {
  205. technique?: string;
  206. values: string[];
  207. }
  208. interface IGLTFMeshPrimitive extends IGLTFProperty {
  209. attributes: Object;
  210. indices: string;
  211. material: string;
  212. mode?: number;
  213. }
  214. interface IGLTFMesh extends IGLTFChildRootProperty {
  215. primitives: IGLTFMeshPrimitive[];
  216. }
  217. interface IGLTFImage extends IGLTFChildRootProperty {
  218. uri: string;
  219. }
  220. interface IGLTFSampler extends IGLTFChildRootProperty {
  221. magFilter?: number;
  222. minFilter?: number;
  223. wrapS?: number;
  224. wrapT?: number;
  225. }
  226. interface IGLTFTexture extends IGLTFChildRootProperty {
  227. sampler: string;
  228. source: string;
  229. format?: ETextureFormat;
  230. internalFormat?: ETextureFormat;
  231. target?: number;
  232. type?: number;
  233. babylonTexture?: Texture;
  234. }
  235. interface IGLTFAmbienLight {
  236. color?: number[];
  237. }
  238. interface IGLTFDirectionalLight {
  239. color?: number[];
  240. }
  241. interface IGLTFPointLight {
  242. color?: number[];
  243. constantAttenuation?: number;
  244. linearAttenuation?: number;
  245. quadraticAttenuation?: number;
  246. }
  247. interface IGLTFSpotLight {
  248. color?: number[];
  249. constantAttenuation?: number;
  250. fallOfAngle?: number;
  251. fallOffExponent?: number;
  252. linearAttenuation?: number;
  253. quadraticAttenuation?: number;
  254. }
  255. interface IGLTFLight extends IGLTFChildRootProperty {
  256. type: string;
  257. }
  258. interface IGLTFCameraOrthographic {
  259. xmag: number;
  260. ymag: number;
  261. zfar: number;
  262. znear: number;
  263. }
  264. interface IGLTFCameraPerspective {
  265. aspectRatio: number;
  266. yfov: number;
  267. zfar: number;
  268. znear: number;
  269. }
  270. interface IGLTFCamera extends IGLTFChildRootProperty {
  271. type: string;
  272. }
  273. interface IGLTFAnimationChannelTarget {
  274. id: string;
  275. path: string;
  276. }
  277. interface IGLTFAnimationChannel {
  278. sampler: string;
  279. target: IGLTFAnimationChannelTarget;
  280. }
  281. interface IGLTFAnimationSampler {
  282. input: string;
  283. output: string;
  284. interpolation?: string;
  285. }
  286. interface IGLTFAnimation extends IGLTFChildRootProperty {
  287. channels?: IGLTFAnimationChannel[];
  288. parameters?: Object;
  289. samplers?: Object;
  290. }
  291. interface IGLTFNodeInstanceSkin {
  292. skeletons: string[];
  293. skin: string;
  294. meshes: string[];
  295. }
  296. interface IGLTFSkins extends IGLTFChildRootProperty {
  297. bindShapeMatrix: number[];
  298. inverseBindMatrices: string;
  299. jointNames: string[];
  300. babylonSkeleton?: Skeleton;
  301. }
  302. interface IGLTFNode extends IGLTFChildRootProperty {
  303. camera?: string;
  304. children: string[];
  305. skin?: string;
  306. jointName?: string;
  307. light?: string;
  308. matrix: number[];
  309. mesh?: string;
  310. meshes?: string[];
  311. rotation?: number[];
  312. scale?: number[];
  313. translation?: number[];
  314. babylonNode?: Node;
  315. }
  316. interface IGLTFScene extends IGLTFChildRootProperty {
  317. nodes: string[];
  318. }
  319. /**
  320. * Runtime
  321. */
  322. interface IGLTFRuntime {
  323. extensions: Object;
  324. accessors: Object;
  325. buffers: Object;
  326. bufferViews: Object;
  327. meshes: Object;
  328. lights: Object;
  329. cameras: Object;
  330. nodes: Object;
  331. images: Object;
  332. textures: Object;
  333. shaders: Object;
  334. programs: Object;
  335. samplers: Object;
  336. techniques: Object;
  337. materials: Object;
  338. animations: Object;
  339. skins: Object;
  340. currentScene?: Object;
  341. scenes: Object;
  342. extensionsUsed: string[];
  343. extensionsRequired?: string[];
  344. buffersCount: number;
  345. shaderscount: number;
  346. scene: Scene;
  347. rootUrl: string;
  348. loadedBufferCount: number;
  349. loadedBufferViews: {
  350. [name: string]: ArrayBufferView;
  351. };
  352. loadedShaderCount: number;
  353. importOnlyMeshes: boolean;
  354. importMeshesNames?: string[];
  355. dummyNodes: Node[];
  356. }
  357. /**
  358. * Bones
  359. */
  360. interface INodeToRoot {
  361. bone: Bone;
  362. node: IGLTFNode;
  363. id: string;
  364. }
  365. interface IJointNode {
  366. node: IGLTFNode;
  367. id: string;
  368. }
  369. }
  370. declare module BABYLON.GLTF1 {
  371. /**
  372. * Implementation of the base glTF spec
  373. */
  374. class GLTFLoaderBase {
  375. static CreateRuntime(parsedData: any, scene: Scene, rootUrl: string): IGLTFRuntime;
  376. static LoadBufferAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (buffer: ArrayBufferView) => void, onError: (message: string) => void, onProgress?: () => void): void;
  377. static LoadTextureBufferAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (buffer: ArrayBufferView) => void, onError: (message: string) => void): void;
  378. static CreateTextureAsync(gltfRuntime: IGLTFRuntime, id: string, buffer: ArrayBufferView, onSuccess: (texture: Texture) => void, onError: (message: string) => void): void;
  379. static LoadShaderStringAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (shaderString: string) => void, onError: (message: string) => void): void;
  380. static LoadMaterialAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (material: Material) => void, onError: (message: string) => void): void;
  381. }
  382. /**
  383. * glTF V1 Loader
  384. */
  385. class GLTFLoader implements IGLTFLoader {
  386. static Extensions: {
  387. [name: string]: GLTFLoaderExtension;
  388. };
  389. static RegisterExtension(extension: GLTFLoaderExtension): void;
  390. importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void): boolean;
  391. loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: () => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void): void;
  392. private _loadShadersAsync(gltfRuntime, onload);
  393. private _loadBuffersAsync(gltfRuntime, onLoad, onProgress?);
  394. private _createNodes(gltfRuntime);
  395. }
  396. }
  397. declare module BABYLON.GLTF1 {
  398. /**
  399. * Utils functions for GLTF
  400. */
  401. class GLTFUtils {
  402. /**
  403. * Sets the given "parameter" matrix
  404. * @param scene: the {BABYLON.Scene} object
  405. * @param source: the source node where to pick the matrix
  406. * @param parameter: the GLTF technique parameter
  407. * @param uniformName: the name of the shader's uniform
  408. * @param shaderMaterial: the shader material
  409. */
  410. static SetMatrix(scene: Scene, source: Node, parameter: IGLTFTechniqueParameter, uniformName: string, shaderMaterial: ShaderMaterial | Effect): void;
  411. /**
  412. * Sets the given "parameter" matrix
  413. * @param shaderMaterial: the shader material
  414. * @param uniform: the name of the shader's uniform
  415. * @param value: the value of the uniform
  416. * @param type: the uniform's type (EParameterType FLOAT, VEC2, VEC3 or VEC4)
  417. */
  418. static SetUniform(shaderMaterial: ShaderMaterial | Effect, uniform: string, value: any, type: number): boolean;
  419. /**
  420. * If the uri is a base64 string
  421. * @param uri: the uri to test
  422. */
  423. static IsBase64(uri: string): boolean;
  424. /**
  425. * Decode the base64 uri
  426. * @param uri: the uri to decode
  427. */
  428. static DecodeBase64(uri: string): ArrayBuffer;
  429. /**
  430. * Returns the wrap mode of the texture
  431. * @param mode: the mode value
  432. */
  433. static GetWrapMode(mode: number): number;
  434. /**
  435. * Returns the byte stride giving an accessor
  436. * @param accessor: the GLTF accessor objet
  437. */
  438. static GetByteStrideFromType(accessor: IGLTFAccessor): number;
  439. /**
  440. * Returns the texture filter mode giving a mode value
  441. * @param mode: the filter mode value
  442. */
  443. static GetTextureFilterMode(mode: number): ETextureFilterType;
  444. static GetBufferFromBufferView(gltfRuntime: IGLTFRuntime, bufferView: IGLTFBufferView, byteOffset: number, byteLength: number, componentType: EComponentType): ArrayBufferView;
  445. /**
  446. * Returns a buffer from its accessor
  447. * @param gltfRuntime: the GLTF runtime
  448. * @param accessor: the GLTF accessor
  449. */
  450. static GetBufferFromAccessor(gltfRuntime: IGLTFRuntime, accessor: IGLTFAccessor): any;
  451. /**
  452. * Decodes a buffer view into a string
  453. * @param view: the buffer view
  454. */
  455. static DecodeBufferToText(view: ArrayBufferView): string;
  456. /**
  457. * Returns the default material of gltf. Related to
  458. * https://github.com/KhronosGroup/glTF/tree/master/specification/1.0#appendix-a-default-material
  459. * @param scene: the Babylon.js scene
  460. */
  461. static GetDefaultMaterial(scene: Scene): ShaderMaterial;
  462. private static _DefaultMaterial;
  463. }
  464. }
  465. declare module BABYLON.GLTF1 {
  466. abstract class GLTFLoaderExtension {
  467. private _name;
  468. constructor(name: string);
  469. readonly name: string;
  470. /**
  471. * Defines an override for loading the runtime
  472. * Return true to stop further extensions from loading the runtime
  473. */
  474. loadRuntimeAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (gltfRuntime: IGLTFRuntime) => void, onError: (message: string) => void): boolean;
  475. /**
  476. * Defines an onverride for creating gltf runtime
  477. * Return true to stop further extensions from creating the runtime
  478. */
  479. loadRuntimeExtensionsAsync(gltfRuntime: IGLTFRuntime, onSuccess: () => void, onError: (message: string) => void): boolean;
  480. /**
  481. * Defines an override for loading buffers
  482. * Return true to stop further extensions from loading this buffer
  483. */
  484. loadBufferAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (buffer: ArrayBufferView) => void, onError: (message: string) => void, onProgress?: () => void): boolean;
  485. /**
  486. * Defines an override for loading texture buffers
  487. * Return true to stop further extensions from loading this texture data
  488. */
  489. loadTextureBufferAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (buffer: ArrayBufferView) => void, onError: (message: string) => void): boolean;
  490. /**
  491. * Defines an override for creating textures
  492. * Return true to stop further extensions from loading this texture
  493. */
  494. createTextureAsync(gltfRuntime: IGLTFRuntime, id: string, buffer: ArrayBufferView, onSuccess: (texture: Texture) => void, onError: (message: string) => void): boolean;
  495. /**
  496. * Defines an override for loading shader strings
  497. * Return true to stop further extensions from loading this shader data
  498. */
  499. loadShaderStringAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (shaderString: string) => void, onError: (message: string) => void): boolean;
  500. /**
  501. * Defines an override for loading materials
  502. * Return true to stop further extensions from loading this material
  503. */
  504. loadMaterialAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (material: Material) => void, onError: (message: string) => void): boolean;
  505. static LoadRuntimeAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (gltfRuntime: IGLTFRuntime) => void, onError: (message: string) => void): void;
  506. static LoadRuntimeExtensionsAsync(gltfRuntime: IGLTFRuntime, onSuccess: () => void, onError: (message: string) => void): void;
  507. static LoadBufferAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (bufferView: ArrayBufferView) => void, onError: (message: string) => void, onProgress?: () => void): void;
  508. static LoadTextureAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (texture: Texture) => void, onError: (message: string) => void): void;
  509. static LoadShaderStringAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (shaderData: string) => void, onError: (message: string) => void): void;
  510. static LoadMaterialAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (material: Material) => void, onError: (message: string) => void): void;
  511. private static LoadTextureBufferAsync(gltfRuntime, id, onSuccess, onError);
  512. private static CreateTextureAsync(gltfRuntime, id, buffer, onSuccess, onError);
  513. private static ApplyExtensions(func, defaultFunc);
  514. }
  515. }
  516. declare module BABYLON.GLTF1 {
  517. class GLTFBinaryExtension extends GLTFLoaderExtension {
  518. private _bin;
  519. constructor();
  520. loadRuntimeAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (gltfRuntime: IGLTFRuntime) => void, onError: (message: string) => void): boolean;
  521. loadBufferAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (buffer: ArrayBufferView) => void, onError: (message: string) => void): boolean;
  522. loadTextureBufferAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (buffer: ArrayBufferView) => void, onError: (message: string) => void): boolean;
  523. loadShaderStringAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (shaderString: string) => void, onError: (message: string) => void): boolean;
  524. }
  525. }
  526. declare module BABYLON.GLTF1 {
  527. class GLTFMaterialsCommonExtension extends GLTFLoaderExtension {
  528. constructor();
  529. loadRuntimeExtensionsAsync(gltfRuntime: IGLTFRuntime, onSuccess: () => void, onError: (message: string) => void): boolean;
  530. loadMaterialAsync(gltfRuntime: IGLTFRuntime, id: string, onSuccess: (material: Material) => void, onError: (message: string) => void): boolean;
  531. private _loadTexture(gltfRuntime, id, material, propertyPath, onError);
  532. }
  533. }