Fun script to try out

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fun script to try out

abergel
Just made this. Fun to see :-)

-=-=-=-=-=
data := (RTView methods flatCollect: #getSource) copyFrom: 1 to: 1500.
data := data select: #isAlphaNumeric.
mousePosition := 250 @ 250.
shape := RTLabel new
        colorElement: [ :anElement |
                | d |
                d := (anElement position - mousePosition) r abs.
                d := d max: 1.
                d := (10000 / d) asInteger.
                d := d min: 256.
                Color gray256: d  ];
        text: [ :aChar | aChar asString ].
v := RTView new.
es := shape elementsOn: data.
v addAll: es.

RTGridLayout new gapSize: 0; on: es.

v when: TRMouseMove do: [ :evt |
        mousePosition := evt positionFromCamera.
        es updateShape.
        v signalUpdate
].
v
-=-=-=-=-=
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Fun script to try out

Sean P. DeNigris
Administrator
abergel wrote
Fun to see :-)
What is it supposed to do/show? I got:



And then "MessageNotUnderstood: RTGroup>>updateShape"
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Fun script to try out

abergel
You should update Roassal for this.

Here is a video of what the script does:

https://dl.dropboxusercontent.com/u/31543901/online/FunWithTextColoring.mov

Cheers,
Alexandre


On Oct 18, 2014, at 3:21 PM, Sean P. DeNigris <[hidden email]> wrote:

> abergel wrote
>> Fun to see :-)
>
> What is it supposed to do/show? I got:
>
> <http://forum.world.st/file/n4785319/Screenshot_2014-10-18_11.png>
>
> And then "MessageNotUnderstood: RTGroup>>updateShape"
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Fun-script-to-try-out-tp4785249p4785319.html
> Sent from the Moose mailing list archive at Nabble.com.
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev