Add renderer demo using scratch-render-webgl

This commit is contained in:
Tim Mickel 2016-06-29 20:56:55 -04:00
parent 809528abdc
commit 19da0b0032
11 changed files with 155 additions and 8 deletions
src/engine

View file

@ -6,6 +6,7 @@ var util = require('util');
var defaultBlockPackages = {
'scratch3_control': require('../blocks/scratch3_control'),
'scratch3_event': require('../blocks/scratch3_event'),
'scratch3_motion': require('../blocks/scratch3_motion'),
'scratch3_operators': require('../blocks/scratch3_operators')
};
@ -257,6 +258,9 @@ Runtime.prototype._setInterval = function(fcn, interval) {
Runtime.prototype.start = function () {
this._setInterval(function() {
this._step();
if (self.renderer) {
self.renderer.draw();
}
}.bind(this), Runtime.THREAD_STEP_INTERVAL);
};