Tried the following, but got the usual solid line instead of marching ants:
l = display.newLine(100, 0, 100, 100)
l.stroke.effect = “generator.marchingAnts”
What’s the right syntax for applying generators to a line?
(I am on 2013.2021)
Tried the following, but got the usual solid line instead of marching ants:
l = display.newLine(100, 0, 100, 100)
l.stroke.effect = “generator.marchingAnts”
What’s the right syntax for applying generators to a line?
(I am on 2013.2021)
Well, you’re missing a step:
l = display.newLine(100, 0, 100, 100) l.stroke = {1, 1, 1} l.stroke.effect = "generator.marchingAnts" l.strokeWidth = 1
However when i do that, it crashes the simulator. It seems that setting a stroke on a line crashes things (the 2nd line). You can in the mean time, change it to a rectangle
l = display.newRect(100, 0, 1, 100) l.stroke = compositePaint l.stroke.effect = "generator.marchingAnts" l.strokeWidth = 2
Thank you, Rob.
Well, you’re missing a step:
l = display.newLine(100, 0, 100, 100) l.stroke = {1, 1, 1} l.stroke.effect = "generator.marchingAnts" l.strokeWidth = 1
However when i do that, it crashes the simulator. It seems that setting a stroke on a line crashes things (the 2nd line). You can in the mean time, change it to a rectangle
l = display.newRect(100, 0, 1, 100) l.stroke = compositePaint l.stroke.effect = "generator.marchingAnts" l.strokeWidth = 2
Thank you, Rob.