This commit is contained in:
Михаил Капелько committed 2026-10-21 17:35:20 +03:00
1 parent 738a5bffd0
commit 47f9eb904a
30 files changed
+339 -35

No files matched your search

+14
View File
@@ -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)
}
}
+9
View File
@@ -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)
}
}
+8 -13
View File
@@ -8,22 +8,17 @@ struct RootView: View {
}
var body: some View {
ZStack {
RenderView()
.ignoresSafeArea()
VStack(spacing: 16) {
Text("Hello, World!")
.font(.largeTitle)
VStack(spacing: 16) {
Text("Hello, World!")
.font(.largeTitle)
Text(vm.countText)
.font(.title3.monospacedDigit())
Text(vm.countText)
.font(.title3.monospacedDigit())
Button("Increment") {
rootSet(F.didClickIncrement, true)
}
Button("Increment") {
rootSet(F.didClickIncrement, true)
}
.padding(40)
}
.padding(40)
}
}