PasteUpMorph method doOneCycle
Last updated at 1:25 pm UTC on 2 May 2019
The PasteUpMorph method #doOneCycle
is the main loop of Morphic.
It calls
worldState doOneCycleFor: theWorldPasteUpMorph
It
- does a delay (interCyclePause:) if needed
- checks for screen resize
- processes events
- processes step methods
- re-displays the world
The main loop is set up in MorphicProject
MorphicProject spawnNewProcess
uiProcess := [
[world doOneCycle. Processor yield ] repeat.
] newProcess priority: Processor userSchedulingPriority.
uiProcess resume
https://stackoverflow.com/questions/43921042/squeak-smalltalk-game-loop