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
複数ブラウザウィンドウを 単一平面とみなしてボールの 衝突判定をする
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
kthatoto
December 14, 2023
Technology
0
200
複数ブラウザウィンドウを 単一平面とみなしてボールの 衝突判定をする
kthatoto
December 14, 2023
Tweet
Share
More Decks by kthatoto
See All by kthatoto
CSSだけでCookie Clickerを作る
kthatoto
0
1.1k
いろいろな駆動開発の話 / various-driven-development
kthatoto
0
96
ぼくのかんがえたさいきょうの放置ゲームを作ってる話 / saikyou-houti-game
kthatoto
1
480
最強の放置ゲームを作ってる話 ~ と、そのうちのゲーム作るためのゲームデータエディタを作ってる話 ~
kthatoto
0
69
ぼくのかんがえたさいきょうのぶろぐしすてむ
kthatoto
0
740
Other Decks in Technology
See All in Technology
出版記念イベントin大阪「書籍紹介&私がよく使うMCPサーバー3選と社内で安全に活用する方法」
kintotechdev
0
110
RGBに陥らないために -プロダクトの価値を届けるまで-
righttouch
PRO
0
130
Oracle Cloud Infrastructure:2026年3月度サービス・アップデート
oracle4engineer
PRO
0
200
Even G2 クイックスタートガイド(日本語版)
vrshinobi1
0
130
Amazon Qはアマコネで頑張っています〜 Amazon Q in Connectについて〜
yama3133
1
160
契約書からの情報抽出を行うLLMのスループットを、バッチ処理を用いて最大40%改善した話
sansantech
PRO
3
320
DMBOKを使ってレバレジーズのデータマネジメントを評価した
leveragestech
0
470
AI時代のシステム開発者の仕事_20260328
sengtor
0
310
ブラックボックス化したMLシステムのVertex AI移行 / mlops_community_62
visional_engineering_and_design
1
230
なぜarray_firstとarray_lastは採用、 array_value_firstとarray_value_lastは 見送りだったか / Why array_value_first and array_value_last was declined, then why array_first and array_last was accpeted?
cocoeyes02
0
290
SaaSに宿る21g
kanyamaguc
2
180
私がよく使うMCPサーバー3選と社内で安全に活用する方法
kintotechdev
0
140
Featured
See All Featured
Navigating Weather and Climate Data
rabernat
0
150
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.5k
It's Worth the Effort
3n
188
29k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
How GitHub (no longer) Works
holman
316
150k
Being A Developer After 40
akosma
91
590k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Amusing Abliteration
ianozsvald
0
140
Building Adaptive Systems
keathley
44
3k
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ͭҎ্ͷϒϥβΟϯυ͕ަΘΔ෦ͷΟϯυ Ҡಈ