Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
lightgl.js
Advanced tools
Readme
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.
npm install lightgl.js
python build.py
: build lightgl.js
from the files in the src
directorypython build.py debug
: rebuild the library any time the contents of the src
directory changepython build.py release
: minify the library using UglifyJS, which assumes there is an uglifyjs
command in your pathdocco src/*.js
: build the documentation, which is generated in the docs
directoryThe latest lightgl.js build can be found at http://evanw.github.com/lightgl.js/lightgl.js.
<!DOCTYPE html>
<html><body>
<script src="lightgl.js"></script>
<script>
var angle = 0;
var gl = GL.create();
var mesh = GL.Mesh.cube();
var shader = new GL.Shader('\
void main() {\
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\
}\
', '\
void main() {\
gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\
}\
');
gl.onupdate = function(seconds) {
angle += 45 * seconds;
};
gl.ondraw = function() {
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
gl.loadIdentity();
gl.translate(0, 0, -5);
gl.rotate(30, 1, 0, 0);
gl.rotate(angle, 0, 1, 0);
shader.draw(mesh);
};
gl.fullscreen();
gl.animate();
</script>
</body></html>
The documentation is automatically generated using Docco:
GL
GL.Matrix
GL.Indexer
, GL.Buffer
, GL.Mesh
GL.HitTest
, GL.Raytracer
GL.Shader
GL.Texture
GL.Vector
Available examples:
FAQs
A lightweight WebGL library
The npm package lightgl.js receives a total of 0 weekly downloads. As such, lightgl.js popularity was classified as not popular.
We found that lightgl.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.