WebGL ASSISTANT: TWGL simplifies the js animation library plug-in for WebGL APIs, webgltwgl
Twgl. js is a small WebGL Assistant Library. The purpose of this js library is to make WebGL APIs more concise and easy to read. The WebGL API is very lengthy. It requires a lot of code to set the shader, buffer, attribute, and uniforms. A simple luminous cube effect may require more than 60 code calls in WebGL. Using TWGL can greatly reduce code writing, and the written code is neat and clear and easy to understand.
TWGL has five core functions:
- Twgl. createProgramInfo: Compile the shader and set the attributes and uniforms.
- Twgl. createBufferInfoFromArrays: Set the plug-in buffer and attribute.
- Twgl. setBuffersAndAttributes: bind the buffer and set attributes.
- Twgl. setUniforms: Set uniforms.
- Twgl. createTextures: Creates a variety of textures.
Effect Demo: http://www.htmleaf.com/Demo/201504131674.html
: Http://www.htmleaf.com/html5/html5-canvas/201504131673.html