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
LINE Developer Meetup: Javascript All The Things
Search
Joel Billaud
July 20, 2016
Programming
730
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
LINE Developer Meetup: Javascript All The Things
Joel Billaud
July 20, 2016
Other Decks in Programming
See All in Programming
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
480
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
560
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
600
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
Jetpack Compose Mechanisms
skydoves
3
820
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
ChromeでローカルLLM
ryu1013
0
140
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
310
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.5k
パスワード再設定メールのURLについて知っておこう
uyuki234
0
160
Featured
See All Featured
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
Rails Girls Zürich Keynote
gr2m
96
14k
Everyday Curiosity
cassininazir
0
350
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
440
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
A designer walks into a library…
pauljervisheath
211
25k
So, you think you're a good person
axbom
PRO
2
2.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
Making Projects Easy
brettharned
120
6.8k
Transcript
Image copyright: Hyperbole and a Half LINE Fukuoka Joël Billaud
2016-07-20
2015 11 LINE Fukuoka Creators Market
JavaScript?
Perl JavaScript (ES6) bless +{ description => $description, methods =>
\@methods, }; bless +{ description => $description, methods => \@methods, }; { description, methods, };
Perl?
None
Green Red Pink
HTML CSS
HTML CSS JavaScript 40 PSDs 2 2 2
➜
PSD HTML Canvas
40 PSDs 2 5
⅓ ⅓ ➜
PSD
None
PSD DSL
PSD npm install psd # > const PSD = require('psd')
> const psd = PSD.fromFile(filepath) > const layer = psd.tree().children()[0] // PSD > layer.name // 'Friends @a.top.title' >[layer.width, layer.height] // [629, 1140] > layer.toPng() // Stream { ... }
"AndroidFriends": { "ja": { "width": 720, "height": 1232, "layers": [
{ "color": "a.friends.bg" "rect": { "left": 0, "top": 0, "width": 720, "height": 1232 } }, { "color": "a.top.button" "src": {
HTML Canvas
Reactive UI
Green Red Pink
function renderPreviewScreen(ctx, preview) { // Promise const renderers = preview.layers.map(layer
=> { if (layer.element) { return loadElementLayer(...); } else if (layer.rect) { return loadRectLayer(...); } else { return loadSpriteLayer(...); } }); // ... function loadSpriteLayer(layer, spriteUrl, colors) { return loadImage(spriteUrl).then(sprite => { return function render(ctx) { ctx.drawImage(sprite, src, dst); }; }); }
// Promise.all(renderers).then(...); // renderers.each(render => render.then(...)); // renderers[0].then(render => render(ctx))
.then(() => renderers[1]).then(render => render(ctx)) .then(() => renderers[2]).then(render => render(ctx)) ... .then(() => renderers[n]).then(render => render(ctx)) // reduce renderers.reduce((previous, current) => { return previous .then(() => current) .then(render => render(ctx)) });
function renderPreviewScreen(ctx, preview) { return preview.layers.map(layer => { if (layer.element)
{ return loadElementLayer(...); } else if (layer.rect) { return loadRectLayer(...); } else { return loadSpriteLayer(...); } }) .reduce((previous, current) => previous.then(() => current) .then(render => render(ctx)) ); }
npm Promise Node npm install beer vodka whiskey #
LINE