[etoys-dev] Etoys: Morphic-kfr.97.mcz

karl ramberg karlramberg at gmail.com
Tue Dec 4 18:17:01 EST 2012


Good suggestions.
I think we must ensure that we send valid numbers to the primitives as well.
Some do not like decimal values and it does not make sense to send extreme
big or small values either.

Karl



On Tue, Dec 4, 2012 at 10:56 PM, Bert Freudenberg <bert at freudenbergs.de>wrote:

>
> On 2012-12-04, at 15:18, Bert Freudenberg <bert at freudenbergs.de> wrote:
>
> >
> > On 2012-12-04, at 13:48, karl ramberg <karlramberg at gmail.com> wrote:
> >
> >> Hi
> >>
> >> I found a issue with the filter implementation that I'm looking for a
> solution for.
> >>
> >> Once a filter is added in a ScriptEditor it will not remove it self
> from the SketchMorph before a removeFilter is sent.
> >> So if the filter is pulled out of the ScriptEditor it is still active.
> >>
> >> Karl
> >
> >
> > Oh, I only now tried your code. From reading it I thought you had added
> 6 new slots. Instead you made the filters be commands, which is not as
> flexible.
> >
> > Here's what I thought we would do: Give the player a new numeric slot,
> named blur, with default value 0. When setting its value to anything other
> than 0, a filter is added, when setting it back to 0, the filter gets
> removed. Similar for the 5 other filters.
> >
> > That way we don't need a "removeFilters" command, and you can easily
> play with the filters in the viewer because they show the current amount.
> >
> > Your SketchMorph code can be exactly the same, it's just how filters get
> added and removed that would change. An improvement would be however if you
> did not add an instance variable, but stored the filters in a property.
> Most of the SketchMorphs will not need filtering.
> >
> > - Bert -
>
> (new version)
>
> Yes! Isn't that much more fun to play with? We don't even need a script! :)
>
> You need to use "self costume renderedMorph" otherwise it breaks under
> rotation.
>
> Also, it's a good idea to check for #isSketchMorph and return 0 in the
> getter / ignore the value in the setter otherwise. It can always happen
> that the messages are sent to a player whose costume is not a sketch.
>
> - Bert -
>
>
> _______________________________________________
> etoys-dev mailing list
> etoys-dev at squeakland.org
> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20121205/fb581e9f/attachment-0001.html>


More information about the etoys-dev mailing list