From 3717394f00d9208756edeb9e8c13e5d58902e653 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford Date: Mon, 29 Jan 2018 14:04:19 -0800 Subject: [PATCH] Playground: load renderer as UMD The recent changes to the renderer's build output packaging broke this repository's playground / benchmark suite. These changes aren't the only way to fix the issue, but this is consistent with the way that the storage module was already being loaded. --- src/playground/benchmark.js | 2 +- src/playground/index.html | 2 ++ webpack.config.js | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/playground/benchmark.js b/src/playground/benchmark.js index 4e6d383b..9284c5db 100644 --- a/src/playground/benchmark.js +++ b/src/playground/benchmark.js @@ -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(); diff --git a/src/playground/index.html b/src/playground/index.html index 9a0fcfbe..be633b62 100644 --- a/src/playground/index.html +++ b/src/playground/index.html @@ -83,6 +83,8 @@ + + diff --git a/webpack.config.js b/webpack.config.js index 0095d0dc..e9eae32d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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' }])