@wolffo/three-fire 1.0.3 → 1.0.5
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 +22 -8
- package/package.json +21 -11
package/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Three fire
|
2
2
|
|
3
3
|
[](https://github.com/typeWolffo/THREE.Fire/actions)
|
4
|
+
[](https://github.com/typeWolffo/THREE.Fire/actions)
|
5
|
+
[](https://github.com/typeWolffo/THREE.Fire)
|
4
6
|
[](https://www.npmjs.com/package/@wolffo/three-fire)
|
5
7
|
[](https://www.npmjs.com/package/@wolffo/three-fire)
|
6
8
|
|
@@ -8,6 +10,8 @@ Modern TypeScript volumetric fire effect for Three.js and React Three Fiber.
|
|
8
10
|
|
9
11
|

|
10
12
|
|
13
|
+
[Live Demo](https://threefire.netlify.app/)
|
14
|
+
|
11
15
|
## Features
|
12
16
|
|
13
17
|
- 🔥 Volumetric fire effect using ray marching
|
@@ -169,19 +173,29 @@ npm run typecheck
|
|
169
173
|
|
170
174
|
# Run tests
|
171
175
|
npm test
|
172
|
-
```
|
173
176
|
|
174
|
-
|
177
|
+
# Test in watch mode
|
178
|
+
npm run test:watch
|
175
179
|
|
176
|
-
|
180
|
+
# Visual test UI
|
181
|
+
npm run test:ui
|
177
182
|
|
178
|
-
|
179
|
-
|
180
|
-
npm run release:patch # 1.0.0 → 1.0.1
|
181
|
-
npm run release:minor # 1.0.0 → 1.1.0
|
182
|
-
npm run release:major # 1.0.0 → 2.0.0
|
183
|
+
# Coverage report
|
184
|
+
npm run test:coverage
|
183
185
|
```
|
184
186
|
|
187
|
+
### Testing
|
188
|
+
|
189
|
+
The project includes comprehensive tests with **92%+ coverage**:
|
190
|
+
|
191
|
+
- **49 test cases** covering all functionality
|
192
|
+
- **Unit tests** for Fire class and FireShader
|
193
|
+
- **Integration tests** for React components
|
194
|
+
- **Mock environment** for Three.js and React Three Fiber
|
195
|
+
- **Coverage reporting** with detailed metrics
|
196
|
+
|
197
|
+
Test files are located in `test/` and use Vitest with Testing Library.
|
198
|
+
|
185
199
|
## Credits
|
186
200
|
|
187
201
|
Based on the original THREE.Fire by [mattatz](https://github.com/mattatz/THREE.Fire)
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@wolffo/three-fire",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.5",
|
4
4
|
"type": "module",
|
5
5
|
"description": "Modern TypeScript volumetric fire effect for Three.js and React Three Fiber",
|
6
6
|
"main": "dist/index.js",
|
@@ -8,16 +8,19 @@
|
|
8
8
|
"module": "dist/index.esm.js",
|
9
9
|
"exports": {
|
10
10
|
".": {
|
11
|
+
"types": "./dist/index.d.ts",
|
11
12
|
"import": "./dist/index.esm.js",
|
12
|
-
"require": "./dist/index.js"
|
13
|
-
"types": "./dist/index.d.ts"
|
13
|
+
"require": "./dist/index.js"
|
14
14
|
}
|
15
15
|
},
|
16
16
|
"scripts": {
|
17
17
|
"build": "rollup -c",
|
18
18
|
"dev": "rollup -c -w",
|
19
19
|
"typecheck": "tsc --noEmit",
|
20
|
-
"test": "
|
20
|
+
"test": "vitest run",
|
21
|
+
"test:watch": "vitest",
|
22
|
+
"test:ui": "vitest --ui",
|
23
|
+
"test:coverage": "vitest run --coverage",
|
21
24
|
"prepublishOnly": "npm run build",
|
22
25
|
"release:patch": "npm version patch && git push origin master --tags",
|
23
26
|
"release:minor": "npm version minor && git push origin master --tags",
|
@@ -38,9 +41,9 @@
|
|
38
41
|
"author": "wolffo",
|
39
42
|
"license": "MIT",
|
40
43
|
"peerDependencies": {
|
41
|
-
"three": ">=0.
|
44
|
+
"@react-three/fiber": ">=8.0.0",
|
42
45
|
"react": ">=18.0.0",
|
43
|
-
"
|
46
|
+
"three": ">=0.150.0"
|
44
47
|
},
|
45
48
|
"peerDependenciesMeta": {
|
46
49
|
"react": {
|
@@ -51,16 +54,23 @@
|
|
51
54
|
}
|
52
55
|
},
|
53
56
|
"devDependencies": {
|
57
|
+
"@react-three/fiber": "^8.15.12",
|
58
|
+
"@rollup/plugin-typescript": "^11.1.5",
|
59
|
+
"@testing-library/jest-dom": "^6.6.3",
|
60
|
+
"@testing-library/react": "^16.3.0",
|
54
61
|
"@types/react": "^18.2.45",
|
55
62
|
"@types/three": "^0.160.0",
|
56
|
-
"@
|
63
|
+
"@vitest/coverage-v8": "^3.2.4",
|
64
|
+
"@vitest/ui": "^3.2.4",
|
65
|
+
"happy-dom": "^18.0.1",
|
57
66
|
"react": "^18.2.0",
|
58
|
-
"
|
59
|
-
"typescript": "^5.3.3",
|
67
|
+
"react-dom": "^18.3.1",
|
60
68
|
"rollup": "^4.9.2",
|
61
|
-
"@rollup/plugin-typescript": "^11.1.5",
|
62
69
|
"rollup-plugin-dts": "^6.1.0",
|
63
|
-
"
|
70
|
+
"three": "^0.160.0",
|
71
|
+
"tslib": "^2.6.2",
|
72
|
+
"typescript": "^5.3.3",
|
73
|
+
"vitest": "^3.2.4"
|
64
74
|
},
|
65
75
|
"files": [
|
66
76
|
"dist",
|