@tsparticles/shape-circle 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.
@@ -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.2
7
+ * v3.0.0-beta.4
8
8
  */
9
9
  (function webpackUniversalModuleDefinition(root, factory) {
10
10
  if(typeof exports === 'object' && typeof module === 'object')
@@ -99,7 +99,12 @@ var engine_root_window_ = __webpack_require__(533);
99
99
  ;// CONCATENATED MODULE: ./dist/browser/CircleDrawer.js
100
100
 
101
101
  class CircleDrawer {
102
- draw(context, particle, radius) {
102
+ draw(data) {
103
+ const {
104
+ context,
105
+ particle,
106
+ radius
107
+ } = data;
103
108
  if (!particle.circleRange) {
104
109
  particle.circleRange = {
105
110
  min: 0,
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.shape.circle.min.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,(e=>(()=>{"use strict";var t={533:t=>{t.exports=e}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{n.r(o),n.d(o,{loadCircleShape:()=>r});var e=n(533);class t{draw(e,t,r){t.circleRange||(t.circleRange={min:0,max:2*Math.PI});const n=t.circleRange;e.arc(0,0,r,n.min,n.max,!1)}getSidesCount(){return 12}particleInit(t,r){const n=r.shapeData,o=n?.angle??{max:360,min:0};r.circleRange=(0,e.isObject)(o)?{min:o.min*Math.PI/180,max:o.max*Math.PI/180}:{min:0,max:o*Math.PI/180}}}async function r(e,r=!0){await e.addShape("circle",new t,r)}})(),o})()));
2
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,(e=>(()=>{"use strict";var t={533:t=>{t.exports=e}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{n.r(o),n.d(o,{loadCircleShape:()=>r});var e=n(533);class t{draw(e){const{context:t,particle:r,radius:n}=e;r.circleRange||(r.circleRange={min:0,max:2*Math.PI});const o=r.circleRange;t.arc(0,0,n,o.min,o.max,!1)}getSidesCount(){return 12}particleInit(t,r){const n=r.shapeData,o=n?.angle??{max:360,min:0};r.circleRange=(0,e.isObject)(o)?{min:o.min*Math.PI/180,max:o.max*Math.PI/180}:{min:0,max:o*Math.PI/180}}}async function r(e,r=!0){await e.addShape("circle",new t,r)}})(),o})()));
@@ -1 +1 @@
1
- /*! tsParticles Circle Shape v3.0.0-beta.2 by Matteo Bruni */
1
+ /*! tsParticles Circle Shape v3.0.0-beta.4 by Matteo Bruni */
@@ -1,7 +1,7 @@
1
- import { type Container, type IShapeDrawer } from "@tsparticles/engine";
1
+ import { type Container, type IShapeDrawData, type IShapeDrawer } from "@tsparticles/engine";
2
2
  import type { CircleParticle } from "./CircleParticle.js";
3
- export declare class CircleDrawer implements IShapeDrawer {
4
- draw(context: CanvasRenderingContext2D, particle: CircleParticle, radius: number): void;
3
+ export declare class CircleDrawer implements IShapeDrawer<CircleParticle> {
4
+ draw(data: IShapeDrawData<CircleParticle>): void;
5
5
  getSidesCount(): number;
6
6
  particleInit(container: Container, particle: CircleParticle): void;
7
7
  }
@@ -12,7 +12,8 @@
12
12
  exports.CircleDrawer = void 0;
13
13
  const engine_1 = require("@tsparticles/engine");
14
14
  class CircleDrawer {
15
- draw(context, particle, radius) {
15
+ draw(data) {
16
+ const { context, particle, radius } = data;
16
17
  if (!particle.circleRange) {
17
18
  particle.circleRange = { min: 0, max: Math.PI * 2 };
18
19
  }