Date: 2016/06/16 21:59:14 UTC-07:00
Type: Denizen Script
GenerateOrbitalParticles:
type: task
definitions: effect|center|radius|amount|orbitals|velocity|yRot
script:
- define locations li@
- define angularVelocity <def[velocity].to_radians||0.04>
- repeat <def[amount]||10>:
- define angle <def[angularVelocity].mul[<def[value]>]>
- repeat <def[orbitals]||3>:
- define locations <def[locations].include[<def[center].sub[<location[<def[angle].cos>,<def[angle].sin>,0].mul[<def[radius]||3>].rotate_around_x[<util.pi.div[<def[orbitals]||3>].mul[<def[value]>]>].rotate_around_y[<def[yRot]||0>]>]>]>
- playeffect <def[effect]> <def[locations]>