@tsparticles/shape-circle
Advanced tools
Comparing version 3.0.0-beta.2 to 3.0.0-beta.3
import { isObject } from "@tsparticles/engine"; | ||
export class CircleDrawer { | ||
draw(context, particle, radius) { | ||
draw(data) { | ||
const { context, particle, radius } = data; | ||
if (!particle.circleRange) { | ||
@@ -5,0 +6,0 @@ particle.circleRange = { min: 0, max: Math.PI * 2 }; |
@@ -6,3 +6,4 @@ "use strict"; | ||
class CircleDrawer { | ||
draw(context, particle, radius) { | ||
draw(data) { | ||
const { context, particle, radius } = data; | ||
if (!particle.circleRange) { | ||
@@ -9,0 +10,0 @@ particle.circleRange = { min: 0, max: Math.PI * 2 }; |
import { isObject } from "@tsparticles/engine"; | ||
export class CircleDrawer { | ||
draw(context, particle, radius) { | ||
draw(data) { | ||
const { context, particle, radius } = data; | ||
if (!particle.circleRange) { | ||
@@ -5,0 +6,0 @@ particle.circleRange = { min: 0, max: Math.PI * 2 }; |
{ | ||
"name": "@tsparticles/shape-circle", | ||
"version": "3.0.0-beta.2", | ||
"version": "3.0.0-beta.3", | ||
"description": "tsParticles circle shape", | ||
@@ -62,3 +62,3 @@ "homepage": "https://particles.js.org", | ||
"dependencies": { | ||
"@tsparticles/engine": "^3.0.0-beta.2" | ||
"@tsparticles/engine": "^3.0.0-beta.3" | ||
}, | ||
@@ -65,0 +65,0 @@ "publishConfig": { |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v3.0.0-beta.2 | ||
* v3.0.0-beta.3 | ||
*/ | ||
@@ -103,3 +103,8 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
class CircleDrawer { | ||
draw(context, particle, radius) { | ||
draw(data) { | ||
const { | ||
context, | ||
particle, | ||
radius | ||
} = data; | ||
if (!particle.circleRange) { | ||
@@ -106,0 +111,0 @@ particle.circleRange = { |
/*! For license information please see tsparticles.shape.circle.min.js.LICENSE.txt */ | ||
!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})())); | ||
!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 +0,1 @@ | ||
/*! tsParticles Circle Shape v3.0.0-beta.2 by Matteo Bruni */ | ||
/*! tsParticles Circle Shape v3.0.0-beta.3 by Matteo Bruni */ |
@@ -1,7 +0,7 @@ | ||
import { type Container, type IShapeDrawer } from "@tsparticles/engine"; | ||
import { type Container, type IShapeDrawData, type IShapeDrawer } from "@tsparticles/engine"; | ||
import type { CircleParticle } from "./CircleParticle.js"; | ||
export declare class CircleDrawer implements IShapeDrawer { | ||
draw(context: CanvasRenderingContext2D, particle: CircleParticle, radius: number): void; | ||
export declare class CircleDrawer implements IShapeDrawer<CircleParticle> { | ||
draw(data: IShapeDrawData<CircleParticle>): void; | ||
getSidesCount(): number; | ||
particleInit(container: Container, particle: CircleParticle): void; | ||
} |
@@ -15,3 +15,4 @@ (function (factory) { | ||
class CircleDrawer { | ||
draw(context, particle, radius) { | ||
draw(data) { | ||
const { context, particle, radius } = data; | ||
if (!particle.circleRange) { | ||
@@ -18,0 +19,0 @@ particle.circleRange = { min: 0, max: Math.PI * 2 }; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
296132
341