Merge pull request #484 from adroitwhiz/fix-cpu-render-playground

Attach V2 adapters in CPU render playground
This commit is contained in:
DD Liu 2019-08-30 14:58:59 -04:00 committed by GitHub
commit 5c6997131b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
<body> <body>
<script src="../../node_modules/scratch-vm/dist/web/scratch-vm.js"></script> <script src="../../node_modules/scratch-vm/dist/web/scratch-vm.js"></script>
<script src="../../node_modules/scratch-storage/dist/web/scratch-storage.js"></script> <script src="../../node_modules/scratch-storage/dist/web/scratch-storage.js"></script>
<script src="../../node_modules/scratch-svg-renderer/dist/web/scratch-svg-renderer.js"></script>
<!-- note: this uses the BUILT version of scratch-render! make sure to npm run build --> <!-- note: this uses the BUILT version of scratch-render! make sure to npm run build -->
<script src="../../dist/web/scratch-render.js"></script> <script src="../../dist/web/scratch-render.js"></script>
@ -21,6 +22,8 @@
vm.attachStorage(storage); vm.attachStorage(storage);
vm.attachRenderer(render); vm.attachRenderer(render);
vm.attachV2SVGAdapter(new ScratchSVGRenderer.SVGRenderer());
vm.attachV2BitmapAdapter(new ScratchSVGRenderer.BitmapAdapter());
document.getElementById('file').addEventListener('click', e => { document.getElementById('file').addEventListener('click', e => {
document.body.removeChild(document.getElementById('loaded')); document.body.removeChild(document.getElementById('loaded'));