how to create billboard style endlessly scrolling text
I'm trying to create a billboard style endlessly scrolling text transform/animation. Where the text (a sentence of varying length, moves from right to left) would repeat and scroll 'endlessly'.
Any ideas how to achieve this?
My current best guess would be something like using multiple jit.gl.text3d objects and calculating the length of the 'sentence' with getbounds (does anyone know what units are these) and use that as the starting point for the second one (maybe even a third and fourth for cases of very short input text) and scroll them together and somehow disable them if they are off screen and loop them back to the beginning. Or something like that :)
This is what I have as a starting point:
requires tweaking and further development, but this approach should work:
Thanks.
Any idea how to calculate the dynamic offset of the 2nd, 3rd etc. text objects so that it would work with text input of various length? And to get rid (or hide) the 'jump' of the position, so that it would seem seamless.
ok figured it out-- there's a magic formula (see patch) (that probably changes according to font size) that works for the current default font. to derive the formula I used the y=mx+c linear function on a couple of different input values (long text and short text).