Skip to content

Instantly share code, notes, and snippets.

@ZucchiniZe
Created December 17, 2015 01:51
Show Gist options
  • Select an option

  • Save ZucchiniZe/5246acaaf3aa936f6a77 to your computer and use it in GitHub Desktop.

Select an option

Save ZucchiniZe/5246acaaf3aa936f6a77 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script src="http://cdnjs.cloudflare.com/ajax/libs/p5.js/0.4.12/p5.js"></script>
<script src="https://rawgit.com/jonleung/79234327a76b2eb4953e/raw/62bbd37c23950be576afac9d8f78112ec46445a2/p5.play.js"></script>
</body>
</html>
var player;
function setup() {
createCanvas(300, 500);
player = createSprite(150, 450);
}
function draw() {
background(255, 240, 220);
player.position.x = player.position.x + 1;
drawSprites();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment