Created
March 5, 2013 21:31
-
-
Save Neurogami/5094473 to your computer and use it in GitHub Desktop.
Sample code from v2 of Leap Web game
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
function prepareLeap(){ | |
canvas = document.getElementById("gameCanvas"); | |
context = canvas.getContext("2d"); | |
controller = new Leap.Controller(); | |
var leftX = parseInt($('#leftX').val()); | |
var rightX = parseInt($('#rightX').val()); | |
var bottomY = parseInt($('#bottomY').val()); | |
var topY = parseInt($('#topY').val()); | |
region = new Leap.UI.Region([leftX, bottomY, -100], [rightX, topY, 300]) | |
controller.addStep(new Leap.UI.Cursor()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment