From d75f1c59654f407343fd9eb864df9b26800ef6a9 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Wed, 26 Oct 2016 10:30:16 -0400 Subject: [PATCH 1/2] Remove empty project --- assets/scratch_cat.svg | 42 --------------------------------- assets/stage.png | Bin 3552 -> 0 bytes playground/playground.js | 12 ---------- src/index.js | 49 --------------------------------------- 4 files changed, 103 deletions(-) delete mode 100644 assets/scratch_cat.svg delete mode 100644 assets/stage.png diff --git a/assets/scratch_cat.svg b/assets/scratch_cat.svg deleted file mode 100644 index 823455468..000000000 --- a/assets/scratch_cat.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/stage.png b/assets/stage.png deleted file mode 100644 index b13e9d1f5f77b8f623b272d4520eecc34c0aa797..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3552 zcmeAS@N?(olHy`uVBq!ia0y~yU_QXWz;uCw2`F+wwC^#HVk{1FcVbv~PUa<$!;&U>cv7h@-A}f&3S>O>_%)r2R7=#&*=dVZsnpEoP;uum9_x740BZGke^TJ=|bEAIT zc4W2{pNWlFLR1*ehf3boFyt=akR{0Pf7lyZ`_I diff --git a/playground/playground.js b/playground/playground.js index 6c483f79e..5a88de76e 100644 --- a/playground/playground.js +++ b/playground/playground.js @@ -1,11 +1,6 @@ -var NEW_PROJECT_HASH = 'createEmptyProject'; var loadProject = function () { var id = location.hash.substring(1); - if (id === NEW_PROJECT_HASH) { - window.vm.createEmptyProject(); - return; - } if (id.length < 1 || !isFinite(id)) { id = '119615668'; } @@ -16,8 +11,6 @@ var loadProject = function () { if (this.readyState === 4) { if (r.status === 200) { window.vm.loadProject(this.responseText); - } else { - window.vm.createEmptyProject(); } } }; @@ -36,11 +29,6 @@ window.onload = function() { document.location = '#' + document.getElementById('projectId').value; location.reload(); }; - document.getElementById('createEmptyProject').addEventListener('click', - function() { - document.location = '#' + NEW_PROJECT_HASH; - location.reload(); - }); loadProject(); // Instantiate the renderer and connect it to the VM. diff --git a/src/index.js b/src/index.js index 1480b1bdf..56962277d 100644 --- a/src/index.js +++ b/src/index.js @@ -3,8 +3,6 @@ var util = require('util'); var Runtime = require('./engine/runtime'); var sb2import = require('./import/sb2import'); -var Sprite = require('./sprites/sprite'); -var Blocks = require('./engine/blocks'); /** * Handles connections between blocks, stage, and extensions. @@ -190,53 +188,6 @@ VirtualMachine.prototype.addBackdrop = function (backdropObject) { stage.setCostume(stage.sprite.costumes.length - 1); }; -/** - * Temporary way to make an empty project, in case the desired project - * cannot be loaded from the online server. - */ -VirtualMachine.prototype.createEmptyProject = function () { - // Stage. - var blocks2 = new Blocks(); - var stage = new Sprite(blocks2, this.runtime); - stage.name = 'Stage'; - stage.costumes.push({ - skin: './assets/stage.png', - name: 'backdrop1', - bitmapResolution: 2, - rotationCenterX: 480, - rotationCenterY: 360 - }); - var target2 = stage.createClone(); - this.runtime.targets.push(target2); - target2.x = 0; - target2.y = 0; - target2.direction = 90; - target2.size = 200; - target2.visible = true; - target2.isStage = true; - // Sprite1 (cat). - var blocks1 = new Blocks(); - var sprite = new Sprite(blocks1, this.runtime); - sprite.name = 'Sprite1'; - sprite.costumes.push({ - skin: './assets/scratch_cat.svg', - name: 'costume1', - bitmapResolution: 1, - rotationCenterX: 47, - rotationCenterY: 55 - }); - var target1 = sprite.createClone(); - this.runtime.targets.push(target1); - target1.x = 0; - target1.y = 0; - target1.direction = 90; - target1.size = 100; - target1.visible = true; - this.editingTarget = this.runtime.targets[0]; - this.emitTargetsUpdate(); - this.emitWorkspaceUpdate(); -}; - /** * Set the renderer for the VM/runtime * @param {!RenderWebGL} renderer The renderer to attach From 16c405d5593c39e53b7819ef37878b6cd96359a2 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Mon, 31 Oct 2016 10:41:16 -0400 Subject: [PATCH 2/2] Remove assets copy plugin --- webpack.config.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index cb4b01e05..9aa878c7c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -109,9 +109,6 @@ module.exports = [ to: 'media' }, { from: 'node_modules/highlightjs/styles/zenburn.css' - }, { - from: 'assets', - to: 'assets' }]) ]) })