@newkrok/three-particles 1.0.2 → 1.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newkrok/three-particles",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Particle system for ThreeJS",
5
5
  "main": "src/js/effects/three-particles.js",
6
6
  "bin": {
@@ -27,7 +27,7 @@
27
27
  "homepage": "https://github.com/NewKrok/three-particles#readme",
28
28
  "dependencies": {
29
29
  "easing-functions": "1.0.1",
30
- "three": "^0.144.0",
30
+ "three": "^0.155.0",
31
31
  "three-noise": "1.1.2",
32
32
  "@newkrok/three-utils": "^1.0.0"
33
33
  },
@@ -31,6 +31,65 @@ export type Emission = {
31
31
  rateOverDistance?: number;
32
32
  };
33
33
 
34
+ export const enum SimulationSpace {
35
+ LOCAL = "LOCAL",
36
+ WORLD = "WORLD",
37
+ }
38
+
39
+ export const enum Shape {
40
+ SPHERE = "SPHERE",
41
+ CONE = "CONE",
42
+ BOX = "BOX",
43
+ CIRCLE = "CIRCLE",
44
+ RECTANGLE = "RECTANGLE",
45
+ }
46
+
47
+ export const enum EmitFrom {
48
+ VOLUME = "VOLUME",
49
+ SHELL = "SHELL",
50
+ EDGE = "EDGE",
51
+ }
52
+
53
+ export const enum TimeMode {
54
+ LIFETIME = "LIFETIME",
55
+ FPS = "FPS",
56
+ }
57
+
58
+ export type ShapeConfig = {
59
+ shape?: Shape;
60
+ sphere?: {
61
+ radius?: number;
62
+ radiusThickness?: number;
63
+ arc?: number;
64
+ };
65
+ cone?: {
66
+ angle?: number;
67
+ radius?: number;
68
+ radiusThickness?: number;
69
+ arc?: number;
70
+ };
71
+ circle?: {
72
+ radius?: number;
73
+ radiusThickness?: number;
74
+ arc?: number;
75
+ };
76
+ rectangle?: {
77
+ rotation?: Point3D;
78
+ scale?: Point3D;
79
+ };
80
+ box?: {
81
+ scale?: Point3D;
82
+ emitFrom?: EmitFrom;
83
+ };
84
+ };
85
+
86
+ export type TextureSheetAnimation = {
87
+ tiles?: THREE.Vector2;
88
+ timeMode?: TimeMode;
89
+ fps?: number;
90
+ startFrame?: MinMaxNumber;
91
+ };
92
+
34
93
  export type ParticleSystemConfig = {
35
94
  transform?: Transform;
36
95
  duration?: number;
@@ -43,10 +102,10 @@ export type ParticleSystemConfig = {
43
102
  startColor?: MinMaxColor;
44
103
  startOpacity?: MinMaxNumber;
45
104
  gravity?: number;
46
- simulationSpace?: "LOCAL" | "WORLD";
105
+ simulationSpace?: SimulationSpace;
47
106
  maxParticles?: number;
48
107
  emission?: Emission;
49
- shape?: any;
108
+ shape?: ShapeConfig;
50
109
  map?: THREE.Texture;
51
110
  renderer?: any;
52
111
  velocityOverLifetime?: any;
@@ -54,7 +113,7 @@ export type ParticleSystemConfig = {
54
113
  opacityOverLifetime?: any;
55
114
  rotationOverLifetime?: any;
56
115
  noise?: any;
57
- textureSheetAnimation?: any;
116
+ textureSheetAnimation?: TextureSheetAnimation;
58
117
  _editorData: any;
59
118
  };
60
119