Skip to content

Instantly share code, notes, and snippets.

View bmcfetty's full-sized avatar

Benjamin McFetridge bmcfetty

  • Wellington, New Zealand
View GitHub Profile
@bmcfetty
bmcfetty / canvas-sketch-base-template.js
Last active April 5, 2021 11:35
Basic starting point for any canvas-sketch with comments of my commonly used/altered settings
const canvasSketch = require('canvas-sketch');
const Random = require("canvas-sketch-util/random");
// ****** If using random ******
// Set a random seed so we can reproduce this print later
const defaultSeed = "";
Random.setSeed(defaultSeed || Random.getRandomSeed());
// Print to console so we can see which seed is being used and copy it if desired
console.log("Random Seed:", Random.getSeed());