p5.js: How to rotate 3D objects on the X, Y, and Z axis

On the 2D plain of a browser window p5.js can represent 3D space using WEBGL. This is specified as the third argument to the createCanvas() function in the setup portion of the sketch: createCanvas(400, 300, WEBGL); Here is some code that demonstrates how to rotate a 2D rectangle on the X axis, using rotateX(), which … Continue reading p5.js: How to rotate 3D objects on the X, Y, and Z axis

WordPress: How to create an iframe refresh button

Let’s say you have an interactive canvas loaded in an iframe and you want to have the ability to “clear” the canvas without reloading the entire page. This example was created using p5.js and the html was loaded into an iframe. After drawing on this canvas, it can be cleared by clicking the “Clear Canvas” … Continue reading WordPress: How to create an iframe refresh button

p5.js: Getting Started

Getting started with p5.js, this article follows the instructions found here:https://p5js.org/get-started/ Where processing.py only allows interaction in the Processing code environment, p5.js allows for real time interactive experiences on the web. This article is similar to the previous article I wrote about getting started with Processing.py: In the Processing IDE, choose the p5.js option at … Continue reading p5.js: Getting Started