ichko / WebGLEditor

Webgl editor for the web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webgl editor

3d editor on the web

Links

Double click the scene to enter in free flying mode (Esc for exit).

  • Empty scene demo
  • Dinosaurs example demo (clone the repo and run it it lite-server for example (rawgit raises cross-origin issues))

Example code

app.lib.init(function init(lib){
	app.inputHandler.lockPointer(lib.gl.canvas);

	lib.scene.push(new app.plane({
		size: 1,
		ctx: lib.gl.ctx,
		width: 30,
		height: 30,
		material: {color: [0.3,0.3,0.3]},
		wireframe: true,
		name: 'Plane'
	}));


}, function update(lib){
	lib.gl.clear();
	lib.cameraControl.update();
	lib.renderer.drawScene(lib.scene, lib.camera);
});

Primitive objects

  • Cube
  • Cuboid
  • Icosahedron
  • Plane
  • Prism
  • Pyramid
  • Sphere
  • Torus
  • Obj file (JSON)

Screenshots

Dinosaurs example dinosaurs

Example with simple primitive objects example

About

Webgl editor for the web

License:MIT License


Languages

Language:JavaScript 86.7%Language:HTML 7.3%Language:GLSL 3.3%Language:CSS 2.8%