Easy GL
Various helper functions to perform WebGL operations.
> WARNING: API in flux and liable to change until v1 release
Included functions
$3
createRenderer
$3
freenavControls,
orbitControls
$3
Buffer,
ElementBuffer,
Framebuffer,
Group,
Material,
Obj,
ObjBuffers,
Renderer,
ShaderAttribute,
ShaderProgram,
ShaderUniform,
Texture,
Triangle,
TypedArray
$3
loadFile,
loadJSON,
loadMtl,
loadObj,
loadProgram,
loadTexture,
loadXML
$3
poseToMatrix,
convertTrianglesToBufferArrays,
dirname,
framebufferToImage,
isPowerOf2,
mergeObjBuffers,
xmlToJSON
$3
createBuffer,
createContext,
createElementBuffer,
createFramebuffer,
createProgram,
createTexture,
generateMipmap
Using in node
Install via
npm install apl-easy-gl, then import via ES6 Modules:
``
typescript
import { windingOrder } from 'apl-easy-gl';
`
Using in the browser
Add the script tag below or download it an bundle it with your own scripts.
`
html
`
If you need to use a function that requires the 3rd-party library and have not included them separetely then include the umd which comes bundled with all dependencies.
`
html
``
Roadmap
- Add unit tests to all functions
- Generate full API docs from type definitions
- Add more helper functions including WebVR setup
Licence
All code is licenced under MIT.