2020互動技術
2020年11月2日 星期一
WEEK-8
Processing
Pixel & Color :
PImage img;
color nowColor;
void setup(){
size(388,330);
img=loadImage("galaxy.png");
}
void draw(){
image(img, 0,0);
fill(nowColor); rect(0,0,30,30);
}
void mouseMoved(){
loadPixels();
int now = width*mouseY + mouseX;
nowColor = pixels[now];
}
沒有留言:
張貼留言
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言