const Chance = require('chance'); const colors = require('./constants/colors.js'); const hsl = function (h, s, l) { return "hsl(" + h + "," + s + "%, " + l + "%)"; } const Fox = function (IMG_WIDTH, IMG_HEIGHT, seed) { if (seed) { chance = new Chance(seed); } else { chance = new Chance(); } // origin: head top left corner const kappa = chance.floating({min: 0.2, max: 0.45}) const headColor = (function () { const level = chance.floating({min: 0, max: 1}); const result = []; const min = colors.head.brick; const max = colors.head.yellow; for (let i=0; i