Width of a text rendered with [jit.gl.text3d] or [jit.gl.text2d]
Is there any way to determine the width of a text fed in in one of those two modules [jit.gl.text3d] or [jit.gl.text2d]? I want to have a scrolling text field and in order to know when it has scrolled out of the window the most familiar approach for me would be to compare the width of the text field + position with the window's dimension. Or is there any other way to find that out? (this is going to be a newsticker-like scrolling text rendered over my video)
Thanks for your help!
Best, Joerg
render white text to a matrix and use jit.findbounds @min 1. 1. 1. 1. @max 1. 1. 1. 1. to find it's bounding size. (you'll need to convert back to GL space if you want GL size (e.g. use scale 320 240 -1. 1.)