OBJLoader2Parser.d.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. export class OBJLoader2Parser {
  2. constructor();
  3. callbacks: {
  4. onProgress: Function;
  5. onAssetAvailable: Function;
  6. onError: Function;
  7. onLoad: Function;
  8. };
  9. contentRef: Uint8Array;
  10. legacyMode: boolean;
  11. materials: object;
  12. materialPerSmoothingGroup: boolean;
  13. useOAsMesh: boolean;
  14. useIndices: boolean;
  15. disregardNormals: boolean;
  16. vertices: number[];
  17. colors: number[];
  18. normals: number[];
  19. uvs: number[];
  20. rawMesh: {
  21. objectName: string;
  22. groupName: string;
  23. activeMtlName: string;
  24. mtllibName: string;
  25. faceType: number;
  26. subGroups: object[];
  27. subGroupInUse: object;
  28. smoothingGroup: {
  29. splitMaterials: boolean;
  30. normalized: boolean;
  31. real: boolean;
  32. };
  33. counts: {
  34. doubleIndicesCount: number;
  35. faceCount: number;
  36. mtlCount: number;
  37. smoothingGroupCount: number;
  38. }
  39. };
  40. inputObjectCount: number;
  41. outputObjectCount: number;
  42. globalCounts: {
  43. vertices: number;
  44. faces: number;
  45. doubleIndicesCount: number;
  46. lineByte: number;
  47. currentByte: number;
  48. totalBytes: number;
  49. };
  50. logging: {
  51. enabled: boolean;
  52. debug: boolean;
  53. };
  54. setMaterialPerSmoothingGroup( materialPerSmoothingGroup: boolean ): this;
  55. setUseOAsMesh( useOAsMesh: boolean ): this;
  56. setUseIndices( useIndices: boolean ): this;
  57. setDisregardNormals( disregardNormals: boolean ): this;
  58. setCallbackOnAssetAvailable( onAssetAvailable: Function ): this;
  59. setCallbackOnProgress( onProgress: Function ): this;
  60. setCallbackOnError( onError: Function ): this;
  61. setCallbackOnLoad( onLoad: Function ): this;
  62. setLogging( enabled: boolean, debug: boolean ): this;
  63. setMaterials( materials: Object ): void;
  64. execute( arrayBuffer: Uint8Array ): void;
  65. executeLegacy( text: string ): void;
  66. }