68 lines
1.8 KiB
YAML
68 lines
1.8 KiB
YAML
version: 4
|
|
|
|
output:
|
|
ver-mac/src/dialect.swift:
|
|
type: swift
|
|
|
|
BlueComponent:
|
|
type: component
|
|
shoulds:
|
|
didLaunch:
|
|
1. Only once during the first setup:
|
|
if:
|
|
c.recentField == F.didSetup &&
|
|
c.didLaunch == false
|
|
then:
|
|
c.didLaunch = true
|
|
|
|
BlueContext:
|
|
type: context
|
|
fields:
|
|
didLaunch: Bool
|
|
didSetup: Bool
|
|
|
|
RenderContext:
|
|
type: context
|
|
fields:
|
|
backingPixelSize: [Int32]
|
|
didLaunch: Bool
|
|
didPrepareGL: Bool
|
|
didSetup: Bool
|
|
pixelSize: [Int32]
|
|
reshapePixelSize: [Int32]
|
|
willDeinit: Bool
|
|
|
|
RenderComponent:
|
|
type: component
|
|
oneliners:
|
|
- didPrepareGL: renderInit(RenderVM.shared!)
|
|
- didPrepareGL: RenderVM.shared!.didPrepareGL = true
|
|
- didPrepareGL: renderStartTimer(RenderVM.shared!)
|
|
- didPrepareGL: renderLoadCubeModel(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
|