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
20160928 時計仕掛けのアヒル
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kei Ito
September 28, 2016
Programming
1.1k
0
Share
20160928 時計仕掛けのアヒル
関モバ #18 の資料です
Kei Ito
September 28, 2016
More Decks by Kei Ito
See All by Kei Ito
20211015 Mac CatalystでmacOS用アプリを作る
itok
2
4.5k
20210219 Flutterに入門してみた
itok
1
4k
20201009 iOS 14 ウィジェットをつくってみた
itok
1
2.5k
20191206 Property Wrappers 入門
itok
0
1.7k
20190920 iOS 13 対応ではまった話
itok
1
2.5k
20190726 Background App Refresh Taskがやってきた
itok
0
2.3k
20190722 Firebase Remote Configでアドネットワークを管理する
itok
0
1.6k
20190419 iOSアプリで証明書の情報を参照する
itok
0
1.5k
20190412 Android TV向けアプリを作ってみる
itok
0
1.1k
Other Decks in Programming
See All in Programming
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
270
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
11
3.1k
Moments When Things Go Wrong
aurimas
3
130
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
110
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
310
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.3k
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
320
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
400
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
140
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.4k
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
180
Featured
See All Featured
エンジニアに許された特別な時間の終わり
watany
107
240k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
180
Typedesign – Prime Four
hannesfritz
42
3.1k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
470
AI: The stuff that nobody shows you
jnunemaker
PRO
7
670
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
240
The untapped power of vector embeddings
frankvandijk
2
1.7k
Deep Space Network (abreviated)
tonyrice
0
160
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Raft: Consensus for Rubyists
vanstee
141
7.5k
Transcript
࣌ܭֻ͚ͷΞώϧ ؔϞόΠϧΞϓϦݚڀձ !JUPL@UXJU
!JUPL@UXJU w ͍ͱ͏͚͍ʢJUPLʣ w ɹɹɹɹɹɹͷதͷਓ w ެࢲڞʹϓϩάϥϚJ04.BDʢͨ·ʹ"OESPJE8JOEPXTʣ w IUUQJUPLKQ IUUQTPSBLB[FDPKQ
None
4NBSU5VCW
XBUDI04ରԠʂ
None
Ξώϧͷಈ͔͠ํ w 4QSJUF,JU w $PSF.PUJPO w 8,(FTUVSF3FDPHOJ[FS
4QSJUF,JU
४උ let scene = SKScene(size: size) scene.physicsWorld.gravity = CGVector(dx: 0,
dy: 0) self.sceneInterface.presentScene(scene)
෩࿊Գ let bath = SKSpriteNode(imageNamed: "xxx") bath.physicsBody = SKPhysicsBody(edgeLoopFrom: path)
scene.addChild(bath)
Ξώϧ let duck = SKSpriteNode(texture: tex, size: size) duck.physicsBody =
SKPhysicsBody(texture: tex, alphaThreshold: 0.2, size: size) bath.addChild(duck)
$PSF.PUJPO
४උ motionMgr.startAccelerometerUpdates(to: OperationQueue()) { (data, error) in if let data
= data { let acceleration = data.acceleration . . . } }
γΣΠΫ if self.isShake(acceleration) { self.addDuck() }
͖ var sign = 1 if WKInterfaceDevice.current().crownOrientation == .left {
sign = -1 } physicsWorld.gravity = CGVector(dx: x * sign, dy: y * sign)
8,(FTUVSF3FDPHOJ[FS
͘͡ @IBAction func handlePan(_ sender: AnyObject) { let pan =
sender as! WKPanGestureRecognizer let velocity = pan.velocityInObject() duck.physicsBody?.velocity = CGVector(dx: velocity.x * r, dy: -velocity.y * r) }
·ͱΊ w ͚ͯΔͱ͙͢ʹը໘͕εϦʔϓ͢Δ w Ϋϥϯͷ͖ʹҙ w (FTUVSF3FDPHOJ[FS*#ͰͷΈଓͰ͖Δ w XBUDI୯ମͰޮՌԻ͕໐Βͤͳ͍