# lightgl.js **Repository Path**: lspCode/lightgl.js ## Basic Information - **Project Name**: lightgl.js - **Description**: A lightweight WebGL library - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-12-11 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # lightgl.js This library makes it easier to quickly prototype WebGL applications. It's lower level than many other WebGL libraries and while it doesn't provide a scene graph, it re-implements OpenGL's modelview/projection matrix stack to provide similar functionality. It also re-introduces some built-in uniforms from GLSL (such as `gl_Vertex` and `gl_ModelViewProjectionMatrix`) and OpenGL's immediate mode. ## Building the library * `python build.py`: build `lightgl.js` from the files in the `src` directory * `python build.py debug`: rebuild the library any time the contents of the `src` directory change * `python build.py release`: minify the library using [UglifyJS](https://github.com/mishoo/UglifyJS2), which assumes there is an `uglifyjs` command in your path * `docco src/*.js`: build the documentation, which is generated in the `docs` directory The latest lightgl.js build can be found at http://evanw.github.com/lightgl.js/lightgl.js. ## Sample code ```html
``` ## Documentation The documentation is automatically generated using [Docco](http://jashkenas.github.com/docco/): * [main.js](http://evanw.github.com/lightgl.js/docs/main.html): `GL` * [matrix.js](http://evanw.github.com/lightgl.js/docs/matrix.html): `GL.Matrix` * [mesh.js](http://evanw.github.com/lightgl.js/docs/mesh.html): `GL.Indexer`, `GL.Buffer`, `GL.Mesh` * [raytracer.js](http://evanw.github.com/lightgl.js/docs/raytracer.html): `GL.HitTest`, `GL.Raytracer` * [shader.js](http://evanw.github.com/lightgl.js/docs/shader.html): `GL.Shader` * [texture.js](http://evanw.github.com/lightgl.js/docs/texture.html): `GL.Texture` * [vector.js](http://evanw.github.com/lightgl.js/docs/vector.html): `GL.Vector` ## Examples Available examples: * [Simple rotating cube](http://evanw.github.com/lightgl.js/tests/readme.html) * [Multitexturing](http://evanw.github.com/lightgl.js/tests/multitexture.html) * [First person camera](http://evanw.github.com/lightgl.js/tests/camera.html) * [Scene manipulation](http://evanw.github.com/lightgl.js/tests/scenemanip.html) * [OpenGL immediate mode](http://evanw.github.com/lightgl.js/tests/immediatemode.html) * [Rendering to a texture](http://evanw.github.com/lightgl.js/tests/rtt.html) * [Shadow map from a point light](http://evanw.github.com/lightgl.js/tests/shadowmap.html) * [Realtime raytracing](http://evanw.github.com/lightgl.js/tests/raytracing.html) * [Constructive solid geometry](http://evanw.github.com/lightgl.js/tests/csg.html) * [GPU lightmap generation](http://evanw.github.com/lightgl.js/tests/gpulightmap.html)