Open pdawyndt opened 6 years ago
scratchblocks
scratchblocks
generates SVG or PNG representations of Scratch blocks; right-clicking the Scratch 3.0 blocks generated by Scratch-LN allows to save them as a PNGscratchblocks
(in Scratch-LN they are enclosed in between bars | ... |
and are block comments instead of line comments), Scratch-LN also supports Scratch-LN comments (both line comments // ...
and block comments /* ... */
) that do not have a corresponding representation in Scratch 3.0 blocksscratchblocks
does not check the validity of the syntax<mouse down?>
can be written as <mouse down?>
; the question mark can also be preceded or followed by additional spaces and/or tabs#AABBCC
can be written using the shorthand notation #ABC
then
keyword is optional in conditional statements, where it is mandatory in scratchblocks
::user-defined
as an alias for the option ::custom
::local
as an alias for the option ::custom-arg
scratchblocks
\n
; as in scratchblocks
), a semicolon (;
) or a combination of a semicolon followed by a newline (possibly with some intermediate spaces and/or tabs); the use of semicolons allows to put Scratch-LN code on a single line in contexts that do not support multiline text; scratchblocks
does not support a semicolon as a delimiterscratchblocks
(e.g. [Hello!]
), but are enclosed in between curly braces ({text}
), double quotes ("text"
) or a combination thereof ({"text"}
) in Scratch-LN (@Ellen102 does Scratch-LN officially also supports the square brackets as a string delimiter, because this seems to work in the preview?)v
to discriminate them from text inputs as in scratchblocks
scratchblocks
; the latter however prevents to represent variables whose name can be interpreted as a number, which is allowed by Scratch 3.0#
is sufficient to recognize a color literal) but can optionally be enclosed in curly braces (as with all arguments)scratchblocks
makes a distinction between number arguments (round brackets) and string arguments (square brackets), whereas Scratch-LN does not make a distinction (curly braces) because Scratch doesn't eitherscratchblocks
automatically tries to infer whether or not a variable is a list, whereas Scratch-LN always requires the ::list
modifier for list variables (explicit is better than implicit)scratchblocks
represents calls to custom blocks that have or haven't been defined in a different way (closed world view), whereas Scratch-LN represents all custom blocks in the same way (open world view)scratchblocks
supports block templates in multiple languagesscratchblocks
#
) in tags, e.g. variable names such as (costume \#)
do no need the escaping in scratchblocks
and can simply be written as (costume #)
scratchblocks
allows to drop the closing square brackets (]
) and parentheses ()
) but Scratch-LN doesn't because it is considered bad style (also in the scratchblocks
style guide)scratchblocks
supports modifiers to set specific colors and shapes for blocks (not supported in Scratch 3.0, may be supported as a Google Blockly extension)scratchblocks
supports custom C-shape blocks (not supported in Scratch 3.0)scratchblocks
supports snap! extensions (not supported in Scratch 3.0)scratchblocks
supports an ellipsis block (...
) (may be supported as a Scratch 3.0 extension)I noticed a couple of other tools or features which scratchblocks offers, which I personally find really useful.
Having a generator which will "download" the scripts from the scratch website and turn them into scratchblocks code scratchblocks.github.io/generator, super useful when creating projects.
The ability to highlight or "cross out" blocks, which is really useful in creating projects where you want to specifically highlight a block to change or a block to remove.
@Ellen102 once we have support for extensions, we could make an extension for "crossed out" blocks; instead of crossing them out, we could either give them a grey color or make them semitransparent (if this is supported by Google Blockly)
If the blocks aren't set as read-only, users could then also take the manual action of removing the "crossed out" block to see the end result.
check the following pages to see if Scratch-LN supports all the
scratchblocks
functionality (for Scratch 2.0 blocks)add a section to the Scratch-LN website that contains
scratchblocks
features that are not supported by Scratch-LNscratchblocks
features that are supported in a different way by Scratch-LNscratchblocks