react-native-particles
react-native-particles copied to clipboard
Don't clip particles that start out of bounds if bounds are within fromPosition
There are certain effects, such as rain coming at an angle, where it is nice to be able to have some particles start off screen. If all particles start at min x=0, and y=0, and they are going down at an angle, then part of the screen won't have any particles on it.
simple solution in BaseEmitter.js line 202:
return x >= 0 && x <= width && y >= 0 && y <= height;
goes to
return (x >= 0 || x >= this.props.fromPosition.x) && x <= width && y >= 0 && y <= height;
Presumably same change could be made for y if someone has a good use case for it.