Support most Scratch blocks
See original GitHub issueExample translations are available at https://leopardjs.now.sh/translations/motion
Built-in
Motion
- Move steps
- Turn right
- Turn left
- Go to [menu]
- Random position
- Mouse
- Sprite
- Go to x y
- Glide secs to [menu]
- Random position
- Mouse
- Sprite
- Glide secs to x y
- Point in direction
- Point towards
- Mouse
- Sprite
- Change x by
- Set x to
- Change y by
- Set y to
- If on edge, bounce: #120
- Set rotation style
- x position
- y position
- direction
✔ Looks
- Say for secs
- Say
- Think for secs
- Think
- Switch costume to
- Next costume
- Switch backdrop to
- Name
- Next
- Previous
- Random
- Switch backdrop and wait
- Next backdrop
- Change size by
- Set size to
- Change effect by
- Set effect to
- Color
- Fisheye
- Whirl
- Pixelate
- Mosaic
- Brightness
- Ghost
- Clear graphic effects
- show
- hide
- go to front/back layer
- go forward/backward layers
- costume number/name
- backdrop number/name
- size
✔ Sound
- Play sound until done
- Play sound
- Stop all sounds
- Change effect by
- Set effect to
- Pitch
- Pan
- Clear sound effects
- Change volume by
- Set volume to
- volume
Events
- When green flag clicked
- When key pressed
- When this sprite clicked
- When backdrop switches to: #121
- When greater than: #122
- When I receive
- Broadcast
- Broadcast and wait
Control
- Wait secs
- Repeat
- Forever
- If
- If else
- Wait until
- Repeat until
- Stop
- When I start as a clone
- Create clone of
- Delete this clone
Sensing
- Touching
- Mouse
- Edge: #125
- Sprite
- Touching color
- Color is touching color
- Distance to
- Mouse
- Sprite
- Ask and wait
- Answer
- Key pressed
- Mouse down
- Mouse x
- Mouse y
- Set drag mode: #123
- Loudness: #122
- Timer:
this.timer
- Reset timer
- [property] of [object]
- Current
- Year
- Month
- Date
- Day of week
- Hour
- Minute
- Second
- Days since 2000
- ~Username~ (N/A)
✔ Operators
- Add
- Subtract
- Multiply
- Divide
- Pick random
- Greater than
- Less than
- Equal to
- And
- Or
- Not
- Join
- Letter of
- Length of
- Contains
- Mod
- Round
- Math “of”
- abs
- floor
- ceiling
- sqrt
- sin
- cos
- tan
- asin
- acos
- atan
- ln
- log
- e ^
- 10 ^
✔ Variables
Variables
- Get variable value
- Set variable to
- Change variable by
- Show variable
- Hide variable
Lists
- Get list value
- Add to list
- Delete of list
- Delete all of list
- Insert at position of list
- Replace item of list
- Item of list
- Item # of string in list
- Length of list
- List contains item
- Show list
- Hide list
✔ My Blocks
Custom blocks are a feature. There aren’t any predefined blocks to support, because… well. You know.
Extensions
Music
- Overall support tracked in #135
- Play drum for beats
- Rest for beats
- Play note for beats
- Set instrument
- Set tempo
- Change tempo
- Tempo
✔ Pen
- Erase all
- Stamp
- Pen down
- Pen up
- Set pen color
- Change pen [property]
- Set pen [property]
- Change pen size
- Set pen size
Other Extensions…
Supporting hardware/api scratch extensions natively is out of the scope of scratch-js.
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (1 by maintainers)
Top Results From Across the Web
More Blocks! Scratch Request! - Discuss Scratch
Scratch Request! This block, and others, could be used to hide the mouse pointer or change the way the mouse pointer looks in...
Read more >Blocks - Scratch Wiki
Blocks are puzzle-piece shapes that are used to create code in Scratch. The blocks connect to each other vertically like a jigsaw puzzle,...
Read more >How to practically use MORE BLOCKS in Scratch 2.0! - YouTube
This video tutorial explains how to make your own block. Also, it shows the various uses of making your own block.Thank you for...
Read more >How to use Scratch Blocks and What They Do - YouTube
Want those Scratch code blocks explained? Watch and code along with me in this tutorial where I list all the block types in...
Read more >Block types | Scratch 3 Walkthrough and Demo
Scratch is a "block-based" programming language. This means instead of writing lines of code to program, we use "blocks". Each block has a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Cloud variables could be supported with this (extremely simple) Javascript library that seems to be very Scratch-inspired: https://kihtrak.com/cloud_variable/
Looking through the author’s other projects, it appears that he’s a lifelong Scratcher. 😃
The code for the client is quite minimalistic, and the server code isn’t much larger. We could either link to this project or copy / adapt it more wholesale – there is no license attached to the code, so we may want to inquire about it.