Created
December 31, 2022 18:13
-
-
Save dipamsen/67247c3dfa941f91f59ffff647044c75 to your computer and use it in GitHub Desktop.
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
// MouseDrag - movable canvas | |
// p5.js | |
// function draw() | |
// translate(offset) | |
// .. | |
// } | |
function mouseDragged(event) { | |
offset.add(event.movementX * 0.9, event.movementY * 0.9) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment