[javascript-dev] Strange "undefined" problem using screentoworld...
Anthony Palomba
apalomba at austin.rr.com
Fri May 16 11:03:42 MDT 2008
- Previous message: [javascript-dev] Re: Processing ported to javascript...
- Next message: [javascript-dev] Re: Strange "undefined" problem using screentoworld...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I have the following code sample...
wxyz = sketch.screentoworld(SizeW/2,SizeH/2);
post("wxyz =", wxyz, "
");
this.NodeList[0].x = wxyz.x;
this.NodeList[0].y = wxyz.y;
//this.NodeList[0].x = 0.0;
//this.NodeList[0].y = 0.0
this.NodeList[0].z = 1.0;
When I try to use screentoworld, and assign the value
to x and y, I get an "undefined" result. The output
looks like this...
NodeGraph dump: 1 nodes.
node 0 : <undefined> <undefined> 1
If I comment in the commented out lines I get this...
NodeGraph dump: 1 nodes.
node 0 : 0.0 0.0 1
It looks like using the values returned from screentoworld causes
some problem. Can anyone see a reason why it would do this?
Thanks,
Anthony
- Previous message: [javascript-dev] Re: Processing ported to javascript...
- Next message: [javascript-dev] Re: Strange "undefined" problem using screentoworld...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
