@tsparticles/shape-line 3.0.0-beta.2 → 3.0.0-beta.4
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/browser/LineDrawer.js +2 -2
- package/cjs/LineDrawer.js +2 -2
- package/esm/LineDrawer.js +2 -2
- package/package.json +3 -3
- package/report.html +4 -22
- package/tsparticles.shape.line.js +8 -3
- package/tsparticles.shape.line.min.js +1 -1
- package/tsparticles.shape.line.min.js.LICENSE.txt +1 -1
- package/types/LineDrawer.d.ts +2 -2
- package/umd/LineDrawer.js +2 -2
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v3.0.0-beta.
|
|
7
|
+
* v3.0.0-beta.4
|
|
8
8
|
*/
|
|
9
9
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
10
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -62,8 +62,13 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
62
62
|
|
|
63
63
|
;// CONCATENATED MODULE: ./dist/browser/LineDrawer.js
|
|
64
64
|
class LineDrawer {
|
|
65
|
-
draw(
|
|
66
|
-
const
|
|
65
|
+
draw(data) {
|
|
66
|
+
const {
|
|
67
|
+
context,
|
|
68
|
+
particle,
|
|
69
|
+
radius
|
|
70
|
+
} = data,
|
|
71
|
+
shapeData = particle.shapeData;
|
|
67
72
|
context.moveTo(-radius / 2, 0);
|
|
68
73
|
context.lineTo(radius / 2, 0);
|
|
69
74
|
context.lineCap = shapeData?.cap ?? "butt";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.shape.line.min.js.LICENSE.txt */
|
|
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
|
|
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 r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(this,(()=>(()=>{"use strict";var e={d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r: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,{loadLineShape:()=>r});class o{draw(e){const{context:t,particle:o,radius:r}=e,n=o.shapeData;t.moveTo(-r/2,0),t.lineTo(r/2,0),t.lineCap=n?.cap??"butt"}getSidesCount(){return 1}}async function r(e,t=!0){await e.addShape("line",new o,t)}return t})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Line Shape v3.0.0-beta.
|
|
1
|
+
/*! tsParticles Line Shape v3.0.0-beta.4 by Matteo Bruni */
|
package/types/LineDrawer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IShapeDrawData, IShapeDrawer } from "@tsparticles/engine";
|
|
2
2
|
export declare class LineDrawer implements IShapeDrawer {
|
|
3
|
-
draw(
|
|
3
|
+
draw(data: IShapeDrawData): void;
|
|
4
4
|
getSidesCount(): number;
|
|
5
5
|
}
|
package/umd/LineDrawer.js
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.LineDrawer = void 0;
|
|
13
13
|
class LineDrawer {
|
|
14
|
-
draw(
|
|
15
|
-
const shapeData = particle.shapeData;
|
|
14
|
+
draw(data) {
|
|
15
|
+
const { context, particle, radius } = data, shapeData = particle.shapeData;
|
|
16
16
|
context.moveTo(-radius / 2, 0);
|
|
17
17
|
context.lineTo(radius / 2, 0);
|
|
18
18
|
context.lineCap = shapeData?.cap ?? "butt";
|