UNPKG

@tsparticles/effect-bubble

Version:
17 lines (16 loc) 576 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BubbleDrawer = void 0; const engine_1 = require("@tsparticles/engine"); const bubbleFactor = 3; class BubbleDrawer { draw(data) { const { context, radius } = data, bubbleRadius = radius / bubbleFactor; context.beginPath(); context.arc(bubbleRadius, -bubbleRadius, bubbleRadius, engine_1.defaultAngle, engine_1.doublePI, false); context.closePath(); context.fillStyle = "#fff9"; context.fill(); } } exports.BubbleDrawer = BubbleDrawer;