Files
2026-10-30 15:17:24 +01:00

89 lines
2.5 KiB
YAML

version: 4
output:
ver-mac/src/dialect.swift:
type: swift
BlueContext:
type: context
fields:
didLaunch: Bool
didSetup: Bool
BlueComponent:
type: component
shoulds:
didLaunch:
1. Only once during the first setup:
if:
c.recentField == F.didSetup &&
c.didLaunch == false
then:
c.didLaunch = true
RenderContext:
type: context
fields:
backingPixelSize: [Int32]
didLaunch: Bool
didPrepareGL: Bool
didPrepareIOSGL: Bool
didPrepareMacGL: Bool
didSetup: Bool
pixelSize: [Int32]
reshapePixelSize: [Int32]
willDeinit: Bool
willRecreateSurface: Bool
RenderComponent:
type: component
oneliners:
- didPrepareGL: renderInit(RenderVM.shared!)
- didPrepareGL: RenderVM.shared!.didPrepareGL = true
- didPrepareGL: renderStartTimer(RenderVM.shared!)
- pixelSize: RenderVM.shared!.pixelSize = c.pixelSize
- willDeinit: renderDeinit(RenderVM.shared!)
- willRecreateSurface: renderRecreateSurface(RenderVM.shared!)
shoulds:
didLaunch:
1. Only once during the first setup:
if:
c.recentField == F.didSetup &&
c.didLaunch == false
then:
c.didLaunch = true
didPrepareGL:
1. For macOS:
if:
c.recentField == F.didPrepareMacGL
then:
c.didPrepareGL = true
2. For iOS:
if:
c.recentField == F.didPrepareIOSGL &&
!c.didPrepareGL
then:
c.didPrepareGL = 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
willRecreateSurface:
1. Upon resize:
if:
c.recentField == F.reshapePixelSize
then:
c.willRecreateSurface = true