@tsparticles/interaction-light 3.0.3 → 3.2.0
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/338.min.js +2 -0
- package/338.min.js.LICENSE.txt +1 -0
- package/388.min.js +2 -0
- package/388.min.js.LICENSE.txt +1 -0
- package/browser/ExternalLighter.js +1 -0
- package/browser/ParticlesLighter.js +1 -0
- package/browser/Utils.js +14 -10
- package/browser/index.js +8 -4
- package/cjs/ExternalLighter.js +1 -0
- package/cjs/ParticlesLighter.js +1 -0
- package/cjs/Utils.js +14 -10
- package/cjs/index.js +20 -4
- package/dist_browser_ExternalLighter_js.js +40 -0
- package/dist_browser_ParticlesLighter_js.js +40 -0
- package/esm/ExternalLighter.js +1 -0
- package/esm/ParticlesLighter.js +1 -0
- package/esm/Utils.js +14 -10
- package/esm/index.js +8 -4
- package/package.json +2 -2
- package/report.html +3 -3
- package/tsparticles.interaction.light.js +281 -267
- package/tsparticles.interaction.light.min.js +1 -1
- package/tsparticles.interaction.light.min.js.LICENSE.txt +1 -1
- package/types/ExternalLighter.d.ts +1 -2
- package/types/Options/Classes/LightGradient.d.ts +1 -2
- package/types/Types.d.ts +4 -4
- package/umd/ExternalLighter.js +1 -0
- package/umd/ParticlesLighter.js +1 -0
- package/umd/Utils.js +14 -10
- package/umd/index.js +22 -5
package/338.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 338.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_interaction_light=this.webpackChunk_tsparticles_interaction_light||[]).push([[338],{338:(t,i,e)=>{e.d(i,{ParticlesLighter:()=>a});var n=e(533),o=e(103);class a extends n.ParticlesInteractorBase{constructor(t){super(t)}clear(){}init(){}async interact(t){const i=this.container,e=i.actualOptions,n=i.interactivity;if(!e.interactivity.events.onHover.enable||"pointermove"!==n.status)return;const a=n.mouse.position;a&&(i.canvas.draw((e=>{(0,o.y_)(i,e,t,a)})),await Promise.resolve())}isEnabled(t){const i=this.container,e=t.interactivity??i.actualOptions.interactivity,a=i.interactivity.mouse,s=e.events;if(!s.onHover.enable||!a.position)return!1;const r=(0,n.isInArray)(o.uh,s.onHover.mode);if(r&&e.modes.light){const i=e.modes.light.shadow;t.lightShadow=(0,n.rangeColorToRgb)(i.color)}return r}reset(){}}},103:(t,i,e)=>{e.d(i,{iZ:()=>h,uh:()=>l,y_:()=>d});var n=e(533);const o={max:1,min:0},a=.5*Math.PI,s=2*Math.PI,r=.25*Math.PI,c=0,l="light";function h(t,i,e){const a=t.actualOptions.interactivity.modes.light?.area;if(!a)return;i.beginPath(),i.arc(e.x,e.y,a.radius,c,s);const r=i.createRadialGradient(e.x,e.y,c,e.x,e.y,a.radius),l=t.canvas.mouseLight;l?.start&&l.stop&&(r.addColorStop(o.min,(0,n.getStyleFromRgb)(l.start)),r.addColorStop(o.max,(0,n.getStyleFromRgb)(l.stop)),i.fillStyle=r,i.fill())}function d(t,i,e,o){const c=e.getPosition(),l=t.actualOptions.interactivity.modes.light?.shadow;if(!l)return;const h=e.lightShadow;if(!h)return;const d=e.getRadius(),y=e.sides,u=s/y,g=-e.rotation+r,p=[];for(let t=0;t<y;t++)p.push({x:c.x+d*Math.sin(g+u*t)*1,y:c.y+d*Math.cos(g+u*t)*1});const v=[],m=l.length;for(const t of p){const i=Math.atan2(o.y-t.y,o.x-t.x),e={x:t.x+m*Math.sin(-i-a),y:t.y+m*Math.cos(-i-a)};v.push({end:e,start:t})}const f=(0,n.getStyleFromRgb)(h);for(let t=v.length-1,e=0;t>=0;e=t--)i.beginPath(),i.moveTo(v[t].start.x,v[t].start.y),i.lineTo(v[e].start.x,v[e].start.y),i.lineTo(v[e].end.x,v[e].end.y),i.lineTo(v[t].end.x,v[t].end.y),i.fillStyle=f,i.fill()}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Light Interaction v3.2.0 by Matteo Bruni */
|
package/388.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 388.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_interaction_light=this.webpackChunk_tsparticles_interaction_light||[]).push([[388],{388:(t,i,e)=>{e.d(i,{ExternalLighter:()=>s});var n=e(533),o=e(103),a=e(78);class s extends n.ExternalInteractorBase{constructor(t){super(t)}clear(){}init(){}async interact(){const t=this.container,i=t.actualOptions,e=t.interactivity;if(!i.interactivity.events.onHover.enable||"pointermove"!==e.status)return;const n=e.mouse.position;n&&(t.canvas.draw((i=>{(0,o.iZ)(t,i,n)})),await Promise.resolve())}isEnabled(t){const i=this.container,e=i.interactivity.mouse,a=t?.interactivity??i.actualOptions.interactivity,s=a.events;if(!s.onHover.enable||!e.position)return!1;const r=(0,n.isInArray)(o.uh,s.onHover.mode);if(r&&a.modes.light){const t=a.modes.light.area.gradient;i.canvas.mouseLight={start:(0,n.rangeColorToRgb)(t.start),stop:(0,n.rangeColorToRgb)(t.stop)}}return r}loadModeOptions(t,...i){t.light||(t.light=new a._);for(const e of i)t.light.load(e?.light)}reset(){}}},103:(t,i,e)=>{e.d(i,{iZ:()=>h,uh:()=>c,y_:()=>g});var n=e(533);const o={max:1,min:0},a=.5*Math.PI,s=2*Math.PI,r=.25*Math.PI,l=0,c="light";function h(t,i,e){const a=t.actualOptions.interactivity.modes.light?.area;if(!a)return;i.beginPath(),i.arc(e.x,e.y,a.radius,l,s);const r=i.createRadialGradient(e.x,e.y,l,e.x,e.y,a.radius),c=t.canvas.mouseLight;c?.start&&c.stop&&(r.addColorStop(o.min,(0,n.getStyleFromRgb)(c.start)),r.addColorStop(o.max,(0,n.getStyleFromRgb)(c.stop)),i.fillStyle=r,i.fill())}function g(t,i,e,o){const l=e.getPosition(),c=t.actualOptions.interactivity.modes.light?.shadow;if(!c)return;const h=e.lightShadow;if(!h)return;const g=e.getRadius(),d=e.sides,u=s/d,y=-e.rotation+r,p=[];for(let t=0;t<d;t++)p.push({x:l.x+g*Math.sin(y+u*t)*1,y:l.y+g*Math.cos(y+u*t)*1});const v=[],m=c.length;for(const t of p){const i=Math.atan2(o.y-t.y,o.x-t.x),e={x:t.x+m*Math.sin(-i-a),y:t.y+m*Math.cos(-i-a)};v.push({end:e,start:t})}const f=(0,n.getStyleFromRgb)(h);for(let t=v.length-1,e=0;t>=0;e=t--)i.beginPath(),i.moveTo(v[t].start.x,v[t].start.y),i.lineTo(v[e].start.x,v[e].start.y),i.lineTo(v[e].end.x,v[e].end.y),i.lineTo(v[t].end.x,v[t].end.y),i.fillStyle=f,i.fill()}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Light Interaction v3.2.0 by Matteo Bruni */
|
|
@@ -21,6 +21,7 @@ export class ExternalLighter extends ExternalInteractorBase {
|
|
|
21
21
|
container.canvas.draw((ctx) => {
|
|
22
22
|
drawLight(container, ctx, mousePos);
|
|
23
23
|
});
|
|
24
|
+
await Promise.resolve();
|
|
24
25
|
}
|
|
25
26
|
isEnabled(particle) {
|
|
26
27
|
const container = this.container, mouse = container.interactivity.mouse, interactivity = particle?.interactivity ?? container.actualOptions.interactivity, events = interactivity.events;
|
|
@@ -20,6 +20,7 @@ export class ParticlesLighter extends ParticlesInteractorBase {
|
|
|
20
20
|
container.canvas.draw((ctx) => {
|
|
21
21
|
drawParticleShadow(container, ctx, particle, mousePos);
|
|
22
22
|
});
|
|
23
|
+
await Promise.resolve();
|
|
23
24
|
}
|
|
24
25
|
isEnabled(particle) {
|
|
25
26
|
const container = this.container, interactivity = particle.interactivity ?? container.actualOptions.interactivity, mouse = container.interactivity.mouse, events = interactivity.events;
|
package/browser/Utils.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { getStyleFromRgb } from "@tsparticles/engine";
|
|
2
|
+
const gradientPos = {
|
|
3
|
+
max: 1,
|
|
4
|
+
min: 0,
|
|
5
|
+
}, half = 0.5, double = 2, halfPI = Math.PI * half, doublePI = Math.PI * double, quarter = 0.25, quarterPI = Math.PI * quarter, arcStart = 0;
|
|
2
6
|
export const lightMode = "light";
|
|
3
7
|
export function drawLight(container, context, mousePos) {
|
|
4
8
|
const lightOptions = container.actualOptions.interactivity.modes.light?.area;
|
|
@@ -6,14 +10,14 @@ export function drawLight(container, context, mousePos) {
|
|
|
6
10
|
return;
|
|
7
11
|
}
|
|
8
12
|
context.beginPath();
|
|
9
|
-
context.arc(mousePos.x, mousePos.y, lightOptions.radius,
|
|
10
|
-
const gradientAmbientLight = context.createRadialGradient(mousePos.x, mousePos.y,
|
|
13
|
+
context.arc(mousePos.x, mousePos.y, lightOptions.radius, arcStart, doublePI);
|
|
14
|
+
const gradientAmbientLight = context.createRadialGradient(mousePos.x, mousePos.y, arcStart, mousePos.x, mousePos.y, lightOptions.radius);
|
|
11
15
|
const gradientRgb = container.canvas.mouseLight;
|
|
12
|
-
if (!gradientRgb
|
|
16
|
+
if (!gradientRgb?.start || !gradientRgb.stop) {
|
|
13
17
|
return;
|
|
14
18
|
}
|
|
15
|
-
gradientAmbientLight.addColorStop(
|
|
16
|
-
gradientAmbientLight.addColorStop(
|
|
19
|
+
gradientAmbientLight.addColorStop(gradientPos.min, getStyleFromRgb(gradientRgb.start));
|
|
20
|
+
gradientAmbientLight.addColorStop(gradientPos.max, getStyleFromRgb(gradientRgb.stop));
|
|
17
21
|
context.fillStyle = gradientAmbientLight;
|
|
18
22
|
context.fill();
|
|
19
23
|
}
|
|
@@ -26,7 +30,7 @@ export function drawParticleShadow(container, context, particle, mousePos) {
|
|
|
26
30
|
if (!shadowRgb) {
|
|
27
31
|
return;
|
|
28
32
|
}
|
|
29
|
-
const radius = particle.getRadius(), sides = particle.sides, full =
|
|
33
|
+
const radius = particle.getRadius(), sides = particle.sides, full = doublePI / sides, angle = -particle.rotation + quarterPI, factor = 1, dots = [];
|
|
30
34
|
for (let i = 0; i < sides; i++) {
|
|
31
35
|
dots.push({
|
|
32
36
|
x: pos.x + radius * Math.sin(angle + full * i) * factor,
|
|
@@ -36,16 +40,16 @@ export function drawParticleShadow(container, context, particle, mousePos) {
|
|
|
36
40
|
const points = [], shadowLength = shadowOptions.length;
|
|
37
41
|
for (const dot of dots) {
|
|
38
42
|
const dotAngle = Math.atan2(mousePos.y - dot.y, mousePos.x - dot.x), end = {
|
|
39
|
-
x: dot.x + shadowLength * Math.sin(-dotAngle -
|
|
40
|
-
y: dot.y + shadowLength * Math.cos(-dotAngle -
|
|
43
|
+
x: dot.x + shadowLength * Math.sin(-dotAngle - halfPI),
|
|
44
|
+
y: dot.y + shadowLength * Math.cos(-dotAngle - halfPI),
|
|
41
45
|
};
|
|
42
46
|
points.push({
|
|
43
47
|
end: end,
|
|
44
48
|
start: dot,
|
|
45
49
|
});
|
|
46
50
|
}
|
|
47
|
-
const shadowColor = getStyleFromRgb(shadowRgb), last = points.length -
|
|
48
|
-
for (let i = last, n = 0; i >=
|
|
51
|
+
const shadowColor = getStyleFromRgb(shadowRgb), lastOffset = 1, firstPos = 0, last = points.length - lastOffset;
|
|
52
|
+
for (let i = last, n = 0; i >= firstPos; n = i--) {
|
|
49
53
|
context.beginPath();
|
|
50
54
|
context.moveTo(points[i].start.x, points[i].start.y);
|
|
51
55
|
context.lineTo(points[n].start.x, points[n].start.y);
|
package/browser/index.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { ExternalLighter } from "./ExternalLighter.js";
|
|
2
|
-
import { ParticlesLighter } from "./ParticlesLighter.js";
|
|
3
1
|
export async function loadLightInteraction(engine, refresh = true) {
|
|
4
|
-
await engine.addInteractor("externalLight", (container) =>
|
|
5
|
-
|
|
2
|
+
await engine.addInteractor("externalLight", async (container) => {
|
|
3
|
+
const { ExternalLighter } = await import("./ExternalLighter.js");
|
|
4
|
+
return new ExternalLighter(container);
|
|
5
|
+
}, refresh);
|
|
6
|
+
await engine.addInteractor("particlesLight", async (container) => {
|
|
7
|
+
const { ParticlesLighter } = await import("./ParticlesLighter.js");
|
|
8
|
+
return new ParticlesLighter(container);
|
|
9
|
+
}, refresh);
|
|
6
10
|
}
|
|
7
11
|
export * from "./Options/Classes/Light.js";
|
|
8
12
|
export * from "./Options/Classes/LightArea.js";
|
package/cjs/ExternalLighter.js
CHANGED
|
@@ -24,6 +24,7 @@ class ExternalLighter extends engine_1.ExternalInteractorBase {
|
|
|
24
24
|
container.canvas.draw((ctx) => {
|
|
25
25
|
(0, Utils_js_1.drawLight)(container, ctx, mousePos);
|
|
26
26
|
});
|
|
27
|
+
await Promise.resolve();
|
|
27
28
|
}
|
|
28
29
|
isEnabled(particle) {
|
|
29
30
|
const container = this.container, mouse = container.interactivity.mouse, interactivity = particle?.interactivity ?? container.actualOptions.interactivity, events = interactivity.events;
|
package/cjs/ParticlesLighter.js
CHANGED
|
@@ -23,6 +23,7 @@ class ParticlesLighter extends engine_1.ParticlesInteractorBase {
|
|
|
23
23
|
container.canvas.draw((ctx) => {
|
|
24
24
|
(0, Utils_js_1.drawParticleShadow)(container, ctx, particle, mousePos);
|
|
25
25
|
});
|
|
26
|
+
await Promise.resolve();
|
|
26
27
|
}
|
|
27
28
|
isEnabled(particle) {
|
|
28
29
|
const container = this.container, interactivity = particle.interactivity ?? container.actualOptions.interactivity, mouse = container.interactivity.mouse, events = interactivity.events;
|
package/cjs/Utils.js
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.drawParticleShadow = exports.drawLight = exports.lightMode = void 0;
|
|
4
4
|
const engine_1 = require("@tsparticles/engine");
|
|
5
|
+
const gradientPos = {
|
|
6
|
+
max: 1,
|
|
7
|
+
min: 0,
|
|
8
|
+
}, half = 0.5, double = 2, halfPI = Math.PI * half, doublePI = Math.PI * double, quarter = 0.25, quarterPI = Math.PI * quarter, arcStart = 0;
|
|
5
9
|
exports.lightMode = "light";
|
|
6
10
|
function drawLight(container, context, mousePos) {
|
|
7
11
|
const lightOptions = container.actualOptions.interactivity.modes.light?.area;
|
|
@@ -9,14 +13,14 @@ function drawLight(container, context, mousePos) {
|
|
|
9
13
|
return;
|
|
10
14
|
}
|
|
11
15
|
context.beginPath();
|
|
12
|
-
context.arc(mousePos.x, mousePos.y, lightOptions.radius,
|
|
13
|
-
const gradientAmbientLight = context.createRadialGradient(mousePos.x, mousePos.y,
|
|
16
|
+
context.arc(mousePos.x, mousePos.y, lightOptions.radius, arcStart, doublePI);
|
|
17
|
+
const gradientAmbientLight = context.createRadialGradient(mousePos.x, mousePos.y, arcStart, mousePos.x, mousePos.y, lightOptions.radius);
|
|
14
18
|
const gradientRgb = container.canvas.mouseLight;
|
|
15
|
-
if (!gradientRgb
|
|
19
|
+
if (!gradientRgb?.start || !gradientRgb.stop) {
|
|
16
20
|
return;
|
|
17
21
|
}
|
|
18
|
-
gradientAmbientLight.addColorStop(
|
|
19
|
-
gradientAmbientLight.addColorStop(
|
|
22
|
+
gradientAmbientLight.addColorStop(gradientPos.min, (0, engine_1.getStyleFromRgb)(gradientRgb.start));
|
|
23
|
+
gradientAmbientLight.addColorStop(gradientPos.max, (0, engine_1.getStyleFromRgb)(gradientRgb.stop));
|
|
20
24
|
context.fillStyle = gradientAmbientLight;
|
|
21
25
|
context.fill();
|
|
22
26
|
}
|
|
@@ -30,7 +34,7 @@ function drawParticleShadow(container, context, particle, mousePos) {
|
|
|
30
34
|
if (!shadowRgb) {
|
|
31
35
|
return;
|
|
32
36
|
}
|
|
33
|
-
const radius = particle.getRadius(), sides = particle.sides, full =
|
|
37
|
+
const radius = particle.getRadius(), sides = particle.sides, full = doublePI / sides, angle = -particle.rotation + quarterPI, factor = 1, dots = [];
|
|
34
38
|
for (let i = 0; i < sides; i++) {
|
|
35
39
|
dots.push({
|
|
36
40
|
x: pos.x + radius * Math.sin(angle + full * i) * factor,
|
|
@@ -40,16 +44,16 @@ function drawParticleShadow(container, context, particle, mousePos) {
|
|
|
40
44
|
const points = [], shadowLength = shadowOptions.length;
|
|
41
45
|
for (const dot of dots) {
|
|
42
46
|
const dotAngle = Math.atan2(mousePos.y - dot.y, mousePos.x - dot.x), end = {
|
|
43
|
-
x: dot.x + shadowLength * Math.sin(-dotAngle -
|
|
44
|
-
y: dot.y + shadowLength * Math.cos(-dotAngle -
|
|
47
|
+
x: dot.x + shadowLength * Math.sin(-dotAngle - halfPI),
|
|
48
|
+
y: dot.y + shadowLength * Math.cos(-dotAngle - halfPI),
|
|
45
49
|
};
|
|
46
50
|
points.push({
|
|
47
51
|
end: end,
|
|
48
52
|
start: dot,
|
|
49
53
|
});
|
|
50
54
|
}
|
|
51
|
-
const shadowColor = (0, engine_1.getStyleFromRgb)(shadowRgb), last = points.length -
|
|
52
|
-
for (let i = last, n = 0; i >=
|
|
55
|
+
const shadowColor = (0, engine_1.getStyleFromRgb)(shadowRgb), lastOffset = 1, firstPos = 0, last = points.length - lastOffset;
|
|
56
|
+
for (let i = last, n = 0; i >= firstPos; n = i--) {
|
|
53
57
|
context.beginPath();
|
|
54
58
|
context.moveTo(points[i].start.x, points[i].start.y);
|
|
55
59
|
context.lineTo(points[n].start.x, points[n].start.y);
|
package/cjs/index.js
CHANGED
|
@@ -10,16 +10,32 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
13
25
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
27
|
};
|
|
16
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
29
|
exports.loadLightInteraction = void 0;
|
|
18
|
-
const ExternalLighter_js_1 = require("./ExternalLighter.js");
|
|
19
|
-
const ParticlesLighter_js_1 = require("./ParticlesLighter.js");
|
|
20
30
|
async function loadLightInteraction(engine, refresh = true) {
|
|
21
|
-
await engine.addInteractor("externalLight", (container) =>
|
|
22
|
-
|
|
31
|
+
await engine.addInteractor("externalLight", async (container) => {
|
|
32
|
+
const { ExternalLighter } = await Promise.resolve().then(() => __importStar(require("./ExternalLighter.js")));
|
|
33
|
+
return new ExternalLighter(container);
|
|
34
|
+
}, refresh);
|
|
35
|
+
await engine.addInteractor("particlesLight", async (container) => {
|
|
36
|
+
const { ParticlesLighter } = await Promise.resolve().then(() => __importStar(require("./ParticlesLighter.js")));
|
|
37
|
+
return new ParticlesLighter(container);
|
|
38
|
+
}, refresh);
|
|
23
39
|
}
|
|
24
40
|
exports.loadLightInteraction = loadLightInteraction;
|
|
25
41
|
__exportStar(require("./Options/Classes/Light.js"), exports);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v3.2.0
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_interaction_light"] = this["webpackChunk_tsparticles_interaction_light"] || []).push([["dist_browser_ExternalLighter_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "./dist/browser/ExternalLighter.js":
|
|
21
|
+
/*!*****************************************!*\
|
|
22
|
+
!*** ./dist/browser/ExternalLighter.js ***!
|
|
23
|
+
\*****************************************/
|
|
24
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25
|
+
|
|
26
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ExternalLighter: () => (/* binding */ ExternalLighter)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Utils.js */ \"./dist/browser/Utils.js\");\n/* harmony import */ var _Options_Classes_Light_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Options/Classes/Light.js */ \"./dist/browser/Options/Classes/Light.js\");\n\n\n\nclass ExternalLighter extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ExternalInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {}\n init() {}\n async interact() {\n const container = this.container,\n options = container.actualOptions,\n interactivity = container.interactivity;\n if (!options.interactivity.events.onHover.enable || interactivity.status !== \"pointermove\") {\n return;\n }\n const mousePos = interactivity.mouse.position;\n if (!mousePos) {\n return;\n }\n container.canvas.draw(ctx => {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__.drawLight)(container, ctx, mousePos);\n });\n await Promise.resolve();\n }\n isEnabled(particle) {\n const container = this.container,\n mouse = container.interactivity.mouse,\n interactivity = particle?.interactivity ?? container.actualOptions.interactivity,\n events = interactivity.events;\n if (!(events.onHover.enable && mouse.position)) {\n return false;\n }\n const res = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isInArray)(_Utils_js__WEBPACK_IMPORTED_MODULE_1__.lightMode, events.onHover.mode);\n if (res && interactivity.modes.light) {\n const lightGradient = interactivity.modes.light.area.gradient;\n container.canvas.mouseLight = {\n start: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToRgb)(lightGradient.start),\n stop: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToRgb)(lightGradient.stop)\n };\n }\n return res;\n }\n loadModeOptions(options, ...sources) {\n if (!options.light) {\n options.light = new _Options_Classes_Light_js__WEBPACK_IMPORTED_MODULE_2__.Light();\n }\n for (const source of sources) {\n options.light.load(source?.light);\n }\n }\n reset() {}\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-light/./dist/browser/ExternalLighter.js?");
|
|
27
|
+
|
|
28
|
+
/***/ }),
|
|
29
|
+
|
|
30
|
+
/***/ "./dist/browser/Utils.js":
|
|
31
|
+
/*!*******************************!*\
|
|
32
|
+
!*** ./dist/browser/Utils.js ***!
|
|
33
|
+
\*******************************/
|
|
34
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
35
|
+
|
|
36
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ drawLight: () => (/* binding */ drawLight),\n/* harmony export */ drawParticleShadow: () => (/* binding */ drawParticleShadow),\n/* harmony export */ lightMode: () => (/* binding */ lightMode)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nconst gradientPos = {\n max: 1,\n min: 0\n },\n half = 0.5,\n double = 2,\n halfPI = Math.PI * half,\n doublePI = Math.PI * double,\n quarter = 0.25,\n quarterPI = Math.PI * quarter,\n arcStart = 0;\nconst lightMode = \"light\";\nfunction drawLight(container, context, mousePos) {\n const lightOptions = container.actualOptions.interactivity.modes.light?.area;\n if (!lightOptions) {\n return;\n }\n context.beginPath();\n context.arc(mousePos.x, mousePos.y, lightOptions.radius, arcStart, doublePI);\n const gradientAmbientLight = context.createRadialGradient(mousePos.x, mousePos.y, arcStart, mousePos.x, mousePos.y, lightOptions.radius);\n const gradientRgb = container.canvas.mouseLight;\n if (!gradientRgb?.start || !gradientRgb.stop) {\n return;\n }\n gradientAmbientLight.addColorStop(gradientPos.min, (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getStyleFromRgb)(gradientRgb.start));\n gradientAmbientLight.addColorStop(gradientPos.max, (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getStyleFromRgb)(gradientRgb.stop));\n context.fillStyle = gradientAmbientLight;\n context.fill();\n}\nfunction drawParticleShadow(container, context, particle, mousePos) {\n const pos = particle.getPosition(),\n shadowOptions = container.actualOptions.interactivity.modes.light?.shadow;\n if (!shadowOptions) {\n return;\n }\n const shadowRgb = particle.lightShadow;\n if (!shadowRgb) {\n return;\n }\n const radius = particle.getRadius(),\n sides = particle.sides,\n full = doublePI / sides,\n angle = -particle.rotation + quarterPI,\n factor = 1,\n dots = [];\n for (let i = 0; i < sides; i++) {\n dots.push({\n x: pos.x + radius * Math.sin(angle + full * i) * factor,\n y: pos.y + radius * Math.cos(angle + full * i) * factor\n });\n }\n const points = [],\n shadowLength = shadowOptions.length;\n for (const dot of dots) {\n const dotAngle = Math.atan2(mousePos.y - dot.y, mousePos.x - dot.x),\n end = {\n x: dot.x + shadowLength * Math.sin(-dotAngle - halfPI),\n y: dot.y + shadowLength * Math.cos(-dotAngle - halfPI)\n };\n points.push({\n end: end,\n start: dot\n });\n }\n const shadowColor = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getStyleFromRgb)(shadowRgb),\n lastOffset = 1,\n firstPos = 0,\n last = points.length - lastOffset;\n for (let i = last, n = 0; i >= firstPos; n = i--) {\n context.beginPath();\n context.moveTo(points[i].start.x, points[i].start.y);\n context.lineTo(points[n].start.x, points[n].start.y);\n context.lineTo(points[n].end.x, points[n].end.y);\n context.lineTo(points[i].end.x, points[i].end.y);\n context.fillStyle = shadowColor;\n context.fill();\n }\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-light/./dist/browser/Utils.js?");
|
|
37
|
+
|
|
38
|
+
/***/ })
|
|
39
|
+
|
|
40
|
+
}]);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v3.2.0
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_interaction_light"] = this["webpackChunk_tsparticles_interaction_light"] || []).push([["dist_browser_ParticlesLighter_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "./dist/browser/ParticlesLighter.js":
|
|
21
|
+
/*!******************************************!*\
|
|
22
|
+
!*** ./dist/browser/ParticlesLighter.js ***!
|
|
23
|
+
\******************************************/
|
|
24
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25
|
+
|
|
26
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ParticlesLighter: () => (/* binding */ ParticlesLighter)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Utils.js */ \"./dist/browser/Utils.js\");\n\n\nclass ParticlesLighter extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ParticlesInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {}\n init() {}\n async interact(particle) {\n const container = this.container,\n options = container.actualOptions,\n interactivity = container.interactivity;\n if (!options.interactivity.events.onHover.enable || interactivity.status !== \"pointermove\") {\n return;\n }\n const mousePos = interactivity.mouse.position;\n if (!mousePos) {\n return;\n }\n container.canvas.draw(ctx => {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__.drawParticleShadow)(container, ctx, particle, mousePos);\n });\n await Promise.resolve();\n }\n isEnabled(particle) {\n const container = this.container,\n interactivity = particle.interactivity ?? container.actualOptions.interactivity,\n mouse = container.interactivity.mouse,\n events = interactivity.events;\n if (!(events.onHover.enable && mouse.position)) {\n return false;\n }\n const res = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isInArray)(_Utils_js__WEBPACK_IMPORTED_MODULE_1__.lightMode, events.onHover.mode);\n if (res && interactivity.modes.light) {\n const shadowOptions = interactivity.modes.light.shadow;\n particle.lightShadow = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToRgb)(shadowOptions.color);\n }\n return res;\n }\n reset() {}\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-light/./dist/browser/ParticlesLighter.js?");
|
|
27
|
+
|
|
28
|
+
/***/ }),
|
|
29
|
+
|
|
30
|
+
/***/ "./dist/browser/Utils.js":
|
|
31
|
+
/*!*******************************!*\
|
|
32
|
+
!*** ./dist/browser/Utils.js ***!
|
|
33
|
+
\*******************************/
|
|
34
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
35
|
+
|
|
36
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ drawLight: () => (/* binding */ drawLight),\n/* harmony export */ drawParticleShadow: () => (/* binding */ drawParticleShadow),\n/* harmony export */ lightMode: () => (/* binding */ lightMode)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nconst gradientPos = {\n max: 1,\n min: 0\n },\n half = 0.5,\n double = 2,\n halfPI = Math.PI * half,\n doublePI = Math.PI * double,\n quarter = 0.25,\n quarterPI = Math.PI * quarter,\n arcStart = 0;\nconst lightMode = \"light\";\nfunction drawLight(container, context, mousePos) {\n const lightOptions = container.actualOptions.interactivity.modes.light?.area;\n if (!lightOptions) {\n return;\n }\n context.beginPath();\n context.arc(mousePos.x, mousePos.y, lightOptions.radius, arcStart, doublePI);\n const gradientAmbientLight = context.createRadialGradient(mousePos.x, mousePos.y, arcStart, mousePos.x, mousePos.y, lightOptions.radius);\n const gradientRgb = container.canvas.mouseLight;\n if (!gradientRgb?.start || !gradientRgb.stop) {\n return;\n }\n gradientAmbientLight.addColorStop(gradientPos.min, (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getStyleFromRgb)(gradientRgb.start));\n gradientAmbientLight.addColorStop(gradientPos.max, (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getStyleFromRgb)(gradientRgb.stop));\n context.fillStyle = gradientAmbientLight;\n context.fill();\n}\nfunction drawParticleShadow(container, context, particle, mousePos) {\n const pos = particle.getPosition(),\n shadowOptions = container.actualOptions.interactivity.modes.light?.shadow;\n if (!shadowOptions) {\n return;\n }\n const shadowRgb = particle.lightShadow;\n if (!shadowRgb) {\n return;\n }\n const radius = particle.getRadius(),\n sides = particle.sides,\n full = doublePI / sides,\n angle = -particle.rotation + quarterPI,\n factor = 1,\n dots = [];\n for (let i = 0; i < sides; i++) {\n dots.push({\n x: pos.x + radius * Math.sin(angle + full * i) * factor,\n y: pos.y + radius * Math.cos(angle + full * i) * factor\n });\n }\n const points = [],\n shadowLength = shadowOptions.length;\n for (const dot of dots) {\n const dotAngle = Math.atan2(mousePos.y - dot.y, mousePos.x - dot.x),\n end = {\n x: dot.x + shadowLength * Math.sin(-dotAngle - halfPI),\n y: dot.y + shadowLength * Math.cos(-dotAngle - halfPI)\n };\n points.push({\n end: end,\n start: dot\n });\n }\n const shadowColor = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getStyleFromRgb)(shadowRgb),\n lastOffset = 1,\n firstPos = 0,\n last = points.length - lastOffset;\n for (let i = last, n = 0; i >= firstPos; n = i--) {\n context.beginPath();\n context.moveTo(points[i].start.x, points[i].start.y);\n context.lineTo(points[n].start.x, points[n].start.y);\n context.lineTo(points[n].end.x, points[n].end.y);\n context.lineTo(points[i].end.x, points[i].end.y);\n context.fillStyle = shadowColor;\n context.fill();\n }\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-light/./dist/browser/Utils.js?");
|
|
37
|
+
|
|
38
|
+
/***/ })
|
|
39
|
+
|
|
40
|
+
}]);
|
package/esm/ExternalLighter.js
CHANGED
|
@@ -21,6 +21,7 @@ export class ExternalLighter extends ExternalInteractorBase {
|
|
|
21
21
|
container.canvas.draw((ctx) => {
|
|
22
22
|
drawLight(container, ctx, mousePos);
|
|
23
23
|
});
|
|
24
|
+
await Promise.resolve();
|
|
24
25
|
}
|
|
25
26
|
isEnabled(particle) {
|
|
26
27
|
const container = this.container, mouse = container.interactivity.mouse, interactivity = particle?.interactivity ?? container.actualOptions.interactivity, events = interactivity.events;
|
package/esm/ParticlesLighter.js
CHANGED
|
@@ -20,6 +20,7 @@ export class ParticlesLighter extends ParticlesInteractorBase {
|
|
|
20
20
|
container.canvas.draw((ctx) => {
|
|
21
21
|
drawParticleShadow(container, ctx, particle, mousePos);
|
|
22
22
|
});
|
|
23
|
+
await Promise.resolve();
|
|
23
24
|
}
|
|
24
25
|
isEnabled(particle) {
|
|
25
26
|
const container = this.container, interactivity = particle.interactivity ?? container.actualOptions.interactivity, mouse = container.interactivity.mouse, events = interactivity.events;
|
package/esm/Utils.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { getStyleFromRgb } from "@tsparticles/engine";
|
|
2
|
+
const gradientPos = {
|
|
3
|
+
max: 1,
|
|
4
|
+
min: 0,
|
|
5
|
+
}, half = 0.5, double = 2, halfPI = Math.PI * half, doublePI = Math.PI * double, quarter = 0.25, quarterPI = Math.PI * quarter, arcStart = 0;
|
|
2
6
|
export const lightMode = "light";
|
|
3
7
|
export function drawLight(container, context, mousePos) {
|
|
4
8
|
const lightOptions = container.actualOptions.interactivity.modes.light?.area;
|
|
@@ -6,14 +10,14 @@ export function drawLight(container, context, mousePos) {
|
|
|
6
10
|
return;
|
|
7
11
|
}
|
|
8
12
|
context.beginPath();
|
|
9
|
-
context.arc(mousePos.x, mousePos.y, lightOptions.radius,
|
|
10
|
-
const gradientAmbientLight = context.createRadialGradient(mousePos.x, mousePos.y,
|
|
13
|
+
context.arc(mousePos.x, mousePos.y, lightOptions.radius, arcStart, doublePI);
|
|
14
|
+
const gradientAmbientLight = context.createRadialGradient(mousePos.x, mousePos.y, arcStart, mousePos.x, mousePos.y, lightOptions.radius);
|
|
11
15
|
const gradientRgb = container.canvas.mouseLight;
|
|
12
|
-
if (!gradientRgb
|
|
16
|
+
if (!gradientRgb?.start || !gradientRgb.stop) {
|
|
13
17
|
return;
|
|
14
18
|
}
|
|
15
|
-
gradientAmbientLight.addColorStop(
|
|
16
|
-
gradientAmbientLight.addColorStop(
|
|
19
|
+
gradientAmbientLight.addColorStop(gradientPos.min, getStyleFromRgb(gradientRgb.start));
|
|
20
|
+
gradientAmbientLight.addColorStop(gradientPos.max, getStyleFromRgb(gradientRgb.stop));
|
|
17
21
|
context.fillStyle = gradientAmbientLight;
|
|
18
22
|
context.fill();
|
|
19
23
|
}
|
|
@@ -26,7 +30,7 @@ export function drawParticleShadow(container, context, particle, mousePos) {
|
|
|
26
30
|
if (!shadowRgb) {
|
|
27
31
|
return;
|
|
28
32
|
}
|
|
29
|
-
const radius = particle.getRadius(), sides = particle.sides, full =
|
|
33
|
+
const radius = particle.getRadius(), sides = particle.sides, full = doublePI / sides, angle = -particle.rotation + quarterPI, factor = 1, dots = [];
|
|
30
34
|
for (let i = 0; i < sides; i++) {
|
|
31
35
|
dots.push({
|
|
32
36
|
x: pos.x + radius * Math.sin(angle + full * i) * factor,
|
|
@@ -36,16 +40,16 @@ export function drawParticleShadow(container, context, particle, mousePos) {
|
|
|
36
40
|
const points = [], shadowLength = shadowOptions.length;
|
|
37
41
|
for (const dot of dots) {
|
|
38
42
|
const dotAngle = Math.atan2(mousePos.y - dot.y, mousePos.x - dot.x), end = {
|
|
39
|
-
x: dot.x + shadowLength * Math.sin(-dotAngle -
|
|
40
|
-
y: dot.y + shadowLength * Math.cos(-dotAngle -
|
|
43
|
+
x: dot.x + shadowLength * Math.sin(-dotAngle - halfPI),
|
|
44
|
+
y: dot.y + shadowLength * Math.cos(-dotAngle - halfPI),
|
|
41
45
|
};
|
|
42
46
|
points.push({
|
|
43
47
|
end: end,
|
|
44
48
|
start: dot,
|
|
45
49
|
});
|
|
46
50
|
}
|
|
47
|
-
const shadowColor = getStyleFromRgb(shadowRgb), last = points.length -
|
|
48
|
-
for (let i = last, n = 0; i >=
|
|
51
|
+
const shadowColor = getStyleFromRgb(shadowRgb), lastOffset = 1, firstPos = 0, last = points.length - lastOffset;
|
|
52
|
+
for (let i = last, n = 0; i >= firstPos; n = i--) {
|
|
49
53
|
context.beginPath();
|
|
50
54
|
context.moveTo(points[i].start.x, points[i].start.y);
|
|
51
55
|
context.lineTo(points[n].start.x, points[n].start.y);
|
package/esm/index.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { ExternalLighter } from "./ExternalLighter.js";
|
|
2
|
-
import { ParticlesLighter } from "./ParticlesLighter.js";
|
|
3
1
|
export async function loadLightInteraction(engine, refresh = true) {
|
|
4
|
-
await engine.addInteractor("externalLight", (container) =>
|
|
5
|
-
|
|
2
|
+
await engine.addInteractor("externalLight", async (container) => {
|
|
3
|
+
const { ExternalLighter } = await import("./ExternalLighter.js");
|
|
4
|
+
return new ExternalLighter(container);
|
|
5
|
+
}, refresh);
|
|
6
|
+
await engine.addInteractor("particlesLight", async (container) => {
|
|
7
|
+
const { ParticlesLighter } = await import("./ParticlesLighter.js");
|
|
8
|
+
return new ParticlesLighter(container);
|
|
9
|
+
}, refresh);
|
|
6
10
|
}
|
|
7
11
|
export * from "./Options/Classes/Light.js";
|
|
8
12
|
export * from "./Options/Classes/LightArea.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/interaction-light",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "tsParticles Light interaction",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"./package.json": "./package.json"
|
|
102
102
|
},
|
|
103
103
|
"dependencies": {
|
|
104
|
-
"@tsparticles/engine": "^3.0
|
|
104
|
+
"@tsparticles/engine": "^3.2.0"
|
|
105
105
|
},
|
|
106
106
|
"publishConfig": {
|
|
107
107
|
"access": "public"
|
package/report.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8"/>
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
6
|
-
<title>@tsparticles/interaction-light [
|
|
6
|
+
<title>@tsparticles/interaction-light [31 Jan 2024 at 02:04]</title>
|
|
7
7
|
<link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6P3j7vfS5PNnpNUxhcbO7f7F6v3O4vHK3/DA2u631Ouy0eqXweKJud5wqthfoNMMbLvY8f73+v2dxeR8sNtTmdDx9/zX6PSjyeaCtd1YnNGX2PuQveCGt95Nls42h8dLlM3F4vBtAAAAM3RSTlMAAyOx0/sKBvik8opWGBMOAe3l1snDm2E9LSb06eHcu5JpHbarfHZCN9CBb08zzkdNS0kYaptYAAAFV0lEQVRYw92X51/aYBDHHS2O2qqttVbrqNq9m+TJIAYIShBkWwqIiCgoWvfeq7Z2/s29hyQNyUcR7LveGwVyXy6XH8/9rqxglLfUPLxVduUor3h0rfp2TYvpivk37929TkG037hffoX0+peVtZQc1589rigVUdXS/ABSAyEmGIO/1XfvldSK8vs3OqB6u3m0nxmIrvgB0dj7rr7Y9IbuF68hnfFaiHA/sxqm0wciIG43P60qKv9WXWc1RXGh/mFESFABTSBi0sNAKzqet17eCtOb3kZIDwxEEU0oAIJGYxNBDhBND29e0rtXXbcpuPmED9IhEAAQ/AXEaF8EPmnrrKsv0LvWR3fg5sWDNAFZOgAgaKvZDogHNU9MFwnnYROkc56RD5CjAbQX9Ow4g7upCsvYu55aSI/Nj0H1akgKQEUM94dwK65hYRmFU9MIcH/fqJYOZYcnuJSU/waKDgTOEVaVKhwrTRP5XzgSpAITYzom7UvkhFX5VutmxeNnWDjjswTKTyfgluNDGbUpWissXhF3s7mlSml+czWkg3D0l1nNjGNjz3myOQOa1KM/jOS6ebdbAVTCi4gljHSFrviza7tOgRWcS0MOUX9zdNgag5w7rRqA44Lzw0hr1WqES36dFliSJFlh2rXIae3FFcDDgKdxrUIDePr8jGcSClV1u7A9xeN0ModY/pHMxmR1EzRh8TJiwqsHmKW0l4FCEZI+jHio+JdPPE9qwQtTRxku2D8sIeRL2LnxWSllANCQGOIiqVHAz2ye2JR0DcH+HoxDkaADLjgxjKQ+AwCX/g0+DNgdG0ukYCONAe+dbc2IAc6fwt1ARoDSezNHxV2Cmzwv3O6lDMV55edBGwGK9n1+x2F8EDfAGCxug8MhpsMEcTEAWf3rx2vZhe/LAmtIn/6apE6PN0ULKgywD9mmdxbmFl3OvD5AS5fW5zLbv/YHmcsBTjf/afDz3MaZTVCfAP9z6/Bw6ycv8EUBWJIn9zYcoAWWlW9+OzO3vkTy8H+RANLmdrpOuYWdZYEXpo+TlCJrW5EARb7fF+bWdqf3hhyZI1nWJQHgznErZhbjoEsWqi8dQNoE294aldzFurwSABL2XXMf9+H1VQGke9exw5P/AnA5Pv5ngMul7LOvO922iwACu8WkCwLCafvM4CeWPxfA8lNHcWZSoi8EwMAIciKX2Z4SWCMAa3snCZ/G4EA8D6CMLNFsGQhkkz/gQNEBbPCbWsxGUpYVu3z8IyNAknwJkfPMEhLyrdi5RTyUVACkw4GSFRNWJNEW+fgPGwHD8/JxnRuLabN4CGNRkAE23na2+VmEAUmrYymSGjMAYqH84YUIyzgzs3XC7gNgH36Vcc4zKY9o9fgPBXUAiHHwVboBHGLiX6Zcjp1f2wu4tvzZKo0ecPnDtQYDQvJXaBeNzce45Fp28ZQLrEZVuFqgBwOalArKXnW1UzlnSusQKJqKYNuz4tOnI6sZG4zanpemv+7ySU2jbA9h6uhcgpfy6G2PahirDZ6zvq6zDduMVFTKvzw8wgyEdelwY9in3XkEPs3osJuwRQ4qTkfzifndg9Gfc4pdsu82+tTnHZTBa2EAMrqr2t43pguc8tNm7JQVQ2S0ukj2d22dhXYP0/veWtwKrCkNoNimAN5+Xr/oLrxswKbVJjteWrX7eR63o4j9q0GxnaBdWgGA5VStpanIjQmEhV0/nVt5VOFUvix6awJhPcAaTEShgrG+iGyvb5a0Ndb1YGHFPEwoqAinoaykaID1o1pdPNu7XsnCKQ3R+hwWIIhGvORcJUBYXe3Xa3vq/mF/N9V13ugufMkfXn+KHsRD0B8AAAAASUVORK5CYII=" type="image/x-icon" />
|
|
8
8
|
|
|
9
9
|
<script>
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
<body>
|
|
32
32
|
<div id="app"></div>
|
|
33
33
|
<script>
|
|
34
|
-
window.chartData = [
|
|
35
|
-
window.entrypoints = ["tsparticles.interaction.light
|
|
34
|
+
window.chartData = [];
|
|
35
|
+
window.entrypoints = ["tsparticles.interaction.light.min"];
|
|
36
36
|
window.defaultSizes = "parsed";
|
|
37
37
|
</script>
|
|
38
38
|
</body>
|