webgl-utils.js
v1.1.0
Published
[![Travis][build-badge]][build] [![npm package][npm-badge]][npm] [![Coveralls][coveralls-badge]][coveralls]
Downloads
532
Readme
webgl-utils.js
Origin from https://webglfundamentals.org/
Install
npm
npm install webgl-utils.js
yarn
yarn add webgl-utils.js
How to use
// Quick example
import * as webglUtils from 'webgl-utils.js';
// ...
// setup GLSL program
var program = webglUtils.createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]);
OR
// Quick example
import { createProgramFromScripts } from 'webgl-utils.js';
// ...
// setup GLSL program
var program = createProgramFromScripts(gl, ["vertex-shader-2d", "fragment-shader-2d"]);
Methods
✔ createAugmentedTypedArray
✔ createAttribsFromArrays
✔ createBuffersFromArrays
✔ createBufferInfoFromArrays
✔ createAttributeSetters
✔ createProgram
✔ createProgramFromScripts
✔ createProgramFromSources
✔ createProgramInfo
✔ createUniformSetters
✔ createVAOAndSetAttributes
✔ createVAOFromBufferInfo
✔ drawBufferInfo
✔ drawObjectList
✔ glEnumToString
✔ getExtensionWithKnownPrefixes
✔ loadShader
✔ resizeCanvasToDisplaySize
✔ setAttributes
✔ setBuffersAndAttributes
✔ setUniforms