Skip to content

A simple p5.js add-on to let you use input more efficiently. Just simply add to your code! An example is in the readme

Notifications You must be signed in to change notification settings

Buggem/processing.input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

processing.input

A simple p5.js and Processing add-on to let you use input. Just simply add to your code!

Variables added

  • keysHeld is a array (an ArrayList in Processing) with all the keys pressed stored in it.
  • aKeyPressed is detecting when a key is pressed (just a merge of keyPressed in processing and keyIsPressed in p5.js basically so your projects are easier to convert to p5.js/processing)
  • theKey is the last key pressed.
  • keysLog is a string containing all keys ever pressed.

Add it

p5.js

Download the p5.input.js file and add

<script src="p5.input.js"></script>

to your code.

Processing (as of version 4)

Copy and paste the processing.input.pde file to your code.

Demo

There is a demonstration of p5.input.js and how it works here, as well as a demonstration using a emulated Java/Processing Environment here. It is also shown on the p5js libraries site.

About

A simple p5.js add-on to let you use input more efficiently. Just simply add to your code! An example is in the readme

Resources

Stars

Watchers

Forks

Packages

No packages published