after12am / eisenscript

A programming language designed for generating awesome structures.
https://after12am.github.io/eisenscript-docs/
MIT License
47 stars 5 forks source link

implement stepwise execution #13

Closed after12am closed 11 years ago

after12am commented 11 years ago

I wonder that using yeild make it possible to implement stepwise execution like this.

after12am commented 11 years ago

could not use 'yield' because chrome have not implemented it. canary and firefox does support. but umm...

So I correspond by adding one object at a time.

var n = 0;
function animate() {
  requestAnimationFrame( animate );

  // if rendering one object at a time
  renderer.build(prod.objects[n]);
  n++;

  renderer.render();
}