First cut at WebGL Lesson 10.5 – cameras and lighting

I’ve got the first working version of the code for lesson 10.5 done. It’s 10.5 because all it adds to lesson 10 is lighting, which I think is a minor but worthwhile digression… Anyway, here it is!

You can leave a response, or trackback from your own site.

6 Responses to “First cut at WebGL Lesson 10.5 – cameras and lighting”

  1. murphy says:

    I’ve got some strange dark lines on the textures when moving farther away on Firefox…is this a known issue?

  2. aa says:

    Nice lesson!
    Just a very small recommendation to all the examples: I think you could better change variables by calling a function in your input than access them each time in your drawScene function.

    Thank you for all the great lessons :)

  3. giles says:

    @murphy — oh dear, I thought I’d got rid of them. Thanks for letting me know, I’ll see what I can do.

    @aa — sorry, I don’t understand — could you give an example?

  4. giles says:

    @murphy — I’ve updated it, is the new version any better for you?

  5. aa says:

    in your code
    void setLight(x) {
    ligthon = x;

    and in your input
    onclick = “setLight(this.checked”)

    or this.value etc.

    it is just a little cleaner, more maintainable way (you can freely add or remove html without breaking it).

  6. giles says:

    Ah, I see what you mean. Yes, that would make sense — I’ll add that sometime soon.

Leave a Reply

Subscribe to RSS Feed Follow Learning WebGL on Twitter