newModel.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. return {
  2. tag = 'graphicsObjects',
  3. summary = 'Create a new Model.',
  4. description = [[
  5. Creates a new Model from a file. The supported 3D file formats are OBJ, glTF, and STL.
  6. ]],
  7. arguments = {
  8. filename = {
  9. type = 'string',
  10. description = 'The filename of the model to load.'
  11. },
  12. modelData = {
  13. type = 'ModelData',
  14. description = 'The ModelData containing the data for the Model.'
  15. }
  16. },
  17. returns = {
  18. model = {
  19. type = 'Model',
  20. description = 'The new Model.'
  21. }
  22. },
  23. variants = {
  24. {
  25. arguments = { 'filename' },
  26. returns = { 'model' }
  27. },
  28. {
  29. arguments = { 'modelData' },
  30. returns = { 'model' }
  31. }
  32. },
  33. notes = [[
  34. Diffuse and emissive textures will be loaded in the sRGB encoding, all other textures will be
  35. loaded as linear.
  36. Currently, the following features are not supported by the model importer:
  37. - OBJ: Quads are not supported (only triangles).
  38. - glTF: Sparse accessors are not supported.
  39. - glTF: Morph targets are not supported.
  40. - glTF: base64 images are not supported (base64 buffer data works though).
  41. - glTF: Only the default scene is loaded.
  42. - glTF: Currently, each skin in a Model can have up to 48 joints.
  43. - STL: ASCII STL files are not supported.
  44. ]]
  45. }