Fields
size
The size of the blob data in bytes.
name
The name of the blob asset.
data
The raw binary data as a buffer. Read it with the buffer library,
for example buffer.readu8(blob.data, 0).
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
sizetype DrawBlob = {
myBlob: Blob?,
}
function init(self: DrawBlob, context: Context): boolean
self.myBlob = context:blob('myBlob')
if self.myBlob then
print('Blob size:', self.myBlob.size, 'bytes')
end
return true
end
return function(): Node<DrawBlob>
return {
myBlob = nil,
init = init,
}
end
nametype DrawBlob = {
myBlob: Blob?,
}
function init(self: DrawBlob, context: Context): boolean
self.myBlob = context:blob('myBlob')
if self.myBlob then
print('Blob name:', self.myBlob.name)
end
return true
end
return function(): Node<DrawBlob>
return {
myBlob = nil,
init = init,
}
end
databuffer library,
for example buffer.readu8(blob.data, 0).
type DrawBlob = {
myBlob: Blob?,
}
function init(self: DrawBlob, context: Context): boolean
self.myBlob = context:blob('myBlob')
if self.myBlob then
print('First byte:', buffer.readu8(self.myBlob.data, 0))
end
return true
end
return function(): Node<DrawBlob>
return {
myBlob = nil,
init = init,
}
end
Was this page helpful?