()
| 22 | const gravity = 0.01; |
| 23 | |
| 24 | function getRandomColor() { |
| 25 | 'worklet'; |
| 26 | // Generate random values for red, green, and blue components |
| 27 | var red = Math.floor(Math.random() * 256); |
| 28 | var green = Math.floor(Math.random() * 256); |
| 29 | var blue = Math.floor(Math.random() * 256); |
| 30 | |
| 31 | // Construct the RGB color string |
| 32 | var rgbColor = 'rgb(' + red + ',' + green + ',' + blue + ')'; |
| 33 | |
| 34 | return rgbColor; |
| 35 | } |
| 36 | |
| 37 | const FLAME_PARTICLES = new Array(40).fill(0); |
| 38 | const OPACITY_VEL_DEC = 0.013; |