MCPcopy Create free account
hub / github.com/NianBroken/Firework_Simulator / horsetailShell

Function horsetailShell

js/script.js:750–764  ·  view source on GitHub ↗
(size = 1)

Source from the content-addressed store, hash-verified

748};
749
750const horsetailShell = (size = 1) => {
751 const color = randomColor();
752 return {
753 shellSize: size,
754 horsetail: true,
755 color,
756 spreadSize: 250 + size * 38,
757 starDensity: 0.9,
758 starLife: 2500 + size * 300,
759 glitter: "medium",
760 glitterColor: Math.random() < 0.5 ? whiteOrGold() : color,
761 // Add strobe effect to white horsetails, to make them more interesting
762 strobe: color === COLOR.White,
763 };
764};
765
766function randomShellName() {
767 return Math.random() < 0.5 ? "Crysanthemum" : shellNames[(Math.random() * (shellNames.length - 1) + 1) | 0];

Callers

nothing calls this directly

Calls 2

randomColorFunction · 0.85
whiteOrGoldFunction · 0.85

Tested by

no test coverage detected