Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[wip] WorldViewの改修
  • Loading branch information
Gurrium committed May 20, 2022
1 parent c7547cd commit a0936a4
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Komusou/WorldView.swift
Expand Up @@ -9,6 +9,31 @@ import Combine
import SceneKit
import SwiftUI

struct AltWorldView: View {
@Binding
var isBluetoothEnabled: Bool

var body: some View {
ZStack(alignment: .topLeading) {
WorldView(
speedSensor: isBluetoothEnabled ? BluetoothSpeedSensor() : MockSpeedSensor(),
cadenceSensor: isBluetoothEnabled ? BluetoothCadenceSensor() : MockCadenceSensor()
)
VStack(alignment: .leading, spacing: 8) {
Text("999.99 [km/h]")
Text("90 [rpm]")
}
.padding([.top, .leading])
}
}
}

struct AltWorldView_Preview: PreviewProvider {
static var previews: some View {
AltWorldView(isBluetoothEnabled: .constant(true))
}
}

struct WorldView: UIViewRepresentable {
private let worldView: _WorldView

Expand Down

0 comments on commit a0936a4

Please sign in to comment.