Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tsparticles-updater-wobble

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsparticles-updater-wobble - npm Package Compare versions

Comparing version 2.0.0-beta.4 to 2.0.0-beta.5

4

index.d.ts

@@ -1,2 +0,2 @@

import type { Main } from "tsparticles-engine";
export declare function loadWobbleUpdater(tsParticles: Main): Promise<void>;
import type { Engine } from "tsparticles-engine";
export declare function loadWobbleUpdater(engine: Engine): Promise<void>;

@@ -11,6 +11,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

import { WobbleUpdater } from "./WobbleUpdater";
export function loadWobbleUpdater(tsParticles) {
export function loadWobbleUpdater(engine) {
return __awaiter(this, void 0, void 0, function* () {
yield tsParticles.addParticleUpdater("wobble", (container) => new WobbleUpdater(container));
yield engine.addParticleUpdater("wobble", (container) => new WobbleUpdater(container));
});
}
{
"name": "tsparticles-updater-wobble",
"version": "2.0.0-beta.4",
"version": "2.0.0-beta.5",
"description": "tsParticles particles wobble updater",

@@ -48,4 +48,4 @@ "homepage": "https://particles.js.org/",

"dependencies": {
"tsparticles-engine": "^2.0.0-beta.3"
"tsparticles-engine": "^2.0.0-beta.4"
}
}

@@ -1,2 +0,2 @@

import { Main } from "tsparticles-engine";
export declare function loadWobbleUpdater(tsParticles: Main): Promise<void>;
import { Engine } from "tsparticles-engine";
export declare function loadWobbleUpdater(engine: Engine): Promise<void>;

@@ -1,2 +0,2 @@

import type { Main } from "tsparticles-engine";
export declare function loadWobbleUpdater(tsParticles: Main): Promise<void>;
import type { Engine } from "tsparticles-engine";
export declare function loadWobbleUpdater(engine: Engine): Promise<void>;

@@ -1,2 +0,2 @@

import type { Main } from "tsparticles-engine";
export declare function loadWobbleUpdater(tsParticles: Main): Promise<void>;
import type { Engine } from "tsparticles-engine";
export declare function loadWobbleUpdater(engine: Engine): Promise<void>;

@@ -7,3 +7,3 @@ /*!

* How to use? : Check the GitHub README
* v2.0.0-beta.4
* v2.0.0-beta.5
*/

@@ -195,5 +195,5 @@ (function webpackUniversalModuleDefinition(root, factory) {

function loadWobbleUpdater(tsParticles) {
function loadWobbleUpdater(engine) {
return __awaiter(this, void 0, void 0, function* () {
yield tsParticles.addParticleUpdater("wobble", container => new WobbleUpdater(container));
yield engine.addParticleUpdater("wobble", container => new WobbleUpdater(container));
});

@@ -200,0 +200,0 @@ }

@@ -1,2 +0,2 @@

/*! tsParticles Wobble Updater v2.0.0-beta.4 by Matteo Bruni */
/*! tsParticles Wobble Updater v2.0.0-beta.5 by Matteo Bruni */
!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 n="object"==typeof exports?t(require("tsparticles-engine")):t(e.window);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(this,(function(e){return(()=>{"use strict";var t={818:t=>{t.exports=e}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{loadWobbleUpdater:()=>i});var e=o(818);class t{constructor(e){this.container=e}init(t){const n=t.options.wobble;n.enable?t.wobble={angle:Math.random()*Math.PI*2,speed:(0,e.getRangeValue)(n.speed)/360}:t.wobble={angle:0,speed:0},t.retina.wobbleDistance=(0,e.getRangeValue)(n.distance)*this.container.retina.pixelRatio}isEnabled(e){return!e.destroyed&&!e.spawning&&e.options.wobble.enable}update(e,t){this.isEnabled(e)&&function(e,t){var n;if(!e.options.wobble.enable||!e.wobble)return;const o=e.wobble.speed*t.factor,r=(null!==(n=e.retina.wobbleDistance)&&void 0!==n?n:0)*t.factor/(1e3/60),i=2*Math.PI;e.wobble.angle+=o,e.wobble.angle>i&&(e.wobble.angle-=i),e.position.x+=r*Math.cos(e.wobble.angle),e.position.y+=r*Math.abs(Math.sin(e.wobble.angle))}(e,t)}}var n=function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{s(o.next(e))}catch(e){i(e)}}function l(e){try{s(o.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((o=o.apply(e,t||[])).next())}))};function i(e){return n(this,void 0,void 0,(function*(){yield e.addParticleUpdater("wobble",(e=>new t(e)))}))}})(),r})()}));

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc