@tsparticles/plugin-easing-expo 3.0.0-alpha.0 → 3.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  # tsParticles Easing Expo Plugin
4
4
 
5
- [![jsDelivr](https://data.jsdelivr.com/v1/package/npm/tsparticles-plugin-easing-expo/badge)](https://www.jsdelivr.com/package/npm/tsparticles-plugin-easing-expo)
6
- [![npmjs](https://badge.fury.io/js/tsparticles-plugin-easing-expo.svg)](https://www.npmjs.com/package/tsparticles-plugin-easing-expo)
7
- [![npmjs](https://img.shields.io/npm/dt/tsparticles-plugin-easing-expo)](https://www.npmjs.com/package/tsparticles-plugin-easing-expo) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
5
+ [![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/plugin-easing-expo/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/plugin-easing-expo)
6
+ [![npmjs](https://badge.fury.io/js/@tsparticles/plugin-easing-expo.svg)](https://www.npmjs.com/package/@tsparticles/plugin-easing-expo)
7
+ [![npmjs](https://img.shields.io/npm/dt/@tsparticles/plugin-easing-expo)](https://www.npmjs.com/package/@tsparticles/plugin-easing-expo) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
8
8
 
9
9
  [tsParticles](https://github.com/matteobruni/tsparticles) plugin for adding the easing expo support.
10
10
 
@@ -42,29 +42,33 @@ Once the scripts are loaded you can set up `tsParticles` and the plugin like thi
42
42
  This package is compatible also with ES or CommonJS modules, firstly this needs to be installed, like this:
43
43
 
44
44
  ```shell
45
- $ npm install tsparticles-plugin-easing-expo
45
+ $ npm install @tsparticles/plugin-easing-expo
46
46
  ```
47
47
 
48
48
  or
49
49
 
50
50
  ```shell
51
- $ yarn add tsparticles-plugin-easing-expo
51
+ $ yarn add @tsparticles/plugin-easing-expo
52
52
  ```
53
53
 
54
54
  Then you need to import it in the app, like this:
55
55
 
56
56
  ```javascript
57
- const { tsParticles } = require("tsparticles-engine");
58
- const { loadEasingExpoPlugin } = require("tsparticles-plugin-easing-expo");
57
+ const { tsParticles } = require("@tsparticles/engine");
58
+ const { loadEasingExpoPlugin } = require("@tsparticles/plugin-easing-expo");
59
59
 
60
- loadEasingExpoPlugin();
60
+ (async () => {
61
+ await loadEasingExpoPlugin();
62
+ })();
61
63
  ```
62
64
 
63
65
  or
64
66
 
65
67
  ```javascript
66
- import { tsParticles } from "tsparticles-engine";
67
- import { loadEasingExpoPlugin } from "tsparticles-plugin-easing-expo";
68
+ import { tsParticles } from "@tsparticles/engine";
69
+ import { loadEasingExpoPlugin } from "@tsparticles/plugin-easing-expo";
68
70
 
69
- loadEasingExpoPlugin();
71
+ (async () => {
72
+ await loadEasingExpoPlugin();
73
+ })();
70
74
  ```
package/browser/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { addEasing } from "@tsparticles/engine";
2
- export function loadEasingExpoPlugin() {
2
+ export async function loadEasingExpoPlugin() {
3
3
  addEasing("ease-in-expo", (value) => (!value ? 0 : 2 ** (10 * value - 10)));
4
4
  addEasing("ease-out-expo", (value) => (value === 1 ? 1 : 1 - Math.pow(2, -10 * value)));
5
5
  addEasing("ease-in-out-expo", (value) => !value ? 0 : value === 1 ? 1 : value < 0.5 ? 2 ** (20 * value - 10) / 2 : (2 - 2 ** (-20 * value + 10)) / 2);
package/cjs/index.js CHANGED
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadEasingExpoPlugin = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
- function loadEasingExpoPlugin() {
6
- (0, engine_1.addEasing)("ease-in-expo", (value) => (!value ? 0 : Math.pow(2, (10 * value - 10))));
5
+ async function loadEasingExpoPlugin() {
6
+ (0, engine_1.addEasing)("ease-in-expo", (value) => (!value ? 0 : 2 ** (10 * value - 10)));
7
7
  (0, engine_1.addEasing)("ease-out-expo", (value) => (value === 1 ? 1 : 1 - Math.pow(2, -10 * value)));
8
- (0, engine_1.addEasing)("ease-in-out-expo", (value) => !value ? 0 : value === 1 ? 1 : value < 0.5 ? Math.pow(2, (20 * value - 10)) / 2 : (2 - Math.pow(2, (-20 * value + 10))) / 2);
8
+ (0, engine_1.addEasing)("ease-in-out-expo", (value) => !value ? 0 : value === 1 ? 1 : value < 0.5 ? 2 ** (20 * value - 10) / 2 : (2 - 2 ** (-20 * value + 10)) / 2);
9
9
  }
10
10
  exports.loadEasingExpoPlugin = loadEasingExpoPlugin;
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { addEasing } from "@tsparticles/engine";
2
- export function loadEasingExpoPlugin() {
2
+ export async function loadEasingExpoPlugin() {
3
3
  addEasing("ease-in-expo", (value) => (!value ? 0 : 2 ** (10 * value - 10)));
4
4
  addEasing("ease-out-expo", (value) => (value === 1 ? 1 : 1 - Math.pow(2, -10 * value)));
5
5
  addEasing("ease-in-out-expo", (value) => !value ? 0 : value === 1 ? 1 : value < 0.5 ? 2 ** (20 * value - 10) / 2 : (2 - 2 ** (-20 * value + 10)) / 2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/plugin-easing-expo",
3
- "version": "3.0.0-alpha.0",
3
+ "version": "3.0.0-beta.0",
4
4
  "description": "tsParticles easing expo plugin",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -72,6 +72,10 @@
72
72
  "type": "github",
73
73
  "url": "https://github.com/sponsors/matteobruni"
74
74
  },
75
+ {
76
+ "type": "github",
77
+ "url": "https://github.com/sponsors/tsparticles"
78
+ },
75
79
  {
76
80
  "type": "buymeacoffee",
77
81
  "url": "https://www.buymeacoffee.com/matteobruni"
@@ -82,10 +86,11 @@
82
86
  "unpkg": "tsparticles.plugin.easing.expo.min.js",
83
87
  "module": "esm/index.js",
84
88
  "types": "types/index.d.ts",
89
+ "sideEffects": false,
90
+ "dependencies": {
91
+ "@tsparticles/engine": "^3.0.0-beta.0"
92
+ },
85
93
  "publishConfig": {
86
94
  "access": "public"
87
- },
88
- "dependencies": {
89
- "@tsparticles/engine": "^3.0.0-alpha.0"
90
95
  }
91
- }
96
+ }