{
 "原理:Flame 是什麼,遊戲迴圈為什麼是遊戲的心跳#1": {
  "type": "flow",
  "title": "按鈕式移動 vs 遊戲迴圈",
  "layout": "row",
  "nodes": [
   {
    "label": "onPressed",
    "sub": "位置加 10"
   },
   {
    "label": "按一下",
    "sub": "跳 10 格"
   },
   {
    "label": "按十下",
    "sub": "跳 100 格"
   },
   {
    "label": "遊戲迴圈",
    "sub": "自己跳的心臟"
   }
  ],
  "reveal": [
   1,
   3,
   3,
   4,
   4
  ]
 },
 "原理:Flame 是什麼,遊戲迴圈為什麼是遊戲的心跳#4": {
  "type": "table",
  "title": "事件驅動 vs 時間驅動",
  "head": [
   "比較",
   "一般 App",
   "遊戲"
  ],
  "rows": [
   [
    "驅動方式",
    "事件驅動",
    "時間驅動"
   ],
   [
    "沒人碰手機",
    "安靜不動",
    "世界照走"
   ],
   [
    "畫面更新",
    "setState 重畫",
    "迴圈不斷轉"
   ]
  ],
  "widths": [
   2,
   3,
   3
  ],
  "reveal": [
   1,
   2,
   3
  ]
 },
 "原理:Flame 是什麼,遊戲迴圈為什麼是遊戲的心跳#5": {
  "type": "flow",
  "title": "遊戲迴圈的一圈",
  "layout": "col",
  "avatar": "hide",
  "nodes": [
   {
    "label": "取得 dt",
    "sub": "這一幀經過的時間"
   },
   {
    "label": "讀取輸入",
    "sub": "點了哪裡?"
   },
   {
    "label": "更新世界",
    "sub": "移動、碰撞、改分數"
   },
   {
    "label": "繪製世界",
    "sub": "畫到螢幕"
   }
  ],
  "reveal": [
   0,
   1,
   3,
   4,
   4,
   4
  ]
 },
 "原理:Flame 是什麼,遊戲迴圈為什麼是遊戲的心跳#7": {
  "type": "flow",
  "title": "一幀的旅程",
  "layout": "cycle",
  "avatar": "hide",
  "nodes": [
   {
    "label": "系統刷新"
   },
   {
    "label": "算出 dt",
    "sub": "例如 0.0167 秒"
   },
   {
    "label": "update(dt)",
    "sub": "位置 += 速度 × dt"
   },
   {
    "label": "render",
    "sub": "在新位置畫圓"
   },
   {
    "label": "送到螢幕",
    "sub": "約每秒 60 圈"
   }
  ],
  "edges": [
   [
    0,
    1
   ],
   [
    1,
    2
   ],
   [
    2,
    3
   ],
   [
    3,
    4
   ],
   [
    4,
    0
   ]
  ],
  "reveal": [
   0,
   1,
   4,
   5,
   5,
   5
  ]
 },
 "觀念教學:update 與 render,一圈迴圈做兩件事#1": {
  "type": "cards",
  "title": "廚師與擺盤師",
  "cards": [
   {
    "title": "update",
    "points": [
     "廚師:負責算",
     "位置、速度、碰牆"
    ]
   },
   {
    "title": "render",
    "points": [
     "擺盤師:負責畫",
     "照結果在畫布畫圓"
    ]
   }
  ],
  "reveal": [
   1,
   2,
   2,
   2
  ]
 },
 "觀念教學:update 與 render,一圈迴圈做兩件事#5": {
  "type": "cards",
  "title": "update(dt):算的那一半",
  "cards": [
   {
    "title": "做什麼",
    "points": [
     "每一幀被呼叫",
     "dt 單位是秒"
    ]
   },
   {
    "title": "規則一",
    "points": [
     "先呼叫",
     "super.update(dt)"
    ]
   },
   {
    "title": "規則二",
    "points": [
     "只做狀態的事",
     "不畫圖、不等網路"
    ]
   }
  ],
  "reveal": [
   1,
   1,
   2,
   3
  ]
 },
 "觀念教學:update 與 render,一圈迴圈做兩件事#7": {
  "type": "cards",
  "title": "render(canvas):畫的那一半",
  "cards": [
   {
    "title": "做什麼",
    "points": [
     "在 Canvas 上畫",
     "圓、矩形、線、文字"
    ]
   },
   {
    "title": "規則",
    "points": [
     "不要改遊戲狀態"
    ]
   },
   {
    "title": "小訣竅",
    "points": [
     "Paint 存成成員變數"
    ]
   }
  ],
  "reveal": [
   1,
   1,
   2,
   3
  ]
 },
 "觀念教學:元件樹與專案結構,把遊戲排成一棵樹#2": {
  "type": "table",
  "title": "元件樹的動作",
  "head": [
   "動作",
   "作用"
  ],
  "rows": [
   [
    "add",
    "把元件掛到這個節點底下"
   ],
   [
    "removeFromParent",
    "把元件從樹上拿下來"
   ],
   [
    "children",
    "這個節點的所有子元件"
   ],
   [
    "priority",
    "數字大的畫在上面"
   ]
  ],
  "widths": [
   3,
   5
  ],
  "reveal": [
   0,
   3,
   3,
   4,
   4
  ]
 },
 "觀念教學:元件樹與專案結構,把遊戲排成一棵樹#7": {
  "type": "flow",
  "title": "Bounce Lab 的元件樹",
  "layout": "snake",
  "nodes": [
   {
    "label": "BounceGame",
    "sub": "根"
   },
   {
    "label": "Background",
    "sub": "草地"
   },
   {
    "label": "Ball",
    "sub": "球"
   },
   {
    "label": "DebugText",
    "sub": "顯示 dt"
   }
  ],
  "edges": [
   [
    0,
    1
   ],
   [
    0,
    2
   ],
   [
    0,
    3
   ]
  ],
  "reveal": [
   0,
   1,
   3,
   4
  ]
 },
 "觀念教學:座標系與時間 dt,讓球在任何手機上一樣快#1": {
  "type": "bar",
  "title": "每幀 3 像素的速度",
  "labels": [
   "60Hz",
   "120Hz"
  ],
  "values": [
   180,
   360
  ],
  "unit": " 像素/秒",
  "highlight": 1,
  "reveal": [
   0,
   0,
   2,
   2
  ]
 },
 "觀念教學:座標系與時間 dt,讓球在任何手機上一樣快#2": {
  "type": "cards",
  "title": "Flame 的座標系",
  "cards": [
   {
    "title": "原點",
    "points": [
     "左上角"
    ]
   },
   {
    "title": "x 軸",
    "points": [
     "往右增加"
    ]
   },
   {
    "title": "y 軸",
    "points": [
     "往下增加"
    ]
   },
   {
    "title": "球往上飛",
    "points": [
     "y 變小"
    ]
   }
  ],
  "reveal": [
   0,
   3,
   4,
   4,
   4
  ]
 },
 "觀念教學:座標系與時間 dt,讓球在任何手機上一樣快#5": {
  "type": "cards",
  "title": "PositionComponent 三屬性",
  "cards": [
   {
    "title": "position",
    "points": [
     "錨點所在的位置"
    ]
   },
   {
    "title": "size",
    "points": [
     "元件的寬高"
    ]
   },
   {
    "title": "anchor",
    "points": [
     "預設左上角",
     "center 為中心"
    ]
   }
  ],
  "reveal": [
   0,
   2,
   3,
   3
  ]
 },
 "觀念教學:座標系與時間 dt,讓球在任何手機上一樣快#6": {
  "type": "table",
  "title": "速度 240 像素/秒(示範)",
  "head": [
   "更新率",
   "每幀",
   "一秒",
   "共"
  ],
  "rows": [
   [
    "60Hz",
    "4 像素",
    "60 幀",
    "240 像素"
   ],
   [
    "120Hz",
    "2 像素",
    "120 幀",
    "240 像素"
   ],
   [
    "30Hz",
    "8 像素",
    "30 幀",
    "240 像素"
   ]
  ],
  "avatar": "hide",
  "reveal": [
   0,
   0,
   1,
   3,
   3
  ]
 },
 "課後重點整理:Flame 與遊戲迴圈#7": {
  "type": "table",
  "title": "關鍵數字備忘(示範數字)",
  "head": [
   "項目",
   "示範值"
  ],
  "rows": [
   [
    "起點",
    "180, 320"
   ],
   [
    "速度",
    "180, 120"
   ],
   [
    "半徑",
    "16"
   ],
   [
    "撞右牆",
    "約 0.911 秒"
   ],
   [
    "撞下牆",
    "約 2.533 秒"
   ],
   [
    "每幀 3 像素 60Hz",
    "180 像素/秒"
   ],
   [
    "每幀 3 像素 120Hz",
    "360 像素/秒"
   ]
  ],
  "widths": [
   3,
   3
  ],
  "reveal": [
   0,
   3,
   5,
   7
  ]
 }
}