This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ==UserStyle== | |
@name Simple Scratch testing | |
@namespace github.com/openstyles/stylus | |
@version 1.0.8 | |
@description Stylesheet to remove text and extraneous UI from Scratch. Used for localization-friendly screencasts | |
@author @mrjoshida | |
==/UserStyle== */ | |
@namespace xlink 'http://www.w3.org/1999/xlink'; | |
@-moz-document domain("csfirstcoding.withgoogle.com"), | |
domain("scratch.mit.edu"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cube({size: 1}); // Creates a cube that is 1 x 1 x 1 | |
linear_extrude({height: 1}, square({size: 1})) // Creates a 1 x 1 square and then extrudes it by 1 to create a 1 x 1 x 1 cube |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use_bpm 120 | |
current_note = 60 | |
play(current_note) | |
sleep(1) | |
# C Major scale using single variable | |
current_note = current_note + 2 | |
play(current_note) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use_bpm 120 | |
current_note = 60 | |
play(current_note) | |
sleep(1) | |
current_note = current_note + 2 | |
play(current_note) | |
sleep(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use_bpm 120 | |
define :my_sound do |n| | |
play n, | |
attack: 0.5, | |
attack_level: 1, | |
decay: 0.25, | |
sustain_level: 0.4, | |
sustain: 0.75, | |
release: 0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use_bpm 120 | |
define :my_sound do |n| | |
play n, | |
attack: 0.5, | |
attack_level: 1, | |
decay: 0.25, | |
sustain_level: 0.4, | |
sustain: 0.75, | |
release: 0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a sprite for each wall and add them to the group walls | |
// You can then use sprite.bounceOff(walls) | |
var walls = createGroup(); | |
var top = createSprite(200, 0, 400, 5); | |
walls.add(top); | |
var bottom = createSprite(200, 400, 400, 5); | |
walls.add(bottom); | |
var left = createSprite(0, 200, 5, 400); | |
walls.add(left); |