Blob

Edit

A Blob is an object that holds binary data. It can be passed to most functions that take filename arguments, like lovr.graphics.newModel or lovr.audio.newSource. Blobs aren't usually necessary for simple projects, but they can be really helpful if:

A Blob's size cannot be changed once it is created.

Constructors

lovr.data.newBlobCreate a new Blob.
lovr.filesystem.newBlobCreate a new Blob from a file.

Methods

Blob:getF32Unpack 32-bit floating point numbers from the Blob.
Blob:getF64Unpack 64-bit floating point numbers from the Blob.
Blob:getI16Unpack signed 16-bit integers from the Blob.
Blob:getI32Unpack signed 32-bit integers from the Blob.
Blob:getI8Unpack signed 8-bit integers from the Blob.
Blob:getNameGet the label of the Blob.
Blob:getPointerGet a raw pointer to the Blob's data.
Blob:getSizeGet the size of the Blob, in bytes.
Blob:getStringGet the Blob's contents as a string.
Blob:getU16Unpack unsigned 16-bit integers from the Blob.
Blob:getU32Unpack unsigned 32-bit integers from the Blob.
Blob:getU8Unpack unsigned 8-bit integers from the Blob.
Blob:setF32Write 32-bit floating point numbers to the Blob.
Blob:setF64Write 64-bit floating point numbers to the Blob.
Blob:setI16Write 16-bit signed integers to the Blob.
Blob:setI32Write 32-bit signed integers to the Blob.
Blob:setI8Write 8-bit signed integers to the Blob.
Blob:setU16Write 16-bit unsigned integers to the Blob.
Blob:setU32Write 32-bit unsigned integers to the Blob.
Blob:setU8Write 8-bit unsigned integers to the Blob.
Object:releaseImmediately release the Lua reference to an object.
Object:typeGet the type name of the object.

See also