Skip to content

Commit ba931bd

Browse files
authored
Merge pull request #4 from tsparticles/dev
3.0.0
2 parents 6bf4dc4 + dd3fc3b commit ba931bd

File tree

15 files changed

+3069
-3636
lines changed

15 files changed

+3069
-3636
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Change Log
2+
3+
All notable changes to this project will be documented in this file.
4+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5+
6+
# 3.0.0 (2023-12-26)
7+
8+
9+
### Features
10+
11+
* completed transition to v3 ([a6af1b6](https://github.com/tsparticles/jquery/commit/a6af1b64e72361ba3ed349ff2d218656c247e9de))
12+
* migrated to v3 ([d6f1e64](https://github.com/tsparticles/jquery/commit/d6f1e6481c02b9ad835fd5b9b85ae1570ee89bac))

README.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[![banner](https://particles.js.org/images/banner3.png)](https://particles.js.org)
22

3-
# jquery-particles
3+
# @tsparticles/jquery
44

5-
[![npm](https://img.shields.io/npm/v/jquery-particles)](https://www.npmjs.com/package/jquery-particles) [![npm](https://img.shields.io/npm/dm/jquery-particles)](https://www.npmjs.com/package/jquery-particles) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
5+
[![npm](https://img.shields.io/npm/v/@tsparticles/jquery)](https://www.npmjs.com/package/@tsparticles/jquery) [![npm](https://img.shields.io/npm/dm/@tsparticles/jquery)](https://www.npmjs.com/package/@tsparticles/jquery) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
66

77
Official [tsParticles](https://github.com/matteobruni/tsparticles) jQuery plugin
88

@@ -13,28 +13,25 @@ Official [tsParticles](https://github.com/matteobruni/tsparticles) jQuery plugin
1313
## Installation
1414

1515
```shell
16-
$ npm install jquery-particles
16+
$ npm install @tsparticles/jquery
1717
```
1818

1919
or
2020

2121
```shell
22-
$ yarn add jquery-particles
22+
$ yarn add @tsparticles/jquery
2323
```
2424

2525
or from jsDelivr
2626

27-
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/jquery-particles/badge)](https://www.jsdelivr.com/package/npm/jquery-particles)
27+
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/jquery/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/jquery)
2828

2929
```html
30-
<!-- first include tsParticles engine -->
31-
<script src="https://cdn.jsdelivr.net/npm/tsparticles-engine"></script>
32-
33-
<!-- then include any tsParticles plugin needed -->
30+
<!-- first include any tsParticles plugin needed -->
3431
<script src="https://cdn.jsdelivr.net/npm/tsparticles/tsparticles.bundle.min.js"></script>
3532

3633
<!-- then include jquery wrapper -->
37-
<script src="https://cdn.jsdelivr.net/npm/jquery-particles"></script>
34+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/jquery"></script>
3835
```
3936

4037
## How to use
@@ -71,7 +68,6 @@ $(document).ready(async function () {
7168
enable: true,
7269
mode: "repulse",
7370
},
74-
resize: true,
7571
},
7672
modes: {
7773
push: {
@@ -107,7 +103,6 @@ $(document).ready(async function () {
107103
number: {
108104
density: {
109105
enable: true,
110-
area: 800,
111106
},
112107
value: 80,
113108
},
@@ -126,7 +121,7 @@ $(document).ready(async function () {
126121
function (container) {
127122
// container is the particles container where you can play/pause or stop/start.
128123
// the container is already started, you don't need to start it manually.
129-
}
124+
},
130125
);
131126

132127
// or

apps/jquery/CHANGELOG.md

Lines changed: 3 additions & 482 deletions
Large diffs are not rendered by default.

apps/jquery/app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ app.use("/lodash", express.static("./node_modules/lodash"));
2323
app.use("/fontawesome", express.static("./node_modules/@fortawesome/fontawesome-free"));
2424
app.use("/jsoneditor", express.static("./node_modules/jsoneditor/dist"));
2525
app.use("/tsparticles", express.static("./node_modules/tsparticles"));
26-
app.use("/demo-configs", express.static("./node_modules/tsparticles-demo-configs"));
27-
app.use("/jquery-particles", express.static("./node_modules/jquery-particles/dist"));
28-
app.use("/preset-links", express.static("./node_modules/tsparticles-preset-links"));
26+
app.use("/demo-configs", express.static("./node_modules/@tsparticles/configs"));
27+
app.use("/jquery-particles", express.static("./node_modules/@tsparticles/jquery/dist"));
28+
app.use("/preset-links", express.static("./node_modules/@tsparticles/preset-links"));
2929
app.use("/stats.ts", express.static("./node_modules/stats.ts/"));
3030
app.use("/jquery", express.static("./node_modules/jquery/dist/"));
3131

apps/jquery/package.json

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
{
2-
"name": "jquery-particles-demo",
3-
"private": true,
4-
"version": "2.9.3",
5-
"description": "> TODO: description",
6-
"author": "Matteo Bruni <[email protected]>",
7-
"homepage": "https://particles.js.org",
8-
"license": "MIT",
9-
"repository": {
10-
"type": "git",
11-
"url": "git+https://github.com/tsparticles/jquery.git"
12-
},
13-
"scripts": {
14-
"build": "pnpm run build:style && pnpm run build:index",
15-
"build:ci": "pnpm run build:style && pnpm run build:index",
16-
"build:index": "echo \"pug ./views/index.pug\"",
17-
"build:style": "stylus ./public/stylesheets/main.styl",
18-
"start": "pnpm run build && node ./app.js"
19-
},
20-
"bugs": {
21-
"url": "https://github.com/tsparticles/jquery/issues"
22-
},
23-
"dependencies": {
24-
"jquery": "^3.6.3",
25-
"jquery-particles": "^2.9.3",
26-
"tsparticles": "^2.9.3",
27-
"tsparticles-demo-configs": "^2.9.3",
28-
"tsparticles-engine": "^2.9.3",
29-
"tsparticles-preset-links": "^2.9.3"
30-
},
31-
"devDependencies": {
32-
"@fortawesome/fontawesome-free": "^6.2.1",
33-
"@typescript-eslint/eslint-plugin": "^5.48.2",
34-
"@typescript-eslint/parser": "^5.48.2",
35-
"babel-preset-env": "^1.7.0",
36-
"eslint": "^8.32.0",
37-
"eslint-config-prettier": "^8.6.0",
38-
"express": "^4.18.2",
39-
"express-rate-limit": "^6.7.0",
40-
"helmet": "^6.0.1",
41-
"jsoneditor": "^9.9.2",
42-
"lodash": "^4.17.21",
43-
"prettier": "^2.8.3",
44-
"pug": "^3.0.2",
45-
"stats.ts": "^1.1.0",
46-
"stylus": "^0.59.0",
47-
"typescript": "^4.9.4"
48-
}
2+
"name": "@tsparticles/jquery-demo",
3+
"private": true,
4+
"version": "3.0.0",
5+
"description": "> TODO: description",
6+
"author": "Matteo Bruni <[email protected]>",
7+
"homepage": "https://particles.js.org",
8+
"license": "MIT",
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/tsparticles/jquery.git"
12+
},
13+
"scripts": {
14+
"build": "pnpm run build:style && pnpm run build:index",
15+
"build:ci": "pnpm run build:style && pnpm run build:index",
16+
"build:index": "echo \"pug ./views/index.pug\"",
17+
"build:style": "stylus ./public/stylesheets/main.styl",
18+
"start": "pnpm run build && node ./app.js"
19+
},
20+
"bugs": {
21+
"url": "https://github.com/tsparticles/jquery/issues"
22+
},
23+
"dependencies": {
24+
"@tsparticles/configs": "^3.0.2",
25+
"@tsparticles/engine": "^3.0.2",
26+
"@tsparticles/jquery": "workspace:^",
27+
"@tsparticles/preset-links": "^3.0.1",
28+
"jquery": "^3.7.1",
29+
"tsparticles": "^3.0.2"
30+
},
31+
"devDependencies": {
32+
"@fortawesome/fontawesome-free": "^6.5.1",
33+
"@typescript-eslint/eslint-plugin": "^6.16.0",
34+
"@typescript-eslint/parser": "^6.16.0",
35+
"babel-preset-env": "^1.7.0",
36+
"eslint": "^8.56.0",
37+
"eslint-config-prettier": "^9.1.0",
38+
"express": "^4.18.2",
39+
"express-rate-limit": "^7.1.5",
40+
"helmet": "^7.1.0",
41+
"jsoneditor": "^10.0.0",
42+
"lodash": "^4.17.21",
43+
"prettier": "^3.1.1",
44+
"pug": "^3.0.2",
45+
"stats.ts": "^1.1.0",
46+
"stylus": "^0.62.0",
47+
"typescript": "^5.3.3"
48+
}
4949
}

apps/jquery/public/javascripts/demo.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ let updateParticles = function (editor) {
3535
$('#tsparticles').particles().init(tsParticles.configs[presetId], (particles) => {
3636
localStorage.presetId = presetId;
3737

38-
const omit = (obj) => {
38+
const omit = obj => {
3939
return _.omitBy(obj, (value, key) => {
4040
return _.startsWith(key, "_");
41-
})
41+
});
4242
};
4343

44-
const transform = (obj) => {
44+
const transform = obj => {
4545
return _.transform(omit(obj), function (result, value, key) {
46-
result[key] = _.isObject(value) ? transform(omit(value)) : value;
47-
})
46+
result[key] = !_.isArray(value) && _.isObject(value) ? transform(omit(value)) : value;
47+
});
4848
};
4949

5050
editor.update(transform(particles.options));
@@ -98,8 +98,12 @@ $(document).ready(function () {
9898
btnUpdate.click(function () {
9999
const particles = tsParticles.domItem(0);
100100

101-
particles.options = editor.get();
102-
particles.refresh();
101+
particles.reset().then(() => {
102+
particles.options.load(editor.get());
103+
particles.refresh().then(() => {
104+
// do nothing
105+
});
106+
});
103107
});
104108

105109
//document.body.querySelector('#tsparticles-container').appendChild(stats.dom);

components/jquery/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# 3.0.0 (2023-12-26)
7+
8+
9+
### Features
10+
11+
* completed transition to v3 ([a6af1b6](https://github.com/tsparticles/jquery/commit/a6af1b64e72361ba3ed349ff2d218656c247e9de))
12+
* migrated to v3 ([d6f1e64](https://github.com/tsparticles/jquery/commit/d6f1e6481c02b9ad835fd5b9b85ae1570ee89bac))
13+
14+
15+
16+
17+
618
## [2.9.3](https://github.com/matteobruni/tsparticles/compare/[email protected]@2.9.3) (2023-02-12)
719

820
**Note:** Version bump only for package jquery-particles

components/jquery/README.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[![banner](https://particles.js.org/images/banner3.png)](https://particles.js.org)
22

3-
# jquery-particles
3+
# @tsparticles/jquery
44

5-
[![npm](https://img.shields.io/npm/v/jquery-particles)](https://www.npmjs.com/package/jquery-particles) [![npm](https://img.shields.io/npm/dm/jquery-particles)](https://www.npmjs.com/package/jquery-particles) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
5+
[![npm](https://img.shields.io/npm/v/@tsparticles/jquery)](https://www.npmjs.com/package/@tsparticles/jquery) [![npm](https://img.shields.io/npm/dm/@tsparticles/jquery)](https://www.npmjs.com/package/@tsparticles/jquery) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
66

77
Official [tsParticles](https://github.com/matteobruni/tsparticles) jQuery plugin
88

@@ -13,28 +13,25 @@ Official [tsParticles](https://github.com/matteobruni/tsparticles) jQuery plugin
1313
## Installation
1414

1515
```shell
16-
$ npm install jquery-particles
16+
$ npm install @tsparticles/jquery
1717
```
1818

1919
or
2020

2121
```shell
22-
$ yarn add jquery-particles
22+
$ yarn add @tsparticles/jquery
2323
```
2424

2525
or from jsDelivr
2626

27-
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/jquery-particles/badge)](https://www.jsdelivr.com/package/npm/jquery-particles)
27+
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/jquery/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/jquery)
2828

2929
```html
30-
<!-- first include tsParticles engine -->
31-
<script src="https://cdn.jsdelivr.net/npm/tsparticles-engine"></script>
32-
33-
<!-- then include any tsParticles plugin needed -->
30+
<!-- first include any tsParticles plugin needed -->
3431
<script src="https://cdn.jsdelivr.net/npm/tsparticles/tsparticles.bundle.min.js"></script>
3532

3633
<!-- then include jquery wrapper -->
37-
<script src="https://cdn.jsdelivr.net/npm/jquery-particles"></script>
34+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/jquery"></script>
3835
```
3936

4037
## How to use
@@ -71,7 +68,6 @@ $(document).ready(async function () {
7168
enable: true,
7269
mode: "repulse",
7370
},
74-
resize: true,
7571
},
7672
modes: {
7773
push: {
@@ -107,7 +103,6 @@ $(document).ready(async function () {
107103
number: {
108104
density: {
109105
enable: true,
110-
area: 800,
111106
},
112107
value: 80,
113108
},
@@ -126,7 +121,7 @@ $(document).ready(async function () {
126121
function (container) {
127122
// container is the particles container where you can play/pause or stop/start.
128123
// the container is already started, you don't need to start it manually.
129-
}
124+
},
130125
);
131126

132127
// or

0 commit comments

Comments
 (0)