Skip to content

Commit

Permalink
Adds a filter to screen layers before attempting to assign tags to them
Browse files Browse the repository at this point in the history
  • Loading branch information
hobnob committed Nov 7, 2024
1 parent 0a6665e commit 729b504
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,19 @@ final class SceneProcessor(
val displayLayers: scalajs.js.Array[(DisplayLayer, scalajs.js.Array[(String, DisplayObject)])] =
scene.layers
.flatMap(l =>
l.toBatch.map(
(
l match {
case LayerEntry.Tagged(tag, _) => Some(tag)
case _ => None
},
_
l.toBatch
.filter(content => content.visible.getOrElse(true))
.map(
(
l match {
case LayerEntry.Tagged(tag, _) => Some(tag)
case _ => None
},
_
)
)
)
)
.toJSArray
.filter(l => l._2.visible.getOrElse(true))
.zipWithIndex
.map { case (l, i) =>
val blending = l._2.blending.getOrElse(Blending.Normal)
Expand Down

0 comments on commit 729b504

Please sign in to comment.