UNPKG

tsparticles

Version:

Easily create highly customizable particle animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.

26 lines (25 loc) 651 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TriangleDrawer = void 0; const PolygonDrawerBase_1 = require("./PolygonDrawerBase"); class TriangleDrawer extends PolygonDrawerBase_1.PolygonDrawerBase { getSidesCount() { return 3; } getSidesData(particle, radius) { return { count: { denominator: 2, numerator: 3, }, length: radius * 2, }; } getCenter(particle, radius) { return { x: -radius, y: radius / 1.66, }; } } exports.TriangleDrawer = TriangleDrawer;