babylon.glTF1FileLoader.d.ts 21 KB

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