jitter object references

Apr 21, 2010 at 2:43pm

jitter object references

Hi all,

I’m delving into javascript to resolve an issue I have with some display of text. The problem is that I can’t find any reference on syntax of how to create jitter objects and address their params.
I just am lost when looking for how to set the text of a jit.gl.text2D instance when creating one instance
Where is the documentation on this?

#49920
Apr 21, 2010 at 10:43pm

Check out Jitter tutorials 45-47, you might find something useful there. If you have specific questions after that, post how far you have gotten.

-Ben

#179298
Apr 22, 2010 at 5:44am

thx Ben,

I already had those covered (more or less)
so specific question:
when you do:
jshape= new JitterObject(“jit.gl.gridshape”,”screen”);
jshape.shape=”cube”;
you get a cube, changing position is jshape.position, so these are the ‘normal’ jitter attributes

But when you have:
jtext = new JitterObject(“jit.gl.text2d”,”screen”)
how do you set the text of this object?
jtext.text=”test” does not work

I could figure this out myself if I had a reference of what functions there are available, but I don’t find any reference

#179299
Apr 22, 2010 at 6:10am

Hello llumen,

var mytitle = new JitterObject ("jit.gl.text2d", "mywindow") ;
    mytitle.color = [0.83, 0.74, 0.84, 1.] ;
    mytitle.font ("Comic Sans MS") ;
    mytitle.size (48) ;
    mytitle.text ("toto") ;

myobject.something = k
myobject.something (k)

Attribute or message ; sometimes i don’t know why, i just do some test.

I join a big javascript from a project i done ; it doesn’t work alone ; but you can found syntax examples inside.

Attachments:
  1. badaboum.js
#179300

You must be logged in to reply to this topic.