brilliantlabsAR / frame-codebase

The complete codebase for Frame
https://www.brilliant.xyz
Other
146 stars 30 forks source link

lua api: display.clear could be added back #219

Open kjjohnsen opened 2 weeks ago

kjjohnsen commented 2 weeks ago

There does not seem to be a way to clear the display without first putting some text into the buffer, and then displaying it. So, it is possible to clear the display, but you have to issue a seemingly unnecessary text call to do it. Here is an example:

frame.display.text('Hello world',50,100)
frame.display.show()
frame.display.text('',50,100) -- empty does not work
frame.display.show() -- does nothing
frame.display.text(' ',50,100) --non-empty works
frame.display.show() -- clears screen

Primary suggestion: re-add a clear function to the lua api Secondary suggestion: make display.show with any empty buffer clear the display

Thanks!