@tsparticles/plugin-easing-sine 3.9.1 → 4.0.0-alpha.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/browser/index.js +7 -6
- package/cjs/index.js +8 -10
- package/esm/index.js +7 -6
- package/package.json +4 -3
- package/report.html +5 -4
- package/tsparticles.plugin.easing.sine.js +14 -20
- package/tsparticles.plugin.easing.sine.min.js +1 -1
- package/tsparticles.plugin.easing.sine.min.js.LICENSE.txt +1 -1
- package/types/index.d.ts +1 -1
- package/umd/index.js +7 -6
package/browser/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { EasingType } from "@tsparticles/engine";
|
|
2
|
-
export
|
|
3
|
-
engine.checkVersion("
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
export function loadEasingSinePlugin(engine) {
|
|
3
|
+
engine.checkVersion("4.0.0-alpha.0");
|
|
4
|
+
engine.register(e => {
|
|
5
|
+
e.addEasing(EasingType.easeInSine, value => 1 - Math.cos((value * Math.PI) / 2));
|
|
6
|
+
e.addEasing(EasingType.easeOutSine, value => Math.sin((value * Math.PI) / 2));
|
|
7
|
+
e.addEasing(EasingType.easeInOutSine, value => -(Math.cos(Math.PI * value) - 1) / 2);
|
|
8
|
+
});
|
|
8
9
|
}
|
package/cjs/index.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
await engine.addEasing(engine_1.EasingType.easeInOutSine, value => -(Math.cos(Math.PI * value) - 1) / 2, false);
|
|
10
|
-
await engine.refresh(refresh);
|
|
1
|
+
import { EasingType } from "@tsparticles/engine";
|
|
2
|
+
export function loadEasingSinePlugin(engine) {
|
|
3
|
+
engine.checkVersion("4.0.0-alpha.0");
|
|
4
|
+
engine.register(e => {
|
|
5
|
+
e.addEasing(EasingType.easeInSine, value => 1 - Math.cos((value * Math.PI) / 2));
|
|
6
|
+
e.addEasing(EasingType.easeOutSine, value => Math.sin((value * Math.PI) / 2));
|
|
7
|
+
e.addEasing(EasingType.easeInOutSine, value => -(Math.cos(Math.PI * value) - 1) / 2);
|
|
8
|
+
});
|
|
11
9
|
}
|
package/esm/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { EasingType } from "@tsparticles/engine";
|
|
2
|
-
export
|
|
3
|
-
engine.checkVersion("
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
export function loadEasingSinePlugin(engine) {
|
|
3
|
+
engine.checkVersion("4.0.0-alpha.0");
|
|
4
|
+
engine.register(e => {
|
|
5
|
+
e.addEasing(EasingType.easeInSine, value => 1 - Math.cos((value * Math.PI) / 2));
|
|
6
|
+
e.addEasing(EasingType.easeOutSine, value => Math.sin((value * Math.PI) / 2));
|
|
7
|
+
e.addEasing(EasingType.easeInOutSine, value => -(Math.cos(Math.PI * value) - 1) / 2);
|
|
8
|
+
});
|
|
8
9
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/plugin-easing-sine",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.0",
|
|
4
4
|
"description": "tsParticles easing sine plugin",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -100,9 +100,10 @@
|
|
|
100
100
|
"./package.json": "./package.json"
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@tsparticles/engine": "
|
|
103
|
+
"@tsparticles/engine": "4.0.0-alpha.0"
|
|
104
104
|
},
|
|
105
105
|
"publishConfig": {
|
|
106
106
|
"access": "public"
|
|
107
|
-
}
|
|
107
|
+
},
|
|
108
|
+
"type": "module"
|
|
108
109
|
}
|