computed costumes
Ted Kaehler <[email protected]> Mon, 24 Mar 2014 09:31:30 -0700
| Newsgroups | gmane.comp.lang.smalltalk.squeak.squeakland |
|---|---|
| Message-ID | <a06240803cf560c0943a2@[10.255.180.105]> |
Folks, 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. --Ted. -- Ted Kaehler 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. http://www.vpri.org/html/team_bios/kaehler.html