WebGL ASSISTANT: TWGL simplifies the js animation library plug-in for WebGL APIs, webgltwgl

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.