Introduction

p5.quadrille.js #

p5.quadrille.js is an open-source p5.js library tailored for students, visual artists, and game designers. It supports the creation of puzzle and board games and the exploration of visual algorithms.

Quadrille cells sorted by their luminance levels.

Anchored in the quadrille concept, which is fundamental to numerous graphics applications, the library opens avenues for crafting traditional grid-based games and exploring algorithmic visuals from color data-based sorting to software-based image processing and rasterization.

At the heart of the library lies the Quadrille class, couple with some p5.js functions that allow manipulation and customization of all the quadrille visual appearance aspects. The class provides a set of properties, some read-only like mouseRow and mouseCol, and others read-write such as width and height. The class also offers methods to perform geometric transformations, conduct algebraic operations inspired by constructive solid geometry, and perform visualizations involving image filtering with convolution matrices and triangle rasterization. Additionally, the class includes various accessors such as clone, ring, and search, along with mutators like clear, fill, insert, replace and sort (used to order the images within the logo above), which allow for detailed customization and manipulation of the quadrille’s state. Moreover, reformatters within the library enable seamless transformation between quadrille instances and various data formats, such as arrays, images, and bitboards.

The library reference which illustrates most of its functionality is found along this site.

Contributions are welcome at the GitHub library site.

Releases #