Join or Log in
var sys = require('pex-sys'); var glu = require('pex-glu'); var materials = require('pex-materials'); var gen = require('pex-gen'); var Color = require('pex-color').Color; sys.Window.create({ init: function() { var cube = new gen.Cube(); this.material = new materials.ShowNormals(); this.mesh = new glu.Mesh(cube, this.material); var aspectRatio = this.width / this.height; this.camera = new glu.PerspectiveCamera(60, aspectRatio); this.arcball = new glu.Arcball(this, this.camera); }, draw: function() { glu.clearColorAndDepth(Color.White); glu.enableDepthReadAndWrite(true); this.mesh.draw(this.camera); } });
Pex 
Added 2 months ago by Frederic Brodbeck
Show info
Pex 
Info
var sys = require('pex-sys'); var glu = require('pex-glu'); var materials = require('pex-materials'); var gen = require('pex-gen'); var Color = require('pex-color').Color; sys.Window.create({ init: function() { var cube = new gen.Cube(); this.material = new materials.ShowNormals(); this.mesh = new glu.Mesh(cube, this.material); var aspectRatio = this.width / this.height; this.camera = new glu.PerspectiveCamera(60, aspectRatio); this.arcball = new glu.Arcball(this, this.camera); }, draw: function() { glu.clearColorAndDepth(Color.White); glu.enableDepthReadAndWrite(true); this.mesh.draw(this.camera); } });
1 Connection