MCPcopy Create free account
hub / github.com/AlirezaHadjar/react-native-animations / getRandomColor

Function getRandomColor

src/Examples/Firework/Particle.tsx:24–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22const gravity = 0.01;
23
24function 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
37const FLAME_PARTICLES = new Array(40).fill(0);
38const OPACITY_VEL_DEC = 0.013;

Callers 1

ParticleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected