some
This commit is contained in:
1 parent
738a5bffd0
commit
47f9eb904a
30 files changed
+339
-35
No files matched your search
@@ -0,0 +1,14 @@
|
||||
class ChkgfxComponent {
|
||||
let ctrl = DialectController(ChkgfxContext())
|
||||
static private(set) weak var singleton: ChkgfxComponent?
|
||||
|
||||
init() {
|
||||
Self.singleton = self
|
||||
chkgfxRegisterEffects(ctrl)
|
||||
chkgfxRegisterShoulds(ctrl)
|
||||
}
|
||||
|
||||
func setup() {
|
||||
chkgfxSet(F.didSetup, true)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import Combine
|
||||
|
||||
final class ChkgfxVM: ObservableObject {
|
||||
static private(set) weak var shared: ChkgfxVM?
|
||||
|
||||
init() {
|
||||
Self.shared = self
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import SwiftUI
|
||||
|
||||
struct ChkgfxView: View {
|
||||
@ObservedObject var vm: ChkgfxVM
|
||||
|
||||
init(_ vm: ChkgfxVM) {
|
||||
self.vm = vm
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 16) {
|
||||
Text("Check graphics")
|
||||
.font(.largeTitle)
|
||||
Button("Load model") {
|
||||
rootSet(F.didClickLoadModel, true)
|
||||
}
|
||||
}
|
||||
.padding(40)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user