Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Web design iV
Search
Frank
July 25, 2016
Programming
0
170
Web design iV
Frank
July 25, 2016
Tweet
Share
More Decks by Frank
See All by Frank
Web design III
frankweihuang
0
250
Web design II
frankweihuang
0
380
Web design
frankweihuang
0
260
Other Decks in Programming
See All in Programming
釣り地図SNSにおける有料機能の実装
nokonoko1203
0
190
Webサーバーサイド言語としてのRustについて
kouyuume
0
1.5k
Devoxx BE - Local Development in the AI Era
kdubois
0
130
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
2
750
Developer Joy - The New Paradigm
hollycummins
1
270
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
3.4k
Writing Better Go: Lessons from 10 Code Reviews
konradreiche
0
3.8k
CSC509 Lecture 05
javiergs
PRO
0
310
Android16 Migration Stories ~Building a Pattern for Android OS upgrades~
reoandroider
0
130
CSC509 Lecture 07
javiergs
PRO
0
230
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
510
Swift Concurrency - 状態監視の罠
objectiveaudio
2
550
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
Making Projects Easy
brettharned
120
6.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Being A Developer After 40
akosma
91
590k
The Illustrated Children's Guide to Kubernetes
chrisshort
49
51k
The Straight Up "How To Draw Better" Workshop
denniskardys
238
140k
Building a Modern Day E-commerce SEO Strategy
aleyda
44
7.8k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
KATA
mclloyd
PRO
32
15k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
jQuery: Nuts, Bolts and Bling
dougneiner
65
7.9k
Transcript
web design IV WEI, HUANG e-Mail:
[email protected]
Contents • Create JS – Introduction to easel JS •
Stage • Shape • Bitmap • Graphics • Event • Ticker • Shadow • Sprite – Other
Easel.js • 由於多數瀏覽器逐漸淘汰 flash 轉向支援 HTML 5 , 因此 Abode
推出一套 Create JS 作為提供給以往習 慣使用 Flash 語法開發的使用者加速上手 html 5 下 的 canvas 開發,而 Easel 則是 create.js 提供的其中 一種負責繪圖的函式庫。
Q & A • Q. 為何不寫原生的 canvas 語法 ? A.
語法較長,必須實作一些圖像處理。 • Q. 我沒學過 flash 可以玩嗎? – A. 可以,大致上理解其類別作用使用這無太大困難。 • Q. 有其他類似的 library 嗎? – A. P5.js 、 processing.js ……
Eeael.js • Create 本身是一個大物件內容包山包海,諸如 Bitmap、Shape、Event … • 怎麼用? – CDN
大招開下去,注意 create 採用 jQuery 語法做為基底, – 因此引入 create.js 時,必須同時引入 jQuery 並且需要再 easel 前引入。
Stage • 建立一個主舞台,每個 Stage 對應到一個 Canvas ID • new createjs.Stage(‘canvas’);
• addChild() – 將欲再 Stage 顯示的物件實體加入
Shape • 產生幾何圖形 • 將幾何圖形放入 Stage 中製作 • 須配合 Graphics
Bitmap • 加入一個點陣圖物件 • 可接受 png jpg … 格式 •
可對 Bitmap 進行相對的影像處理
Graphics • 圖形物件,產生出一系列圖形 • 包含線、方、圓…
Event • 對於物件實體所對應的事件處理
Ticker • 計時器,提供物件顯示更新時用
Shadow • 創建陰影
Sprite • 製作動畫使用
練習 & 作業 • 練習 (一) – 製作一個可以顯示數個物件並可於平臺上相互碰撞 • 作業
(一) – 製作打磚塊遊戲 • 作業 (二) – 圖形解鎖