p5.flex!

CC Attribution

p5.flex

p5.flex is a tool that creates a container to hold your p5 canvas and ensures the canvas fits the container, similar to CSS object-fit. It offers modes like CONTAIN, COVER, FILL, NONE, and SCALE_DOWN to specify how the canvas should fit the container. Using p5.flex can make your p5 canvas responsive while maintaining correct mouse positions ( you can still use mouseX and mouseY ! ). GitHub: https://github.com/ZRNOF/p5.flex
p5.flex!
e.g., mouse, keyboard
e.g., visualization, fractal, mouse
Learn more about Creative Commons
Join Plus+ to change privacy settings
1/6
  • mySketch
Select mode or a template
Centers sketch and matches the background color.
Prevents infinite loops that may freeze the sketch.
This will be the default layout for your sketches
Easy on the eyes
It will show up when there is an error or print() in code
Potential warnings will be displayed as you type
Closes parenthesis-like characters automatically as you type

Controls
Play
Ctrl+Enter
Code
Ctrl+Shift+Enter
Save
Ctrl+S
Interface
Fullscreen
Ctrl+Alt+F
Switch Layout
Ctrl+Alt+L
Settings
Ctrl+Alt+.
Editor
Tidy Code
Ctrl+B
Multiple Cursors
Ctrl+Click
Duplicate Line/Selection
Ctrl+Shift+D
Move Line
Alt+↑/↓
Select Multiple
Ctrl+D
Find in Code
Ctrl+F
Find Next
Ctrl+G
Find Previous
Ctrl+Shift+G

See More Shortcuts

Join Plus+ for private sketches, version history, 1GB space, custom embeds, and more!