openfl-simple-particles
openfl-simple-particles copied to clipboard
Default values
Default values make the library use a bit misleading. I guess the point is to have some kind of default particle effect.
If i set direction i also need to set speed because defaulted to 0.
I need to set myself start_size end_size when it should probably be set to the image size. gravity is at -180, really annoying when you try to debug direction :3
But for a real issue :
if(direction != 0) {
var new_dir = (direction + direction_random * random_1_to_1() ) * ( Math.PI / 180 ); // convert to radians
direction_vector.setTo( Math.cos( new_dir ), Math.sin( new_dir ) );
} else {
direction_vector.setTo(0,0);
}
- A
directionof0should actually make adirection_vectorof(1, 0)to be consistent here. - If i set
direction_randomfor adirectionof0it wouldn't have any effect because oncedirection != 0the block containingdirection_randomis skipped. - Setting
direction_vectorwhen creating the emitter is useless because overridden by the block above.
This is more a note for myself in case i'm brave enough for a PR.