-
Notifications
You must be signed in to change notification settings - Fork 0
/
SKScribbles Code Change Diary.txt
134 lines (98 loc) · 4.2 KB
/
SKScribbles Code Change Diary.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
After basic version going, started logging changes
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Add Multiple Color option
2019-03-18
Updated to Swift 4.2 syntax
ios/Main.storyboard
macOS/Main.storyboard
- added checkbox/UISwitch to turn on multi-colour mode
ios/GameViewController.swift
macOS/GameViewController.swift
- added property varColorsOn
- added action varyColorsValueChange to detect switch changes & recreate scene
- varyColorsSwitch/Checkbox bound to storyboard
GameScene2LineNodes
- _colorsVary and _colorIter properties added
- newGameScene
- added param to flag doing multi-colors
- touchUp optionally use _colorIter instead of fixed green
ColorIterator.swift
- copied from github
- minor rewrite using SKColor to be platform-agnostic instead of UIIColor
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Refactor Multiple Color option to also apply to PathRebuild
2019-03-18
ColorProvider.swift
- abstracted out colour generation so always pass an iterator, rather than flag + iter
ios/GameViewController.swift
macOS/GameViewController.swift
- makeScene - use ColorProvider and pass to both
GameScene2LineNodes
- refactor very slightly to use passed-in ColorProvider
GameScenePathRebuilding
- newGameScene - take ColorProvider
- touchUp use _colorIter instead of fixed green
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Adding Particle-based drawing
2019-03-18
ios/Main.storyboard
macOS/Main.storyboard
- added particle crayon option on both
ios/GameViewController.swift
macOS/GameViewController.swift
- makeScene - add 3rd option making a GameSceneParticleCrayon
spark.imageset
- added automatically by adding a particle
crayon.sks
- added particle file
GameSceneParticleCrayon.swift
- added to use crayon.sks but vary birthrate and position as move the touch.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Adding Fill Switch and drawing filled shapes
2019-03-24
both/GameViewController.swift
- renamed with iOS and Mac suffix because Interface Builder keeps confusing same name even with manual selection,
making outlets be inserted into the wrong file.
- varyColorsValueChange - fixed bug where called makeScene with index 0 - meant if you toggled the varyColors switch you got the wrong scene started anew
- fillValueChanged added so if toggle new switch, starts again
- segValueChange - disabled varyColors and fill switches if on the particleCrayon panel
- makeScene pass a fill flag to newGameScene methods for first two scene types
ios/Main.storyboard
macOS/Main.storyboard
- added switch/checkbox on both for Fill
GameScene2LineNodes
- added _fillShape property
- added fill param to init and factory function
- touchUp
- set the fill color depending on _fillShape
- close the curve with an added point if _fillShape set
GameScenePathRebuilding
- added _fillShape property
- added fill param to init and factory function
- touchUp
- set the fill color depending on _fillShape
- updatePath - set the fill color depending on _fillShape
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Minor aesthetics & code cleanups
2023-07-06
iOS/Main.storyboard
- GameViewControllerScene
- Clear button add leading constraint to suppress a11y warning
- optionSeg set background color so labels visible with dark SKView
macO/SMain.storyboard
- GameViewControllerScene
- Fill toggle add leading constraint to align on optionSeg
- optionSeg embed in custom effect view so labels clearly visible
Fix some vars that could be lets
GameViewControllerMacOS.swift
- allocate font with fallback to Arial so doesn't crash if SFUI fonts missing
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Minor drawing tweaks
2024-06-25
GameSceneParticleCrayon
- touchDown set the particleBirthrate to zero so only starts drawing as move
- touchUp clear particleBirthrate before any other actions to minimise blob
Crayon.sks adjust so doesn't fade so fast
- Alpha Speed reduced from -0.15 to -0.02 so doesn't fade as fast
- Scale reduced from 0.3 to 0.2 and Rnge increased from 0.05 to 0.1 so get more ragged bits