PasteUpMorph method doOneCycle
Last updated at 1:30 pm UTC on 15 November 2017
The variable world contains a PasteUpMorph. The instance of the current Morphic project may be accessed with Project current world.
The PasteUpMorph method #doOneCycle
is the main loop of Morphic.
worldState doOneCycleFor: theWorldPasteUpMorph
- 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
uiProcess := [
[world doOneCycle. Processor yield ] repeat.
] newProcess priority: Processor userSchedulingPriority.