How to auto-align jit.gl.text to centre of window?
Hi,
I'm trying to auto-align some jit.gl.text that will be dynamic in length, so that it would be horizontally aligned to the centre of the window.
Any ideas?
Max Patch
Copy patch and select New From Clipboard in Max.
you can query the text3d bounds with the getbounds message, route for bounds out the dumpout, unpack the 4th element which will represent the width of the string, take the largest of these values, and use that to calculate the position adjustment of your jit.gl.node.