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
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
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 Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
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
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