Skip to content
:crystal_ball: Lightweight 3D WebGL framework written in ES6
JavaScript HTML
Find file
Latest commit 486cca4 @mohebifar Update README.md
Failed to load latest commit information.
dist Fix jshint problems
examples Update cube-by-click.html
src Fix jshint problems
.gitignore Ignore .log files
.jshintrc Fix jshint problems
.travis.yml Add ES6
Gruntfile.js Separate livereload task
LICENSE Initial commit
README.md Update README.md
bower.json Change bower name
package.json Set 1.0.1-alpha patch

README.md

NPM version npm

lithree.js

lithree.js is a lightweight 3D WebGL framework. It's just about 25kb. lithree.js is originally written in ES6 and is transcompiled to ES5.

When to use lithree.js

LiThree is created for lightweight 3D projects. For example if you want to create a website to preview some simple product, It's not proper to load some heavy library like three.js which is about 450kb when minified.

Usage

You can check the demo here.

Make a world which will contain all your elements.

var world = new LiThree.World();

Create an object using object factories.

var sphere = LiThree.ObjectFactory.Sphere(1, 20, 20);

Add object to the world.

world.add(sphere);

Create a renderer.

var renderer = new LiThree.WebGLRenderer(640, 480, world);
renderer.initShapes();

Append canvas to body.

document.body.appendChild(renderer.canvas);

Attempt to draw and redraw canvas as many times as you want.

function redraw() {
    renderer.draw();
    requestAnimationFrame(redraw);
}

requestAnimationFrame(redraw);

Contribution

Feel free to help us and making a new awesome 3D library with ES6.

Something went wrong with that request. Please try again.