---
# System prepended metadata

title: 米老鼠
tags: [程式設計上課作品]

---

---
tags: 程式設計,第一單元,老師版,互動藝術程式創作入門,Creative Coding
---
# 第二周程式碼說明

## 顏色的說明

```javascript=
function setup() {
  createCanvas(windowWidth, windowHeight);
  background("#D6CCC2")
}

function draw() {//每秒執行60次
  //background(220);
 // background(255,0,0)//RGB
 //background(mouseX%256,mouseY%256,0)//背景顏色隨著滑鼠變化
 //background("#ffc8dd")//16進位色票顯示，前後加""，再加#
  //background(109,104,117)
}

```

## 畫框
```javascript=
function setup() {
  createCanvas(windowWidth, windowHeight);
  background("#D6CCC2")
}

function draw() {//每秒執行60次
  //background(220);
 // background(255,0,0)//RGB
 //background(mouseX%256,mouseY%256,0)//背景顏色隨著滑鼠變化
 //background("#ffc8dd")//16進位色票顯示，前後加""，再加#
  //background(109,104,117)
  fill("#ffddd2")//充滿顏色
  stroke("#e4c1f9")
  //noStroke()//不產生邊框
  rect(mouseX,mouseY,100,200)//畫寬100高200長方形
}

```

## 畫米老鼠
```javascript=
function setup() {
  createCanvas(windowWidth, windowHeight);
  background("#D6CCC2")
}

function draw() {//每秒執行60次
  //background(220);
  //background(255,0,0)//RGB
 //background(mouseX%256,mouseY%256,0)//背景顏色隨著滑鼠變化
 //background("#ffc8dd")//16進位色票顯示，前後加""，再加#
  //background(109,104,117)
  background("#D6CCC2")
  fill("#ffddd2")//充滿顏色
  stroke("#e4c1f9")
  //noStroke()//不產生邊框
  //rect(mouseX,mouseY,100,200)//畫寬100高200長方形
  ellipse(mouseX,mouseY,200)
  fill("#cdb4db")
  ellipse(mouseX-100,mouseY-100,100)//左側耳朵
  ellipse(mouseX+100,mouseY-100,100)//右側耳朵

}

```