init.lua 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. return {
  2. summary = 'A chunk of binary data.',
  3. description = [[
  4. A Blob is an object that holds binary data. It can be passed to most functions that take
  5. filename arguments, like `lovr.graphics.newModel` or `lovr.audio.newSource`. Blobs aren't
  6. usually necessary for simple projects, but they can be really helpful if:
  7. - You need to work with low level binary data, potentially using the LuaJIT FFI for increased
  8. performance.
  9. - You are working with data that isn't stored as a file, such as programmatically generated data
  10. or a string from a network request.
  11. - You want to load data from a file once and then use it to create many different objects.
  12. A Blob's size cannot be changed once it is created.
  13. ]],
  14. constructors = { 'lovr.data.newBlob', 'lovr.filesystem.newBlob' },
  15. methods = {
  16. 'Blob:getSize',
  17. 'Blob:getName',
  18. 'Blob:getPointer',
  19. 'Blob:getString',
  20. 'Blob:getI8',
  21. 'Blob:getU8',
  22. 'Blob:getI16',
  23. 'Blob:getU16',
  24. 'Blob:getI32',
  25. 'Blob:getU32',
  26. 'Blob:getF32',
  27. 'Blob:getF64'
  28. }
  29. }