New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tsparticles/updater-gradient

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tsparticles/updater-gradient - npm Package Compare versions

Comparing version 3.0.0-beta.0 to 3.0.0-beta.1

browser/package.json

4

browser/GradientUpdater.js
import { executeOnSingleOrMultiple, getHslAnimationFromHsl, getRandom, getRangeMax, getRangeMin, getRangeValue, getStyleFromHsl, itemFromSingleOrMultiple, randomInRange, rangeColorToHsl, } from "@tsparticles/engine";
import { AnimatableGradient } from "./Options/Classes/AnimatableGradient";
import { updateGradient } from "./Utils";
import { AnimatableGradient } from "./Options/Classes/AnimatableGradient.js";
import { updateGradient } from "./Utils.js";
export class GradientUpdater {

@@ -5,0 +5,0 @@ getColorStyles(particle, context, radius, opacity) {

@@ -1,4 +0,4 @@

import { GradientUpdater } from "./GradientUpdater";
import { GradientUpdater } from "./GradientUpdater.js";
export async function loadGradientUpdater(engine, refresh = true) {
await engine.addParticleUpdater("gradient", () => new GradientUpdater(), refresh);
}

@@ -1,3 +0,3 @@

import { AnimatableGradientColor } from "./AnimatableGradientColor";
import { GradientAngle } from "./GradientAngle";
import { AnimatableGradientColor } from "./AnimatableGradientColor.js";
import { GradientAngle } from "./GradientAngle.js";
export class AnimatableGradient {

@@ -4,0 +4,0 @@ constructor() {

import { AnimatableColor, isNumber } from "@tsparticles/engine";
import { GradientColorOpacity } from "./GradientColorOpacity";
import { GradientColorOpacity } from "./GradientColorOpacity.js";
export class AnimatableGradientColor {

@@ -4,0 +4,0 @@ constructor() {

import { setRangeValue, } from "@tsparticles/engine";
import { GradientAngleAnimation } from "./GradientAngleAnimation";
import { GradientAngleAnimation } from "./GradientAngleAnimation.js";
export class GradientAngle {

@@ -4,0 +4,0 @@ constructor() {

import { setRangeValue, } from "@tsparticles/engine";
import { GradientColorOpacityAnimation } from "./GradientColorOpacityAnimation";
import { GradientColorOpacityAnimation } from "./GradientColorOpacityAnimation.js";
export class GradientColorOpacity {

@@ -4,0 +4,0 @@ constructor() {

@@ -5,4 +5,4 @@ "use strict";

const engine_1 = require("@tsparticles/engine");
const AnimatableGradient_1 = require("./Options/Classes/AnimatableGradient");
const Utils_1 = require("./Utils");
const AnimatableGradient_js_1 = require("./Options/Classes/AnimatableGradient.js");
const Utils_js_1 = require("./Utils.js");
class GradientUpdater {

@@ -124,3 +124,3 @@ getColorStyles(particle, context, radius, opacity) {

options.gradient = (0, engine_1.executeOnSingleOrMultiple)(gradientToLoad, (gradient) => {
const tmp = new AnimatableGradient_1.AnimatableGradient();
const tmp = new AnimatableGradient_js_1.AnimatableGradient();
tmp.load(gradient);

@@ -132,5 +132,5 @@ return tmp;

update(particle, delta) {
(0, Utils_1.updateGradient)(particle, delta);
(0, Utils_js_1.updateGradient)(particle, delta);
}
}
exports.GradientUpdater = GradientUpdater;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.loadGradientUpdater = void 0;
const GradientUpdater_1 = require("./GradientUpdater");
const GradientUpdater_js_1 = require("./GradientUpdater.js");
async function loadGradientUpdater(engine, refresh = true) {
await engine.addParticleUpdater("gradient", () => new GradientUpdater_1.GradientUpdater(), refresh);
await engine.addParticleUpdater("gradient", () => new GradientUpdater_js_1.GradientUpdater(), refresh);
}
exports.loadGradientUpdater = loadGradientUpdater;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AnimatableGradient = void 0;
const AnimatableGradientColor_1 = require("./AnimatableGradientColor");
const GradientAngle_1 = require("./GradientAngle");
const AnimatableGradientColor_js_1 = require("./AnimatableGradientColor.js");
const GradientAngle_js_1 = require("./GradientAngle.js");
class AnimatableGradient {
constructor() {
this.angle = new GradientAngle_1.GradientAngle();
this.angle = new GradientAngle_js_1.GradientAngle();
this.colors = [];

@@ -19,3 +19,3 @@ this.type = "random";

this.colors = data.colors.map((s) => {
const tmp = new AnimatableGradientColor_1.AnimatableGradientColor();
const tmp = new AnimatableGradientColor_js_1.AnimatableGradientColor();
tmp.load(s);

@@ -22,0 +22,0 @@ return tmp;

@@ -5,3 +5,3 @@ "use strict";

const engine_1 = require("@tsparticles/engine");
const GradientColorOpacity_1 = require("./GradientColorOpacity");
const GradientColorOpacity_js_1 = require("./GradientColorOpacity.js");
class AnimatableGradientColor {

@@ -21,3 +21,3 @@ constructor() {

if (data.opacity !== undefined) {
this.opacity = new GradientColorOpacity_1.GradientColorOpacity();
this.opacity = new GradientColorOpacity_js_1.GradientColorOpacity();
if ((0, engine_1.isNumber)(data.opacity)) {

@@ -24,0 +24,0 @@ this.opacity.value = data.opacity;

@@ -5,7 +5,7 @@ "use strict";

const engine_1 = require("@tsparticles/engine");
const GradientAngleAnimation_1 = require("./GradientAngleAnimation");
const GradientAngleAnimation_js_1 = require("./GradientAngleAnimation.js");
class GradientAngle {
constructor() {
this.value = 0;
this.animation = new GradientAngleAnimation_1.GradientAngleAnimation();
this.animation = new GradientAngleAnimation_js_1.GradientAngleAnimation();
this.direction = "clockwise";

@@ -12,0 +12,0 @@ }

@@ -5,7 +5,7 @@ "use strict";

const engine_1 = require("@tsparticles/engine");
const GradientColorOpacityAnimation_1 = require("./GradientColorOpacityAnimation");
const GradientColorOpacityAnimation_js_1 = require("./GradientColorOpacityAnimation.js");
class GradientColorOpacity {
constructor() {
this.value = 0;
this.animation = new GradientColorOpacityAnimation_1.GradientColorOpacityAnimation();
this.animation = new GradientColorOpacityAnimation_js_1.GradientColorOpacityAnimation();
}

@@ -12,0 +12,0 @@ load(data) {

import { executeOnSingleOrMultiple, getHslAnimationFromHsl, getRandom, getRangeMax, getRangeMin, getRangeValue, getStyleFromHsl, itemFromSingleOrMultiple, randomInRange, rangeColorToHsl, } from "@tsparticles/engine";
import { AnimatableGradient } from "./Options/Classes/AnimatableGradient";
import { updateGradient } from "./Utils";
import { AnimatableGradient } from "./Options/Classes/AnimatableGradient.js";
import { updateGradient } from "./Utils.js";
export class GradientUpdater {

@@ -5,0 +5,0 @@ getColorStyles(particle, context, radius, opacity) {

@@ -1,4 +0,4 @@

import { GradientUpdater } from "./GradientUpdater";
import { GradientUpdater } from "./GradientUpdater.js";
export async function loadGradientUpdater(engine, refresh = true) {
await engine.addParticleUpdater("gradient", () => new GradientUpdater(), refresh);
}

@@ -1,3 +0,3 @@

import { AnimatableGradientColor } from "./AnimatableGradientColor";
import { GradientAngle } from "./GradientAngle";
import { AnimatableGradientColor } from "./AnimatableGradientColor.js";
import { GradientAngle } from "./GradientAngle.js";
export class AnimatableGradient {

@@ -4,0 +4,0 @@ constructor() {

import { AnimatableColor, isNumber } from "@tsparticles/engine";
import { GradientColorOpacity } from "./GradientColorOpacity";
import { GradientColorOpacity } from "./GradientColorOpacity.js";
export class AnimatableGradientColor {

@@ -4,0 +4,0 @@ constructor() {

import { setRangeValue, } from "@tsparticles/engine";
import { GradientAngleAnimation } from "./GradientAngleAnimation";
import { GradientAngleAnimation } from "./GradientAngleAnimation.js";
export class GradientAngle {

@@ -4,0 +4,0 @@ constructor() {

import { setRangeValue, } from "@tsparticles/engine";
import { GradientColorOpacityAnimation } from "./GradientColorOpacityAnimation";
import { GradientColorOpacityAnimation } from "./GradientColorOpacityAnimation.js";
export class GradientColorOpacity {

@@ -4,0 +4,0 @@ constructor() {

{
"name": "@tsparticles/updater-gradient",
"version": "3.0.0-beta.0",
"version": "3.0.0-beta.1",
"description": "tsParticles particles gradient updater",

@@ -85,10 +85,22 @@ "homepage": "https://particles.js.org",

],
"main": "cjs/index.js",
"sideEffects": false,
"jsdelivr": "tsparticles.updater.gradient.min.js",
"unpkg": "tsparticles.updater.gradient.min.js",
"browser": "browser/index.js",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "types/index.d.ts",
"sideEffects": false,
"exports": {
".": {
"types": "./types/index.d.ts",
"browser": "./browser/index.js",
"import": "./esm/index.js",
"require": "./cjs/index.js",
"umd": "./umd/index.js",
"default": "./cjs/index.js"
},
"./package.json": "./package.json"
},
"dependencies": {
"@tsparticles/engine": "^3.0.0-beta.0"
"@tsparticles/engine": "^3.0.0-beta.1"
},

@@ -95,0 +107,0 @@ "publishConfig": {

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

* How to use? : Check the GitHub README
* v3.0.0-beta.0
* v3.0.0-beta.1
*/

@@ -10,0 +10,0 @@ (function webpackUniversalModuleDefinition(root, factory) {

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

/*! tsParticles Gradient Updater v3.0.0-beta.0 by Matteo Bruni */
/*! tsParticles Gradient Updater v3.0.0-beta.1 by Matteo Bruni */
import { type IDelta, type IParticleColorStyle, type IParticleUpdater, type RecursivePartial } from "@tsparticles/engine";
import type { GradientParticle, GradientParticlesOptions, IGradientParticlesOptions } from "./Types";
import type { GradientParticle, GradientParticlesOptions, IGradientParticlesOptions } from "./Types.js";
export declare class GradientUpdater implements IParticleUpdater {

@@ -4,0 +4,0 @@ getColorStyles(particle: GradientParticle, context: CanvasRenderingContext2D, radius: number, opacity: number): IParticleColorStyle;

import { GradientType, type IOptionLoader, type RecursivePartial } from "@tsparticles/engine";
import { AnimatableGradientColor } from "./AnimatableGradientColor";
import { GradientAngle } from "./GradientAngle";
import type { IAnimatableGradient } from "../Interfaces/IAnimatableGradient";
import { AnimatableGradientColor } from "./AnimatableGradientColor.js";
import { GradientAngle } from "./GradientAngle.js";
import type { IAnimatableGradient } from "../Interfaces/IAnimatableGradient.js";
export declare class AnimatableGradient implements IAnimatableGradient, IOptionLoader<IAnimatableGradient> {

@@ -6,0 +6,0 @@ angle: GradientAngle;

import { AnimatableColor, type IOptionLoader, type RecursivePartial } from "@tsparticles/engine";
import { GradientColorOpacity } from "./GradientColorOpacity";
import type { IAnimatableGradientColor } from "../Interfaces/IOptionsGradient";
import { GradientColorOpacity } from "./GradientColorOpacity.js";
import type { IAnimatableGradientColor } from "../Interfaces/IOptionsGradient.js";
export declare class AnimatableGradientColor implements IAnimatableGradientColor, IOptionLoader<IAnimatableGradientColor> {

@@ -5,0 +5,0 @@ opacity?: GradientColorOpacity;

import { type IAnimatable, type IAnimation, type IOptionLoader, type RangeValue, type RecursivePartial, RotateDirection, type RotateDirectionAlt } from "@tsparticles/engine";
import { GradientAngleAnimation } from "./GradientAngleAnimation";
import type { IGradientAngle } from "../Interfaces/Gradients";
import { GradientAngleAnimation } from "./GradientAngleAnimation.js";
import type { IGradientAngle } from "../Interfaces/Gradients.js";
export declare class GradientAngle implements IGradientAngle, IAnimatable<IAnimation>, IOptionLoader<IGradientAngle & IAnimatable<IAnimation>> {

@@ -5,0 +5,0 @@ animation: GradientAngleAnimation;

import { type IAnimatable, type IAnimation, type IOptionLoader, type RangeValue, type RecursivePartial } from "@tsparticles/engine";
import { GradientColorOpacityAnimation } from "./GradientColorOpacityAnimation";
import type { IGradientColorOpacity } from "../Interfaces/Gradients";
import type { IGradientColorOpacityAnimation } from "../Interfaces/IOptionsGradient";
import { GradientColorOpacityAnimation } from "./GradientColorOpacityAnimation.js";
import type { IGradientColorOpacity } from "../Interfaces/Gradients.js";
import type { IGradientColorOpacityAnimation } from "../Interfaces/IOptionsGradient.js";
export declare class GradientColorOpacity implements IGradientColorOpacity, IAnimatable<GradientColorOpacityAnimation>, IOptionLoader<IGradientColorOpacity & IAnimatable<IGradientColorOpacityAnimation>> {

@@ -6,0 +6,0 @@ animation: GradientColorOpacityAnimation;

import { type IOptionLoader, type RangeValue, type RecursivePartial, StartValueType } from "@tsparticles/engine";
import type { IGradientColorOpacityAnimation } from "../Interfaces/IOptionsGradient";
import type { IGradientColorOpacityAnimation } from "../Interfaces/IOptionsGradient.js";
export declare class GradientColorOpacityAnimation implements IGradientColorOpacityAnimation, IOptionLoader<IGradientColorOpacityAnimation> {

@@ -4,0 +4,0 @@ count: RangeValue;

import type { IAnimatable, IAnimation } from "@tsparticles/engine";
import type { IAnimatableGradientColor, IOptionsGradient } from "./IOptionsGradient";
import type { IGradientAngle } from "./Gradients";
import type { IAnimatableGradientColor, IOptionsGradient } from "./IOptionsGradient.js";
import type { IGradientAngle } from "./Gradients.js";
export type IAnimatableGradient = IOptionsGradient & {

@@ -5,0 +5,0 @@ angle: IGradientAngle & IAnimatable<IAnimation>;

import type { IAnimatable, IAnimatableColor, IAnimation, StartValueType } from "@tsparticles/engine";
import type { IGradient, IGradientColor, IGradientColorOpacity } from "./Gradients";
import type { IGradient, IGradientColor, IGradientColorOpacity } from "./Gradients.js";
export interface IGradientColorOpacityAnimation extends IAnimation {

@@ -4,0 +4,0 @@ startValue: StartValueType | keyof typeof StartValueType;

import type { GradientType, IParticleHslAnimation, IParticleNumericValueAnimation, IParticleValueAnimation, IParticlesOptions, Particle, ParticlesOptions, SingleOrMultiple } from "@tsparticles/engine";
import type { AnimatableGradient } from "./Options/Classes/AnimatableGradient";
import type { IAnimatableGradient } from "./Options/Interfaces/IAnimatableGradient";
import type { AnimatableGradient } from "./Options/Classes/AnimatableGradient.js";
import type { IAnimatableGradient } from "./Options/Interfaces/IAnimatableGradient.js";
export interface IParticleGradientColorAnimation {

@@ -5,0 +5,0 @@ opacity?: IParticleNumericValueAnimation;

import { type IDelta } from "@tsparticles/engine";
import type { GradientParticle } from "./Types";
import type { GradientParticle } from "./Types.js";
export declare function updateGradient(particle: GradientParticle, delta: IDelta): void;

@@ -7,3 +7,3 @@ (function (factory) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "@tsparticles/engine", "./Options/Classes/AnimatableGradient", "./Utils"], factory);
define(["require", "exports", "@tsparticles/engine", "./Options/Classes/AnimatableGradient.js", "./Utils.js"], factory);
}

@@ -15,4 +15,4 @@ })(function (require, exports) {

const engine_1 = require("@tsparticles/engine");
const AnimatableGradient_1 = require("./Options/Classes/AnimatableGradient");
const Utils_1 = require("./Utils");
const AnimatableGradient_js_1 = require("./Options/Classes/AnimatableGradient.js");
const Utils_js_1 = require("./Utils.js");
class GradientUpdater {

@@ -134,3 +134,3 @@ getColorStyles(particle, context, radius, opacity) {

options.gradient = (0, engine_1.executeOnSingleOrMultiple)(gradientToLoad, (gradient) => {
const tmp = new AnimatableGradient_1.AnimatableGradient();
const tmp = new AnimatableGradient_js_1.AnimatableGradient();
tmp.load(gradient);

@@ -142,3 +142,3 @@ return tmp;

update(particle, delta) {
(0, Utils_1.updateGradient)(particle, delta);
(0, Utils_js_1.updateGradient)(particle, delta);
}

@@ -145,0 +145,0 @@ }

@@ -7,3 +7,3 @@ (function (factory) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./GradientUpdater"], factory);
define(["require", "exports", "./GradientUpdater.js"], factory);
}

@@ -14,7 +14,7 @@ })(function (require, exports) {

exports.loadGradientUpdater = void 0;
const GradientUpdater_1 = require("./GradientUpdater");
const GradientUpdater_js_1 = require("./GradientUpdater.js");
async function loadGradientUpdater(engine, refresh = true) {
await engine.addParticleUpdater("gradient", () => new GradientUpdater_1.GradientUpdater(), refresh);
await engine.addParticleUpdater("gradient", () => new GradientUpdater_js_1.GradientUpdater(), refresh);
}
exports.loadGradientUpdater = loadGradientUpdater;
});

@@ -7,3 +7,3 @@ (function (factory) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./AnimatableGradientColor", "./GradientAngle"], factory);
define(["require", "exports", "./AnimatableGradientColor.js", "./GradientAngle.js"], factory);
}

@@ -14,7 +14,7 @@ })(function (require, exports) {

exports.AnimatableGradient = void 0;
const AnimatableGradientColor_1 = require("./AnimatableGradientColor");
const GradientAngle_1 = require("./GradientAngle");
const AnimatableGradientColor_js_1 = require("./AnimatableGradientColor.js");
const GradientAngle_js_1 = require("./GradientAngle.js");
class AnimatableGradient {
constructor() {
this.angle = new GradientAngle_1.GradientAngle();
this.angle = new GradientAngle_js_1.GradientAngle();
this.colors = [];

@@ -30,3 +30,3 @@ this.type = "random";

this.colors = data.colors.map((s) => {
const tmp = new AnimatableGradientColor_1.AnimatableGradientColor();
const tmp = new AnimatableGradientColor_js_1.AnimatableGradientColor();
tmp.load(s);

@@ -33,0 +33,0 @@ return tmp;

@@ -7,3 +7,3 @@ (function (factory) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "@tsparticles/engine", "./GradientColorOpacity"], factory);
define(["require", "exports", "@tsparticles/engine", "./GradientColorOpacity.js"], factory);
}

@@ -15,3 +15,3 @@ })(function (require, exports) {

const engine_1 = require("@tsparticles/engine");
const GradientColorOpacity_1 = require("./GradientColorOpacity");
const GradientColorOpacity_js_1 = require("./GradientColorOpacity.js");
class AnimatableGradientColor {

@@ -31,3 +31,3 @@ constructor() {

if (data.opacity !== undefined) {
this.opacity = new GradientColorOpacity_1.GradientColorOpacity();
this.opacity = new GradientColorOpacity_js_1.GradientColorOpacity();
if ((0, engine_1.isNumber)(data.opacity)) {

@@ -34,0 +34,0 @@ this.opacity.value = data.opacity;

@@ -7,3 +7,3 @@ (function (factory) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "@tsparticles/engine", "./GradientAngleAnimation"], factory);
define(["require", "exports", "@tsparticles/engine", "./GradientAngleAnimation.js"], factory);
}

@@ -15,7 +15,7 @@ })(function (require, exports) {

const engine_1 = require("@tsparticles/engine");
const GradientAngleAnimation_1 = require("./GradientAngleAnimation");
const GradientAngleAnimation_js_1 = require("./GradientAngleAnimation.js");
class GradientAngle {
constructor() {
this.value = 0;
this.animation = new GradientAngleAnimation_1.GradientAngleAnimation();
this.animation = new GradientAngleAnimation_js_1.GradientAngleAnimation();
this.direction = "clockwise";

@@ -22,0 +22,0 @@ }

@@ -7,3 +7,3 @@ (function (factory) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "@tsparticles/engine", "./GradientColorOpacityAnimation"], factory);
define(["require", "exports", "@tsparticles/engine", "./GradientColorOpacityAnimation.js"], factory);
}

@@ -15,7 +15,7 @@ })(function (require, exports) {

const engine_1 = require("@tsparticles/engine");
const GradientColorOpacityAnimation_1 = require("./GradientColorOpacityAnimation");
const GradientColorOpacityAnimation_js_1 = require("./GradientColorOpacityAnimation.js");
class GradientColorOpacity {
constructor() {
this.value = 0;
this.animation = new GradientColorOpacityAnimation_1.GradientColorOpacityAnimation();
this.animation = new GradientColorOpacityAnimation_js_1.GradientColorOpacityAnimation();
}

@@ -22,0 +22,0 @@ load(data) {

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