Actionscript 3 Lightning class - First tests

Math, Physics, actionscript 3, advanced image editing, algorithms, fun, game, perlinNoise, simulation

Here again with the first test of a Fx class.

The class can render lightnings with these specs:

- different shapes and aspect
- variable edge-smoothness to keep the extremities sticked to the origin
- runtime children generation (every trunk can generate children)


Sample #1


Sample #2

Perhaps not that useful but could be nice to implement in some game or demo.
Code soon.

10 Responses

  1. Og2t  •  April 23, 2009 @9:12 am

    This is awesome Pierluigi, do you use Perlin Noise for that at all?

  2. Diseño Web Valencia  •  April 23, 2009 @9:59 am

    Its cool, Im waiting the code. Thanks

  3. benny!  •  April 23, 2009 @11:56 am

    Very nice looking effect. Good work!

  4. Pierluigi Pesenti  •  April 23, 2009 @1:04 pm

    Glad you like it. There are many perlinNoise here, two for every energy line. One for the macro and one for the micro, the one used for the macro variations is realtime smoothed by a simple function I’ll post, to keep the extremities sticked to the origins.

  5. Andy Kim  •  April 23, 2009 @9:38 pm

    Very very nice. I’m quite ready to sink my teeth into the code to learn :)

  6. dVyper  •  April 24, 2009 @1:59 pm

    This is excellent - can’t wait to see your method!!!

  7. [...] diferente al mio , parece que logro el efecto usando Perlin Noise , pueden ver el post en su blog : http://blog.oaxoa.com/2009/04/23/actionscript-3-lightning-class-first-tests/ Bookmark It Hide Sites [...]

  8. [...] My favorite flash effects meister, Panta is previewing his electrifying new experiment. Code please! >>> [...]

  9. Milan  •  November 11, 2009 @12:56 pm

    dude is there a possibility you could send me your first code linking the lightning between the two crosses?

  10. Pierluigi Pesenti  •  November 12, 2009 @4:59 pm

    I answered your mail. Bye

Leave a Reply

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>