Working example from learnwebgl.com