Skip to content

Instantly share code, notes, and snippets.

@sinisterchipmunk
Created October 5, 2012 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sinisterchipmunk/3839250 to your computer and use it in GitHub Desktop.
Save sinisterchipmunk/3839250 to your computer and use it in GitHub Desktop.
jax 3 debug
$("canvas").remove();
c = document.createElement('canvas');
c.width = c.height = 300;
$(document.body).append(c);
$(c).css("width", "300px");
$(c).css("height", "300px");
$(c).css("position", "absolute");
$(c).css("top", "0px");
$(c).css("left", "0px");
$(c).css("border", "1px solid #000");
c = Jax.Controller.create("welcome", { index: function() { this.world.addObject(new Jax.Model({position: [0, 0, -5], mesh: new Jax.Mesh.Cube()})); } });
j = new Jax.Context($("canvas")[0]);
j.redirectTo("welcome");
j.world.ambientColor = "#f00";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment