Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
October 30, 2022 11:37 pm GMT

tsParticles 2.4.0 Released

tsParticles 2.4.0 Changelog

New Features

  • Added reset method to updaters, this method will be called after a particle loses a life.
  • Created the motion plugin for handling motion sickness, I moved this feature from the engine to a plugin since I prefer to have it more customizable. Everyone now can create their own motion sickness plugin, instead of having a standard behavior for everyone
  • Added mutation observer to avoid style changes to the canvas when the fullScreen option is enabled (default behavior)
  • Moved all easing functions to plugin packages, slim now depends on easing-quad since it's the default value used in repulse and attract
  • Added support for multiline text in canvas mask text options, separator and spacing are customizable values
  • Added aria-hidden="true" to canvas element, fixes #4785
  • Removed all canvas context save/restore calls, this should be a huge improvement to general performances
  • Added the particles pool for reusing destroyed particles, every tsParticles instance will have its own pool
  • Changed collision absorb code, added absorb.speed option to collisions section
  • Added delay to root options, fixes #4766

Bug Fixes

  • Fixed infection plugin
  • Fixed issue with polygon mask when particles bounce on the polygon edges
  • Fixed issue with rgb(), hsl() and hsv() values in color option values

Other Changes

  • Refactored plugins to avoid passing options in init functions since it's no more necessary
  • Removed initAsync function from plugins, standard init is now async for all plugins
  • Removed polygon mask plugin from the tsparticles package, this is a breaking change only for those that are using it. Since it's a heavy plugin and not so much used, I have preferred removing it from the tsparticles package.
  • Changed tsconfig target from es6 to es2019 (less transpilation to a reasonable target). The compatibility is still very high, reducing the bundle size.

--

Social links

GitHub logo matteobruni / tsparticles

tsParticles - Easily create highly customizable JavaScript particles effects, confetti explosions and fireworks animations and use them as animated backgrounds for your website. Ready to use components available for React.js, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Inferno, Solid, Riot and Web Components.

banner

tsParticles - TypeScript Particles

A lightweight TypeScript library for creating particles. Dependency free (*), browser ready and compatible withReact.js, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Inferno, Riot.js, Solid.js, and Web Components

GitHub SponsorsjsDelivr hits (npm)CdnjsnpmnpmlernaCodeFactorCodacy BadgeRate this packageGitpod Ready-to-CodeRun on Repl.it

DiscordSlackTelegramReddit

tsParticles Product HuntBuy Me A Coffee Linktree

Table of Contents

_This readme refers to v2version, read here for v1 documentation*

Do you want to use it on your website?

Documentation and Development references here

This library is


Original Link: https://dev.to/tsparticles/tsparticles-240-released-26ak

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To