@newkrok/three-particles 2.0.1 → 2.0.2

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.
Files changed (3) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +63 -42
  3. package/package.json +9 -4
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 Istvan Krisztian Somoracz
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Istvan Krisztian Somoracz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,42 +1,63 @@
1
- # THREE Particles
2
- [![Run Tests](https://github.com/NewKrok/three-particles/actions/workflows/test.yml/badge.svg)](https://github.com/NewKrok/three-particles/actions/workflows/test.yml)
3
- [![NPM Version](https://img.shields.io/npm/v/@newkrok/three-particles.svg)](https://www.npmjs.com/package/@newkrok/three-particles)
4
- [![NPM Downloads](https://img.shields.io/npm/dw/@newkrok/three-particles.svg)](https://www.npmjs.com/package/@newkrok/three-particles)
5
- [![Bundle Size](https://img.shields.io/bundlephobia/minzip/@newkrok/three-particles)](https://bundlephobia.com/package/@newkrok/three-particles)
6
-
7
- Particle system for ThreeJS.
8
-
9
- # THREE Particles Editor
10
-
11
- You can create your own particle effects with its editor: [https://github.com/NewKrok/three-particles-editor](https://github.com/NewKrok/three-particles-editor)
12
-
13
- # Video
14
-
15
- - Projectiles: [https://youtu.be/Q352JuxON04](https://youtu.be/Q352JuxON04)
16
- - First preview: [https://youtu.be/dtN_bndvoGU](https://youtu.be/dtN_bndvoGU)
17
-
18
- # Live Demo
19
-
20
- [https://newkrok.com/three-particles-editor/index.html](https://newkrok.com/three-particles-editor/index.html)
21
-
22
- # Documentation
23
-
24
- Automatically generated TypeDoc: [https://newkrok.github.io/three-particles/](https://newkrok.github.io/three-particles/)
25
-
26
- # Install
27
-
28
- NPM package: [https://www.npmjs.com/package/@newkrok/three-particles](https://www.npmjs.com/package/@newkrok/three-particles)
29
-
30
- Install with npm:
31
- ```bash
32
- npm i @newkrok/three-particles
33
- ```
34
-
35
- Add as a `package.json` dependency:
36
- ```json
37
- "dependencies": {
38
- ...
39
- "@newkrok/three-particles": "2.0.0"
40
- ...
41
- }
42
- ```
1
+ # THREE Particles
2
+ [![Run Tests](https://github.com/NewKrok/three-particles/actions/workflows/test.yml/badge.svg)](https://github.com/NewKrok/three-particles/actions/workflows/test.yml)
3
+ [![NPM Version](https://img.shields.io/npm/v/@newkrok/three-particles.svg)](https://www.npmjs.com/package/@newkrok/three-particles)
4
+ [![NPM Downloads](https://img.shields.io/npm/dw/@newkrok/three-particles.svg)](https://www.npmjs.com/package/@newkrok/three-particles)
5
+ [![Bundle Size](https://img.shields.io/bundlephobia/minzip/@newkrok/three-particles)](https://bundlephobia.com/package/@newkrok/three-particles)
6
+
7
+ Particle system for ThreeJS.
8
+
9
+ # Features
10
+
11
+ * Easy integration with Three.js.
12
+ * Visual editor for creating and fine-tuning effects: [THREE Particles Editor](https://github.com/NewKrok/three-particles-editor)
13
+ * Highly customizable particle properties (position, velocity, size, color, alpha, rotation, etc.).
14
+ * Support for various emitter shapes and parameters.
15
+ * TypeDoc API documentation available.
16
+
17
+ # Live Demo & Examples
18
+
19
+ * **Editor & Live Demo:** [https://newkrok.com/three-particles-editor/index.html](https://newkrok.com/three-particles-editor/index.html)
20
+ * **CodePen Basic Example:** [https://codepen.io/NewKrok/pen/GgRzEmP](https://codepen.io/NewKrok/pen/GgRzEmP)
21
+ * **Video - Projectiles:** [https://youtu.be/Q352JuxON04](https://youtu.be/Q352JuxON04)
22
+ * **Video - First Preview:** [https://youtu.be/dtN_bndvoGU](https://youtu.be/dtN_bndvoGU)
23
+
24
+ # Installation
25
+
26
+ ## NPM
27
+
28
+ ```bash
29
+ npm install @newkrok/three-particles
30
+ ```
31
+
32
+ ## CDN (Browser)
33
+
34
+ Include the script directly in your HTML:
35
+
36
+ ```html
37
+ <!-- Please verify this path points to the correct UMD/IIFE bundle -->
38
+ <script src="https://cdn.jsdelivr.net/npm/@newkrok/three-particles@latest/dist/three-particles.min.js"></script>
39
+ <!-- or -->
40
+ <script src="https://unpkg.com/@newkrok/three-particles@latest/dist/three-particles.min.js"></script>
41
+ ```
42
+
43
+ # Usage
44
+
45
+ Here's a basic example of how to load and use a particle system:
46
+
47
+ ```javascript
48
+ // Create a particle system
49
+ const effect = {
50
+ // Your effect configuration here
51
+ // It can be empty to use default settings
52
+ };
53
+ const { instance } = createParticleSystem(effect);
54
+ scene.add(instance);
55
+
56
+ // Update the particle system in your animation loop
57
+ // Pass the current time, delta time, and elapsed time
58
+ updateParticleSystems({now, delta, elapsed});
59
+ ```
60
+
61
+ # Documentation
62
+
63
+ Automatically generated TypeDoc: [https://newkrok.github.io/three-particles/](https://newkrok.github.io/three-particles/)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newkrok/three-particles",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "type": "module",
5
5
  "description": "Three.js-based high-performance particle system library designed for creating visually stunning particle effects with ease. Perfect for game developers and 3D applications.",
6
6
  "main": "./dist/index.js",
@@ -44,11 +44,12 @@
44
44
  },
45
45
  "homepage": "https://github.com/NewKrok/three-particles#readme",
46
46
  "scripts": {
47
- "build": "rmdir /s /q dist && tsc && webpack --config webpack.config.js",
47
+ "build": "rimraf dist && tsc && webpack --config webpack.config.js",
48
48
  "prepublishOnly": "npm run build",
49
49
  "test": "jest",
50
50
  "test:watch": "jest --watch",
51
- "lint": "eslint src"
51
+ "lint": "eslint src",
52
+ "prepare": "husky"
52
53
  },
53
54
  "dependencies": {
54
55
  "@newkrok/three-utils": "^1.0.0",
@@ -61,6 +62,8 @@
61
62
  "devDependencies": {
62
63
  "@babel/preset-env": "^7.26.0",
63
64
  "@babel/preset-typescript": "^7.26.0",
65
+ "@commitlint/cli": "^19.8.0",
66
+ "@commitlint/config-conventional": "^19.8.0",
64
67
  "@types/jest": "^29.5.14",
65
68
  "@types/node": "^22.10.4",
66
69
  "@types/three": "^0.175.0",
@@ -71,9 +74,11 @@
71
74
  "eslint-config-prettier": "^10.0.1",
72
75
  "eslint-plugin-import": "^2.31.0",
73
76
  "eslint-plugin-prettier": "^5.2.3",
77
+ "husky": "^9.1.7",
74
78
  "jest": "^29.7.0",
75
79
  "madge": "^8.0.0",
76
80
  "prettier": "^3.4.2",
81
+ "rimraf": "^6.0.1",
77
82
  "terser-webpack-plugin": "^5.3.11",
78
83
  "ts-jest": "^29.2.5",
79
84
  "ts-loader": "^9.5.2",
@@ -84,4 +89,4 @@
84
89
  "webpack-bundle-analyzer": "^4.10.2",
85
90
  "webpack-cli": "^6.0.1"
86
91
  }
87
- }
92
+ }