scripts
This commit is contained in:
1 parent
f3ea773c79
commit
70386f15b6
47 files changed
+26
-24
No files matched your search
@@ -0,0 +1,97 @@
|
||||
version: 4
|
||||
|
||||
output:
|
||||
ver-mac/src/dialect.swift:
|
||||
type: swift
|
||||
|
||||
RenderContext:
|
||||
type: context
|
||||
fields:
|
||||
backingPixelSize: [Int32]
|
||||
didClickIncrement: Bool
|
||||
didLaunch: Bool
|
||||
didPrepareGL: Bool
|
||||
didSetup: Bool
|
||||
pixelSize: [Int32]
|
||||
reshapePixelSize: [Int32]
|
||||
willDeinit: Bool
|
||||
|
||||
RenderComponent:
|
||||
type: component
|
||||
oneliners:
|
||||
- didClickIncrement: renderLoadCubeModel(RenderVM.shared!)
|
||||
- didPrepareGL: renderInit(RenderVM.shared!)
|
||||
- didPrepareGL: RenderVM.shared!.didPrepareGL = true
|
||||
- didPrepareGL: renderStartTimer(RenderVM.shared!)
|
||||
- pixelSize: RenderVM.shared!.pixelSize = c.pixelSize
|
||||
- willDeinit: renderDeinit(RenderVM.shared!)
|
||||
shoulds:
|
||||
didLaunch:
|
||||
1. Only once during the first setup:
|
||||
if:
|
||||
c.recentField == F.didSetup &&
|
||||
c.didLaunch == false
|
||||
then:
|
||||
c.didLaunch = true
|
||||
pixelSize:
|
||||
1. Upon launch:
|
||||
if:
|
||||
c.recentField == F.didLaunch
|
||||
then:
|
||||
c.pixelSize = [1, 1]
|
||||
2. Upon resize:
|
||||
if:
|
||||
c.recentField == F.reshapePixelSize
|
||||
then:
|
||||
c.pixelSize = c.reshapePixelSize
|
||||
3. Upon DPI change:
|
||||
if:
|
||||
c.recentField == F.backingPixelSize
|
||||
then:
|
||||
c.pixelSize = c.backingPixelSize
|
||||
|
||||
RootComponent:
|
||||
type: component
|
||||
oneliners:
|
||||
- countText: RootVM.shared!.countText = c.countText
|
||||
- didClickIncrement: renderSet(F.didClickIncrement, true)
|
||||
shoulds:
|
||||
count:
|
||||
1. Upon hitting 10 the first time:
|
||||
if:
|
||||
c.recentField == F.didClickIncrement &&
|
||||
c.count == 7
|
||||
then:
|
||||
c.count += 10
|
||||
2. Upon each button click:
|
||||
if:
|
||||
c.recentField == F.didClickIncrement
|
||||
then:
|
||||
c.count += 1
|
||||
countText:
|
||||
1. Upon each count change:
|
||||
if:
|
||||
c.recentField == F.count
|
||||
then:
|
||||
c.countText = "Count: '\(c.count)'"
|
||||
2. Upon launch:
|
||||
if:
|
||||
c.recentField == F.didLaunch
|
||||
then:
|
||||
c.countText = "Press the button to count"
|
||||
didLaunch:
|
||||
1. Only once during the first setup:
|
||||
if:
|
||||
c.recentField == F.didSetup &&
|
||||
c.didLaunch == false
|
||||
then:
|
||||
c.didLaunch = true
|
||||
|
||||
RootContext:
|
||||
type: context
|
||||
fields:
|
||||
count: Int
|
||||
countText: String
|
||||
didClickIncrement: Bool
|
||||
didLaunch: Bool
|
||||
didSetup: Bool
|
||||
Reference in new issue
Block a user