Port of Nature of Code examples to TypeScript (using p5.js)