mirror of
https://github.com/medialab-prado/poblados-colonizacion-colonias-penitenciarias.git
synced 2024-12-26 12:31:22 +01:00
mapa parcelas
This commit is contained in:
parent
c2f8f2e577
commit
a15f1392b8
1 changed files with 3 additions and 5 deletions
|
@ -22,7 +22,7 @@ function preload() {
|
|||
}
|
||||
|
||||
function setup() {
|
||||
createCanvas(windowWidth,519);
|
||||
createCanvas(800,519);
|
||||
nombres = new Array("Norte","Duero","Ebro","Pirineo","Jucar","Tajo","Guadiana","Guadalquivir","Sur", "Segura", "Baleares y Canarias");
|
||||
colores = new Array("#f00","#0f0","#00f","#ff0","#0ff","#a00","#0a0","#00a","#aa0","#0aa", "#aaa");
|
||||
x = new Array(158,243, 429, 597, 432, 268, 226, 253, 362,432, 611);
|
||||
|
@ -31,9 +31,7 @@ function setup() {
|
|||
|
||||
|
||||
function draw() {
|
||||
background(200,225,225);
|
||||
var dx = (width-519)*.5;
|
||||
translate(dx,0);
|
||||
background(0,0);
|
||||
// capas
|
||||
for (var n = 0; n < ids.length; n++) {
|
||||
if (dimr[n] != -1) image(capas[n],0,0);
|
||||
|
@ -43,7 +41,7 @@ function draw() {
|
|||
}
|
||||
|
||||
// Parcelas segun PGC
|
||||
var mc = cmap.get(mouseX-dx,mouseY);
|
||||
var mc = cmap.get(mouseX,mouseY);
|
||||
for (var n = 0; n < colores.length; n++) {
|
||||
if (compara(mc,color(colores[n]))) {
|
||||
tint(255,100);
|
||||
|
|
Loading…
Reference in a new issue