Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Web design iV
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Frank
July 25, 2016
Programming
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Web design iV
Frank
July 25, 2016
Transcript
14 slides
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 • 製作動畫使用
練習 & 作業 • 練習 (一) – 製作一個可以顯示數個物件並可於平臺上相互碰撞 • 作業
(一) – 製作打磚塊遊戲 • 作業 (二) – 圖形解鎖
More Decks by Frank
See All by Frank
Web design III
frankweihuang
0
250
Web design II
frankweihuang
0
390
Web design
frankweihuang
0
270
Other Decks in Programming
See All in Programming
疎結合とは何か?ソフトウェア設計における結合バランスについて考える #phpcon_niigata
kajitack
2
430
祈るテストから、探索するテストへ 〜Lincheckではじめる並行処理テスト〜
yyh_gl
0
430
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
170
imagewebp()の向こう側: WebPはなぜ JPEG・PNGより軽いのか
yuzneri
0
150
コード生成時代のAPI定義を支えるRequest Spec移行
pvcresin
0
300
SODA - FACT BOOK(JP)
sodainc
1
40k
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
330
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
250
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
180
LLM 101
dalinaum
0
540
protojson における文字化けの扱い
kazuki1023
0
470
Crash Auto Pipelines
veronikapj
1
450
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
96
6.9k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.7k
A designer walks into a library…
pauljervisheath
211
25k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Amusing Abliteration
ianozsvald
1
400
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.9k
The SEO Collaboration Effect
kristinabergwall1
1
630
RailsConf 2023
tenderlove
30
1.6k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.3k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
540
A Modern Web Designer's Workflow
chriscoyier
699
190k