objLoadingOptions.d.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import type { Vector2 } from "@babylonjs/core/Maths/math.vector.js";
  2. /**
  3. * Options for loading OBJ/MTL files
  4. */
  5. export type OBJLoadingOptions = {
  6. /**
  7. * Defines if UVs are optimized by default during load.
  8. */
  9. optimizeWithUV: boolean;
  10. /**
  11. * Defines custom scaling of UV coordinates of loaded meshes.
  12. */
  13. UVScaling: Vector2;
  14. /**
  15. * Invert model on y-axis (does a model scaling inversion)
  16. */
  17. invertY: boolean;
  18. /**
  19. * Invert Y-Axis of referenced textures on load
  20. */
  21. invertTextureY: boolean;
  22. /**
  23. * Include in meshes the vertex colors available in some OBJ files. This is not part of OBJ standard.
  24. */
  25. importVertexColors: boolean;
  26. /**
  27. * Compute the normals for the model, even if normals are present in the file.
  28. */
  29. computeNormals: boolean;
  30. /**
  31. * Optimize the normals for the model. Lighting can be uneven if you use OptimizeWithUV = true because new vertices can be created for the same location if they pertain to different faces.
  32. * Using OptimizehNormals = true will help smoothing the lighting by averaging the normals of those vertices.
  33. */
  34. optimizeNormals: boolean;
  35. /**
  36. * Skip loading the materials even if defined in the OBJ file (materials are ignored).
  37. */
  38. skipMaterials: boolean;
  39. /**
  40. * When a material fails to load OBJ loader will silently fail and onSuccess() callback will be triggered.
  41. */
  42. materialLoadingFailsSilently: boolean;
  43. /**
  44. * Loads assets without handedness conversions. This flag is for compatibility. Use it only if absolutely required. Defaults to false.
  45. */
  46. useLegacyBehavior: boolean;
  47. };