SketchWaveJS Classes

A library of custom graphics classes for p5.js

We've got class! (& so can you! )

Click on any card below to learn more and see interactive demos

SWColor

🎨 SWColor Class

Create and manipulate colors with HSBA color mode with the ability translate to RGB, HSL, or hex values.

SWPoint

📍 SWPoint Class

Create and manipulate points in 2D space with customizable colors, sizes, and labels.

SWGrid

📐 SWGrid Class

Add coordinate grids to your sketches for precise positioning and visual reference.

SWDisk

🟢 SWDisk Class

Create and manipulate disks with customizable colors, sizes, positions. Via SWSinusoid, watch them breathe and color cycle.

SWSinusoid

〰️ SWSinusoid Class

Control a ball's height with a sine wave! Change the frequency, and watch the ball bounce! Enable breathing and color cycling with your favorite shape!

SWLine

📏 SWLine Class

Draw and manipulate line segments with customizable colors, thickness, and positions. Leverage their attributes in designs, and let them breathe and rotate.

SWGradient

🌈 SWGradient Class

Create and manipulate gradients with customizable colors, directions, and transitions.

SWTriangle

🔺 SWTriangle Class

Create triangles and manipulate their attributes with customizable colors, thickness, and positions. Not surprisingly, they too can breathe and rotate.

SWRectangle

▭ SWRectangle Class

Control a rectangle's dimensions with a sine wave! Change the frequency, and watch the rectangle breathe! Enable breathing and rotation. Be on the lookout for the 'golden rectangle'!