canvas-confetti
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
// canvas-confetti v1.3.2 built on 2020-11-12T12:53:54.473Z | ||
// canvas-confetti v1.3.3 built on 2021-01-16T22:50:46.932Z | ||
!(function (window, module) { | ||
@@ -226,2 +226,6 @@ // source content | ||
function colorsToRgb(colors) { | ||
return colors.map(hexToRgb); | ||
} | ||
function hexToRgb(str) { | ||
@@ -292,3 +296,3 @@ var val = String(str).replace(/[^0-9a-f]/gi, ''); | ||
tiltAngle: Math.random() * Math.PI, | ||
color: hexToRgb(opts.color), | ||
color: opts.color, | ||
shape: opts.shape, | ||
@@ -431,3 +435,3 @@ tick: 0, | ||
var gravity = prop(options, 'gravity', Number); | ||
var colors = prop(options, 'colors'); | ||
var colors = prop(options, 'colors', colorsToRgb); | ||
var ticks = prop(options, 'ticks', Number); | ||
@@ -588,3 +592,3 @@ var shapes = prop(options, 'shapes'); | ||
return this; | ||
return this || {}; | ||
})(), module, false)); | ||
@@ -591,0 +595,0 @@ |
{ | ||
"name": "canvas-confetti", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "performant confetti animation in the browser", | ||
@@ -5,0 +5,0 @@ "main": "src/confetti.js", |
@@ -223,2 +223,6 @@ (function main(global, module, isWorker, workerSize) { | ||
function colorsToRgb(colors) { | ||
return colors.map(hexToRgb); | ||
} | ||
function hexToRgb(str) { | ||
@@ -289,3 +293,3 @@ var val = String(str).replace(/[^0-9a-f]/gi, ''); | ||
tiltAngle: Math.random() * Math.PI, | ||
color: hexToRgb(opts.color), | ||
color: opts.color, | ||
shape: opts.shape, | ||
@@ -428,3 +432,3 @@ tick: 0, | ||
var gravity = prop(options, 'gravity', Number); | ||
var colors = prop(options, 'colors'); | ||
var colors = prop(options, 'colors', colorsToRgb); | ||
var ticks = prop(options, 'ticks', Number); | ||
@@ -585,3 +589,3 @@ var shapes = prop(options, 'shapes'); | ||
return this; | ||
return this || {}; | ||
})(), module, false)); |
Sorry, the diff of this file is not supported yet
62390
0.39%1470
0.62%