tsparticles 1.42.0 → 1.42.3
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 +16 -7
- package/Core/Particles.js +2 -3
- package/Plugins/Emitters/Options/Classes/Emitter.js +2 -2
- package/browser/Core/Canvas.d.ts +1 -1
- package/browser/Core/Canvas.js +16 -7
- package/browser/Core/Particles.js +3 -4
- package/browser/Plugins/Emitters/Options/Classes/Emitter.js +2 -2
- package/esm/Core/Canvas.d.ts +1 -1
- package/esm/Core/Canvas.js +16 -7
- package/esm/Core/Particles.js +2 -3
- package/esm/Plugins/Emitters/Options/Classes/Emitter.js +2 -2
- package/package.json +15 -3
- package/report.html +2 -2
- package/report.slim.html +2 -2
- package/tsparticles.engine.js +15 -10
- package/tsparticles.engine.min.js +2 -2
- package/tsparticles.interaction.external.attract.js +15 -10
- package/tsparticles.interaction.external.attract.min.js +1 -1
- package/tsparticles.interaction.external.bounce.js +15 -10
- package/tsparticles.interaction.external.bounce.min.js +1 -1
- package/tsparticles.interaction.external.bubble.js +15 -10
- package/tsparticles.interaction.external.bubble.min.js +1 -1
- package/tsparticles.interaction.external.connect.js +15 -10
- package/tsparticles.interaction.external.connect.min.js +1 -1
- package/tsparticles.interaction.external.grab.js +15 -10
- package/tsparticles.interaction.external.grab.min.js +1 -1
- package/tsparticles.interaction.external.repulse.js +15 -10
- package/tsparticles.interaction.external.repulse.min.js +1 -1
- package/tsparticles.interaction.external.trail.js +15 -10
- package/tsparticles.interaction.external.trail.min.js +1 -1
- package/tsparticles.interaction.particles.attract.js +15 -10
- package/tsparticles.interaction.particles.attract.min.js +1 -1
- package/tsparticles.interaction.particles.collisions.js +15 -10
- package/tsparticles.interaction.particles.collisions.min.js +1 -1
- package/tsparticles.interaction.particles.links.js +15 -10
- package/tsparticles.interaction.particles.links.min.js +1 -1
- package/tsparticles.js +17 -12
- package/tsparticles.min.js +2 -2
- package/tsparticles.pathseg.min.js +1 -1
- package/tsparticles.plugins.absorbers.js +15 -10
- package/tsparticles.plugins.absorbers.min.js +1 -1
- package/tsparticles.plugins.emitters.js +17 -12
- package/tsparticles.plugins.emitters.min.js +2 -2
- package/tsparticles.plugins.polygonMask.js +15 -10
- package/tsparticles.plugins.polygonMask.min.js +1 -1
- package/tsparticles.shape.circle.min.js +1 -1
- package/tsparticles.shape.image.js +15 -10
- 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 +15 -10
- package/tsparticles.shape.text.min.js +1 -1
- package/tsparticles.slim.js +15 -10
- package/tsparticles.slim.min.js +2 -2
- package/tsparticles.updater.angle.js +15 -10
- package/tsparticles.updater.angle.min.js +1 -1
- package/tsparticles.updater.color.js +15 -10
- package/tsparticles.updater.color.min.js +1 -1
- package/tsparticles.updater.life.js +15 -10
- package/tsparticles.updater.life.min.js +1 -1
- package/tsparticles.updater.opacity.js +15 -10
- package/tsparticles.updater.opacity.min.js +1 -1
- package/tsparticles.updater.outModes.js +15 -10
- package/tsparticles.updater.outModes.min.js +1 -1
- package/tsparticles.updater.roll.js +15 -10
- package/tsparticles.updater.roll.min.js +1 -1
- package/tsparticles.updater.size.js +15 -10
- package/tsparticles.updater.size.min.js +1 -1
- package/tsparticles.updater.strokeColor.js +15 -10
- package/tsparticles.updater.strokeColor.min.js +1 -1
- package/tsparticles.updater.tilt.js +15 -10
- package/tsparticles.updater.tilt.min.js +1 -1
- package/tsparticles.updater.wobble.js +15 -10
- package/tsparticles.updater.wobble.min.js +1 -1
- package/umd/Core/Canvas.d.ts +1 -1
- package/umd/Core/Canvas.js +16 -7
- package/umd/Core/Particles.js +2 -3
- package/umd/Plugins/Emitters/Options/Classes/Emitter.js +2 -2
|
@@ -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
|
}
|
|
@@ -986,11 +986,16 @@
|
|
|
986
986
|
const container = this.container;
|
|
987
987
|
const pxRatio = container.retina.pixelRatio;
|
|
988
988
|
const size = container.canvas.size;
|
|
989
|
+
const newSize = {
|
|
990
|
+
width: this.element.offsetWidth * pxRatio,
|
|
991
|
+
height: this.element.offsetHeight * pxRatio
|
|
992
|
+
};
|
|
993
|
+
if (newSize.height === size.height && newSize.width === size.width && newSize.height === this.element.height && newSize.width === this.element.width) {
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
989
996
|
const oldSize = Object.assign({}, size);
|
|
990
|
-
size.width = this.element.offsetWidth * pxRatio;
|
|
991
|
-
size.height = this.element.offsetHeight * pxRatio;
|
|
992
|
-
this.element.width = size.width;
|
|
993
|
-
this.element.height = size.height;
|
|
997
|
+
this.element.width = size.width = this.element.offsetWidth * pxRatio;
|
|
998
|
+
this.element.height = size.height = this.element.offsetHeight * pxRatio;
|
|
994
999
|
if (this.container.started) {
|
|
995
1000
|
this.resizeFactor = {
|
|
996
1001
|
width: size.width / oldSize.width,
|
|
@@ -1114,12 +1119,13 @@
|
|
|
1114
1119
|
const color = cover.color;
|
|
1115
1120
|
const coverRgb = colorToRgb(color);
|
|
1116
1121
|
if (coverRgb) {
|
|
1117
|
-
|
|
1122
|
+
const coverColor = {
|
|
1118
1123
|
r: coverRgb.r,
|
|
1119
1124
|
g: coverRgb.g,
|
|
1120
1125
|
b: coverRgb.b,
|
|
1121
1126
|
a: cover.opacity
|
|
1122
1127
|
};
|
|
1128
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1123
1129
|
}
|
|
1124
1130
|
}
|
|
1125
1131
|
initTrail() {
|
|
@@ -3306,9 +3312,7 @@
|
|
|
3306
3312
|
delete container.canvas.resizeFactor;
|
|
3307
3313
|
}
|
|
3308
3314
|
async draw(delta) {
|
|
3309
|
-
const container = this.container;
|
|
3310
|
-
container.canvas.clear();
|
|
3311
|
-
const canvasSize = this.container.canvas.size;
|
|
3315
|
+
const container = this.container, canvasSize = this.container.canvas.size;
|
|
3312
3316
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
3313
3317
|
await this.update(delta);
|
|
3314
3318
|
if (this.needsSort) {
|
|
@@ -3316,6 +3320,7 @@
|
|
|
3316
3320
|
this.lastZIndex = this.zArray[this.zArray.length - 1].position.z;
|
|
3317
3321
|
this.needsSort = false;
|
|
3318
3322
|
}
|
|
3323
|
+
container.canvas.clear();
|
|
3319
3324
|
for (const [, plugin] of container.plugins) {
|
|
3320
3325
|
container.canvas.drawPlugin(plugin, delta);
|
|
3321
3326
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.3 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
|
}
|
|
@@ -986,11 +986,16 @@
|
|
|
986
986
|
const container = this.container;
|
|
987
987
|
const pxRatio = container.retina.pixelRatio;
|
|
988
988
|
const size = container.canvas.size;
|
|
989
|
+
const newSize = {
|
|
990
|
+
width: this.element.offsetWidth * pxRatio,
|
|
991
|
+
height: this.element.offsetHeight * pxRatio
|
|
992
|
+
};
|
|
993
|
+
if (newSize.height === size.height && newSize.width === size.width && newSize.height === this.element.height && newSize.width === this.element.width) {
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
989
996
|
const oldSize = Object.assign({}, size);
|
|
990
|
-
size.width = this.element.offsetWidth * pxRatio;
|
|
991
|
-
size.height = this.element.offsetHeight * pxRatio;
|
|
992
|
-
this.element.width = size.width;
|
|
993
|
-
this.element.height = size.height;
|
|
997
|
+
this.element.width = size.width = this.element.offsetWidth * pxRatio;
|
|
998
|
+
this.element.height = size.height = this.element.offsetHeight * pxRatio;
|
|
994
999
|
if (this.container.started) {
|
|
995
1000
|
this.resizeFactor = {
|
|
996
1001
|
width: size.width / oldSize.width,
|
|
@@ -1114,12 +1119,13 @@
|
|
|
1114
1119
|
const color = cover.color;
|
|
1115
1120
|
const coverRgb = colorToRgb(color);
|
|
1116
1121
|
if (coverRgb) {
|
|
1117
|
-
|
|
1122
|
+
const coverColor = {
|
|
1118
1123
|
r: coverRgb.r,
|
|
1119
1124
|
g: coverRgb.g,
|
|
1120
1125
|
b: coverRgb.b,
|
|
1121
1126
|
a: cover.opacity
|
|
1122
1127
|
};
|
|
1128
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1123
1129
|
}
|
|
1124
1130
|
}
|
|
1125
1131
|
initTrail() {
|
|
@@ -3306,9 +3312,7 @@
|
|
|
3306
3312
|
delete container.canvas.resizeFactor;
|
|
3307
3313
|
}
|
|
3308
3314
|
async draw(delta) {
|
|
3309
|
-
const container = this.container;
|
|
3310
|
-
container.canvas.clear();
|
|
3311
|
-
const canvasSize = this.container.canvas.size;
|
|
3315
|
+
const container = this.container, canvasSize = this.container.canvas.size;
|
|
3312
3316
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
3313
3317
|
await this.update(delta);
|
|
3314
3318
|
if (this.needsSort) {
|
|
@@ -3316,6 +3320,7 @@
|
|
|
3316
3320
|
this.lastZIndex = this.zArray[this.zArray.length - 1].position.z;
|
|
3317
3321
|
this.needsSort = false;
|
|
3318
3322
|
}
|
|
3323
|
+
container.canvas.clear();
|
|
3319
3324
|
for (const [, plugin] of container.plugins) {
|
|
3320
3325
|
container.canvas.drawPlugin(plugin, delta);
|
|
3321
3326
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.3 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
|
}
|
|
@@ -986,11 +986,16 @@
|
|
|
986
986
|
const container = this.container;
|
|
987
987
|
const pxRatio = container.retina.pixelRatio;
|
|
988
988
|
const size = container.canvas.size;
|
|
989
|
+
const newSize = {
|
|
990
|
+
width: this.element.offsetWidth * pxRatio,
|
|
991
|
+
height: this.element.offsetHeight * pxRatio
|
|
992
|
+
};
|
|
993
|
+
if (newSize.height === size.height && newSize.width === size.width && newSize.height === this.element.height && newSize.width === this.element.width) {
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
989
996
|
const oldSize = Object.assign({}, size);
|
|
990
|
-
size.width = this.element.offsetWidth * pxRatio;
|
|
991
|
-
size.height = this.element.offsetHeight * pxRatio;
|
|
992
|
-
this.element.width = size.width;
|
|
993
|
-
this.element.height = size.height;
|
|
997
|
+
this.element.width = size.width = this.element.offsetWidth * pxRatio;
|
|
998
|
+
this.element.height = size.height = this.element.offsetHeight * pxRatio;
|
|
994
999
|
if (this.container.started) {
|
|
995
1000
|
this.resizeFactor = {
|
|
996
1001
|
width: size.width / oldSize.width,
|
|
@@ -1114,12 +1119,13 @@
|
|
|
1114
1119
|
const color = cover.color;
|
|
1115
1120
|
const coverRgb = colorToRgb(color);
|
|
1116
1121
|
if (coverRgb) {
|
|
1117
|
-
|
|
1122
|
+
const coverColor = {
|
|
1118
1123
|
r: coverRgb.r,
|
|
1119
1124
|
g: coverRgb.g,
|
|
1120
1125
|
b: coverRgb.b,
|
|
1121
1126
|
a: cover.opacity
|
|
1122
1127
|
};
|
|
1128
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1123
1129
|
}
|
|
1124
1130
|
}
|
|
1125
1131
|
initTrail() {
|
|
@@ -3306,9 +3312,7 @@
|
|
|
3306
3312
|
delete container.canvas.resizeFactor;
|
|
3307
3313
|
}
|
|
3308
3314
|
async draw(delta) {
|
|
3309
|
-
const container = this.container;
|
|
3310
|
-
container.canvas.clear();
|
|
3311
|
-
const canvasSize = this.container.canvas.size;
|
|
3315
|
+
const container = this.container, canvasSize = this.container.canvas.size;
|
|
3312
3316
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
3313
3317
|
await this.update(delta);
|
|
3314
3318
|
if (this.needsSort) {
|
|
@@ -3316,6 +3320,7 @@
|
|
|
3316
3320
|
this.lastZIndex = this.zArray[this.zArray.length - 1].position.z;
|
|
3317
3321
|
this.needsSort = false;
|
|
3318
3322
|
}
|
|
3323
|
+
container.canvas.clear();
|
|
3319
3324
|
for (const [, plugin] of container.plugins) {
|
|
3320
3325
|
container.canvas.drawPlugin(plugin, delta);
|
|
3321
3326
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.3 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
|
}
|
|
@@ -986,11 +986,16 @@
|
|
|
986
986
|
const container = this.container;
|
|
987
987
|
const pxRatio = container.retina.pixelRatio;
|
|
988
988
|
const size = container.canvas.size;
|
|
989
|
+
const newSize = {
|
|
990
|
+
width: this.element.offsetWidth * pxRatio,
|
|
991
|
+
height: this.element.offsetHeight * pxRatio
|
|
992
|
+
};
|
|
993
|
+
if (newSize.height === size.height && newSize.width === size.width && newSize.height === this.element.height && newSize.width === this.element.width) {
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
989
996
|
const oldSize = Object.assign({}, size);
|
|
990
|
-
size.width = this.element.offsetWidth * pxRatio;
|
|
991
|
-
size.height = this.element.offsetHeight * pxRatio;
|
|
992
|
-
this.element.width = size.width;
|
|
993
|
-
this.element.height = size.height;
|
|
997
|
+
this.element.width = size.width = this.element.offsetWidth * pxRatio;
|
|
998
|
+
this.element.height = size.height = this.element.offsetHeight * pxRatio;
|
|
994
999
|
if (this.container.started) {
|
|
995
1000
|
this.resizeFactor = {
|
|
996
1001
|
width: size.width / oldSize.width,
|
|
@@ -1114,12 +1119,13 @@
|
|
|
1114
1119
|
const color = cover.color;
|
|
1115
1120
|
const coverRgb = colorToRgb(color);
|
|
1116
1121
|
if (coverRgb) {
|
|
1117
|
-
|
|
1122
|
+
const coverColor = {
|
|
1118
1123
|
r: coverRgb.r,
|
|
1119
1124
|
g: coverRgb.g,
|
|
1120
1125
|
b: coverRgb.b,
|
|
1121
1126
|
a: cover.opacity
|
|
1122
1127
|
};
|
|
1128
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1123
1129
|
}
|
|
1124
1130
|
}
|
|
1125
1131
|
initTrail() {
|
|
@@ -3306,9 +3312,7 @@
|
|
|
3306
3312
|
delete container.canvas.resizeFactor;
|
|
3307
3313
|
}
|
|
3308
3314
|
async draw(delta) {
|
|
3309
|
-
const container = this.container;
|
|
3310
|
-
container.canvas.clear();
|
|
3311
|
-
const canvasSize = this.container.canvas.size;
|
|
3315
|
+
const container = this.container, canvasSize = this.container.canvas.size;
|
|
3312
3316
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
3313
3317
|
await this.update(delta);
|
|
3314
3318
|
if (this.needsSort) {
|
|
@@ -3316,6 +3320,7 @@
|
|
|
3316
3320
|
this.lastZIndex = this.zArray[this.zArray.length - 1].position.z;
|
|
3317
3321
|
this.needsSort = false;
|
|
3318
3322
|
}
|
|
3323
|
+
container.canvas.clear();
|
|
3319
3324
|
for (const [, plugin] of container.plugins) {
|
|
3320
3325
|
container.canvas.drawPlugin(plugin, delta);
|
|
3321
3326
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.3 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
|
}
|
|
@@ -986,11 +986,16 @@
|
|
|
986
986
|
const container = this.container;
|
|
987
987
|
const pxRatio = container.retina.pixelRatio;
|
|
988
988
|
const size = container.canvas.size;
|
|
989
|
+
const newSize = {
|
|
990
|
+
width: this.element.offsetWidth * pxRatio,
|
|
991
|
+
height: this.element.offsetHeight * pxRatio
|
|
992
|
+
};
|
|
993
|
+
if (newSize.height === size.height && newSize.width === size.width && newSize.height === this.element.height && newSize.width === this.element.width) {
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
989
996
|
const oldSize = Object.assign({}, size);
|
|
990
|
-
size.width = this.element.offsetWidth * pxRatio;
|
|
991
|
-
size.height = this.element.offsetHeight * pxRatio;
|
|
992
|
-
this.element.width = size.width;
|
|
993
|
-
this.element.height = size.height;
|
|
997
|
+
this.element.width = size.width = this.element.offsetWidth * pxRatio;
|
|
998
|
+
this.element.height = size.height = this.element.offsetHeight * pxRatio;
|
|
994
999
|
if (this.container.started) {
|
|
995
1000
|
this.resizeFactor = {
|
|
996
1001
|
width: size.width / oldSize.width,
|
|
@@ -1114,12 +1119,13 @@
|
|
|
1114
1119
|
const color = cover.color;
|
|
1115
1120
|
const coverRgb = colorToRgb(color);
|
|
1116
1121
|
if (coverRgb) {
|
|
1117
|
-
|
|
1122
|
+
const coverColor = {
|
|
1118
1123
|
r: coverRgb.r,
|
|
1119
1124
|
g: coverRgb.g,
|
|
1120
1125
|
b: coverRgb.b,
|
|
1121
1126
|
a: cover.opacity
|
|
1122
1127
|
};
|
|
1128
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1123
1129
|
}
|
|
1124
1130
|
}
|
|
1125
1131
|
initTrail() {
|
|
@@ -3306,9 +3312,7 @@
|
|
|
3306
3312
|
delete container.canvas.resizeFactor;
|
|
3307
3313
|
}
|
|
3308
3314
|
async draw(delta) {
|
|
3309
|
-
const container = this.container;
|
|
3310
|
-
container.canvas.clear();
|
|
3311
|
-
const canvasSize = this.container.canvas.size;
|
|
3315
|
+
const container = this.container, canvasSize = this.container.canvas.size;
|
|
3312
3316
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
3313
3317
|
await this.update(delta);
|
|
3314
3318
|
if (this.needsSort) {
|
|
@@ -3316,6 +3320,7 @@
|
|
|
3316
3320
|
this.lastZIndex = this.zArray[this.zArray.length - 1].position.z;
|
|
3317
3321
|
this.needsSort = false;
|
|
3318
3322
|
}
|
|
3323
|
+
container.canvas.clear();
|
|
3319
3324
|
for (const [, plugin] of container.plugins) {
|
|
3320
3325
|
container.canvas.drawPlugin(plugin, delta);
|
|
3321
3326
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.3 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
|
}
|
|
@@ -986,11 +986,16 @@
|
|
|
986
986
|
const container = this.container;
|
|
987
987
|
const pxRatio = container.retina.pixelRatio;
|
|
988
988
|
const size = container.canvas.size;
|
|
989
|
+
const newSize = {
|
|
990
|
+
width: this.element.offsetWidth * pxRatio,
|
|
991
|
+
height: this.element.offsetHeight * pxRatio
|
|
992
|
+
};
|
|
993
|
+
if (newSize.height === size.height && newSize.width === size.width && newSize.height === this.element.height && newSize.width === this.element.width) {
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
989
996
|
const oldSize = Object.assign({}, size);
|
|
990
|
-
size.width = this.element.offsetWidth * pxRatio;
|
|
991
|
-
size.height = this.element.offsetHeight * pxRatio;
|
|
992
|
-
this.element.width = size.width;
|
|
993
|
-
this.element.height = size.height;
|
|
997
|
+
this.element.width = size.width = this.element.offsetWidth * pxRatio;
|
|
998
|
+
this.element.height = size.height = this.element.offsetHeight * pxRatio;
|
|
994
999
|
if (this.container.started) {
|
|
995
1000
|
this.resizeFactor = {
|
|
996
1001
|
width: size.width / oldSize.width,
|
|
@@ -1114,12 +1119,13 @@
|
|
|
1114
1119
|
const color = cover.color;
|
|
1115
1120
|
const coverRgb = colorToRgb(color);
|
|
1116
1121
|
if (coverRgb) {
|
|
1117
|
-
|
|
1122
|
+
const coverColor = {
|
|
1118
1123
|
r: coverRgb.r,
|
|
1119
1124
|
g: coverRgb.g,
|
|
1120
1125
|
b: coverRgb.b,
|
|
1121
1126
|
a: cover.opacity
|
|
1122
1127
|
};
|
|
1128
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1123
1129
|
}
|
|
1124
1130
|
}
|
|
1125
1131
|
initTrail() {
|
|
@@ -3306,9 +3312,7 @@
|
|
|
3306
3312
|
delete container.canvas.resizeFactor;
|
|
3307
3313
|
}
|
|
3308
3314
|
async draw(delta) {
|
|
3309
|
-
const container = this.container;
|
|
3310
|
-
container.canvas.clear();
|
|
3311
|
-
const canvasSize = this.container.canvas.size;
|
|
3315
|
+
const container = this.container, canvasSize = this.container.canvas.size;
|
|
3312
3316
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
3313
3317
|
await this.update(delta);
|
|
3314
3318
|
if (this.needsSort) {
|
|
@@ -3316,6 +3320,7 @@
|
|
|
3316
3320
|
this.lastZIndex = this.zArray[this.zArray.length - 1].position.z;
|
|
3317
3321
|
this.needsSort = false;
|
|
3318
3322
|
}
|
|
3323
|
+
container.canvas.clear();
|
|
3319
3324
|
for (const [, plugin] of container.plugins) {
|
|
3320
3325
|
container.canvas.drawPlugin(plugin, delta);
|
|
3321
3326
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.3 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
|
}
|
|
@@ -986,11 +986,16 @@
|
|
|
986
986
|
const container = this.container;
|
|
987
987
|
const pxRatio = container.retina.pixelRatio;
|
|
988
988
|
const size = container.canvas.size;
|
|
989
|
+
const newSize = {
|
|
990
|
+
width: this.element.offsetWidth * pxRatio,
|
|
991
|
+
height: this.element.offsetHeight * pxRatio
|
|
992
|
+
};
|
|
993
|
+
if (newSize.height === size.height && newSize.width === size.width && newSize.height === this.element.height && newSize.width === this.element.width) {
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
989
996
|
const oldSize = Object.assign({}, size);
|
|
990
|
-
size.width = this.element.offsetWidth * pxRatio;
|
|
991
|
-
size.height = this.element.offsetHeight * pxRatio;
|
|
992
|
-
this.element.width = size.width;
|
|
993
|
-
this.element.height = size.height;
|
|
997
|
+
this.element.width = size.width = this.element.offsetWidth * pxRatio;
|
|
998
|
+
this.element.height = size.height = this.element.offsetHeight * pxRatio;
|
|
994
999
|
if (this.container.started) {
|
|
995
1000
|
this.resizeFactor = {
|
|
996
1001
|
width: size.width / oldSize.width,
|
|
@@ -1114,12 +1119,13 @@
|
|
|
1114
1119
|
const color = cover.color;
|
|
1115
1120
|
const coverRgb = colorToRgb(color);
|
|
1116
1121
|
if (coverRgb) {
|
|
1117
|
-
|
|
1122
|
+
const coverColor = {
|
|
1118
1123
|
r: coverRgb.r,
|
|
1119
1124
|
g: coverRgb.g,
|
|
1120
1125
|
b: coverRgb.b,
|
|
1121
1126
|
a: cover.opacity
|
|
1122
1127
|
};
|
|
1128
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1123
1129
|
}
|
|
1124
1130
|
}
|
|
1125
1131
|
initTrail() {
|
|
@@ -3306,9 +3312,7 @@
|
|
|
3306
3312
|
delete container.canvas.resizeFactor;
|
|
3307
3313
|
}
|
|
3308
3314
|
async draw(delta) {
|
|
3309
|
-
const container = this.container;
|
|
3310
|
-
container.canvas.clear();
|
|
3311
|
-
const canvasSize = this.container.canvas.size;
|
|
3315
|
+
const container = this.container, canvasSize = this.container.canvas.size;
|
|
3312
3316
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
3313
3317
|
await this.update(delta);
|
|
3314
3318
|
if (this.needsSort) {
|
|
@@ -3316,6 +3320,7 @@
|
|
|
3316
3320
|
this.lastZIndex = this.zArray[this.zArray.length - 1].position.z;
|
|
3317
3321
|
this.needsSort = false;
|
|
3318
3322
|
}
|
|
3323
|
+
container.canvas.clear();
|
|
3319
3324
|
for (const [, plugin] of container.plugins) {
|
|
3320
3325
|
container.canvas.drawPlugin(plugin, delta);
|
|
3321
3326
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tsParticles v1.42.
|
|
1
|
+
/*! tsParticles v1.42.3 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
|
}
|
|
@@ -986,11 +986,16 @@
|
|
|
986
986
|
const container = this.container;
|
|
987
987
|
const pxRatio = container.retina.pixelRatio;
|
|
988
988
|
const size = container.canvas.size;
|
|
989
|
+
const newSize = {
|
|
990
|
+
width: this.element.offsetWidth * pxRatio,
|
|
991
|
+
height: this.element.offsetHeight * pxRatio
|
|
992
|
+
};
|
|
993
|
+
if (newSize.height === size.height && newSize.width === size.width && newSize.height === this.element.height && newSize.width === this.element.width) {
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
989
996
|
const oldSize = Object.assign({}, size);
|
|
990
|
-
size.width = this.element.offsetWidth * pxRatio;
|
|
991
|
-
size.height = this.element.offsetHeight * pxRatio;
|
|
992
|
-
this.element.width = size.width;
|
|
993
|
-
this.element.height = size.height;
|
|
997
|
+
this.element.width = size.width = this.element.offsetWidth * pxRatio;
|
|
998
|
+
this.element.height = size.height = this.element.offsetHeight * pxRatio;
|
|
994
999
|
if (this.container.started) {
|
|
995
1000
|
this.resizeFactor = {
|
|
996
1001
|
width: size.width / oldSize.width,
|
|
@@ -1114,12 +1119,13 @@
|
|
|
1114
1119
|
const color = cover.color;
|
|
1115
1120
|
const coverRgb = colorToRgb(color);
|
|
1116
1121
|
if (coverRgb) {
|
|
1117
|
-
|
|
1122
|
+
const coverColor = {
|
|
1118
1123
|
r: coverRgb.r,
|
|
1119
1124
|
g: coverRgb.g,
|
|
1120
1125
|
b: coverRgb.b,
|
|
1121
1126
|
a: cover.opacity
|
|
1122
1127
|
};
|
|
1128
|
+
this.coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
1123
1129
|
}
|
|
1124
1130
|
}
|
|
1125
1131
|
initTrail() {
|
|
@@ -3306,9 +3312,7 @@
|
|
|
3306
3312
|
delete container.canvas.resizeFactor;
|
|
3307
3313
|
}
|
|
3308
3314
|
async draw(delta) {
|
|
3309
|
-
const container = this.container;
|
|
3310
|
-
container.canvas.clear();
|
|
3311
|
-
const canvasSize = this.container.canvas.size;
|
|
3315
|
+
const container = this.container, canvasSize = this.container.canvas.size;
|
|
3312
3316
|
this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
|
|
3313
3317
|
await this.update(delta);
|
|
3314
3318
|
if (this.needsSort) {
|
|
@@ -3316,6 +3320,7 @@
|
|
|
3316
3320
|
this.lastZIndex = this.zArray[this.zArray.length - 1].position.z;
|
|
3317
3321
|
this.needsSort = false;
|
|
3318
3322
|
}
|
|
3323
|
+
container.canvas.clear();
|
|
3319
3324
|
for (const [, plugin] of container.plugins) {
|
|
3320
3325
|
container.canvas.drawPlugin(plugin, delta);
|
|
3321
3326
|
}
|