@tsparticles/plugin-easing-sine 3.0.0-alpha.1 → 3.0.0-beta.1
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 +15 -11
- package/browser/index.js +1 -1
- package/browser/package.json +1 -0
- package/cjs/index.js +1 -1
- package/cjs/package.json +1 -0
- package/esm/index.js +1 -1
- package/esm/package.json +1 -0
- package/package.json +23 -6
- package/report.html +4 -4
- package/tsparticles.plugin.easing.sine.js +3 -3
- package/tsparticles.plugin.easing.sine.min.js +1 -1
- package/tsparticles.plugin.easing.sine.min.js.LICENSE.txt +1 -8
- package/types/index.d.ts +1 -1
- package/umd/index.js +1 -1
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# tsParticles Easing Sine Plugin
|
|
4
4
|
|
|
5
|
-
[](https://www.jsdelivr.com/package/npm/@tsparticles/plugin-easing-sine)
|
|
6
|
+
[](https://www.npmjs.com/package/@tsparticles/plugin-easing-sine)
|
|
7
|
+
[](https://www.npmjs.com/package/@tsparticles/plugin-easing-sine) [](https://github.com/sponsors/matteobruni)
|
|
8
8
|
|
|
9
9
|
[tsParticles](https://github.com/matteobruni/tsparticles) plugin for adding the easing sine 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
|
|
45
|
+
$ npm install @tsparticles/plugin-easing-sine
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
or
|
|
49
49
|
|
|
50
50
|
```shell
|
|
51
|
-
$ yarn add tsparticles
|
|
51
|
+
$ yarn add @tsparticles/plugin-easing-sine
|
|
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
|
|
58
|
-
const { loadEasingSinePlugin } = require("tsparticles
|
|
57
|
+
const { tsParticles } = require("@tsparticles/engine");
|
|
58
|
+
const { loadEasingSinePlugin } = require("@tsparticles/plugin-easing-sine");
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
(async () => {
|
|
61
|
+
await loadEasingSinePlugin();
|
|
62
|
+
})();
|
|
61
63
|
```
|
|
62
64
|
|
|
63
65
|
or
|
|
64
66
|
|
|
65
67
|
```javascript
|
|
66
|
-
import { tsParticles } from "tsparticles
|
|
67
|
-
import { loadEasingSinePlugin } from "tsparticles
|
|
68
|
+
import { tsParticles } from "@tsparticles/engine";
|
|
69
|
+
import { loadEasingSinePlugin } from "@tsparticles/plugin-easing-sine";
|
|
68
70
|
|
|
69
|
-
|
|
71
|
+
(async () => {
|
|
72
|
+
await loadEasingSinePlugin();
|
|
73
|
+
})();
|
|
70
74
|
```
|
package/browser/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { addEasing } from "@tsparticles/engine";
|
|
2
|
-
export function loadEasingSinePlugin() {
|
|
2
|
+
export async function loadEasingSinePlugin() {
|
|
3
3
|
addEasing("ease-in-sine", (value) => 1 - Math.cos((value * Math.PI) / 2));
|
|
4
4
|
addEasing("ease-out-sine", (value) => Math.sin((value * Math.PI) / 2));
|
|
5
5
|
addEasing("ease-in-out-sine", (value) => -(Math.cos(Math.PI * value) - 1) / 2);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "module" }
|
package/cjs/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.loadEasingSinePlugin = void 0;
|
|
4
4
|
const engine_1 = require("@tsparticles/engine");
|
|
5
|
-
function loadEasingSinePlugin() {
|
|
5
|
+
async function loadEasingSinePlugin() {
|
|
6
6
|
(0, engine_1.addEasing)("ease-in-sine", (value) => 1 - Math.cos((value * Math.PI) / 2));
|
|
7
7
|
(0, engine_1.addEasing)("ease-out-sine", (value) => Math.sin((value * Math.PI) / 2));
|
|
8
8
|
(0, engine_1.addEasing)("ease-in-out-sine", (value) => -(Math.cos(Math.PI * value) - 1) / 2);
|
package/cjs/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "commonjs" }
|
package/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { addEasing } from "@tsparticles/engine";
|
|
2
|
-
export function loadEasingSinePlugin() {
|
|
2
|
+
export async function loadEasingSinePlugin() {
|
|
3
3
|
addEasing("ease-in-sine", (value) => 1 - Math.cos((value * Math.PI) / 2));
|
|
4
4
|
addEasing("ease-out-sine", (value) => Math.sin((value * Math.PI) / 2));
|
|
5
5
|
addEasing("ease-in-out-sine", (value) => -(Math.cos(Math.PI * value) - 1) / 2);
|
package/esm/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "module" }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/plugin-easing-sine",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-beta.1",
|
|
4
4
|
"description": "tsParticles easing sine plugin",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -72,20 +72,37 @@
|
|
|
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"
|
|
78
82
|
}
|
|
79
83
|
],
|
|
80
|
-
"
|
|
84
|
+
"sideEffects": false,
|
|
81
85
|
"jsdelivr": "tsparticles.plugin.easing.sine.min.js",
|
|
82
86
|
"unpkg": "tsparticles.plugin.easing.sine.min.js",
|
|
87
|
+
"browser": "browser/index.js",
|
|
88
|
+
"main": "cjs/index.js",
|
|
83
89
|
"module": "esm/index.js",
|
|
84
90
|
"types": "types/index.d.ts",
|
|
85
|
-
"
|
|
86
|
-
"
|
|
91
|
+
"exports": {
|
|
92
|
+
".": {
|
|
93
|
+
"types": "./types/index.d.ts",
|
|
94
|
+
"browser": "./browser/index.js",
|
|
95
|
+
"import": "./esm/index.js",
|
|
96
|
+
"require": "./cjs/index.js",
|
|
97
|
+
"umd": "./umd/index.js",
|
|
98
|
+
"default": "./cjs/index.js"
|
|
99
|
+
},
|
|
100
|
+
"./package.json": "./package.json"
|
|
87
101
|
},
|
|
88
102
|
"dependencies": {
|
|
89
|
-
"@tsparticles/engine": "^3.0.0-
|
|
103
|
+
"@tsparticles/engine": "^3.0.0-beta.1"
|
|
104
|
+
},
|
|
105
|
+
"publishConfig": {
|
|
106
|
+
"access": "public"
|
|
90
107
|
}
|
|
91
|
-
}
|
|
108
|
+
}
|