Skip to content

Instantly share code, notes, and snippets.

@sgodycki
Created September 17, 2021 15:54
Show Gist options
  • Save sgodycki/03e42e0e702f3162f17d669df7df9a75 to your computer and use it in GitHub Desktop.
Save sgodycki/03e42e0e702f3162f17d669df7df9a75 to your computer and use it in GitHub Desktop.
map__
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)
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