Releases: catdad/canvas-confetti
1.0.3
This release only contains updates to the package.json
file and internal optimizations. There is no functional difference.
1.0.2
1.0.1
1.0.0
ππ The module is now at 1.0.0! ππ
- Whenever possible,
confetti
will use a web worker for rendering animation so that it is not doing heavy work on the main thread, and also to allow you to do heavy blocking work without affecting the animation. The defaultconfetti()
method will use workers for rendering by default whenever possible, and fall back to main thread rendering when it is not supported. If you are creating a custom canvas or would like to turn this off because you enjoy blocking the main thread, see the newuseWorker
option onconfetti.create()
- see #83 - Fixes a bug that caused animation to speed up on high refresh rate monitors - see #90
- [Internal] Prefixed versions of
requestAnimationFrame
will no longer be used. There is a fallback that will be used on all browsers that do not support the officialrequestAnimationFrame
. This should not affect usage of the module's API, though it may change some characteristics about the animation on older browsers - see #86
0.5.0
- [BREAKING]
confetti.Promise
is no longer set by default (i.e. if you try to read this value, it will now beundefined
). This property was never documented, and it has now been removed from the implementation.
Note: you can still set
confetti.Promise = MyPromiseLib
to use your custom promises or to polyfill promises without settingwindow.Promise
.
- Server-side rendering is now supported. You can safely use this module in a build that performs server-side rendering.
Note: if you want to trigger
confetti()
inside your render path (i.e. in therender()
method of a class component or directly inside a function component), you will still need to check that you are on the client, as launching confetti is not supported on the server (for obvious reasons). Include a check such as this:
function MyComponent(props) {
// launch some confetti when the component renders
if (typeof window !== 'undefined') {
confetti();
}
return <div>Some page content</div>;
}
class MyComponent extends React.Component {
render() {
// launch some confetti when the component renders
if (typeof window !== 'undefined') {
confetti();
}
return <div>Some page content</div>;
}
}
compare: 0.4.2...0.5.0
0.4.2
This release only includes internal testing improvements. There is no functional difference in this release.
compare: 0.4.1...0.4.2
0.4.1
- builds that do not transform javascript code to the required target version but do bundle es6 modules (cough angular cough) can now use this module when supporting really old browsers (cough Safari 9 cough) - see #68
- fixing a bug introduced in 0.4.0 that broke IE support... you can again see π in IE 11 - see #71
compare: 0.4.0...0.4.1
0.4.0
- [BREAKING] added a new circle shape to confetti. The default
shape
is now to include an even mix of both squares and circles. If you hate the circles and want the old behavior back, you can addshape: ['square']
to your options - see #60
compare: 0.3.0...0.4.0
0.3.0
0.2.1
This release only contains internal optimizations to the npm package and documentation. There is no functional difference in this release.
compare: 0.2.0...0.2.1