var j = 1; var z = 3; var c = 0; for(var i = 0; i< 100; i++) { var m = Morph.makeRectangle(0,0, 10,50 - (i*0.35)) if(i % 2 == 0) { m.moveBy(pt(70+2*i,70+i)) } else { m.moveBy(pt((10+i), 60)) } m.rotateBy(i * 0.3) m.setFill(Color.rgb(i * 10,i,5*i)) this.addMorph(m) c += 3; } this.submorphs.invoke('remove')
prepare
run
this: <lively.morphic.Box#6DF0F... - contextOfFunction> j: 1 z: 3 c: 159 i: 53 m: <lively.morphic.Box#FFFEA...> [[containing scope]]