From 8c2d023925730ac00779a4a6a31c2684a757790f Mon Sep 17 00:00:00 2001 From: Florrie Date: Mon, 30 Apr 2018 21:29:34 -0300 Subject: [PATCH] Implement set/change stretch blocks --- src/blocks/scratch3_looks.js | 2 ++ src/serialization/sb2_specmap.js | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/blocks/scratch3_looks.js b/src/blocks/scratch3_looks.js index 37542aaf3..93226aee1 100644 --- a/src/blocks/scratch3_looks.js +++ b/src/blocks/scratch3_looks.js @@ -255,6 +255,8 @@ class Scratch3LooksBlocks { looks_cleargraphiceffects: this.clearEffects, looks_changesizeby: this.changeSize, looks_setsizeto: this.setSize, + looks_changestretchby: this.doNothing, + looks_setstretchto: this.doNothing, looks_gotofrontback: this.goToFrontBack, looks_goforwardbackwardlayers: this.goForwardBackwardLayers, looks_size: this.getSize, diff --git a/src/serialization/sb2_specmap.js b/src/serialization/sb2_specmap.js index 24f5d8618..b0c004273 100644 --- a/src/serialization/sb2_specmap.js +++ b/src/serialization/sb2_specmap.js @@ -349,6 +349,26 @@ const specMap = { } ] }, + 'changeStretchBy:': { + opcode: 'looks_changestretchby', + argMap: [ + { + type: 'input', + inputOp: 'math_number', + inputName: 'CHANGE' + } + ] + }, + 'setStretchTo:': { + opcode: 'looks_setstretchto', + argMap: [ + { + type: 'input', + inputOp: 'math_number', + inputName: 'STRETCH' + } + ] + }, 'comeToFront': { opcode: 'looks_gotofrontback', argMap: [