Skip to content

Releases: catdad/canvas-confetti

1.0.3

03 Jan 00:35
Compare
Choose a tag to compare

This release only contains updates to the package.json file and internal optimizations. There is no functional difference.

1.0.2...1.0.3

1.0.2

27 Dec 18:14
Compare
Choose a tag to compare
  • Fixed an issue that could cause the main thread to freeze for some time after a lot of individual confetti have been fired using a worker (like for example the snow demo) - see #100

1.0.1

24 Dec 16:10
Compare
Choose a tag to compare
  • Fixed a bug that was causing jsDelivr obfuscation to break the code - see #94

1.0.0

22 Dec 14:38
Compare
Choose a tag to compare

🎉🎉 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 default confetti() 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 new useWorker option on confetti.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 official requestAnimationFrame. 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

20 Nov 23:37
Compare
Choose a tag to compare
  • [BREAKING] confetti.Promise is no longer set by default (i.e. if you try to read this value, it will now be undefined). 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 setting window.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 the render() 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

03 Oct 01:32
1eb4240
Compare
Choose a tag to compare

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

23 Sep 21:29
Compare
Choose a tag to compare
  • 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

20 Sep 19:02
Compare
Choose a tag to compare
  • [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 add shape: ['square'] to your options - see #60

compare: 0.3.0...0.4.0

0.3.0

20 Sep 19:04
Compare
Choose a tag to compare
  • added a reset method to clear all confetti - see #61

compare: 0.2.1...0.3.0

0.2.1

20 Sep 19:05
Compare
Choose a tag to compare

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