sinisterchipmunk / jax

Framework for creating rich WebGL-enabled applications using JavaScript and Ruby
http://jaxgl.com
MIT License
96 stars 16 forks source link

Minor tutorial bug? #19

Closed rubychan closed 12 years ago

rubychan commented 13 years ago

In http://guides.jaxgl.com/getting_started.html#directional-lights, the picture shows the output for the "sun" light source at [-1, 1, 1], but the code says [-1, -1, 1]. The spotlight effect later also looks a bit different than the picture.

At least, that's what I get :-)

And by the way, Jax is impressive!

sinisterchipmunk commented 13 years ago

Thanks for the compliment! :) Wait till the next iteration comes around... IMHO support for plugins will make it just that much more powerful, because it'll let developers effectively collaborate on shaders, meshes and so forth.

In WebGL and Jax, the X axis goes from the left (negative) to right (positive); Y goes from the bottom (negative) to top (positive); and Z goes from near (positive) to far (negative). Light vectors are given in world coordinates, so the camera orientation should not have an effect in this case.

The screenshot in the guide is accurate for a directional light shining in the direction [-1, -1, 1] -- or [left, down, forward].

If it's not behaving as advertised for you, then that's the real issue! I'll double check and make sure the Y axis isn't being flipped or anything weird like that, but I haven't noticed such anomalies on my end so it may be more complicated than that. Can you list steps to reproduce the issue, or perhaps even provide a git repo I can clone?

rubychan commented 13 years ago

I went through the tutorial up to step 4.3.1, and I got this: http://rubychan.de/tmp/murphy_teapot.png

sinisterchipmunk commented 12 years ago

Is this still an issue with the latest Jax (v2.0.1 as of this writing)?

sinisterchipmunk commented 12 years ago

Closing due to inactivity. If this is still an issue, please reopen (or open a new issue and link it to this one).