Nice animation

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

Nice animation

abergel
Hi!

If you have an image with Roassal open, give a try:

v := RTView new.
v when: TRMouseClick do: [ :event | v clean ].
v when: TRMouseMove do: [ :event |
        e := (RTBox new color: (Color red alpha: 0.2); size: 20 atRandom + 5) element.
        e translateTo: event positionFromCamera.
        v add: e.
        v addAnimation: (RTAccelerationMove to:
                event positionFromCamera + ((150 atRandom - 75) @ (150 atRandom - 75)) during: 5 on: e)
].
v

:-)

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
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: Nice animation

volkert-2
Nice :-)

Am 04.05.2015 um 19:49 schrieb Alexandre Bergel:

> Hi!
>
> If you have an image with Roassal open, give a try:
>
> v := RTView new.
> v when: TRMouseClick do: [ :event | v clean ].
> v when: TRMouseMove do: [ :event |
> e := (RTBox new color: (Color red alpha: 0.2); size: 20 atRandom + 5) element.
> e translateTo: event positionFromCamera.
> v add: e.
> v addAnimation: (RTAccelerationMove to:
> event positionFromCamera + ((150 atRandom - 75) @ (150 atRandom - 75)) during: 5 on: e)
> ].
> v
>
> :-)
>
> Cheers,
> Alexandre

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

Re: Nice animation

Offray
Really nice. What if I want to add randomness to the color, lets say on
the alpha or the rgb?

Cheers,

Offray

El 04/05/15 a las 12:40, volkert escribió:

> Nice :-)
>
> Am 04.05.2015 um 19:49 schrieb Alexandre Bergel:
>> Hi!
>>
>> If you have an image with Roassal open, give a try:
>>
>> v := RTView new.
>> v when: TRMouseClick do: [ :event | v clean ].
>> v when: TRMouseMove do: [ :event |
>>     e := (RTBox new color: (Color red alpha: 0.2); size: 20 atRandom +
>> 5) element.
>>     e translateTo: event positionFromCamera.
>>     v add: e.
>>     v addAnimation: (RTAccelerationMove to:
>>         event positionFromCamera + ((150 atRandom - 75) @ (150
>> atRandom - 75)) during: 5 on: e)
>> ].
>> v
>>
>> :-)
>>
>> Cheers,
>> Alexandre
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>


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

Re: Nice animation

abergel

You can just use a palette. Try this:

v := RTView new.
v when: TRMouseClick do: [ :event | v clean ].
v when: TRMouseMove do: [ :event |
   e := (RTBox new color: ((ColorPalette qualitative colors: 9 scheme:'Pastel1') atRandom alpha: 0.5); size: 20 atRandom +
5) element.
   e translateTo: event positionFromCamera.
   v add: e.
   v addAnimation: (RTAccelerationMove to:
       event positionFromCamera + ((150 atRandom - 75) @ (150
atRandom - 75)) during: 5 on: e)
].
v


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



> On May 4, 2015, at 3:20 PM, Offray Vladimir Luna Cárdenas <[hidden email]> wrote:
>
> Really nice. What if I want to add randomness to the color, lets say on the alpha or the rgb?
>
> Cheers,
>
> Offray
>
> El 04/05/15 a las 12:40, volkert escribió:
>> Nice :-)
>>
>> Am 04.05.2015 um 19:49 schrieb Alexandre Bergel:
>>> Hi!
>>>
>>> If you have an image with Roassal open, give a try:
>>>
>>> v := RTView new.
>>> v when: TRMouseClick do: [ :event | v clean ].
>>> v when: TRMouseMove do: [ :event |
>>>    e := (RTBox new color: (Color red alpha: 0.2); size: 20 atRandom +
>>> 5) element.
>>>    e translateTo: event positionFromCamera.
>>>    v add: e.
>>>    v addAnimation: (RTAccelerationMove to:
>>>        event positionFromCamera + ((150 atRandom - 75) @ (150
>>> atRandom - 75)) during: 5 on: e)
>>> ].
>>> v
>>>
>>> :-)
>>>
>>> Cheers,
>>> Alexandre
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


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

Re: Nice animation

Offray
Je je! is so fun and beautiful :-)

Thanks,

Offray

El 04/05/15 a las 16:01, Alexandre Bergel escribió:

>
> You can just use a palette. Try this:
>
> v := RTView new.
> v when: TRMouseClick do: [ :event | v clean ].
> v when: TRMouseMove do: [ :event |
>     e := (RTBox new color: ((ColorPalette qualitative colors: 9 scheme:'Pastel1') atRandom alpha: 0.5); size: 20 atRandom +
> 5) element.
>     e translateTo: event positionFromCamera.
>     v add: e.
>     v addAnimation: (RTAccelerationMove to:
>         event positionFromCamera + ((150 atRandom - 75) @ (150
> atRandom - 75)) during: 5 on: e)
> ].
> v
>
>


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