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
複数ブラウザウィンドウを 単一平面とみなしてボールの 衝突判定をする
Search
kthatoto
December 14, 2023
Technology
210
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
複数ブラウザウィンドウを 単一平面とみなしてボールの 衝突判定をする
kthatoto
December 14, 2023
More Decks by kthatoto
See All by kthatoto
CSSだけでCookie Clickerを作る
kthatoto
0
1.1k
いろいろな駆動開発の話 / various-driven-development
kthatoto
0
99
ぼくのかんがえたさいきょうの放置ゲームを作ってる話 / saikyou-houti-game
kthatoto
1
490
最強の放置ゲームを作ってる話 ~ と、そのうちのゲーム作るためのゲームデータエディタを作ってる話 ~
kthatoto
0
74
ぼくのかんがえたさいきょうのぶろぐしすてむ
kthatoto
0
750
Other Decks in Technology
See All in Technology
OpenTelemetry eBPF Instrumentationの舞台裏 / Behind the Scenes of OpenTelemetry eBPF Instrumentation
ymotongpoo
4
1.2k
AI時代、データエンジニアが一番おもろい
genshun9
0
370
HRC_Frontend_Conference_Fukuoka_2026.pdf
ts020
0
620
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
140
10分で知る最近のOmarchy
komagata
0
280
あるけみー式LTスライド作成術
alchemy1115
1
200
消えない 動かない 効かない
yama3133
1
120
Snowflakeのコスト最適化を支えるアーキテクチャ設計
ktatsuya
1
1.5k
Claude Code本って、 読む必要あるの?
oikon48
2
430
OpenTelemetryのメトリクスをCloudWatchに送ってPromQLで見てみた
ota1022
0
140
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
3
480
Amazon Quick on DesktopがIAM Identity Centerで動かない理由
yukiogawa
0
170
Featured
See All Featured
Skip the Path - Find Your Career Trail
mkilby
1
230
Bash Introduction
62gerente
615
220k
Utilizing Notion as your number one productivity tool
mfonobong
4
590
RailsConf 2023
tenderlove
30
1.5k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
My Coaching Mixtape
mlcsv
0
310
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
410
Optimising Largest Contentful Paint
csswizardry
37
4k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Typedesign – Prime Four
hannesfritz
42
3.2k
エンジニアに許された特別な時間の終わり
watany
108
250k
Transcript
ෳϒϥβΟϯυΛ ୯Ұฏ໘ͱΈͳͯ͠Ϙʔϧͷ িಥఆΛ͢Δ @h4topigeon
ߴڮ Ұే (Kazuto Takahashi) ɾॴଐɿגࣜձࣾΫϩεϏοτ ɾۀɿγϑτཧαʔϏεͷ։ൃ, ςοΫϦʔυ ɾٕज़ɿRails, Vue,
React, NeoVim ɾझຯɿٕज़ͷແବ͍, ์ஔήʔϜ Zenn / GitHub @kthatoto Twitter @h4topigeon
ͬͨ͜ͱ / ͭͬͨ͘ͷ • ϒϥβΟϯυΛ୯ҰԾฏ໘ʹ͢Δ • ·ͣϘʔϧͷিಥఆΛ࣮͢Δ
• ݁ߏ͕֯Ͱ͖ΔͷͰ֯ͱͷিಥΛߟྀ͢Δඞཁ͕͋Δ • ҙ֎ͱԁͱ֯ͷিಥఆޙɺͶฦΓ͕ߟྀ͞Ε ͨใ͕͋·Γଟ͘ͳ͍ ͬͨ͜ͱ / ͭͬͨ͘ͷ
هࣄॻ͖·ͨ͠
؆қਤղ
࣮ݱํ๏ (Ґஔؔ) • window.screenX, window.screenY • window.outerWidth, window.outerHeight x y
(0, 0) → ݪ (-403, -1415)
࣮ݱํ๏ (σʔλڞ༗) • localStorage or IndexedDB • ྆ํͱΟϯυΛލ͍Ͱσʔλڞ༗Ͱ͖Δ • localStorageͰࢼͯ͠Έͨͱ͜Ζ...
• key, valueΛ1֊͔ͯ͠ͳ͍ • ͳ͔ͥਖ਼ৗʹͷߋ৽͕͞Εͳ͍͍͠ؾ͕͢Δ...
࣮ݱํ๏ (σʔλڞ༗) • IndexedDBΛͬͯΈΔ • ͳΜ͔ૣ͍ʂ͏·͍͘͘ʂ • Dexie.js ͑ΠϯλʔϑΣʔεָʹѻ͑Δ
هࣄॻ͖·ͨ͠
݁Ռ
࣮ݱํ๏ (σʔλڞ༗) • localStorage • ಉ͡ΩʔΛ͍ճ͍ͯ͠Δ͔ΒόοςΟϯά͍ͯ͠ʹ ͳΒͳ͔ͬͨ • ΩʔʹIDΛؚΜͰ͠·͏ͱҰཡੑ͕ࣦΘΕΔ
(localStorage.ball_1 = ...) • Ωʔ͕ଘࡏ͢ΔIDͷҰཡΛผͰอ࣋͢Δ͜ͱͰղܾ • ❌ localStorage.balls = "[{x:0,y:0},{x:100,y:100}]" • ⭕ localStorage.ball_ids = "[1,2]" ɹ localStorage.ball_1 = "{id:1,x:0,y:0}" ɹ localStorage.ball_2 = "{id:2,x:100,y:100}"
࣮ݱํ๏ (ΟϯυҠಈՄೳఆ) ͜͜௨աͰ͖Δ͔ఆ͍ͨ͠ ো ো 2ͭͷΟϯυΛލ͙ ॠ͚ؒͩԾͷো Λదʹஔ͘
࣮ݱํ๏ (ΟϯυҠಈՄೳఆ) • ͜ͷదʹ͕େม... • ਫฏํͷҠಈՄೳఆ͚ͩͰ9ύλʔϯ • ਨํ9ύλʔϯΛ߹Θͤͯ18ύλʔϯ ো ো
ো ো ো ো ো ো ো ো ো ো ো ো ো ো ো ো
ࠓޙ • ԁಉ࢜Ͱিಥఆ • ܭࢉྔͷ࠷దԽ → ׂ࢛ۭؒ • ϒϥβΟϯυͷॏͳΓΛߟྀͨ͠ΟϯυҠ ಈ
• 3ͭҎ্ͷϒϥβΟϯυ͕ަΘΔ෦ͷΟϯυ Ҡಈ