<script src="http://spelprogrammering.nu/simple.js">

function update()
{
  clearScreen();

  var p1 = {x:-1, y:-1, z:-1};
  var p2 = {x:-1, y:-1, z: 1};
  var p3 = {x:-1, y: 1, z:-1};
  var p4 = {x:-1, y: 1, z: 1};
  var p5 = {x: 1, y:-1, z:-1};
  var p6 = {x: 1, y:-1, z: 1};
  var p7 = {x: 1, y: 1, z:-1};
  var p8 = {x: 1, y: 1, z: 1};
  
  math.line3D(p1, p2, "green");
  math.line3D(p1, p5, "green");
  math.line3D(p1, p3, "green");
  math.line3D(p5, p6, "green");
  math.line3D(p5, p7, "green");
  math.line3D(p7, p8, "green");
  math.line3D(p7, p3, "green");
  math.line3D(p3, p4, "green");
  math.line3D(p4, p2, "green");
  math.line3D(p4, p8, "green");
  math.line3D(p2, p6, "green");
  math.line3D(p8, p6, "green");

  math.rotate3D(0.01, 0.015, 0.016);
}
</script>
        
Gå tillbaka