3D box in p5.js

Simple 3D box in p5js (require WebGL)

Goup box:

Here we create 4 box start from (0,0) (0,1) (1,0) (1,1).

In p5js, translate() is global effect that will apply to all object coordinate. If we just want to change single object coordinate, need to use with push and pop.

A plain:

Date: 2025-03-02 Sun 00:00

Author: Terry Fung

Created: 2025-03-02 Sun 22:47

Emacs 29.4 (Org mode 9.6.15)

Validate