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 b13e9d1f5..000000000 Binary files a/assets/stage.png and /dev/null differ diff --git a/playground/playground.js b/playground/playground.js index aa6f56d50..75027dc33 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 79ae2febf..a275cfacc 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. @@ -239,53 +237,6 @@ VirtualMachine.prototype.deleteSprite = function (targetId) { } }; -/** - * 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 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' }]) ]) })