In this program, two spheres of different sizes are rotating, and they can be moved and resized. Their surface texture can be changed through buttons, and it's provided with a constant distant light source. Use w, s, a, d
to walk through the scene and p, o
to change the projection way (perspective or ortho).
-
How to run?
Clone to local and open the
demo.html
file in a browser.Note that there may be a browser limit. IE explorer and Microsoft Edge have been tested. Google Chrome can not show local texture images for security reasons.
-
File Structure
Do not change the
common
folder, it's the library.demo
is my code, there is ahtml
and ajs
file inside.Images
contains all the images needed. -
Basic WebGL exercises
Please refer to [website]: https://www.cs.unm.edu/~angel/WebGL/7E/