mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-01 17:11:21 -04:00
Add renderer demo using scratch-render-webgl
This commit is contained in:
parent
809528abdc
commit
19da0b0032
11 changed files with 155 additions and 8 deletions
src/engine
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue