diff --git a/src/blocks/scratch3_motion.js b/src/blocks/scratch3_motion.js index 524eab24..ce3f1ac4 100644 --- a/src/blocks/scratch3_motion.js +++ b/src/blocks/scratch3_motion.js @@ -34,7 +34,13 @@ class Scratch3MotionBlocks { motion_sety: this.setY, motion_xposition: this.getX, motion_yposition: this.getY, - motion_direction: this.getDirection + motion_direction: this.getDirection, + // Legacy no-op blocks: + motion_scroll_right: () => {}, + motion_scroll_up: () => {}, + motion_align_scene: () => {}, + motion_xscroll: () => {}, + motion_yscroll: () => {} }; } diff --git a/src/serialization/sb2_specmap.js b/src/serialization/sb2_specmap.js index 687b4226..797dce08 100644 --- a/src/serialization/sb2_specmap.js +++ b/src/serialization/sb2_specmap.js @@ -206,6 +206,45 @@ const specMap = { argMap: [ ] }, + 'scrollRight': { + opcode: 'motion_scroll_right', + argMap: [ + { + type: 'input', + inputOp: 'math_number', + inputName: 'DISTANCE' + } + ] + }, + 'scrollUp': { + opcode: 'motion_scroll_up', + argMap: [ + { + type: 'input', + inputOp: 'math_number', + inputName: 'DISTANCE' + } + ] + }, + 'scrollAlign': { + opcode: 'motion_align_scene', + argMap: [ + { + type: 'field', + fieldName: 'ALIGNMENT' + } + ] + }, + 'xScroll': { + opcode: 'motion_xscroll', + argMap: [ + ] + }, + 'yScroll': { + opcode: 'motion_yscroll', + argMap: [ + ] + }, 'say:duration:elapsed:from:': { opcode: 'looks_sayforsecs', argMap: [