Created
September 17, 2021 15:54
-
-
Save sgodycki/03e42e0e702f3162f17d669df7df9a75 to your computer and use it in GitHub Desktop.
map__
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
mode=Python | |
mode.id=jycessing.mode.PythonMode | |
def setup(): | |
size(800,375) | |
global mountainsImage | |
global hillsImage | |
global foregroundImage | |
global princesspeachImage | |
global moonImage | |
mountainsImage = loadImage("week03-mountains.png") | |
hillsImage = loadImage("week03-hills.png") | |
foregroundImage = loadImage("week03-foreground.png") | |
princesspeachImage =loadImage("princesspeach.png") | |
moonImage = loadImage("week03-moon.png") | |
def draw(): | |
rg = map(mouseX, 0,width, 155,10) | |
b = map(mouseX, 0,width, 255,50) | |
background(rg,rg,b) | |
mtnX=map(mouseX,0,200,0,-20) | |
image(mountainsImage, mtnX, 50) | |
hillsX = map(mouseX, 0, width, -20,-200) | |
image(hillsImage, hillsX, 250) | |
fgX = map(mouseX, 0, width, 0, -2000) | |
image(foregroundImage, fgX, 225) | |
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
def setup(): | |
size(800,375) | |
global mountainsImage | |
global hillsImage | |
global foregroundImage | |
global princesspeachImage | |
global moonImage | |
mountainsImage = loadImage("week03-mountains.png") | |
hillsImage = loadImage("week03-hills.png") | |
foregroundImage = loadImage("week03-foreground.png") | |
princesspeachImage =loadImage("princesspeach.png") | |
moonImage = loadImage("week03-moon.png") | |
def draw(): | |
rg = map(mouseX, 0,width, 155,10) | |
b = map(mouseX, 0,width, 255,50) | |
background(rg,rg,b) | |
mtnX=map(mouseX,0,200,0,-20) | |
image(mountainsImage, mtnX, 50) | |
hillsX = map(mouseX, 0, width, -20,-200) | |
image(hillsImage, hillsX, 250) | |
fgX = map(mouseX, 0, width, 0, -2000) | |
image(foregroundImage, fgX, 225) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment