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