jmoenig / snap Goto Github PK
View Code? Open in Web Editor NEWa visual programming language inspired by Scratch
Home Page: http://snap.berkeley.edu
License: GNU Affero General Public License v3.0
a visual programming language inspired by Scratch
Home Page: http://snap.berkeley.edu
License: GNU Affero General Public License v3.0
Using the "Make a variable" button to make a variable that already exists toggles the visibility of its watcher on the stage. Making an existing variable should be a no-op.
Passing a non-number value as the argument to <move () steps>, e.g., the result of <join (hello ) (world)>, causes the sprite to move offscreen; the exact position varies depending on the size of your viewport.
This is caused by SpriteMorph.prototype.forward
failing to check for NaN
in casting its argument from a string to a number. The simplest fix is to use steps * this.parent.scale || 0
rather than parseFloat(steps * this.parent.scale)
.
Other affected blocks:
NaN
)The general approach in these blocks of using parseFloat(value || '0')
to cast to a number is flawed because it only guards against an empty string value and doesn't respond well to non-numeric strings—it still produces NaN
. +value || 0
is a good solution for a zero default value (what Scratch and BYOB use), and isNaN(value) ? default : +value
is good for non-zero default values.
It's easier not to have to drag a variable reporter out into the scripting area.
There are a few non-localized strings (or at least not included in the German localization):
Clicking "Share" in the "Save Project" dialog with no project selected in the project list should save the project and mark it as shared.
Clicking "help" from the context menu for the "Make a variable," "Delete a variable," and "Make a block" buttons should display the help screens for adding variables, removing variables, and adding blocks, respectively.
should we simply slightly increase their distance?
Watchers and value bubbles should detect recursion in lists and display some indication of it, rather than trying to create infinitely-nested lists.
I propose that right-clicking on a variable reporter or setter block (CHANGE or SET) would present the user with a "show definition" command. If it refers to a variable that has not been declared in its lexical scope, the command would be hidden. When the command is selected, the following would occur:
An ellipsis in a menu item indicates that further user interaction is required to complete that command (often this is in the form of a modal or nonmodal dialog). Clicking "Import tools…" imports the full tool set and does not prompt the user for any more information, so it should not end with an ellipsis.
In the open dialog, double-clicking on a project name should perform the same action as selecting the project name and clicking the "Open" button.
Menu items in Snap! are capitalized using sentence case, but the "Project Notes…" item is capitalized using title case. In order to be consistent with the other menu items, it should be "Project notes…"
As it currently functions, choosing "rename…" from a variable reporter's context menu only changes the label of that variable reporter—it doesn't actually change the declaration of the variable or any of its other occurrences.
Renaming a variable means changing its name, so when a user renames a variable its declaration (with script variables …
or as a sprite or global variable) should also be changed to reflect the new name, as should all reporters within the variable's scope which refer to it.
Desired result:
In addition to being a much more intuitive result for the "rename" command, this process is also consistent with Scratch 2.0's variable renaming feature.
Users should still be able to change the variable to which the reporter points (i.e., change only its own label), but this feature should be available from the "relabel…" command rather than the "rename…" command.
When the #lang:xx anchor is added to the URL, the empty project that is created by default should have its name and the name of its (single) sprite localized.
The dialog that opens when a script variable is clicked has the title "Input Name," when it should be "Variable Name" or "Script Variable Name."
#open: should support the Username=username&ProjectName=project name format, so users can link to their projects in editing mode rather than presentation mode.
At least in Mac OS X, non-ASCII characters cannot be input the usual way (i.e., ´+a to get á). All non-ASCII characteres must thus be pasted from elsewhere.
Costumes go missing with this project: https://www.dropbox.com/l/RvhhsYNfwjHf9dohkng4bc
When I've tried snap on win7 in firefox or chrome, there is a general lag - its very slow to load - and some script or other often freezes the browser. Sometimes basic UI interaction works at first, until I try to load the official blocks, or open a project. Is this expected at this stage in development?
While Snap! allows cirularity in lists and is able to serialize / deserialize them displaying them in a list watcher - either on stage or in a bubble - freezes Snap!
hasOwnProperty
breaks the variables palette.hasOwnProperty
breaks the sprite name menu.hasOwnProperty
breaks the costume name menu.hasOwnProperty
breaks the sound name menu.hasOwnProperty
breaks the broadcast menu.It would be really nice if Snap! supported keyboard shortcuts for these common commands:
(I'm aware that Snap! already has keyboard shortcuts for starting and stopping scripts)
I think that's my fault—sorry.
When a user clicks and drags on a dialog button, he/she picks up the dialog itself and can't finish clicking the button. The button should prevent the drag event from propagating to its parent dialog so a user can press the mouse, drag slightly, release it, and still complete the click; this is the behavior exhibited by other buttons in the interface, e.g., the palette buttons.
Uncaught TypeError: Cannot call method 'fullBounds' of null
Clicking the a palette category button when it is already selected scrolls the palette contents over about 10 pixels up and to the left.
The "Export blocks ..." and "Export project as plain text ..." menu items have a space before the ellipsis, while other menu items don't.
When I try to import the project http://bit.ly/14MGc7j to Snap! the following error occurs:
Load failled: TypeError: Cannot call method 'setContents' of undefined
If I remove the script and leave only the costumes (see http://bit.ly/YZWjud), the error no longer occurs. However, the costumes are not loaded properly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.