(size = 1)
| 586 | |
| 587 | // 唯一的 shell 类型 |
| 588 | const crysanthemumShell = (size = 1) => { |
| 589 | const glitter = Math.random() < 0.25; |
| 590 | const singleColor = Math.random() < 0.72; |
| 591 | const color = singleColor ? randomColor({ limitWhite: true }) : [randomColor(), randomColor({ notSame: true })]; |
| 592 | const pistil = singleColor && Math.random() < 0.42; |
| 593 | const pistilColor = pistil && makePistilColor(color); |
| 594 | const secondColor = singleColor && (Math.random() < 0.2 || color === COLOR.White) ? pistilColor || randomColor({ notColor: color, limitWhite: true }) : null; |
| 595 | const streamers = !pistil && color !== COLOR.White && Math.random() < 0.42; |
| 596 | let starDensity = glitter ? 1.1 : 1.25; |
| 597 | if (isLowQuality) starDensity *= 0.8; |
| 598 | if (isHighQuality) starDensity = 1.2; |
| 599 | return { |
| 600 | shellSize: size, |
| 601 | spreadSize: 300 + size * 100, |
| 602 | starLife: 900 + size * 200, |
| 603 | starDensity, |
| 604 | color, |
| 605 | secondColor, |
| 606 | glitter: glitter ? "light" : "", |
| 607 | glitterColor: whiteOrGold(), |
| 608 | pistil, |
| 609 | pistilColor, |
| 610 | streamers, |
| 611 | }; |
| 612 | }; |
| 613 | |
| 614 | const ghostShell = (size = 1) => { |
| 615 | // Extend crysanthemum shell |
no test coverage detected