Merge pull request #921 from cwillisf/use-render-umd
Playground: load renderer as UMD
This commit is contained in:
3 files changed
+6
-2
No files matched your search
@@ -476,7 +476,7 @@ const runBenchmark = function () {
|
||||
|
||||
// Instantiate the renderer and connect it to the VM.
|
||||
const canvas = document.getElementById('scratch-stage');
|
||||
const renderer = new window.RenderWebGL(canvas);
|
||||
const renderer = new window.ScratchRender(canvas);
|
||||
Scratch.renderer = renderer;
|
||||
vm.attachRenderer(renderer);
|
||||
const audioEngine = new window.AudioEngine();
|
||||
|
||||
@@ -83,6 +83,8 @@
|
||||
<script src="./vendor.js"></script>
|
||||
<!-- Storage module -->
|
||||
<script src="./scratch-storage.js"></script>
|
||||
<!-- Stage rendering -->
|
||||
<script src="./scratch-render.js"></script>
|
||||
<!-- VM -->
|
||||
<script src="./scratch-vm.js"></script>
|
||||
<!-- Playground -->
|
||||
|
||||
+3
-1
@@ -122,7 +122,7 @@ module.exports = [
|
||||
},
|
||||
{
|
||||
test: require.resolve('scratch-render'),
|
||||
loader: 'expose-loader?RenderWebGL'
|
||||
loader: 'expose-loader?ScratchRender'
|
||||
}
|
||||
])
|
||||
},
|
||||
@@ -134,6 +134,8 @@ module.exports = [
|
||||
from: 'node_modules/highlightjs/styles/zenburn.css'
|
||||
}, {
|
||||
from: 'node_modules/scratch-storage/dist/web'
|
||||
}, {
|
||||
from: 'node_modules/scratch-render/dist/web'
|
||||
}, {
|
||||
from: 'src/playground'
|
||||
}])
|
||||
|
||||
Reference in new issue
Block a user