1var count = 50; 2var defaults = { 3 origin: { y: 1 }, 4}; 5 6function fire(particleRatio, opts) { 7 window.confetti( 8 Object.assign({}, defaults, opts, { 9 particleCount: Math.floor(count * particleRatio), 10 }) 11 ); 12} 13 14function party() { 15 console.log('party'); 16 fire(0.25, { 17 spread: 26, 18 startVelocity: 55, 19 }); 20 fire(0.2, { 21 spread: 60, 22 }); 23 fire(0.35, { 24 spread: 100, 25 decay: 0.91, 26 scalar: 0.8, 27 }); 28 fire(0.1, { 29 spread: 120, 30 startVelocity: 25, 31 decay: 0.92, 32 scalar: 1.2, 33 }); 34 fire(0.1, { 35 spread: 120, 36 startVelocity: 45, 37 }); 38}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.