All Projects → jagenjo → Rendeer.js

jagenjo / Rendeer.js

Licence: mit
Light-weight 3D Scene graph library with renderer in WebGL

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Rendeer.js

Vts Browser Js
JavaScript WebGL 3D map rendering engine
Stars: ✭ 148 (+134.92%)
Mutual labels:  webgl, 3d-engine
Helixjs
A Javascript 3D game engine.
Stars: ✭ 84 (+33.33%)
Mutual labels:  webgl, 3d-engine
Engine
Oasis Engine is a web-first and mobile-first high-performance real-time development platform.
Stars: ✭ 2,202 (+3395.24%)
Mutual labels:  webgl, 3d-engine
Layaair discard
This is old LayaAir veriosn writetten by ActionScript 3.0 ,now LayaAir is using TypeScript as the Engine Script,Please use https://github.com/layabox/LayaAir instead.
Stars: ✭ 1,858 (+2849.21%)
Mutual labels:  webgl, 3d-engine
Litescene.js
A WebGL 3D Engine library with component-based node hierarchy. Used by WebGLStudio
Stars: ✭ 268 (+325.4%)
Mutual labels:  webgl, 3d-engine
Lume
Create CSS3D/WebGL applications declaratively with HTML. Give regular DOM elements shadow and lighting.
Stars: ✭ 445 (+606.35%)
Mutual labels:  webgl, 3d-engine
Glas
WebGL in WebAssembly with AssemblyScript
Stars: ✭ 278 (+341.27%)
Mutual labels:  webgl, 3d-engine
Layaair
LayaAir is an open-source 2D/3D engine. LayaAir Engine is designed for high performance games.LayaAir support TypeScript and JavaScript、ActionScript 3.0 programming language.Can develop once, publish for multi platform.
Stars: ✭ 791 (+1155.56%)
Mutual labels:  webgl, 3d-engine
Regl Camera
A camera for regl
Stars: ✭ 43 (-31.75%)
Mutual labels:  webgl
Mod3
MOD3.js: JavaScript port of AS3DMod ActionScript 3D Modifier Library
Stars: ✭ 50 (-20.63%)
Mutual labels:  3d-engine
Unity Core Project
Core Framework for Unity
Stars: ✭ 42 (-33.33%)
Mutual labels:  webgl
Webgl Structure
🚀 A modern, ES6 based, javascript structure for WebGL based projects with THREE.js!
Stars: ✭ 44 (-30.16%)
Mutual labels:  webgl
Shadoweditor
Cross-platform 3D scene editor based on three.js, golang and mongodb for desktop and web. https://tengge1.github.io/ShadowEditor-examples/
Stars: ✭ 1,060 (+1582.54%)
Mutual labels:  webgl
Infinite Webl Gallery
Infinite Auto-Scrolling Gallery using WebGL and GLSL Shaders.
Stars: ✭ 42 (-33.33%)
Mutual labels:  webgl
Deep Viz
A React component library, providing concise and beautiful diversity charts with Canvas, SVG, E-map, WebGL, Dom, based on data visualization experience and commercial data display practice.
Stars: ✭ 55 (-12.7%)
Mutual labels:  webgl
Pano.gl
Equirectangular video/image viewer based on WebGL.
Stars: ✭ 42 (-33.33%)
Mutual labels:  webgl
Webgl Sandbox
http://gam0022.net/webgl/
Stars: ✭ 41 (-34.92%)
Mutual labels:  webgl
Dgel
A WebGPU engine.
Stars: ✭ 60 (-4.76%)
Mutual labels:  webgl
Sunset Cyberspace
🎮👾Retro-runner Game made in Expo, Three.js, OpenGL, WebGL, Tween. 🕹
Stars: ✭ 54 (-14.29%)
Mutual labels:  webgl
Solarsys
Realistic Solar System simulation with three.js
Stars: ✭ 49 (-22.22%)
Mutual labels:  webgl

rendeer.js

Rendeer.js is a lightweight 3D scene graph library, meant to be used in 3D web apps and games. It is meant to be flexible and easy to tweak. It used the library litegl.js as a low level layer for WebGL.

It comes with some common useful classes like:

  • Scene and SceneNode
  • Camera
  • Renderer
  • ParticleEmissor

And because it uses litegl you have all the basic ones (Mesh, Shader and Texture).

Demo

Check the examples folder to see the examples, or visit this website.

There is a boilerplate to create an application in the folder boilerlate/

Usage

Here is a brief example of how to use it, but I totally encourage to read the more detailed starter guide stored in the guides folder, or to check the boilerplate provided, and finally check the documentation for better understanding of the API.

First include the library and dependencies

<script src="js/gl-matrix-min.js"></script>
<script src="js/litegl.js"></script>
<script src="js/rendeer.js"></script>

Create the scene

var scene = new RD.Scene();

Create the renderer

var context = GL.create({width: window.innerWidth, height:window.innerHeight});
var renderer = new RD.Renderer(context);

Attach to DOM

document.body.appendChild(renderer.canvas);

Get user input

gl.captureMouse();
renderer.context.onmousedown = function(e) { ... }
renderer.context.onmousemove = function(e) { ... }

gl.captureKeys();
renderer.context.onkey = function(e) { ... }

Set camera

var camera = new RD.Camera();
camera.perspective( 45, gl.canvas.width / gl.canvas.height, 1, 1000 );
camera.lookAt( [100,100,100],[0,0,0],[0,1,0] );

Create and register mesh

var mesh = GL.Mesh.fromURL("data/mesh.obj");
renderer.meshes["mymesh"] = mesh;

load and register texture

var texture = GL.Texture.fromURL("mytexture.png", { minFilter: gl.LINEAR_MIPMAP_LINEAR, magFilter: gl.LINEAR });
renderer.textures["mytexture.png"] = texture;

Compile and register shader

var shader = new GL.Shader(vs_code, fs_code);
renderer.shaders["phong"] = shader;

Add a node to the scene

var node = new RD.SceneNode();
node.color = [1,0,0,1];
node.mesh = "mymesh";
node.texture = "mytexture.png";
node.shader = "phong";
node.position = [0,0,0];
node.scale([10,10,10]);
scene.root.addChild(node);

Create main loop

requestAnimationFrame(animate);
function animate() {
	requestAnimationFrame( animate );

	last = now;
	now = getTime();
	var dt = (now - last) * 0.001;
	renderer.render(scene, camera);
	scene.update(dt);
}

Documentation

The doc folder contains the documentation. For info about glMatrix check the documentation in its website.

Utils

It includes several commands in the utils folder to generate doc, check errors and build minifyed version.

Feedback

You can write any feedback to [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].