Snap! (programming language): Difference between revisions

Content deleted Content added
WikiCleanerBot (talk | contribs)
m v2.05b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation)
Line 25:
}}
 
'''Snap''!''''' (formerly Build Your Own Blocks) is a free, block-based [[List of educational programming languages|educational]] graphical programming language and online community allowing students to explore, create, and remix interactive animations, games, stories, and more, while learning about mathematical and computational ideas. While inspired by [[Scratch (programming language)|Scratch]], Snap''!'' has many advanced features. The Snap''!'' editor, and programs created in it, are [[web application]]s that run in the browser (like [[Scratch (programming language)|Scratch 3]]) without requiring [[Installation (computer programs)|installation]].{{#tag:ref|BYOB, Snap''!''{{'}}s predecessor, was a modification of Scratch and could export projects as [[Portable Executable|Windows executables]].|group=Note}} It is built on top of ''Morphic.js'',<ref name="morphic_js">{{cite web |last1=Mönig |first1=Jens |title=morphic.js |url=https://github.com/jmoenig/morphic.js/blob/master/morphic.txt |website=GitHub |accessdate=7 June 2023}}</ref>, a [[Morphic (software)|Morphic]] GUI, written by Jens Mönig as 'middle layer' between Snap! itself and 'bare' JavaScript.
 
==User interface==
Line 77:
 
==Implementation==
Although Snap''!'' is implemented in JavaScript using an [[HTML5]] Canvas [[application programming interface]] (API), it is actually built on top of ''Morphic.js'',<ref name="morphic_js">{{cite web |last1=Mönig |first1=Jens |title=morphic.js |url=https://github.com/jmoenig/morphic.js/blob/master/morphic.txt |website=GitHub |accessdate=7 June 2023}}</ref>, a [[Morphic (software)|Morphic]] GUI, which serves as 'middle layer' between Snap! itself and 'bare' JavaScript.
 
All things visible in Snap''!'' are morphs themselves, i.e. all buttons, sliders, dialog boxes, menus,entry fields, text rendering, blinking cursors etc. are created with morphic.js rather than using HTML DOM elements. Snap! caches the shapes of [[Sprite (computer graphics)|sprite]]s so the sprite doesn't have to be re-drawn onto a new Canvas element every time the mouse moves over its bounding box. It does not cache blocks, however. Instead it manages the insides of C- and E-shaped blocks through the morphic "holes" mechanism.