Re: computed costumes
2014-03-24 20:50:42 GMT
I'm building a math demo. It is a complex diagram that changes as the user moves a slider. I'm using the turtle Pen to draw the diagram. It needs to be "double-buffered" so that the user does not see the area get cleared to white and does not see the drawing being made. That is, no flashing.
Here's the plan. Make a drawing (SketchMorph). Make another drawing that is the same size and hide it. Each sketch will be a costume for a player of the first sketch.
Whenever the slider moves, get the Form of the sketch that is not currently showing. Draw into it with the Pen. Switch it to be the costume that shows.
Is there a simpler way to do this in Etoys?
If not, maybe we can extend Etoys to allow this, so an author does not need to know Squeak to make it happen.
If you're not hungry enough to eat an apple, then you're not hungry. If you are that hungry, then do eat an apple. -- paraphrasing Michael Pollan.
squeakland mailing list
squeakland <at> squeakland.org
To some of us, writing computer programs is a fascinating game. A program is a building of thought. It is costless to build, weightless, growing easily under our typing hands. If we get carried away, its size and complexity will grow out of control, confusing even the one who created it. This is the main problem of programming. It is why so much of today's software tends to crash, fail, screw up.
When a program works, it is beautiful. The art of programming is the skill of controlling complexity. The great program is subdued, made simple in its complexity.
_______________________________________________ squeakland mailing list squeakland@... http://lists.squeakland.org/mailman/listinfo/squeakland