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
Panty Patch WebApp
Search
joniburn
August 20, 2019
1
1.4k
Panty Patch WebApp
パンツAPIを叩くウェブアプリを作った話(LT用資料)
joniburn
August 20, 2019
Tweet
Share
More Decks by joniburn
See All by joniburn
Getting Started with VRChat Udon
joniburn
0
1.2k
VRChat World Optimization
joniburn
0
1.5k
Customize Avatar Textures using Clip Studio Paint
joniburn
0
1.4k
VRChat VRC_Panorama Slide System
joniburn
2
2k
VRChat Avatar Optimization
joniburn
1
3.1k
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Scaling GitHub
holman
459
140k
Building Adaptive Systems
keathley
39
2.4k
Typedesign – Prime Four
hannesfritz
40
2.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
29
2.2k
BBQ
matthewcrist
86
9.4k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
Docker and Python
trallard
43
3.2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
Being A Developer After 40
akosma
89
590k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.4k
Transcript
パンツAPIを叩く ウェブアプリを作った話 @joniburn
キッシュちゃんパンツパッチ • TenteEEEE (@tenteeeee_vrc) さんが 開発しているアプリ • 日替わりパンツをCCライセンスで公開
夏のある日…
夏のある日…
パンツAPI • https://pantie-patch.herokuapp.com/ • GET /api/convert/<model>/<path> • 例:GET /api/convert/mishe/0255.png 0255.png
変換後
そこにAPIがあったので
そこにAPIがあったので
そこにAPIがあったので
使ったもの(1) • Angular • Angular Material Angularはいいぞ
使ったもの(2) • GitHub Pages ◦ gh-pagesブランチにindex.htmlとかを配置 ◦ https://github.com/joniburn/quiche-pantie-patch-gui ◦ https://joniburn.github.io/quiche-pantie-patch-gui/
• CircleCI ◦ ビルドとGitHub Pagesへのデプロイを 自動化
ソースコード(抜粋) /** * 変換後パンツのURLを返す。 * * @param model 変換対象モデル *
@param path パンツのファイル名 * @param options 変換オプション */ convertedPantyUrl(model: string, path: string, options: {[key: string]: string}): string { const url = new URL(`${BASE_URL}/api/convert/${model}/${path}`); const params = url.searchParams; Object.entries(options).forEach((e) => { params.append(e[0], e[1]); }); return url.toString(); }
ソースコード(抜粋) /** * 現在選択しているパンツが表示範囲内に入るようにスクロールする */ focusCurrentPanty() { // 選択中の要素を取得 const
current = this.pantycards.find(elm => elm.nativeElement.dataset.path === this.path); if (!current) { return; } // スクロール const listTop = this.pantyList.nativeElement.getBoundingClientRect().top; const targetTop = current.nativeElement.getBoundingClientRect().top; this.pantyList.nativeElement.scrollBy(0, targetTop - listTop - 81); }
ソースコード(抜粋) @Component({ selector: 'qpp-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) export
class AppComponent implements OnInit { panties$: Observable<string[]>; allPanties$: Observable<string[]>; convertersList: [string, Converter][]; convertersMap: {[key: string]: Converter}; pantySize: 'small' | 'medium' | 'large' | 'original' = 'medium';
おわり 2019 パンツプログラミングの夏