Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# 3.0.0 (2023-12-26)


### Features

* completed transition to v3 ([a6af1b6](https://github.com/tsparticles/jquery/commit/a6af1b64e72361ba3ed349ff2d218656c247e9de))
* migrated to v3 ([d6f1e64](https://github.com/tsparticles/jquery/commit/d6f1e6481c02b9ad835fd5b9b85ae1570ee89bac))
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[![banner](https://particles.js.org/images/banner3.png)](https://particles.js.org)

# jquery-particles
# @tsparticles/jquery

[![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)
[![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)

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

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

```shell
$ npm install jquery-particles
$ npm install @tsparticles/jquery
```

or

```shell
$ yarn add jquery-particles
$ yarn add @tsparticles/jquery
```

or from jsDelivr

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

```html
<!-- first include tsParticles engine -->
<script src="https://cdn.jsdelivr.net/npm/tsparticles-engine"></script>

<!-- then include any tsParticles plugin needed -->
<!-- first include any tsParticles plugin needed -->
<script src="https://cdn.jsdelivr.net/npm/tsparticles/tsparticles.bundle.min.js"></script>

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

## How to use
Expand Down Expand Up @@ -71,7 +68,6 @@ $(document).ready(async function () {
enable: true,
mode: "repulse",
},
resize: true,
},
modes: {
push: {
Expand Down Expand Up @@ -107,7 +103,6 @@ $(document).ready(async function () {
number: {
density: {
enable: true,
area: 800,
},
value: 80,
},
Expand All @@ -126,7 +121,7 @@ $(document).ready(async function () {
function (container) {
// container is the particles container where you can play/pause or stop/start.
// the container is already started, you don't need to start it manually.
}
},
);

// or
Expand Down
485 changes: 3 additions & 482 deletions apps/jquery/CHANGELOG.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions apps/jquery/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ app.use("/lodash", express.static("./node_modules/lodash"));
app.use("/fontawesome", express.static("./node_modules/@fortawesome/fontawesome-free"));
app.use("/jsoneditor", express.static("./node_modules/jsoneditor/dist"));
app.use("/tsparticles", express.static("./node_modules/tsparticles"));
app.use("/demo-configs", express.static("./node_modules/tsparticles-demo-configs"));
app.use("/jquery-particles", express.static("./node_modules/jquery-particles/dist"));
app.use("/preset-links", express.static("./node_modules/tsparticles-preset-links"));
app.use("/demo-configs", express.static("./node_modules/@tsparticles/configs"));
app.use("/jquery-particles", express.static("./node_modules/@tsparticles/jquery/dist"));
app.use("/preset-links", express.static("./node_modules/@tsparticles/preset-links"));
app.use("/stats.ts", express.static("./node_modules/stats.ts/"));
app.use("/jquery", express.static("./node_modules/jquery/dist/"));

Expand Down
94 changes: 47 additions & 47 deletions apps/jquery/package.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
{
"name": "jquery-particles-demo",
"private": true,
"version": "2.9.3",
"description": "> TODO: description",
"author": "Matteo Bruni <matteo.bruni@me.com>",
"homepage": "https://particles.js.org",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/tsparticles/jquery.git"
},
"scripts": {
"build": "pnpm run build:style && pnpm run build:index",
"build:ci": "pnpm run build:style && pnpm run build:index",
"build:index": "echo \"pug ./views/index.pug\"",
"build:style": "stylus ./public/stylesheets/main.styl",
"start": "pnpm run build && node ./app.js"
},
"bugs": {
"url": "https://github.com/tsparticles/jquery/issues"
},
"dependencies": {
"jquery": "^3.6.3",
"jquery-particles": "^2.9.3",
"tsparticles": "^2.9.3",
"tsparticles-demo-configs": "^2.9.3",
"tsparticles-engine": "^2.9.3",
"tsparticles-preset-links": "^2.9.3"
},
"devDependencies": {
"@fortawesome/fontawesome-free": "^6.2.1",
"@typescript-eslint/eslint-plugin": "^5.48.2",
"@typescript-eslint/parser": "^5.48.2",
"babel-preset-env": "^1.7.0",
"eslint": "^8.32.0",
"eslint-config-prettier": "^8.6.0",
"express": "^4.18.2",
"express-rate-limit": "^6.7.0",
"helmet": "^6.0.1",
"jsoneditor": "^9.9.2",
"lodash": "^4.17.21",
"prettier": "^2.8.3",
"pug": "^3.0.2",
"stats.ts": "^1.1.0",
"stylus": "^0.59.0",
"typescript": "^4.9.4"
}
"name": "@tsparticles/jquery-demo",
"private": true,
"version": "3.0.0",
"description": "> TODO: description",
"author": "Matteo Bruni <matteo.bruni@me.com>",
"homepage": "https://particles.js.org",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/tsparticles/jquery.git"
},
"scripts": {
"build": "pnpm run build:style && pnpm run build:index",
"build:ci": "pnpm run build:style && pnpm run build:index",
"build:index": "echo \"pug ./views/index.pug\"",
"build:style": "stylus ./public/stylesheets/main.styl",
"start": "pnpm run build && node ./app.js"
},
"bugs": {
"url": "https://github.com/tsparticles/jquery/issues"
},
"dependencies": {
"@tsparticles/configs": "^3.0.2",
"@tsparticles/engine": "^3.0.2",
"@tsparticles/jquery": "workspace:^",
"@tsparticles/preset-links": "^3.0.1",
"jquery": "^3.7.1",
"tsparticles": "^3.0.2"
},
"devDependencies": {
"@fortawesome/fontawesome-free": "^6.5.1",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
"babel-preset-env": "^1.7.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"express": "^4.18.2",
"express-rate-limit": "^7.1.5",
"helmet": "^7.1.0",
"jsoneditor": "^10.0.0",
"lodash": "^4.17.21",
"prettier": "^3.1.1",
"pug": "^3.0.2",
"stats.ts": "^1.1.0",
"stylus": "^0.62.0",
"typescript": "^5.3.3"
}
}
18 changes: 11 additions & 7 deletions apps/jquery/public/javascripts/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ let updateParticles = function (editor) {
$('#tsparticles').particles().init(tsParticles.configs[presetId], (particles) => {
localStorage.presetId = presetId;

const omit = (obj) => {
const omit = obj => {
return _.omitBy(obj, (value, key) => {
return _.startsWith(key, "_");
})
});
};

const transform = (obj) => {
const transform = obj => {
return _.transform(omit(obj), function (result, value, key) {
result[key] = _.isObject(value) ? transform(omit(value)) : value;
})
result[key] = !_.isArray(value) && _.isObject(value) ? transform(omit(value)) : value;
});
};

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

particles.options = editor.get();
particles.refresh();
particles.reset().then(() => {
particles.options.load(editor.get());
particles.refresh().then(() => {
// do nothing
});
});
});

//document.body.querySelector('#tsparticles-container').appendChild(stats.dom);
Expand Down
12 changes: 12 additions & 0 deletions components/jquery/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# 3.0.0 (2023-12-26)


### Features

* completed transition to v3 ([a6af1b6](https://github.com/tsparticles/jquery/commit/a6af1b64e72361ba3ed349ff2d218656c247e9de))
* migrated to v3 ([d6f1e64](https://github.com/tsparticles/jquery/commit/d6f1e6481c02b9ad835fd5b9b85ae1570ee89bac))





## [2.9.3](https://github.com/matteobruni/tsparticles/compare/jquery-particles@2.9.2...jquery-particles@2.9.3) (2023-02-12)

**Note:** Version bump only for package jquery-particles
Expand Down
21 changes: 8 additions & 13 deletions components/jquery/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[![banner](https://particles.js.org/images/banner3.png)](https://particles.js.org)

# jquery-particles
# @tsparticles/jquery

[![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)
[![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)

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

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

```shell
$ npm install jquery-particles
$ npm install @tsparticles/jquery
```

or

```shell
$ yarn add jquery-particles
$ yarn add @tsparticles/jquery
```

or from jsDelivr

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

```html
<!-- first include tsParticles engine -->
<script src="https://cdn.jsdelivr.net/npm/tsparticles-engine"></script>

<!-- then include any tsParticles plugin needed -->
<!-- first include any tsParticles plugin needed -->
<script src="https://cdn.jsdelivr.net/npm/tsparticles/tsparticles.bundle.min.js"></script>

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

## How to use
Expand Down Expand Up @@ -71,7 +68,6 @@ $(document).ready(async function () {
enable: true,
mode: "repulse",
},
resize: true,
},
modes: {
push: {
Expand Down Expand Up @@ -107,7 +103,6 @@ $(document).ready(async function () {
number: {
density: {
enable: true,
area: 800,
},
value: 80,
},
Expand All @@ -126,7 +121,7 @@ $(document).ready(async function () {
function (container) {
// container is the particles container where you can play/pause or stop/start.
// the container is already started, you don't need to start it manually.
}
},
);

// or
Expand Down
Loading