@tsparticles/effect-bubble 3.9.1 → 4.0.0-alpha.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/178.min.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 178.min.js.LICENSE.txt */
2
+ (this.webpackChunk_tsparticles_effect_bubble=this.webpackChunk_tsparticles_effect_bubble||[]).push([[178],{178(e,t,l){l.d(t,{BubbleDrawer:()=>b});var a=l(303);class b{drawAfter(e){const{context:t,radius:l}=e,b=l/3;t.beginPath(),t.arc(b,-b,b,a.defaultAngle,a.doublePI,!1),t.closePath(),t.fillStyle="#fff9",t.fill()}}}}]);
@@ -0,0 +1 @@
1
+ /*! tsParticles Bubble Shape v4.0.0-alpha.0 by Matteo Bruni */
@@ -1,7 +1,7 @@
1
1
  import { defaultAngle, doublePI } from "@tsparticles/engine";
2
2
  const bubbleFactor = 3;
3
3
  export class BubbleDrawer {
4
- draw(data) {
4
+ drawAfter(data) {
5
5
  const { context, radius } = data, bubbleRadius = radius / bubbleFactor;
6
6
  context.beginPath();
7
7
  context.arc(bubbleRadius, -bubbleRadius, bubbleRadius, defaultAngle, doublePI, false);
package/browser/index.js CHANGED
@@ -1,5 +1,7 @@
1
- import { BubbleDrawer } from "./BubbleDrawer.js";
2
- export async function loadBubbleEffect(engine, refresh = true) {
3
- engine.checkVersion("3.9.1");
4
- await engine.addEffect("bubble", new BubbleDrawer(), refresh);
1
+ export function loadBubbleEffect(engine) {
2
+ engine.checkVersion("4.0.0-alpha.0");
3
+ engine.register(async (e) => {
4
+ const { BubbleDrawer } = await import("./BubbleDrawer.js");
5
+ e.addEffect("bubble", new BubbleDrawer());
6
+ });
5
7
  }
@@ -1,16 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BubbleDrawer = void 0;
4
- const engine_1 = require("@tsparticles/engine");
1
+ import { defaultAngle, doublePI } from "@tsparticles/engine";
5
2
  const bubbleFactor = 3;
6
- class BubbleDrawer {
7
- draw(data) {
3
+ export class BubbleDrawer {
4
+ drawAfter(data) {
8
5
  const { context, radius } = data, bubbleRadius = radius / bubbleFactor;
9
6
  context.beginPath();
10
- context.arc(bubbleRadius, -bubbleRadius, bubbleRadius, engine_1.defaultAngle, engine_1.doublePI, false);
7
+ context.arc(bubbleRadius, -bubbleRadius, bubbleRadius, defaultAngle, doublePI, false);
11
8
  context.closePath();
12
9
  context.fillStyle = "#fff9";
13
10
  context.fill();
14
11
  }
15
12
  }
16
- exports.BubbleDrawer = BubbleDrawer;
package/cjs/index.js CHANGED
@@ -1,8 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.loadBubbleEffect = loadBubbleEffect;
4
- const BubbleDrawer_js_1 = require("./BubbleDrawer.js");
5
- async function loadBubbleEffect(engine, refresh = true) {
6
- engine.checkVersion("3.9.1");
7
- await engine.addEffect("bubble", new BubbleDrawer_js_1.BubbleDrawer(), refresh);
1
+ export function loadBubbleEffect(engine) {
2
+ engine.checkVersion("4.0.0-alpha.0");
3
+ engine.register(async (e) => {
4
+ const { BubbleDrawer } = await import("./BubbleDrawer.js");
5
+ e.addEffect("bubble", new BubbleDrawer());
6
+ });
8
7
  }
@@ -0,0 +1,30 @@
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
+ * v4.0.0-alpha.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_effect_bubble"] = this["webpackChunk_tsparticles_effect_bubble"] || []).push([["dist_browser_BubbleDrawer_js"],{
19
+
20
+ /***/ "./dist/browser/BubbleDrawer.js"
21
+ /*!**************************************!*\
22
+ !*** ./dist/browser/BubbleDrawer.js ***!
23
+ \**************************************/
24
+ (__unused_webpack___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 */ BubbleDrawer: () => (/* binding */ BubbleDrawer)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nconst bubbleFactor = 3;\nclass BubbleDrawer {\n drawAfter(data) {\n const {\n context,\n radius\n } = data,\n bubbleRadius = radius / bubbleFactor;\n context.beginPath();\n context.arc(bubbleRadius, -bubbleRadius, bubbleRadius, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.defaultAngle, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.doublePI, false);\n context.closePath();\n context.fillStyle = \"#fff9\";\n context.fill();\n }\n}\n\n//# sourceURL=webpack://@tsparticles/effect-bubble/./dist/browser/BubbleDrawer.js?\n}");
27
+
28
+ /***/ }
29
+
30
+ }]);
@@ -1,7 +1,7 @@
1
1
  import { defaultAngle, doublePI } from "@tsparticles/engine";
2
2
  const bubbleFactor = 3;
3
3
  export class BubbleDrawer {
4
- draw(data) {
4
+ drawAfter(data) {
5
5
  const { context, radius } = data, bubbleRadius = radius / bubbleFactor;
6
6
  context.beginPath();
7
7
  context.arc(bubbleRadius, -bubbleRadius, bubbleRadius, defaultAngle, doublePI, false);
package/esm/index.js CHANGED
@@ -1,5 +1,7 @@
1
- import { BubbleDrawer } from "./BubbleDrawer.js";
2
- export async function loadBubbleEffect(engine, refresh = true) {
3
- engine.checkVersion("3.9.1");
4
- await engine.addEffect("bubble", new BubbleDrawer(), refresh);
1
+ export function loadBubbleEffect(engine) {
2
+ engine.checkVersion("4.0.0-alpha.0");
3
+ engine.register(async (e) => {
4
+ const { BubbleDrawer } = await import("./BubbleDrawer.js");
5
+ e.addEffect("bubble", new BubbleDrawer());
6
+ });
5
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/effect-bubble",
3
- "version": "3.9.1",
3
+ "version": "4.0.0-alpha.0",
4
4
  "description": "tsParticles bubble effect",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -100,9 +100,10 @@
100
100
  "./package.json": "./package.json"
101
101
  },
102
102
  "dependencies": {
103
- "@tsparticles/engine": "3.9.1"
103
+ "@tsparticles/engine": "4.0.0-alpha.0"
104
104
  },
105
105
  "publishConfig": {
106
106
  "access": "public"
107
- }
107
+ },
108
+ "type": "module"
108
109
  }