We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I need to make this confetti animation go below the device viewport. Right now, the confettis stops at the bottom of the screen, and disappear.
I would do it with custom styles, but I can't get it work :/ Digging in the code, I found a value that we could use, in confetti.js:
componentDidMount() { let {duration, index} = this.props; Animated.timing(this._yAnimation, { duration: duration + this.randomIntValue(duration * .2, duration * -.2), toValue: windowHeight + 1.25, // <=== here useNativeDriver: true }).start(this.props.onAnimationComplete); }
Maybe we could change it to:
componentDidMount() { let {duration, yDelta} = this.props; Animated.timing(this._yAnimation, { duration: duration + this.randomIntValue(duration * .2, duration * -.2), toValue: windowHeight + yDelta, useNativeDriver: true }).start(this.props.onAnimationComplete); }
With the relevant defaultProps:
Confetti.defaultProps = { duration: 6000, colors: [ "rgb(242.2, 102, 68.8)", "rgb(255, 198.9, 91.8)", "rgb(122.4, 198.9, 163.2)", "rgb(76.5, 193.8, 216.7)", "rgb(147.9, 99.4, 140.2)" ], size: 1, bsize: 1, yDelta: 1.25, }
I'm not sure about the naming (yDelta is probably not the best param name). However I have a branch ready to push.
The text was updated successfully, but these errors were encountered:
I'm not sure that repo is still maintained. However, I forked it so we can still work on it : https://github.com/enguerranws/react-native-confetti/
Sorry, something went wrong.
No branches or pull requests
Hi,
I need to make this confetti animation go below the device viewport. Right now, the confettis stops at the bottom of the screen, and disappear.
I would do it with custom styles, but I can't get it work :/
Digging in the code, I found a value that we could use, in confetti.js:
Maybe we could change it to:
With the relevant defaultProps:
I'm not sure about the naming (yDelta is probably not the best param name). However I have a branch ready to push.
The text was updated successfully, but these errors were encountered: