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
Kei Ito
September 28, 2016
Programming
0
1k
20160928 時計仕掛けのアヒル
関モバ #18 の資料です
Kei Ito
September 28, 2016
Tweet
Share
More Decks by Kei Ito
See All by Kei Ito
20211015 Mac CatalystでmacOS用アプリを作る
itok
2
4.3k
20210219 Flutterに入門してみた
itok
1
4k
20201009 iOS 14 ウィジェットをつくってみた
itok
1
2.4k
20191206 Property Wrappers 入門
itok
0
1.6k
20190920 iOS 13 対応ではまった話
itok
1
2.3k
20190726 Background App Refresh Taskがやってきた
itok
0
2.1k
20190722 Firebase Remote Configでアドネットワークを管理する
itok
0
1.5k
20190419 iOSアプリで証明書の情報を参照する
itok
0
1.4k
20190412 Android TV向けアプリを作ってみる
itok
0
1k
Other Decks in Programming
See All in Programming
外接に惑わされない自システムの処理時間SLIをOpenTelemetryで実現した話
kotaro7750
0
130
オンデバイスAIとXcode
ryodeveloper
0
340
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
420
ドメイン駆動設計のエッセンス
masuda220
PRO
15
6.7k
モテるデスク環境
mozumasu
3
1.4k
EMこそClaude Codeでコード調査しよう
shibayu36
0
500
One Enishi After Another
snoozer05
PRO
0
170
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
620
CSC509 Lecture 07
javiergs
PRO
0
250
業務でAIを使いたい話
hnw
0
210
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
18
9.2k
TransformerからMCPまで(現代AIを理解するための羅針盤)
mickey_kubo
7
5.8k
Featured
See All Featured
The Language of Interfaces
destraynor
162
25k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
Practical Orchestrator
shlominoach
190
11k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Done Done
chrislema
186
16k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
GraphQLとの向き合い方2022年版
quramy
49
14k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
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୯ମͰޮՌԻ͕໐Βͤͳ͍