remove 'squares' field from app type, and refactor most functions in common-update.sml to use layer tree instead of squares vector

This commit is contained in:
2025-08-09 10:19:26 +01:00
parent ab888f8410
commit d3ace298d3
6 changed files with 21 additions and 133 deletions

View File

@@ -23,12 +23,9 @@ struct
(windowWidth, windowHeight, canvasWidth, canvasHeight)
val maxPoints = Int.max (canvasWidth, canvasHeight)
val squares = Vector.tabulate (maxPoints, fn _ =>
Vector.tabulate (maxPoints, fn _ => {r = 0, g = 0, b = 0, a = 0}))
val layerTree = LayerTree.init maxPoints
in
{ mode = AppType.NORMAL_MODE
, squares = squares
, canvasWidth = canvasWidth
, canvasHeight = canvasHeight
, windowWidth = windowWidth