tsparticles 1.42.1 → 1.42.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Core/Canvas.d.ts +1 -1
- package/Core/Canvas.js +5 -3
- package/browser/Core/Canvas.d.ts +1 -1
- package/browser/Core/Canvas.js +5 -3
- package/esm/Core/Canvas.d.ts +1 -1
- package/esm/Core/Canvas.js +5 -3
- package/package.json +15 -3
- package/report.html +2 -2
- package/report.slim.html +2 -2
- package/tsparticles.engine.js +5 -3
- package/tsparticles.engine.min.js +2 -2
- package/tsparticles.interaction.external.attract.js +5 -3
- package/tsparticles.interaction.external.attract.min.js +1 -1
- package/tsparticles.interaction.external.bounce.js +5 -3
- package/tsparticles.interaction.external.bounce.min.js +1 -1
- package/tsparticles.interaction.external.bubble.js +5 -3
- package/tsparticles.interaction.external.bubble.min.js +1 -1
- package/tsparticles.interaction.external.connect.js +5 -3
- package/tsparticles.interaction.external.connect.min.js +1 -1
- package/tsparticles.interaction.external.grab.js +5 -3
- package/tsparticles.interaction.external.grab.min.js +1 -1
- package/tsparticles.interaction.external.repulse.js +5 -3
- package/tsparticles.interaction.external.repulse.min.js +1 -1
- package/tsparticles.interaction.external.trail.js +5 -3
- package/tsparticles.interaction.external.trail.min.js +1 -1
- package/tsparticles.interaction.particles.attract.js +5 -3
- package/tsparticles.interaction.particles.attract.min.js +1 -1
- package/tsparticles.interaction.particles.collisions.js +5 -3
- package/tsparticles.interaction.particles.collisions.min.js +1 -1
- package/tsparticles.interaction.particles.links.js +5 -3
- package/tsparticles.interaction.particles.links.min.js +1 -1
- package/tsparticles.js +5 -3
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.min.js +1 -1
- package/tsparticles.plugins.absorbers.js +5 -3
- package/tsparticles.plugins.absorbers.min.js +1 -1
- package/tsparticles.plugins.emitters.js +5 -3
- package/tsparticles.plugins.emitters.min.js +1 -1
- package/tsparticles.plugins.polygonMask.js +5 -3
- package/tsparticles.plugins.polygonMask.min.js +1 -1
- package/tsparticles.shape.circle.min.js +1 -1
- package/tsparticles.shape.image.js +5 -3
- package/tsparticles.shape.image.min.js +1 -1
- package/tsparticles.shape.line.min.js +1 -1
- package/tsparticles.shape.polygon.min.js +1 -1
- package/tsparticles.shape.square.min.js +1 -1
- package/tsparticles.shape.star.min.js +1 -1
- package/tsparticles.shape.text.js +5 -3
- package/tsparticles.shape.text.min.js +1 -1
- package/tsparticles.slim.js +5 -3
- package/tsparticles.slim.min.js +2 -2
- package/tsparticles.updater.angle.js +5 -3
- package/tsparticles.updater.angle.min.js +1 -1
- package/tsparticles.updater.color.js +5 -3
- package/tsparticles.updater.color.min.js +1 -1
- package/tsparticles.updater.life.js +5 -3
- package/tsparticles.updater.life.min.js +1 -1
- package/tsparticles.updater.opacity.js +5 -3
- package/tsparticles.updater.opacity.min.js +1 -1
- package/tsparticles.updater.outModes.js +5 -3
- package/tsparticles.updater.outModes.min.js +1 -1
- package/tsparticles.updater.roll.js +5 -3
- package/tsparticles.updater.roll.min.js +1 -1
- package/tsparticles.updater.size.js +5 -3
- package/tsparticles.updater.size.min.js +1 -1
- package/tsparticles.updater.strokeColor.js +5 -3
- package/tsparticles.updater.strokeColor.min.js +1 -1
- package/tsparticles.updater.tilt.js +5 -3
- package/tsparticles.updater.tilt.min.js +1 -1
- package/tsparticles.updater.wobble.js +5 -3
- package/tsparticles.updater.wobble.min.js +1 -1
- package/umd/Core/Canvas.d.ts +1 -1
- package/umd/Core/Canvas.js +5 -3
|
@@ -941,9 +941,9 @@
|
|
|
941
941
|
paint() {
|
|
942
942
|
const options = this.container.actualOptions;
|
|
943
943
|
this.draw((ctx => {
|
|
944
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
944
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
945
945
|
clear(ctx, this.size);
|
|
946
|
-
this.paintBase(
|
|
946
|
+
this.paintBase(this.coverColorStyle);
|
|
947
947
|
} else {
|
|
948
948
|
this.paintBase();
|
|
949
949
|
}
|
|
@@ -1114,12 +1114,14 @@
|
|
|
1114
1114
|
const color = cover.color;
|
|
1115
1115
|
const coverRgb = colorToRgb(color);
|
|
1116
1116
|
if (coverRgb) {
|
|
1117
|
-
|
|
1117
|
+
const coverColor = {
|
|
1118
1118
|
r: coverRgb.r,
|
|
1119
1119
|
g: coverRgb.g,
|
|
1120
1120
|
b: coverRgb.b,
|
|
1121
1121
|
a: cover.opacity
|
|
1122
1122
|
};
|
|
1123
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1124
|
+
console.log(this.coverColorStyle);
|
|
1123
1125
|
}
|
|
1124
1126
|
}
|
|
1125
1127
|
initTrail() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.2 by Matteo Bruni */
|
|
2
2
|
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(window,(function(){return function(){"use strict";var e={d:function(t,o){for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{loadAngleUpdater:function(){return u}});class o{}o.generatedAttribute="generated",o.randomColorValue="random",o.midColorValue="mid",o.touchEndEvent="touchend",o.mouseDownEvent="mousedown",o.mouseUpEvent="mouseup",o.mouseMoveEvent="mousemove",o.touchStartEvent="touchstart",o.touchMoveEvent="touchmove",o.mouseLeaveEvent="mouseleave",o.mouseOutEvent="mouseout",o.touchCancelEvent="touchcancel",o.resizeEvent="resize",o.visibilityChangeEvent="visibilitychange",o.noPolygonDataLoaded="No polygon data loaded.",o.noPolygonFound="No polygon found, you need to specify SVG url in config.";new WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;function n(e){return"number"==typeof e?e:function(e){const t=r(e);let o=a(e);return t===o&&(o=0),Math.random()*(t-o)+o}(e)}function a(e){return"number"==typeof e?e:e.min}function r(e){return"number"==typeof e?e:e.max}new WeakMap;class i{constructor(e){this.container=e}init(e){const t=e.options.rotate;e.rotate={enable:t.animation.enable,value:n(t.value)*Math.PI/180};let o=t.direction;if("random"===o){o=Math.floor(2*Math.random())>0?"counter-clockwise":"clockwise"}switch(o){case"counter-clockwise":case"counterClockwise":e.rotate.status=1;break;case"clockwise":e.rotate.status=0}const a=e.options.rotate.animation;a.enable&&(e.rotate.velocity=n(a.speed)/360*this.container.retina.reduceFactor,a.sync||(e.rotate.velocity*=Math.random()))}isEnabled(e){const t=e.options.rotate,o=t.animation;return!e.destroyed&&!e.spawning&&!t.path&&o.enable}update(e,t){this.isEnabled(e)&&function(e,t){var o;const n=e.rotate;if(!n)return;const a=e.options.rotate.animation,r=(null!==(o=n.velocity)&&void 0!==o?o:0)*t.factor,i=2*Math.PI;if(a.enable)switch(n.status){case 0:n.value+=r,n.value>i&&(n.value-=i);break;case 1:default:n.value-=r,n.value<0&&(n.value+=i)}}(e,t)}}async function u(e){await e.addParticleUpdater("angle",(e=>new i(e)))}return t}()}));
|
|
@@ -941,9 +941,9 @@
|
|
|
941
941
|
paint() {
|
|
942
942
|
const options = this.container.actualOptions;
|
|
943
943
|
this.draw((ctx => {
|
|
944
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
944
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
945
945
|
clear(ctx, this.size);
|
|
946
|
-
this.paintBase(
|
|
946
|
+
this.paintBase(this.coverColorStyle);
|
|
947
947
|
} else {
|
|
948
948
|
this.paintBase();
|
|
949
949
|
}
|
|
@@ -1114,12 +1114,14 @@
|
|
|
1114
1114
|
const color = cover.color;
|
|
1115
1115
|
const coverRgb = colorToRgb(color);
|
|
1116
1116
|
if (coverRgb) {
|
|
1117
|
-
|
|
1117
|
+
const coverColor = {
|
|
1118
1118
|
r: coverRgb.r,
|
|
1119
1119
|
g: coverRgb.g,
|
|
1120
1120
|
b: coverRgb.b,
|
|
1121
1121
|
a: cover.opacity
|
|
1122
1122
|
};
|
|
1123
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1124
|
+
console.log(this.coverColorStyle);
|
|
1123
1125
|
}
|
|
1124
1126
|
}
|
|
1125
1127
|
initTrail() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.2 by Matteo Bruni */
|
|
2
2
|
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var n=o();for(var t in n)("object"==typeof exports?exports:e)[t]=n[t]}}(window,(function(){return function(){"use strict";var e={d:function(o,n){for(var t in n)e.o(n,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:n[t]})},o:function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{loadColorUpdater:function(){return y}});class n{}n.generatedAttribute="generated",n.randomColorValue="random",n.midColorValue="mid",n.touchEndEvent="touchend",n.mouseDownEvent="mousedown",n.mouseUpEvent="mouseup",n.mouseMoveEvent="mousemove",n.touchStartEvent="touchstart",n.touchMoveEvent="touchmove",n.mouseLeaveEvent="mouseleave",n.mouseOutEvent="mouseout",n.touchCancelEvent="touchcancel",n.resizeEvent="resize",n.visibilityChangeEvent="visibilitychange",n.noPolygonDataLoaded="No polygon data loaded.",n.noPolygonFound="No polygon found, you need to specify SVG url in config.";new WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;function t(e){const o=l(e);let n=a(e);return o===n&&(n=0),Math.random()*(o-n)+n}function r(e){return"number"==typeof e?e:t(e)}function a(e){return"number"==typeof e?e:e.min}function l(e){return"number"==typeof e?e:e.max}function s(e,o){if(e===o||void 0===o&&"number"==typeof e)return e;const n=a(e),t=l(e);return void 0!==o?{min:Math.min(n,o),max:Math.max(t,o)}:s(n,t)}function i(e,o,n=!0){return e[void 0!==o&&n?o%e.length:function(e){return Math.floor(Math.random()*e.length)}(e)]}function u(e,o,n){let t=n;return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+6*(o-e)*t:t<.5?o:t<2/3?e+(o-e)*(2/3-t)*6:e}function c(e){if(e.startsWith("rgb")){const o=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.]+)\s*)?\)/i.exec(e);return o?{a:o.length>4?parseFloat(o[5]):1,b:parseInt(o[3],10),g:parseInt(o[2],10),r:parseInt(o[1],10)}:void 0}if(e.startsWith("hsl")){const o=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(e);return o?function(e){const o=f(e);return{a:e.a,b:o.b,g:o.g,r:o.r}}({a:o.length>4?parseFloat(o[5]):1,h:parseInt(o[1],10),l:parseInt(o[3],10),s:parseInt(o[2],10)}):void 0}if(e.startsWith("hsv")){const o=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(e);return o?function(e){const o=h(e);return{a:e.a,b:o.b,g:o.g,r:o.r}}({a:o.length>4?parseFloat(o[5]):1,h:parseInt(o[1],10),s:parseInt(o[2],10),v:parseInt(o[3],10)}):void 0}{const o=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,n=e.replace(o,((e,o,n,t,r)=>o+o+n+n+t+t+(void 0!==r?r+r:""))),t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(n);return t?{a:void 0!==t[4]?parseInt(t[4],16)/255:1,b:parseInt(t[3],16),g:parseInt(t[2],16),r:parseInt(t[1],16)}:void 0}}function d(e,o,t=!0){var r,a,l;if(void 0===e)return;const s="string"==typeof e?{value:e}:e;let u;if("string"==typeof s.value)u=s.value===n.randomColorValue?p():function(e){return c(e)}(s.value);else if(s.value instanceof Array){u=d({value:i(s.value,o,t)})}else{const e=s.value,o=null!==(r=e.rgb)&&void 0!==r?r:s.value;if(void 0!==o.r)u=o;else{const o=null!==(a=e.hsl)&&void 0!==a?a:s.value;if(void 0!==o.h&&void 0!==o.l)u=f(o);else{const o=null!==(l=e.hsv)&&void 0!==l?l:s.value;void 0!==o.h&&void 0!==o.v&&(u=h(o))}}}return u}function v(e,o,n=!0){const t=d(e,o,n);return void 0!==t?function(e){const o=e.r/255,n=e.g/255,t=e.b/255,r=Math.max(o,n,t),a=Math.min(o,n,t),l={h:0,l:(r+a)/2,s:0};r!=a&&(l.s=l.l<.5?(r-a)/(r+a):(r-a)/(2-r-a),l.h=o===r?(n-t)/(r-a):l.h=n===r?2+(t-o)/(r-a):4+(o-n)/(r-a));l.l*=100,l.s*=100,l.h*=60,l.h<0&&(l.h+=360);return l}(t):void 0}function f(e){const o={b:0,g:0,r:0},n={h:e.h/360,l:e.l/100,s:e.s/100};if(0===n.s)o.b=n.l,o.g=n.l,o.r=n.l;else{const e=n.l<.5?n.l*(1+n.s):n.l+n.s-n.l*n.s,t=2*n.l-e;o.r=u(t,e,n.h+1/3),o.g=u(t,e,n.h),o.b=u(t,e,n.h-1/3)}return o.r=Math.floor(255*o.r),o.g=Math.floor(255*o.g),o.b=Math.floor(255*o.b),o}function h(e){const o={b:0,g:0,r:0},n=e.h/60,t=e.s/100,r=e.v/100,a=r*t,l=a*(1-Math.abs(n%2-1));let s;if(n>=0&&n<=1?s={r:a,g:l,b:0}:n>1&&n<=2?s={r:l,g:a,b:0}:n>2&&n<=3?s={r:0,g:a,b:l}:n>3&&n<=4?s={r:0,g:l,b:a}:n>4&&n<=5?s={r:l,g:0,b:a}:n>5&&n<=6&&(s={r:a,g:0,b:l}),s){const e=r-a;o.r=Math.floor(255*(s.r+e)),o.g=Math.floor(255*(s.g+e)),o.b=Math.floor(255*(s.b+e))}return o}function p(e){const o=null!=e?e:0;return{b:Math.floor(t(s(o,256))),g:Math.floor(t(s(o,256))),r:Math.floor(t(s(o,256)))}}function b(e,o,n){if(e.enable=o.enable,e.enable){if(e.velocity=r(o.speed)/100*n,o.sync)return;e.status=0,e.velocity*=Math.random(),e.value&&(e.value*=Math.random())}else e.velocity=0}function g(e,o,n,r,a){var l;const s=o;if(!s||!n.enable)return;const i=t(n.offset),u=(null!==(l=o.velocity)&&void 0!==l?l:0)*e.factor+3.6*i;a&&0!==s.status?(s.value-=u,s.value<0&&(s.status=0,s.value+=s.value)):(s.value+=u,a&&s.value>r&&(s.status=1,s.value-=s.value%r)),s.value>r&&(s.value%=r)}new WeakMap;class m{constructor(e){this.container=e}init(e){const o=v(e.options.color,e.id,e.options.reduceDuplicates);o&&(e.color=function(e,o,n){const t={h:{enable:!1,value:e.h},s:{enable:!1,value:e.s},l:{enable:!1,value:e.l}};return o&&(b(t.h,o.h,n),b(t.s,o.s,n),b(t.l,o.l,n)),t}(o,e.options.color.animation,this.container.retina.reduceFactor))}isEnabled(e){var o,n,t;const r=e.options.color.animation;return!e.destroyed&&!e.spawning&&(void 0!==(null===(o=e.color)||void 0===o?void 0:o.h.value)&&r.h.enable||void 0!==(null===(n=e.color)||void 0===n?void 0:n.s.value)&&r.s.enable||void 0!==(null===(t=e.color)||void 0===t?void 0:t.l.value)&&r.l.enable)}update(e,o){!function(e,o){var n,t,r;const a=e.options.color.animation;void 0!==(null===(n=e.color)||void 0===n?void 0:n.h)&&g(o,e.color.h,a.h,360,!1),void 0!==(null===(t=e.color)||void 0===t?void 0:t.s)&&g(o,e.color.s,a.s,100,!0),void 0!==(null===(r=e.color)||void 0===r?void 0:r.l)&&g(o,e.color.l,a.l,100,!0)}(e,o)}}async function y(e){await e.addParticleUpdater("color",(e=>new m(e)))}return o}()}));
|
|
@@ -941,9 +941,9 @@
|
|
|
941
941
|
paint() {
|
|
942
942
|
const options = this.container.actualOptions;
|
|
943
943
|
this.draw((ctx => {
|
|
944
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
944
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
945
945
|
clear(ctx, this.size);
|
|
946
|
-
this.paintBase(
|
|
946
|
+
this.paintBase(this.coverColorStyle);
|
|
947
947
|
} else {
|
|
948
948
|
this.paintBase();
|
|
949
949
|
}
|
|
@@ -1114,12 +1114,14 @@
|
|
|
1114
1114
|
const color = cover.color;
|
|
1115
1115
|
const coverRgb = colorToRgb(color);
|
|
1116
1116
|
if (coverRgb) {
|
|
1117
|
-
|
|
1117
|
+
const coverColor = {
|
|
1118
1118
|
r: coverRgb.r,
|
|
1119
1119
|
g: coverRgb.g,
|
|
1120
1120
|
b: coverRgb.b,
|
|
1121
1121
|
a: cover.opacity
|
|
1122
1122
|
};
|
|
1123
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1124
|
+
console.log(this.coverColorStyle);
|
|
1123
1125
|
}
|
|
1124
1126
|
}
|
|
1125
1127
|
initTrail() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.2 by Matteo Bruni */
|
|
2
2
|
!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t=n();for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}(window,(function(){return function(){"use strict";var e={d:function(n,t){for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{loadLifeUpdater:function(){return l}});class t{}t.generatedAttribute="generated",t.randomColorValue="random",t.midColorValue="mid",t.touchEndEvent="touchend",t.mouseDownEvent="mousedown",t.mouseUpEvent="mouseup",t.mouseMoveEvent="mousemove",t.touchStartEvent="touchstart",t.touchMoveEvent="touchmove",t.mouseLeaveEvent="mouseleave",t.mouseOutEvent="mouseout",t.touchCancelEvent="touchcancel",t.resizeEvent="resize",t.visibilityChangeEvent="visibilitychange",t.noPolygonDataLoaded="No polygon data loaded.",t.noPolygonFound="No polygon found, you need to specify SVG url in config.";new WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;function o(e){const n=r(e);let t=a(e);return n===t&&(t=0),Math.random()*(n-t)+t}function i(e){return"number"==typeof e?e:o(e)}function a(e){return"number"==typeof e?e:e.min}function r(e){return"number"==typeof e?e:e.max}function u(e,n){if(e===n||void 0===n&&"number"==typeof e)return e;const t=a(e),o=r(e);return void 0!==n?{min:Math.min(t,n),max:Math.max(o,n)}:u(t,o)}new WeakMap;class d{constructor(e){this.container=e}init(){}isEnabled(e){return!e.destroyed}update(e,n){if(!this.isEnabled(e))return;const t=e.life;let a=!1;if(e.spawning){if(t.delayTime+=n.value,!(t.delayTime>=e.life.delay))return;a=!0,e.spawning=!1,t.delayTime=0,t.time=0}if(-1===t.duration)return;if(e.spawning)return;if(a?t.time=0:t.time+=n.value,t.time<t.duration)return;if(t.time=0,e.life.count>0&&e.life.count--,0===e.life.count)return void e.destroy();const r=this.container.canvas.size,d=u(0,r.width),l=u(0,r.width);e.position.x=o(d),e.position.y=o(l),e.spawning=!0,t.delayTime=0,t.time=0,e.reset();const c=e.options.life;t.delay=1e3*i(c.delay.value),t.duration=1e3*i(c.duration.value)}}async function l(e){await e.addParticleUpdater("life",(e=>new d(e)))}return n}()}));
|
|
@@ -941,9 +941,9 @@
|
|
|
941
941
|
paint() {
|
|
942
942
|
const options = this.container.actualOptions;
|
|
943
943
|
this.draw((ctx => {
|
|
944
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
944
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
945
945
|
clear(ctx, this.size);
|
|
946
|
-
this.paintBase(
|
|
946
|
+
this.paintBase(this.coverColorStyle);
|
|
947
947
|
} else {
|
|
948
948
|
this.paintBase();
|
|
949
949
|
}
|
|
@@ -1114,12 +1114,14 @@
|
|
|
1114
1114
|
const color = cover.color;
|
|
1115
1115
|
const coverRgb = colorToRgb(color);
|
|
1116
1116
|
if (coverRgb) {
|
|
1117
|
-
|
|
1117
|
+
const coverColor = {
|
|
1118
1118
|
r: coverRgb.r,
|
|
1119
1119
|
g: coverRgb.g,
|
|
1120
1120
|
b: coverRgb.b,
|
|
1121
1121
|
a: cover.opacity
|
|
1122
1122
|
};
|
|
1123
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1124
|
+
console.log(this.coverColorStyle);
|
|
1123
1125
|
}
|
|
1124
1126
|
}
|
|
1125
1127
|
initTrail() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.2 by Matteo Bruni */
|
|
2
2
|
!function(o,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e=t();for(var a in e)("object"==typeof exports?exports:o)[a]=e[a]}}(window,(function(){return function(){"use strict";var o={d:function(t,e){for(var a in e)o.o(e,a)&&!o.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},o:function(o,t){return Object.prototype.hasOwnProperty.call(o,t)},r:function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};o.r(t),o.d(t,{loadOpacityUpdater:function(){return s}});class e{}e.generatedAttribute="generated",e.randomColorValue="random",e.midColorValue="mid",e.touchEndEvent="touchend",e.mouseDownEvent="mousedown",e.mouseUpEvent="mouseup",e.mouseMoveEvent="mousemove",e.touchStartEvent="touchstart",e.touchMoveEvent="touchmove",e.mouseLeaveEvent="mouseleave",e.mouseOutEvent="mouseout",e.touchCancelEvent="touchcancel",e.resizeEvent="resize",e.visibilityChangeEvent="visibilitychange",e.noPolygonDataLoaded="No polygon data loaded.",e.noPolygonFound="No polygon found, you need to specify SVG url in config.";new WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;function a(o){const t=c(o);let e=i(o);return t===e&&(e=0),Math.random()*(t-e)+e}function n(o){return"number"==typeof o?o:a(o)}function i(o){return"number"==typeof o?o:o.min}function c(o){return"number"==typeof o?o:o.max}function p(o,t){var e,a,n,i,c;if(!o.opacity)return;const p=o.opacity.min,u=o.opacity.max;if(!(o.destroyed||!o.opacity.enable||(null!==(e=o.opacity.maxLoops)&&void 0!==e?e:0)>0&&(null!==(a=o.opacity.loops)&&void 0!==a?a:0)>(null!==(n=o.opacity.maxLoops)&&void 0!==n?n:0))){switch(o.opacity.status){case 0:o.opacity.value>=u?(o.opacity.status=1,o.opacity.loops||(o.opacity.loops=0),o.opacity.loops++):o.opacity.value+=(null!==(i=o.opacity.velocity)&&void 0!==i?i:0)*t.factor;break;case 1:o.opacity.value<=p?(o.opacity.status=0,o.opacity.loops||(o.opacity.loops=0),o.opacity.loops++):o.opacity.value-=(null!==(c=o.opacity.velocity)&&void 0!==c?c:0)*t.factor}var s,r,l;!function(o,t,e,a){switch(o.options.opacity.animation.destroy){case"max":t>=a&&o.destroy();break;case"min":t<=e&&o.destroy()}}(o,o.opacity.value,p,u),o.destroyed||(o.opacity.value=(s=o.opacity.value,r=p,l=u,Math.min(Math.max(s,r),l)))}}new WeakMap;class u{constructor(o){this.container=o}init(o){const t=o.options.opacity;o.opacity={enable:t.animation.enable,max:c(t.value),min:i(t.value),value:n(t.value),loops:0,maxLoops:n(t.animation.count)};const e=t.animation;if(e.enable){o.opacity.status=0;const p=t.value;switch(o.opacity.min=i(p),o.opacity.max=c(p),e.startValue){case"min":o.opacity.value=o.opacity.min,o.opacity.status=0;break;case"random":o.opacity.value=a(o.opacity),o.opacity.status=Math.random()>=.5?0:1;break;case"max":default:o.opacity.value=o.opacity.max,o.opacity.status=1}o.opacity.velocity=n(e.speed)/100*this.container.retina.reduceFactor,e.sync||(o.opacity.velocity*=Math.random())}}isEnabled(o){var t,e,a,n;return!o.destroyed&&!o.spawning&&!!o.opacity&&o.opacity.enable&&((null!==(t=o.opacity.maxLoops)&&void 0!==t?t:0)<=0||(null!==(e=o.opacity.maxLoops)&&void 0!==e?e:0)>0&&(null!==(a=o.opacity.loops)&&void 0!==a?a:0)<(null!==(n=o.opacity.maxLoops)&&void 0!==n?n:0))}update(o,t){this.isEnabled(o)&&p(o,t)}}async function s(o){await o.addParticleUpdater("opacity",(o=>new u(o)))}return t}()}));
|
|
@@ -941,9 +941,9 @@
|
|
|
941
941
|
paint() {
|
|
942
942
|
const options = this.container.actualOptions;
|
|
943
943
|
this.draw((ctx => {
|
|
944
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
944
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
945
945
|
clear(ctx, this.size);
|
|
946
|
-
this.paintBase(
|
|
946
|
+
this.paintBase(this.coverColorStyle);
|
|
947
947
|
} else {
|
|
948
948
|
this.paintBase();
|
|
949
949
|
}
|
|
@@ -1114,12 +1114,14 @@
|
|
|
1114
1114
|
const color = cover.color;
|
|
1115
1115
|
const coverRgb = colorToRgb(color);
|
|
1116
1116
|
if (coverRgb) {
|
|
1117
|
-
|
|
1117
|
+
const coverColor = {
|
|
1118
1118
|
r: coverRgb.r,
|
|
1119
1119
|
g: coverRgb.g,
|
|
1120
1120
|
b: coverRgb.b,
|
|
1121
1121
|
a: cover.opacity
|
|
1122
1122
|
};
|
|
1123
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1124
|
+
console.log(this.coverColorStyle);
|
|
1123
1125
|
}
|
|
1124
1126
|
}
|
|
1125
1127
|
initTrail() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.2 by Matteo Bruni */
|
|
2
2
|
!function(t,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var e=o();for(var i in e)("object"==typeof exports?exports:t)[i]=e[i]}}(window,(function(){return function(){"use strict";var t={d:function(o,e){for(var i in e)t.o(e,i)&&!t.o(o,i)&&Object.defineProperty(o,i,{enumerable:!0,get:e[i]})},o:function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};t.r(o),t.d(o,{loadOutModesUpdater:function(){return c}});class e{}e.generatedAttribute="generated",e.randomColorValue="random",e.midColorValue="mid",e.touchEndEvent="touchend",e.mouseDownEvent="mousedown",e.mouseUpEvent="mouseup",e.mouseMoveEvent="mousemove",e.touchStartEvent="touchstart",e.touchMoveEvent="touchmove",e.mouseLeaveEvent="mouseleave",e.mouseOutEvent="mouseout",e.touchCancelEvent="touchcancel",e.resizeEvent="resize",e.visibilityChangeEvent="visibilitychange",e.noPolygonDataLoaded="No polygon data loaded.",e.noPolygonFound="No polygon found, you need to specify SVG url in config.";new WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;function i(t){return"number"==typeof t?t:function(t){const o=s(t);let e=n(t);return o===e&&(e=0),Math.random()*(o-e)+e}(t)}function n(t){return"number"==typeof t?t:t.min}function s(t){return"number"==typeof t?t:t.max}function a(t,o,e,i){return function(t,o,e){let i=!0;e&&"bottom"!==e||(i=t.top<o.height);!i||e&&"left"!==e||(i=t.right>0);!i||e&&"right"!==e||(i=t.left<o.width);!i||e&&"top"!==e||(i=t.bottom>0);return i}(r(t,null!=e?e:0),o,i)}function r(t,o){return{bottom:t.y+o,left:t.x-o,right:t.x+o,top:t.y-o}}new WeakMap;class u{constructor(t){this.container=t}init(){}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,o){var e,i,n,s;const a=t.options.move.outModes;this.updateOutMode(t,o,null!==(e=a.bottom)&&void 0!==e?e:a.default,"bottom"),this.updateOutMode(t,o,null!==(i=a.left)&&void 0!==i?i:a.default,"left"),this.updateOutMode(t,o,null!==(n=a.right)&&void 0!==n?n:a.default,"right"),this.updateOutMode(t,o,null!==(s=a.top)&&void 0!==s?s:a.default,"top")}updateOutMode(t,o,e,i){switch(e){case"bounce":case"bounce-vertical":case"bounce-horizontal":case"bounceVertical":case"bounceHorizontal":case"split":this.bounce(t,o,i,e);break;case"destroy":this.destroy(t,i);break;case"out":this.out(t,i);break;case"none":default:this.none(t,i)}}destroy(t,o){const e=this.container;a(t.position,e.canvas.size,t.getRadius(),o)||e.particles.remove(t,void 0,!0)}out(t,o){const e=this.container;if(a(t.position,e.canvas.size,t.getRadius(),o))return;const i=t.options.move.warp,n=e.canvas.size,s={bottom:n.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:n.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},u=t.getRadius(),c=r(t.position,u);"right"===o&&c.left>n.width+t.offset.x?(t.position.x=s.left,t.initialPosition.x=t.position.x,i||(t.position.y=Math.random()*n.height,t.initialPosition.y=t.position.y)):"left"===o&&c.right<-t.offset.x&&(t.position.x=s.right,t.initialPosition.x=t.position.x,i||(t.position.y=Math.random()*n.height,t.initialPosition.y=t.position.y)),"bottom"===o&&c.top>n.height+t.offset.y?(i||(t.position.x=Math.random()*n.width,t.initialPosition.x=t.position.x),t.position.y=s.top,t.initialPosition.y=t.position.y):"top"===o&&c.bottom<-t.offset.y&&(i||(t.position.x=Math.random()*n.width,t.initialPosition.x=t.position.x),t.position.y=s.bottom,t.initialPosition.y=t.position.y)}bounce(t,o,e,n){const s=this.container;let a=!1;for(const[,i]of s.plugins)if(void 0!==i.particleBounce&&(a=i.particleBounce(t,o,e)),a)break;if(a)return;const u=t.getPosition(),c=t.offset,d=t.getRadius(),l=r(u,d),p=s.canvas.size;!function(t){if("bounce"!==t.outMode&&"bounce-horizontal"!==t.outMode&&"bounceHorizontal"!==t.outMode&&"split"!==t.outMode)return;const o=t.particle.velocity.x;let e=!1;if("right"===t.direction&&t.bounds.right>=t.canvasSize.width&&o>0||"left"===t.direction&&t.bounds.left<=0&&o<0){const o=i(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-o,e=!0}if(!e)return;const n=t.offset.x+t.size;t.bounds.right>=t.canvasSize.width?t.particle.position.x=t.canvasSize.width-n:t.bounds.left<=0&&(t.particle.position.x=n),"split"===t.outMode&&t.particle.destroy()}({particle:t,outMode:n,direction:e,bounds:l,canvasSize:p,offset:c,size:d}),function(t){if("bounce"===t.outMode||"bounce-vertical"===t.outMode||"bounceVertical"===t.outMode||"split"===t.outMode){const o=t.particle.velocity.y;let e=!1;if("bottom"===t.direction&&t.bounds.bottom>=t.canvasSize.height&&o>0||"top"===t.direction&&t.bounds.top<=0&&o<0){const o=i(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-o,e=!0}if(!e)return;const n=t.offset.y+t.size;t.bounds.bottom>=t.canvasSize.height?t.particle.position.y=t.canvasSize.height-n:t.bounds.top<=0&&(t.particle.position.y=n),"split"===t.outMode&&t.particle.destroy()}}({particle:t,outMode:n,direction:e,bounds:l,canvasSize:p,offset:c,size:d})}none(t,o){if(t.options.move.distance.horizontal&&("left"===o||"right"===o)||t.options.move.distance.vertical&&("top"===o||"bottom"===o))return;const e=t.options.move.gravity,i=this.container,n=i.canvas.size,s=t.getRadius();if(e.enable){const a=t.position;(!e.inverse&&a.y>n.height+s&&"bottom"===o||e.inverse&&a.y<-s&&"top"===o)&&i.particles.remove(t)}else{if(t.velocity.y>0&&t.position.y<=n.height+s||t.velocity.y<0&&t.position.y>=-s||t.velocity.x>0&&t.position.x<=n.width+s||t.velocity.x<0&&t.position.x>=-s)return;a(t.position,i.canvas.size,s,o)||i.particles.remove(t)}}}async function c(t){await t.addParticleUpdater("outModes",(t=>new u(t)))}return o}()}));
|
|
@@ -941,9 +941,9 @@
|
|
|
941
941
|
paint() {
|
|
942
942
|
const options = this.container.actualOptions;
|
|
943
943
|
this.draw((ctx => {
|
|
944
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
944
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
945
945
|
clear(ctx, this.size);
|
|
946
|
-
this.paintBase(
|
|
946
|
+
this.paintBase(this.coverColorStyle);
|
|
947
947
|
} else {
|
|
948
948
|
this.paintBase();
|
|
949
949
|
}
|
|
@@ -1114,12 +1114,14 @@
|
|
|
1114
1114
|
const color = cover.color;
|
|
1115
1115
|
const coverRgb = colorToRgb(color);
|
|
1116
1116
|
if (coverRgb) {
|
|
1117
|
-
|
|
1117
|
+
const coverColor = {
|
|
1118
1118
|
r: coverRgb.r,
|
|
1119
1119
|
g: coverRgb.g,
|
|
1120
1120
|
b: coverRgb.b,
|
|
1121
1121
|
a: cover.opacity
|
|
1122
1122
|
};
|
|
1123
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1124
|
+
console.log(this.coverColorStyle);
|
|
1123
1125
|
}
|
|
1124
1126
|
}
|
|
1125
1127
|
initTrail() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.2 by Matteo Bruni */
|
|
2
2
|
!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t=n();for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}(window,(function(){return function(){"use strict";var e={d:function(n,t){for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{loadRollUpdater:function(){return b}});class t{}t.generatedAttribute="generated",t.randomColorValue="random",t.midColorValue="mid",t.touchEndEvent="touchend",t.mouseDownEvent="mousedown",t.mouseUpEvent="mouseup",t.mouseMoveEvent="mousemove",t.touchStartEvent="touchstart",t.touchMoveEvent="touchmove",t.mouseLeaveEvent="mouseleave",t.mouseOutEvent="mouseout",t.touchCancelEvent="touchcancel",t.resizeEvent="resize",t.visibilityChangeEvent="visibilitychange",t.noPolygonDataLoaded="No polygon data loaded.",t.noPolygonFound="No polygon found, you need to specify SVG url in config.";new WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;function o(e){const n=l(e);let t=a(e);return n===t&&(t=0),Math.random()*(n-t)+t}function r(e){return"number"==typeof e?e:o(e)}function a(e){return"number"==typeof e?e:e.min}function l(e){return"number"==typeof e?e:e.max}function s(e,n){if(e===n||void 0===n&&"number"==typeof e)return e;const t=a(e),o=l(e);return void 0!==n?{min:Math.min(t,n),max:Math.max(o,n)}:s(t,o)}function i(e,n,t=!0){return e[void 0!==n&&t?n%e.length:function(e){return Math.floor(Math.random()*e.length)}(e)]}function u(e,n,t){let o=t;return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+6*(n-e)*o:o<.5?n:o<2/3?e+(n-e)*(2/3-o)*6:e}function d(e){if(e.startsWith("rgb")){const n=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.]+)\s*)?\)/i.exec(e);return n?{a:n.length>4?parseFloat(n[5]):1,b:parseInt(n[3],10),g:parseInt(n[2],10),r:parseInt(n[1],10)}:void 0}if(e.startsWith("hsl")){const n=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(e);return n?function(e){const n=v(e);return{a:e.a,b:n.b,g:n.g,r:n.r}}({a:n.length>4?parseFloat(n[5]):1,h:parseInt(n[1],10),l:parseInt(n[3],10),s:parseInt(n[2],10)}):void 0}if(e.startsWith("hsv")){const n=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(e);return n?function(e){const n=h(e);return{a:e.a,b:n.b,g:n.g,r:n.r}}({a:n.length>4?parseFloat(n[5]):1,h:parseInt(n[1],10),s:parseInt(n[2],10),v:parseInt(n[3],10)}):void 0}{const n=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,t=e.replace(n,((e,n,t,o,r)=>n+n+t+t+o+o+(void 0!==r?r+r:""))),o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(t);return o?{a:void 0!==o[4]?parseInt(o[4],16)/255:1,b:parseInt(o[3],16),g:parseInt(o[2],16),r:parseInt(o[1],16)}:void 0}}function c(e,n,o=!0){var r,a,l;if(void 0===e)return;const s="string"==typeof e?{value:e}:e;let u;if("string"==typeof s.value)u=s.value===t.randomColorValue?p():function(e){return d(e)}(s.value);else if(s.value instanceof Array){u=c({value:i(s.value,n,o)})}else{const e=s.value,n=null!==(r=e.rgb)&&void 0!==r?r:s.value;if(void 0!==n.r)u=n;else{const n=null!==(a=e.hsl)&&void 0!==a?a:s.value;if(void 0!==n.h&&void 0!==n.l)u=v(n);else{const n=null!==(l=e.hsv)&&void 0!==l?l:s.value;void 0!==n.h&&void 0!==n.v&&(u=h(n))}}}return u}function f(e,n,t=!0){const o=c(e,n,t);return void 0!==o?function(e){const n=e.r/255,t=e.g/255,o=e.b/255,r=Math.max(n,t,o),a=Math.min(n,t,o),l={h:0,l:(r+a)/2,s:0};r!=a&&(l.s=l.l<.5?(r-a)/(r+a):(r-a)/(2-r-a),l.h=n===r?(t-o)/(r-a):l.h=t===r?2+(o-n)/(r-a):4+(n-t)/(r-a));l.l*=100,l.s*=100,l.h*=60,l.h<0&&(l.h+=360);return l}(o):void 0}function v(e){const n={b:0,g:0,r:0},t={h:e.h/360,l:e.l/100,s:e.s/100};if(0===t.s)n.b=t.l,n.g=t.l,n.r=t.l;else{const e=t.l<.5?t.l*(1+t.s):t.l+t.s-t.l*t.s,o=2*t.l-e;n.r=u(o,e,t.h+1/3),n.g=u(o,e,t.h),n.b=u(o,e,t.h-1/3)}return n.r=Math.floor(255*n.r),n.g=Math.floor(255*n.g),n.b=Math.floor(255*n.b),n}function h(e){const n={b:0,g:0,r:0},t=e.h/60,o=e.s/100,r=e.v/100,a=r*o,l=a*(1-Math.abs(t%2-1));let s;if(t>=0&&t<=1?s={r:a,g:l,b:0}:t>1&&t<=2?s={r:l,g:a,b:0}:t>2&&t<=3?s={r:0,g:a,b:l}:t>3&&t<=4?s={r:0,g:l,b:a}:t>4&&t<=5?s={r:l,g:0,b:a}:t>5&&t<=6&&(s={r:a,g:0,b:l}),s){const e=r-a;n.r=Math.floor(255*(s.r+e)),n.g=Math.floor(255*(s.g+e)),n.b=Math.floor(255*(s.b+e))}return n}function p(e){const n=null!=e?e:0;return{b:Math.floor(o(s(n,256))),g:Math.floor(o(s(n,256))),r:Math.floor(o(s(n,256)))}}new WeakMap;class g{init(e){const n=e.options.roll;if(n.enable)if(e.roll={angle:Math.random()*Math.PI*2,speed:r(n.speed)/360},n.backColor)e.backColor=f(n.backColor);else if(n.darken.enable&&n.enlighten.enable){const t=Math.random()>=.5?"darken":"enlighten";e.roll.alter={type:t,value:r("darken"===t?n.darken.value:n.enlighten.value)}}else n.darken.enable?e.roll.alter={type:"darken",value:r(n.darken.value)}:n.enlighten.enable&&(e.roll.alter={type:"enlighten",value:r(n.enlighten.value)});else e.roll={angle:0,speed:0}}isEnabled(e){const n=e.options.roll;return!e.destroyed&&!e.spawning&&n.enable}update(e,n){this.isEnabled(e)&&function(e,n){const t=e.options.roll;if(!e.roll||!t.enable)return;const o=e.roll.speed*n.factor,r=2*Math.PI;e.roll.angle+=o,e.roll.angle>r&&(e.roll.angle-=r)}(e,n)}}async function b(e){await e.addParticleUpdater("roll",(()=>new g))}return n}()}));
|
|
@@ -941,9 +941,9 @@
|
|
|
941
941
|
paint() {
|
|
942
942
|
const options = this.container.actualOptions;
|
|
943
943
|
this.draw((ctx => {
|
|
944
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
944
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
945
945
|
clear(ctx, this.size);
|
|
946
|
-
this.paintBase(
|
|
946
|
+
this.paintBase(this.coverColorStyle);
|
|
947
947
|
} else {
|
|
948
948
|
this.paintBase();
|
|
949
949
|
}
|
|
@@ -1114,12 +1114,14 @@
|
|
|
1114
1114
|
const color = cover.color;
|
|
1115
1115
|
const coverRgb = colorToRgb(color);
|
|
1116
1116
|
if (coverRgb) {
|
|
1117
|
-
|
|
1117
|
+
const coverColor = {
|
|
1118
1118
|
r: coverRgb.r,
|
|
1119
1119
|
g: coverRgb.g,
|
|
1120
1120
|
b: coverRgb.b,
|
|
1121
1121
|
a: cover.opacity
|
|
1122
1122
|
};
|
|
1123
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1124
|
+
console.log(this.coverColorStyle);
|
|
1123
1125
|
}
|
|
1124
1126
|
}
|
|
1125
1127
|
initTrail() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.2 by Matteo Bruni */
|
|
2
2
|
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var t=o();for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}(window,(function(){return function(){"use strict";var e={d:function(o,t){for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})},o:function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{loadSizeUpdater:function(){return s}});class t{}t.generatedAttribute="generated",t.randomColorValue="random",t.midColorValue="mid",t.touchEndEvent="touchend",t.mouseDownEvent="mousedown",t.mouseUpEvent="mouseup",t.mouseMoveEvent="mousemove",t.touchStartEvent="touchstart",t.touchMoveEvent="touchmove",t.mouseLeaveEvent="mouseleave",t.mouseOutEvent="mouseout",t.touchCancelEvent="touchcancel",t.resizeEvent="resize",t.visibilityChangeEvent="visibilitychange",t.noPolygonDataLoaded="No polygon data loaded.",t.noPolygonFound="No polygon found, you need to specify SVG url in config.";new WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;function n(e,o){var t,n,i,s;const a=(null!==(t=e.size.velocity)&&void 0!==t?t:0)*o.factor,u=e.size.min,l=e.size.max;if(!(e.destroyed||!e.size.enable||(null!==(n=e.size.maxLoops)&&void 0!==n?n:0)>0&&(null!==(i=e.size.loops)&&void 0!==i?i:0)>(null!==(s=e.size.maxLoops)&&void 0!==s?s:0))){switch(e.size.status){case 0:e.size.value>=l?(e.size.status=1,e.size.loops||(e.size.loops=0),e.size.loops++):e.size.value+=a;break;case 1:e.size.value<=u?(e.size.status=0,e.size.loops||(e.size.loops=0),e.size.loops++):e.size.value-=a}var r,d,c;!function(e,o,t,n){switch(e.options.size.animation.destroy){case"max":o>=n&&e.destroy();break;case"min":o<=t&&e.destroy()}}(e,e.size.value,u,l),e.destroyed||(e.size.value=(r=e.size.value,d=u,c=l,Math.min(Math.max(r,d),c)))}}new WeakMap;class i{init(){}isEnabled(e){var o,t,n,i;return!e.destroyed&&!e.spawning&&e.size.enable&&((null!==(o=e.size.maxLoops)&&void 0!==o?o:0)<=0||(null!==(t=e.size.maxLoops)&&void 0!==t?t:0)>0&&(null!==(n=e.size.loops)&&void 0!==n?n:0)<(null!==(i=e.size.maxLoops)&&void 0!==i?i:0))}update(e,o){this.isEnabled(e)&&n(e,o)}}async function s(e){await e.addParticleUpdater("size",(()=>new i))}return o}()}));
|
|
@@ -941,9 +941,9 @@
|
|
|
941
941
|
paint() {
|
|
942
942
|
const options = this.container.actualOptions;
|
|
943
943
|
this.draw((ctx => {
|
|
944
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
944
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
945
945
|
clear(ctx, this.size);
|
|
946
|
-
this.paintBase(
|
|
946
|
+
this.paintBase(this.coverColorStyle);
|
|
947
947
|
} else {
|
|
948
948
|
this.paintBase();
|
|
949
949
|
}
|
|
@@ -1114,12 +1114,14 @@
|
|
|
1114
1114
|
const color = cover.color;
|
|
1115
1115
|
const coverRgb = colorToRgb(color);
|
|
1116
1116
|
if (coverRgb) {
|
|
1117
|
-
|
|
1117
|
+
const coverColor = {
|
|
1118
1118
|
r: coverRgb.r,
|
|
1119
1119
|
g: coverRgb.g,
|
|
1120
1120
|
b: coverRgb.b,
|
|
1121
1121
|
a: cover.opacity
|
|
1122
1122
|
};
|
|
1123
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1124
|
+
console.log(this.coverColorStyle);
|
|
1123
1125
|
}
|
|
1124
1126
|
}
|
|
1125
1127
|
initTrail() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.2 by Matteo Bruni */
|
|
2
2
|
!function(o,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t=e();for(var n in t)("object"==typeof exports?exports:o)[n]=t[n]}}(window,(function(){return function(){"use strict";var o={d:function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},r:function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},e={};o.r(e),o.d(e,{loadStrokeColorUpdater:function(){return y}});class t{}t.generatedAttribute="generated",t.randomColorValue="random",t.midColorValue="mid",t.touchEndEvent="touchend",t.mouseDownEvent="mousedown",t.mouseUpEvent="mouseup",t.mouseMoveEvent="mousemove",t.touchStartEvent="touchstart",t.touchMoveEvent="touchmove",t.mouseLeaveEvent="mouseleave",t.mouseOutEvent="mouseout",t.touchCancelEvent="touchcancel",t.resizeEvent="resize",t.visibilityChangeEvent="visibilitychange",t.noPolygonDataLoaded="No polygon data loaded.",t.noPolygonFound="No polygon found, you need to specify SVG url in config.";new WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;function n(o){const e=l(o);let t=a(o);return e===t&&(t=0),Math.random()*(e-t)+t}function r(o){return"number"==typeof o?o:n(o)}function a(o){return"number"==typeof o?o:o.min}function l(o){return"number"==typeof o?o:o.max}function s(o,e){if(o===e||void 0===e&&"number"==typeof o)return o;const t=a(o),n=l(o);return void 0!==e?{min:Math.min(t,e),max:Math.max(n,e)}:s(t,n)}function i(o,e,t=!0){return o[void 0!==e&&t?e%o.length:function(o){return Math.floor(Math.random()*o.length)}(o)]}function u(o,e,t){let n=t;return n<0&&(n+=1),n>1&&(n-=1),n<1/6?o+6*(e-o)*n:n<.5?e:n<2/3?o+(e-o)*(2/3-n)*6:o}function d(o){if(o.startsWith("rgb")){const e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.]+)\s*)?\)/i.exec(o);return e?{a:e.length>4?parseFloat(e[5]):1,b:parseInt(e[3],10),g:parseInt(e[2],10),r:parseInt(e[1],10)}:void 0}if(o.startsWith("hsl")){const e=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(o);return e?function(o){const e=f(o);return{a:o.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?parseFloat(e[5]):1,h:parseInt(e[1],10),l:parseInt(e[3],10),s:parseInt(e[2],10)}):void 0}if(o.startsWith("hsv")){const e=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(o);return e?function(o){const e=h(o);return{a:o.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?parseFloat(e[5]):1,h:parseInt(e[1],10),s:parseInt(e[2],10),v:parseInt(e[3],10)}):void 0}{const e=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,t=o.replace(e,((o,e,t,n,r)=>e+e+t+t+n+n+(void 0!==r?r+r:""))),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(t);return n?{a:void 0!==n[4]?parseInt(n[4],16)/255:1,b:parseInt(n[3],16),g:parseInt(n[2],16),r:parseInt(n[1],16)}:void 0}}function v(o,e,n=!0){var r,a,l;if(void 0===o)return;const s="string"==typeof o?{value:o}:o;let u;if("string"==typeof s.value)u=s.value===t.randomColorValue?p():function(o){return d(o)}(s.value);else if(s.value instanceof Array){u=v({value:i(s.value,e,n)})}else{const o=s.value,e=null!==(r=o.rgb)&&void 0!==r?r:s.value;if(void 0!==e.r)u=e;else{const e=null!==(a=o.hsl)&&void 0!==a?a:s.value;if(void 0!==e.h&&void 0!==e.l)u=f(e);else{const e=null!==(l=o.hsv)&&void 0!==l?l:s.value;void 0!==e.h&&void 0!==e.v&&(u=h(e))}}}return u}function c(o,e,t=!0){const n=v(o,e,t);return void 0!==n?function(o){const e=o.r/255,t=o.g/255,n=o.b/255,r=Math.max(e,t,n),a=Math.min(e,t,n),l={h:0,l:(r+a)/2,s:0};r!=a&&(l.s=l.l<.5?(r-a)/(r+a):(r-a)/(2-r-a),l.h=e===r?(t-n)/(r-a):l.h=t===r?2+(n-e)/(r-a):4+(e-t)/(r-a));l.l*=100,l.s*=100,l.h*=60,l.h<0&&(l.h+=360);return l}(n):void 0}function f(o){const e={b:0,g:0,r:0},t={h:o.h/360,l:o.l/100,s:o.s/100};if(0===t.s)e.b=t.l,e.g=t.l,e.r=t.l;else{const o=t.l<.5?t.l*(1+t.s):t.l+t.s-t.l*t.s,n=2*t.l-o;e.r=u(n,o,t.h+1/3),e.g=u(n,o,t.h),e.b=u(n,o,t.h-1/3)}return e.r=Math.floor(255*e.r),e.g=Math.floor(255*e.g),e.b=Math.floor(255*e.b),e}function h(o){const e={b:0,g:0,r:0},t=o.h/60,n=o.s/100,r=o.v/100,a=r*n,l=a*(1-Math.abs(t%2-1));let s;if(t>=0&&t<=1?s={r:a,g:l,b:0}:t>1&&t<=2?s={r:l,g:a,b:0}:t>2&&t<=3?s={r:0,g:a,b:l}:t>3&&t<=4?s={r:0,g:l,b:a}:t>4&&t<=5?s={r:l,g:0,b:a}:t>5&&t<=6&&(s={r:a,g:0,b:l}),s){const o=r-a;e.r=Math.floor(255*(s.r+o)),e.g=Math.floor(255*(s.g+o)),e.b=Math.floor(255*(s.b+o))}return e}function p(o){const e=null!=o?o:0;return{b:Math.floor(n(s(e,256))),g:Math.floor(n(s(e,256))),r:Math.floor(n(s(e,256)))}}function b(o,e,t){if(o.enable=e.enable,o.enable){if(o.velocity=r(e.speed)/100*t,e.sync)return;o.status=0,o.velocity*=Math.random(),o.value&&(o.value*=Math.random())}else o.velocity=0}function g(o,e,t,r,a){var l;const s=e;if(!s||!s.enable)return;const i=n(t.offset),u=(null!==(l=e.velocity)&&void 0!==l?l:0)*o.factor+3.6*i;a&&0!==s.status?(s.value-=u,s.value<0&&(s.status=0,s.value+=s.value)):(s.value+=u,a&&s.value>r&&(s.status=1,s.value-=s.value%r)),s.value>r&&(s.value%=r)}new WeakMap;class m{constructor(o){this.container=o}init(o){var e,t;const n=this.container;o.stroke=o.options.stroke instanceof Array?i(o.options.stroke,o.id,o.options.reduceDuplicates):o.options.stroke,o.strokeWidth=o.stroke.width*n.retina.pixelRatio;const r=null!==(e=c(o.stroke.color))&&void 0!==e?e:o.getFillColor();r&&(o.strokeColor=function(o,e,t){const n={h:{enable:!1,value:o.h},s:{enable:!1,value:o.s},l:{enable:!1,value:o.l}};return e&&(b(n.h,e.h,t),b(n.s,e.s,t),b(n.l,e.l,t)),n}(r,null===(t=o.stroke.color)||void 0===t?void 0:t.animation,n.retina.reduceFactor))}isEnabled(o){var e,t,n,r;const a=null===(e=o.stroke)||void 0===e?void 0:e.color;return!o.destroyed&&!o.spawning&&!!a&&(void 0!==(null===(t=o.strokeColor)||void 0===t?void 0:t.h.value)&&a.animation.h.enable||void 0!==(null===(n=o.strokeColor)||void 0===n?void 0:n.s.value)&&a.animation.s.enable||void 0!==(null===(r=o.strokeColor)||void 0===r?void 0:r.l.value)&&a.animation.l.enable)}update(o,e){this.isEnabled(o)&&function(o,e){var t,n,r,a,l,s,i,u,d,v;if(!(null===(t=o.stroke)||void 0===t?void 0:t.color))return;const c=o.stroke.color.animation,f=null!==(r=null===(n=o.strokeColor)||void 0===n?void 0:n.h)&&void 0!==r?r:null===(a=o.color)||void 0===a?void 0:a.h;f&&g(e,f,c.h,360,!1);const h=null!==(s=null===(l=o.strokeColor)||void 0===l?void 0:l.s)&&void 0!==s?s:null===(i=o.color)||void 0===i?void 0:i.s;h&&g(e,h,c.s,100,!0);const p=null!==(d=null===(u=o.strokeColor)||void 0===u?void 0:u.l)&&void 0!==d?d:null===(v=o.color)||void 0===v?void 0:v.l;p&&g(e,p,c.l,100,!0)}(o,e)}}async function y(o){await o.addParticleUpdater("strokeColor",(o=>new m(o)))}return e}()}));
|
|
@@ -941,9 +941,9 @@
|
|
|
941
941
|
paint() {
|
|
942
942
|
const options = this.container.actualOptions;
|
|
943
943
|
this.draw((ctx => {
|
|
944
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
944
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
945
945
|
clear(ctx, this.size);
|
|
946
|
-
this.paintBase(
|
|
946
|
+
this.paintBase(this.coverColorStyle);
|
|
947
947
|
} else {
|
|
948
948
|
this.paintBase();
|
|
949
949
|
}
|
|
@@ -1114,12 +1114,14 @@
|
|
|
1114
1114
|
const color = cover.color;
|
|
1115
1115
|
const coverRgb = colorToRgb(color);
|
|
1116
1116
|
if (coverRgb) {
|
|
1117
|
-
|
|
1117
|
+
const coverColor = {
|
|
1118
1118
|
r: coverRgb.r,
|
|
1119
1119
|
g: coverRgb.g,
|
|
1120
1120
|
b: coverRgb.b,
|
|
1121
1121
|
a: cover.opacity
|
|
1122
1122
|
};
|
|
1123
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1124
|
+
console.log(this.coverColorStyle);
|
|
1123
1125
|
}
|
|
1124
1126
|
}
|
|
1125
1127
|
initTrail() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.2 by Matteo Bruni */
|
|
2
2
|
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(window,(function(){return function(){"use strict";var e={d:function(t,o){for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{loadTiltUpdater:function(){return u}});class o{}o.generatedAttribute="generated",o.randomColorValue="random",o.midColorValue="mid",o.touchEndEvent="touchend",o.mouseDownEvent="mousedown",o.mouseUpEvent="mouseup",o.mouseMoveEvent="mousemove",o.touchStartEvent="touchstart",o.touchMoveEvent="touchmove",o.mouseLeaveEvent="mouseleave",o.mouseOutEvent="mouseout",o.touchCancelEvent="touchcancel",o.resizeEvent="resize",o.visibilityChangeEvent="visibilitychange",o.noPolygonDataLoaded="No polygon data loaded.",o.noPolygonFound="No polygon found, you need to specify SVG url in config.";new WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;function n(e){return"number"==typeof e?e:function(e){const t=i(e);let o=a(e);return t===o&&(o=0),Math.random()*(t-o)+o}(e)}function a(e){return"number"==typeof e?e:e.min}function i(e){return"number"==typeof e?e:e.max}new WeakMap;class r{constructor(e){this.container=e}init(e){const t=e.options.tilt;e.tilt={enable:t.enable,value:n(t.value)*Math.PI/180,sinDirection:Math.random()>=.5?1:-1,cosDirection:Math.random()>=.5?1:-1};let o=t.direction;if("random"===o){o=Math.floor(2*Math.random())>0?"counter-clockwise":"clockwise"}switch(o){case"counter-clockwise":case"counterClockwise":e.tilt.status=1;break;case"clockwise":e.tilt.status=0}const a=e.options.tilt.animation;a.enable&&(e.tilt.velocity=n(a.speed)/360*this.container.retina.reduceFactor,a.sync||(e.tilt.velocity*=Math.random()))}isEnabled(e){const t=e.options.tilt.animation;return!e.destroyed&&!e.spawning&&t.enable}update(e,t){this.isEnabled(e)&&function(e,t){var o;if(!e.tilt)return;const n=e.options.tilt.animation,a=(null!==(o=e.tilt.velocity)&&void 0!==o?o:0)*t.factor,i=2*Math.PI;if(n.enable)switch(e.tilt.status){case 0:e.tilt.value+=a,e.tilt.value>i&&(e.tilt.value-=i);break;case 1:default:e.tilt.value-=a,e.tilt.value<0&&(e.tilt.value+=i)}}(e,t)}}async function u(e){await e.addParticleUpdater("tilt",(e=>new r(e)))}return t}()}));
|
|
@@ -941,9 +941,9 @@
|
|
|
941
941
|
paint() {
|
|
942
942
|
const options = this.container.actualOptions;
|
|
943
943
|
this.draw((ctx => {
|
|
944
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
944
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
945
945
|
clear(ctx, this.size);
|
|
946
|
-
this.paintBase(
|
|
946
|
+
this.paintBase(this.coverColorStyle);
|
|
947
947
|
} else {
|
|
948
948
|
this.paintBase();
|
|
949
949
|
}
|
|
@@ -1114,12 +1114,14 @@
|
|
|
1114
1114
|
const color = cover.color;
|
|
1115
1115
|
const coverRgb = colorToRgb(color);
|
|
1116
1116
|
if (coverRgb) {
|
|
1117
|
-
|
|
1117
|
+
const coverColor = {
|
|
1118
1118
|
r: coverRgb.r,
|
|
1119
1119
|
g: coverRgb.g,
|
|
1120
1120
|
b: coverRgb.b,
|
|
1121
1121
|
a: cover.opacity
|
|
1122
1122
|
};
|
|
1123
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1124
|
+
console.log(this.coverColorStyle);
|
|
1123
1125
|
}
|
|
1124
1126
|
}
|
|
1125
1127
|
initTrail() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.2 by Matteo Bruni */
|
|
2
2
|
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var n=o();for(var t in n)("object"==typeof exports?exports:e)[t]=n[t]}}(window,(function(){return function(){"use strict";var e={d:function(o,n){for(var t in n)e.o(n,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:n[t]})},o:function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{loadWobbleUpdater:function(){return u}});class n{}n.generatedAttribute="generated",n.randomColorValue="random",n.midColorValue="mid",n.touchEndEvent="touchend",n.mouseDownEvent="mousedown",n.mouseUpEvent="mouseup",n.mouseMoveEvent="mousemove",n.touchStartEvent="touchstart",n.touchMoveEvent="touchmove",n.mouseLeaveEvent="mouseleave",n.mouseOutEvent="mouseout",n.touchCancelEvent="touchcancel",n.resizeEvent="resize",n.visibilityChangeEvent="visibilitychange",n.noPolygonDataLoaded="No polygon data loaded.",n.noPolygonFound="No polygon found, you need to specify SVG url in config.";new WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;function t(e){return"number"==typeof e?e:function(e){const o=i(e);let n=a(e);return o===n&&(n=0),Math.random()*(o-n)+n}(e)}function a(e){return"number"==typeof e?e:e.min}function i(e){return"number"==typeof e?e:e.max}new WeakMap;class r{constructor(e){this.container=e}init(e){const o=e.options.wobble;o.enable?e.wobble={angle:Math.random()*Math.PI*2,speed:t(o.speed)/360}:e.wobble={angle:0,speed:0},e.retina.wobbleDistance=t(o.distance)*this.container.retina.pixelRatio}isEnabled(e){return!e.destroyed&&!e.spawning&&e.options.wobble.enable}update(e,o){this.isEnabled(e)&&function(e,o){var n;if(!e.options.wobble.enable||!e.wobble)return;const t=e.wobble.speed*o.factor,a=(null!==(n=e.retina.wobbleDistance)&&void 0!==n?n:0)*o.factor/(1e3/60),i=2*Math.PI;e.wobble.angle+=t,e.wobble.angle>i&&(e.wobble.angle-=i),e.position.x+=a*Math.cos(e.wobble.angle),e.position.y+=a*Math.abs(Math.sin(e.wobble.angle))}(e,o)}}async function u(e){await e.addParticleUpdater("wobble",(e=>new r(e)))}return o}()}));
|
package/umd/Core/Canvas.d.ts
CHANGED
package/umd/Core/Canvas.js
CHANGED
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
paint() {
|
|
60
60
|
const options = this.container.actualOptions;
|
|
61
61
|
this.draw((ctx) => {
|
|
62
|
-
if (options.backgroundMask.enable && options.backgroundMask.cover
|
|
62
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
63
63
|
(0, Utils_1.clear)(ctx, this.size);
|
|
64
|
-
this.paintBase(
|
|
64
|
+
this.paintBase(this.coverColorStyle);
|
|
65
65
|
}
|
|
66
66
|
else {
|
|
67
67
|
this.paintBase();
|
|
@@ -238,12 +238,14 @@
|
|
|
238
238
|
const color = cover.color;
|
|
239
239
|
const coverRgb = (0, Utils_1.colorToRgb)(color);
|
|
240
240
|
if (coverRgb) {
|
|
241
|
-
|
|
241
|
+
const coverColor = {
|
|
242
242
|
r: coverRgb.r,
|
|
243
243
|
g: coverRgb.g,
|
|
244
244
|
b: coverRgb.b,
|
|
245
245
|
a: cover.opacity,
|
|
246
246
|
};
|
|
247
|
+
this.coverColorStyle = (0, Utils_1.getStyleFromRgb)(coverColor, coverColor.a);
|
|
248
|
+
console.log(this.coverColorStyle);
|
|
247
249
|
}
|
|
248
250
|
}
|
|
249
251
|
initTrail() {
|