WebGL study notes (seven): Input and animation

So far, we have drawn 3D objects are static, then we need to make a small box on the desktop can be (arrow keys) forward and back our key;

Input connection, monitor and mouse button to add the corresponding message listening directly on the line of the document;

Animation this, we have introduced webgl-utils.js library, which method requestAnimFrame can call the method specified by the frame rate of 60 frames, each frame by adjusting the small box on the desktop matrix location, you can achieve the animation;

Examples

https://hammerc.github.io/dou3d-ts/examples/learningNotes/lesson_5/index.html

Guess you like

Origin www.cnblogs.com/hammerc/p/11388923.html