jit.lcd + javascript = possible yet? ever?

Jun 6, 2009 at 7:34pm

jit.lcd + javascript = possible yet? ever?

> Sorry but jit.lcd does not work from Javascript at this time.

This was true in November 2005 – is it still true?

If so, is this ever going to change?

And if not, is there an example anywhere of how one might use it?

(I’m trying to make use of jit.lcd’s text functions, so jit.gl.sketch is not an alternative.)

(Actually, what I’m looking for is some way to get feedback on the pixel dimensions (width) of a given string of text – I can get it from jit.lcd by using getpenloc after a write command. I can’t figure out any way to get this information from jit.gl.text2d or jit.gl.text3d – maybe I’m missing something?)

Jun 8, 2009 at 4:18pm


Do you have an exemple ?

What you do whit jit.lcd may be done with openGL …


Jun 9, 2009 at 6:59pm

As requested, an example of easily getting feedback on text length in jit.lcd. I am unaware of any way of doing this kind of thing in jit.gl land, but would love to be enlightened.

Also, while we’re on the topic of jit.lcd: according to its help file, it supports (and only supports) 4 char data – so then is there any way to address the 4th (alpha) channel?

– Pasted Max Patch, click to expand. –
Jun 10, 2009 at 3:53pm

Hello maxers,

here a way to do it ; (not sexy, but it seems to work).


Jun 11, 2009 at 9:40am

Hello maxers,

this one works with colored text.

Jun 15, 2009 at 10:40am

Excellent example & very informative – thanks for putting it together. Much appreciated.


Jun 16, 2010 at 10:33am

weird! I don’t see vanille b.’s example! Did you edited and deleted it, vanille?

Jun 16, 2010 at 4:10pm

Hello ygreq,

no, not me ;

very sadly, files join with post sent before the “cycling 74 web big change” (last year) have been deleted ;

the idea of my patch was to use [jit.findbounds] to track how many pixels long was the text using [jit.gl.text2d] … don’t have time to do it again ;-)

May 19, 2011 at 7:41pm

Any other clues on this? I’m not getting any joy out of jit.findbounds… (will keep fiddling obviously)

May 20, 2011 at 11:43am

Here you go – had to dig around, tucked away many folders deep.

May 20, 2011 at 1:51pm

Nice one pseudostereo, interesting!

Looks like what i had should have worked (not using JS) but doesn’t for some reason – so many thanks!


May 20, 2011 at 11:33pm

just to be clear, vanille béchamel made the patch, not me – I just posed the question!


You must be logged in to reply to this topic.