2019年10月24日 星期四

哈哈哈哈哈哈哈哈哈哈~

今天學習用程式控制像素點
練習做一個電流急急棒
PImage imgMap;
void setup(){
  size(400,400);
  imgMap=loadImage("map.png");
  imgMap.loadPixels();
}
void draw(){
    background(imgMap);
    if(imgMap.pixels[ mouseX+mouseY*400 ] == color(237,28,36) ){
      background(255,0,0);
    }
    fill(imgMap.pixels[ mouseX+mouseY*400 ]);
    rect(250,250,100,100);
}

沒有留言:

張貼留言

alanhc 互動技術-week17 [final]

回顧這學期的作品:  期中作業:LANDING:PLANET 賣點&特點: 炫麗的特效 物理(星球重力及降落)及粒子系統(噴射) 世界地圖可根據視角縮放 困難點: 重寫3次最終改寫成物件導向的CLASS寫法...