|
8 | 8 | "name": "ParticleEmitter3D", |
9 | 9 | "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/f2e5a34bf465f781866677762d385d6c8e9e8d203383f2df9a3b7e0fad6a2cb5_fire.svg", |
10 | 10 | "shortDescription": "Display a large number of particles to create visual effects.", |
11 | | - "version": "0.0.2", |
| 11 | + "version": "1.0.0", |
12 | 12 | "description": [ |
13 | 13 | "Particle emitters can be used to display:", |
14 | 14 | "- Fire", |
15 | 15 | "- Smoke", |
16 | 16 | "- Splashes", |
17 | | - "- Lights" |
| 17 | + "- Lights", |
| 18 | + "", |
| 19 | + "Breaking change from 1.0.0:", |
| 20 | + "- Particles were 3 times too small" |
18 | 21 | ], |
19 | 22 | "tags": [ |
20 | 23 | "3d", |
|
2787 | 2790 | " }", |
2788 | 2791 | " if (this.worldSpace) {", |
2789 | 2792 | " particle.position.applyMatrix4(matrix);", |
2790 | | - " particle.startSize = (particle.startSize * (scale.x + scale.y + scale.z)) / 3;", |
| 2793 | + " particle.startSize = (particle.startSize * (Math.abs(scale.x) + Math.abs(scale.y) + Math.abs(scale.z))) / 3;", |
2791 | 2794 | " particle.size = particle.startSize;", |
2792 | 2795 | " particle.velocity.multiply(scale).applyMatrix3(this.normalMatrix);", |
2793 | 2796 | " if (particle.rotation && particle.rotation instanceof THREE.Quaternion) {", |
|
3835 | 3838 | " this.sizeBuffer.setX(index, particle.size);", |
3836 | 3839 | " }", |
3837 | 3840 | " else {", |
3838 | | - " this.sizeBuffer.setX(index, (particle.size * (scale.x + scale.y + scale.z)) / 3);", |
| 3841 | + " this.sizeBuffer.setX(index, (particle.size * (Math.abs(scale.x) + Math.abs(scale.y) + Math.abs(scale.z))) / 3);", |
3839 | 3842 | " }", |
3840 | 3843 | " }", |
3841 | 3844 | " this.uvTileBuffer.setX(index, particle.uvTile);", |
|
4189 | 4192 | " this.widthBuffer.setX(index + 1, current.size);", |
4190 | 4193 | " }", |
4191 | 4194 | " else {", |
4192 | | - " this.widthBuffer.setX(index, (current.size * (scale.x + scale.y + scale.z)) / 3);", |
4193 | | - " this.widthBuffer.setX(index + 1, (current.size * (scale.x + scale.y + scale.z)) / 3);", |
| 4195 | + " this.widthBuffer.setX(index, (current.size * (Math.abs(scale.x) + Math.abs(scale.y) + Math.abs(scale.z))) / 3);", |
| 4196 | + " this.widthBuffer.setX(index + 1, (current.size * (Math.abs(scale.x) + Math.abs(scale.y) + Math.abs(scale.z))) / 3);", |
4194 | 4197 | " }", |
4195 | 4198 | " }", |
4196 | 4199 | " this.uvBuffer.setXY(index, (i / particle.previous.length + col) * tileWidth, (vTileCount - row - 1) * tileHeight);", |
|
0 commit comments