xxxxxxxxxx
25
var svg;
function preload() {
svg = loadImage('assets/Blank_US_Map_(states_only)_fill_id2.svg');
}
function setup() {
createCanvas(1000, 600);
background(100,100,0);
info();
image(svg, 0, 0, 1000, 600);
}
function info() {
print(" https://stackoverflow.com/questions/46880175/changing-the-fill-of-an-svg-image-in-p5-js ");
print(" https://discourse.processing.org/t/teaching-p5js-what-to-do-about-svg/14830 ");
print(" http://zenozeng.github.io/p5.js-svg/examples/#manipulating ");
print(" https://github.com/zenozeng/p5.js-svg ");
print(" with this old p5js and this library can use SVG");
print(" https://editor.p5js.org/kll/sketches/Y0xkkqqpR");
print(" but here we just use the newer image tool to render it, without the possibility to manipulate it");
}