From c02ee88d0247528f8fc0911c0fa057f60131d205 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Mon, 19 Sep 2016 15:24:46 -0400 Subject: [PATCH] Add some more info/links to sb2specmap (#197) --- src/import/sb2specmap.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/import/sb2specmap.js b/src/import/sb2specmap.js index adfd11af3..693d82f81 100644 --- a/src/import/sb2specmap.js +++ b/src/import/sb2specmap.js @@ -4,9 +4,22 @@ * the SB2 JSON format and the data we need to run a project * in the Scratch 3.0 VM. * Notably: - * - Map 2.0-format opcodes (forward:) into 3.0-format (motion_movesteps). + * - Map 2.0 and 1.4 opcodes (forward:) into 3.0-format (motion_movesteps). * - Map ordered, unnamed args to unordered, named inputs and fields. * Keep this up-to-date as 3.0 blocks are renamed, changed, etc. + * Originally this was generated largely by a hand-guided scripting process. + * The relevant data lives here: + * https://github.com/LLK/scratch-flash/blob/master/src/Specs.as + * (for the old opcode and argument order). + * and here: + * https://github.com/LLK/scratch-blocks/tree/develop/blocks_vertical + * (for the new opcodes and argument names). + * and here: + * https://github.com/LLK/scratch-blocks/blob/develop/tests/ + * (for the shadow blocks created for each block). + * I started with the `commands` array in Specs.as, and discarded irrelevant + * properties. By hand, I matched the opcode name to the 3.0 opcode. + * Finally, I filled in the expected arguments as below. */ var specMap = { 'forward:':{