move timer
This commit is contained in:
1 parent
b068b866f0
commit
fab65fb5ad
6 files changed
+29
-13
No files matched your search
@@ -128,6 +128,7 @@ public struct F {
|
||||
public static let isReadyToRender = "isReadyToRender"
|
||||
public static let pixelSize = "pixelSize"
|
||||
public static let reshapePixelSize = "reshapePixelSize"
|
||||
public static let willPrepareGLContext = "willPrepareGLContext"
|
||||
|
||||
}
|
||||
public struct RenderContext: DialectContext {
|
||||
@@ -137,6 +138,7 @@ public struct RenderContext: DialectContext {
|
||||
public var isReadyToRender = Bool()
|
||||
public var pixelSize = [Int32]()
|
||||
public var reshapePixelSize = [Int32]()
|
||||
public var willPrepareGLContext = Bool()
|
||||
|
||||
public var recentField = ""
|
||||
|
||||
@@ -159,6 +161,9 @@ public struct RenderContext: DialectContext {
|
||||
else if (name == "reshapePixelSize") {
|
||||
return reshapePixelSize as! T
|
||||
}
|
||||
else if (name == "willPrepareGLContext") {
|
||||
return willPrepareGLContext as! T
|
||||
}
|
||||
|
||||
return "unknown-field-name" as! T
|
||||
}
|
||||
@@ -185,6 +190,9 @@ public struct RenderContext: DialectContext {
|
||||
else if (name == "reshapePixelSize") {
|
||||
reshapePixelSize = value as! [Int32]
|
||||
}
|
||||
else if (name == "willPrepareGLContext") {
|
||||
willPrepareGLContext = value as! Bool
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -404,6 +412,7 @@ func renderRegisterEffects(_ ctrl: DialectController) {
|
||||
let _: RenderContext? = registerOneliners(ctrl, [
|
||||
F.isReadyToRender, { (c: RenderContext) in print("ИГР isRTR: '\(c.isReadyToRender)'") },
|
||||
F.pixelSize, { (c: RenderContext) in RenderVM.shared!.pixelSize = c.pixelSize },
|
||||
F.willPrepareGLContext, { (c: RenderContext) in renderStartTimer(RenderVM.shared!) },
|
||||
|
||||
])
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
../../../../components/render/renderEffect.swift
|
||||
Reference in new issue
Block a user