@tsparticles/updater-destroy
Advanced tools
Comparing version 3.0.0-beta.0 to 3.0.0-beta.1
import { getRangeValue, } from "@tsparticles/engine"; | ||
import { Destroy } from "./Options/Classes/Destroy"; | ||
import { split } from "./Utils"; | ||
import { Destroy } from "./Options/Classes/Destroy.js"; | ||
import { split } from "./Utils.js"; | ||
export class DestroyUpdater { | ||
@@ -5,0 +5,0 @@ constructor(engine, container) { |
@@ -1,4 +0,4 @@ | ||
import { DestroyUpdater } from "./DestroyUpdater"; | ||
import { DestroyUpdater } from "./DestroyUpdater.js"; | ||
export async function loadDestroyUpdater(engine, refresh = true) { | ||
await engine.addParticleUpdater("destroy", (container) => new DestroyUpdater(engine, container), refresh); | ||
} |
@@ -1,3 +0,3 @@ | ||
import { DestroyBounds } from "./DestroyBounds"; | ||
import { Split } from "./Split"; | ||
import { DestroyBounds } from "./DestroyBounds.js"; | ||
import { Split } from "./Split.js"; | ||
export class Destroy { | ||
@@ -4,0 +4,0 @@ constructor() { |
import { OptionsColor, deepExtend, executeOnSingleOrMultiple, } from "@tsparticles/engine"; | ||
import { SplitFactor } from "./SplitFactor"; | ||
import { SplitRate } from "./SplitRate"; | ||
import { SplitFactor } from "./SplitFactor.js"; | ||
import { SplitRate } from "./SplitRate.js"; | ||
export class Split { | ||
@@ -5,0 +5,0 @@ constructor() { |
@@ -5,4 +5,4 @@ "use strict"; | ||
const engine_1 = require("@tsparticles/engine"); | ||
const Destroy_1 = require("./Options/Classes/Destroy"); | ||
const Utils_1 = require("./Utils"); | ||
const Destroy_js_1 = require("./Options/Classes/Destroy.js"); | ||
const Utils_js_1 = require("./Utils.js"); | ||
class DestroyUpdater { | ||
@@ -42,3 +42,3 @@ constructor(engine, container) { | ||
if (!options.destroy) { | ||
options.destroy = new Destroy_1.Destroy(); | ||
options.destroy = new Destroy_js_1.Destroy(); | ||
} | ||
@@ -55,3 +55,3 @@ for (const source of sources) { | ||
if (destroyOptions && destroyOptions.mode === "split") { | ||
(0, Utils_1.split)(this.engine, this.container, particle); | ||
(0, Utils_js_1.split)(this.engine, this.container, particle); | ||
} | ||
@@ -58,0 +58,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadDestroyUpdater = void 0; | ||
const DestroyUpdater_1 = require("./DestroyUpdater"); | ||
const DestroyUpdater_js_1 = require("./DestroyUpdater.js"); | ||
async function loadDestroyUpdater(engine, refresh = true) { | ||
await engine.addParticleUpdater("destroy", (container) => new DestroyUpdater_1.DestroyUpdater(engine, container), refresh); | ||
await engine.addParticleUpdater("destroy", (container) => new DestroyUpdater_js_1.DestroyUpdater(engine, container), refresh); | ||
} | ||
exports.loadDestroyUpdater = loadDestroyUpdater; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Destroy = void 0; | ||
const DestroyBounds_1 = require("./DestroyBounds"); | ||
const Split_1 = require("./Split"); | ||
const DestroyBounds_js_1 = require("./DestroyBounds.js"); | ||
const Split_js_1 = require("./Split.js"); | ||
class Destroy { | ||
constructor() { | ||
this.bounds = new DestroyBounds_1.DestroyBounds(); | ||
this.bounds = new DestroyBounds_js_1.DestroyBounds(); | ||
this.mode = "none"; | ||
this.split = new Split_1.Split(); | ||
this.split = new Split_js_1.Split(); | ||
} | ||
@@ -12,0 +12,0 @@ load(data) { |
@@ -5,9 +5,9 @@ "use strict"; | ||
const engine_1 = require("@tsparticles/engine"); | ||
const SplitFactor_1 = require("./SplitFactor"); | ||
const SplitRate_1 = require("./SplitRate"); | ||
const SplitFactor_js_1 = require("./SplitFactor.js"); | ||
const SplitRate_js_1 = require("./SplitRate.js"); | ||
class Split { | ||
constructor() { | ||
this.count = 1; | ||
this.factor = new SplitFactor_1.SplitFactor(); | ||
this.rate = new SplitRate_1.SplitRate(); | ||
this.factor = new SplitFactor_js_1.SplitFactor(); | ||
this.rate = new SplitRate_js_1.SplitRate(); | ||
this.sizeOffset = true; | ||
@@ -14,0 +14,0 @@ } |
import { getRangeValue, } from "@tsparticles/engine"; | ||
import { Destroy } from "./Options/Classes/Destroy"; | ||
import { split } from "./Utils"; | ||
import { Destroy } from "./Options/Classes/Destroy.js"; | ||
import { split } from "./Utils.js"; | ||
export class DestroyUpdater { | ||
@@ -5,0 +5,0 @@ constructor(engine, container) { |
@@ -1,4 +0,4 @@ | ||
import { DestroyUpdater } from "./DestroyUpdater"; | ||
import { DestroyUpdater } from "./DestroyUpdater.js"; | ||
export async function loadDestroyUpdater(engine, refresh = true) { | ||
await engine.addParticleUpdater("destroy", (container) => new DestroyUpdater(engine, container), refresh); | ||
} |
@@ -1,3 +0,3 @@ | ||
import { DestroyBounds } from "./DestroyBounds"; | ||
import { Split } from "./Split"; | ||
import { DestroyBounds } from "./DestroyBounds.js"; | ||
import { Split } from "./Split.js"; | ||
export class Destroy { | ||
@@ -4,0 +4,0 @@ constructor() { |
import { OptionsColor, deepExtend, executeOnSingleOrMultiple, } from "@tsparticles/engine"; | ||
import { SplitFactor } from "./SplitFactor"; | ||
import { SplitRate } from "./SplitRate"; | ||
import { SplitFactor } from "./SplitFactor.js"; | ||
import { SplitRate } from "./SplitRate.js"; | ||
export class Split { | ||
@@ -5,0 +5,0 @@ constructor() { |
{ | ||
"name": "@tsparticles/updater-destroy", | ||
"version": "3.0.0-beta.0", | ||
"version": "3.0.0-beta.1", | ||
"description": "tsParticles particles destroy updater", | ||
@@ -71,10 +71,22 @@ "homepage": "https://particles.js.org", | ||
}, | ||
"main": "cjs/index.js", | ||
"sideEffects": false, | ||
"jsdelivr": "tsparticles.updater.destroy.min.js", | ||
"unpkg": "tsparticles.updater.destroy.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" | ||
}, | ||
@@ -81,0 +93,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 Destroy Updater v3.0.0-beta.0 by Matteo Bruni */ | ||
/*! tsParticles Destroy Updater v3.0.0-beta.1 by Matteo Bruni */ |
import { type Container, type Engine, type IParticleUpdater, type Particle, type RecursivePartial } from "@tsparticles/engine"; | ||
import type { DestroyParticle, DestroyParticlesOptions, IDestroyParticlesOptions } from "./Types"; | ||
import type { DestroyParticle, DestroyParticlesOptions, IDestroyParticlesOptions } from "./Types.js"; | ||
export declare class DestroyUpdater implements IParticleUpdater { | ||
@@ -4,0 +4,0 @@ private readonly engine; |
import type { IOptionLoader, RecursivePartial } from "@tsparticles/engine"; | ||
import { DestroyBounds } from "./DestroyBounds"; | ||
import { DestroyMode } from "../../Enums/DestroyMode"; | ||
import type { IDestroy } from "../Interfaces/IDestroy"; | ||
import { Split } from "./Split"; | ||
import { DestroyBounds } from "./DestroyBounds.js"; | ||
import { DestroyMode } from "../../Enums/DestroyMode.js"; | ||
import type { IDestroy } from "../Interfaces/IDestroy.js"; | ||
import { Split } from "./Split.js"; | ||
export declare class Destroy implements IDestroy, IOptionLoader<IDestroy> { | ||
@@ -7,0 +7,0 @@ bounds: DestroyBounds; |
import { type IOptionLoader, type RangeValue, type RecursivePartial } from "@tsparticles/engine"; | ||
import type { IDestroyBounds } from "../Interfaces/IDestroyBounds"; | ||
import type { IDestroyBounds } from "../Interfaces/IDestroyBounds.js"; | ||
export declare class DestroyBounds implements IDestroyBounds, IOptionLoader<IDestroyBounds> { | ||
@@ -4,0 +4,0 @@ bottom?: RangeValue; |
import { type IOptionLoader, type IParticlesOptions, type IRangeHsl, OptionsColor, type RecursivePartial, type SingleOrMultiple } from "@tsparticles/engine"; | ||
import type { ISplit } from "../Interfaces/ISplit"; | ||
import { SplitFactor } from "./SplitFactor"; | ||
import { SplitRate } from "./SplitRate"; | ||
import type { ISplit } from "../Interfaces/ISplit.js"; | ||
import { SplitFactor } from "./SplitFactor.js"; | ||
import { SplitRate } from "./SplitRate.js"; | ||
export declare class Split implements ISplit, IOptionLoader<ISplit> { | ||
@@ -6,0 +6,0 @@ color?: OptionsColor; |
@@ -1,4 +0,4 @@ | ||
import type { DestroyMode } from "../../Enums/DestroyMode"; | ||
import type { IDestroyBounds } from "./IDestroyBounds"; | ||
import type { ISplit } from "./ISplit"; | ||
import type { DestroyMode } from "../../Enums/DestroyMode.js"; | ||
import type { IDestroyBounds } from "./IDestroyBounds.js"; | ||
import type { ISplit } from "./ISplit.js"; | ||
export interface IDestroy { | ||
@@ -5,0 +5,0 @@ bounds: IDestroyBounds; |
import type { IBounds, IParticlesOptions, Particle, ParticlesOptions } from "@tsparticles/engine"; | ||
import type { Destroy } from "./Options/Classes/Destroy"; | ||
import type { IDestroy } from "./Options/Interfaces/IDestroy"; | ||
import type { Destroy } from "./Options/Classes/Destroy.js"; | ||
import type { IDestroy } from "./Options/Interfaces/IDestroy.js"; | ||
export type IDestroyParticlesOptions = IParticlesOptions & { | ||
@@ -5,0 +5,0 @@ destroy?: IDestroy; |
import { type Container, type Engine } from "@tsparticles/engine"; | ||
import type { DestroyParticle } from "./Types"; | ||
import type { DestroyParticle } from "./Types.js"; | ||
export declare function split(engine: Engine, container: Container, particle: DestroyParticle): void; |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define(["require", "exports", "@tsparticles/engine", "./Options/Classes/Destroy", "./Utils"], factory); | ||
define(["require", "exports", "@tsparticles/engine", "./Options/Classes/Destroy.js", "./Utils.js"], factory); | ||
} | ||
@@ -15,4 +15,4 @@ })(function (require, exports) { | ||
const engine_1 = require("@tsparticles/engine"); | ||
const Destroy_1 = require("./Options/Classes/Destroy"); | ||
const Utils_1 = require("./Utils"); | ||
const Destroy_js_1 = require("./Options/Classes/Destroy.js"); | ||
const Utils_js_1 = require("./Utils.js"); | ||
class DestroyUpdater { | ||
@@ -52,3 +52,3 @@ constructor(engine, container) { | ||
if (!options.destroy) { | ||
options.destroy = new Destroy_1.Destroy(); | ||
options.destroy = new Destroy_js_1.Destroy(); | ||
} | ||
@@ -65,3 +65,3 @@ for (const source of sources) { | ||
if (destroyOptions && destroyOptions.mode === "split") { | ||
(0, Utils_1.split)(this.engine, this.container, particle); | ||
(0, Utils_js_1.split)(this.engine, this.container, particle); | ||
} | ||
@@ -68,0 +68,0 @@ } |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define(["require", "exports", "./DestroyUpdater"], factory); | ||
define(["require", "exports", "./DestroyUpdater.js"], factory); | ||
} | ||
@@ -14,7 +14,7 @@ })(function (require, exports) { | ||
exports.loadDestroyUpdater = void 0; | ||
const DestroyUpdater_1 = require("./DestroyUpdater"); | ||
const DestroyUpdater_js_1 = require("./DestroyUpdater.js"); | ||
async function loadDestroyUpdater(engine, refresh = true) { | ||
await engine.addParticleUpdater("destroy", (container) => new DestroyUpdater_1.DestroyUpdater(engine, container), refresh); | ||
await engine.addParticleUpdater("destroy", (container) => new DestroyUpdater_js_1.DestroyUpdater(engine, container), refresh); | ||
} | ||
exports.loadDestroyUpdater = loadDestroyUpdater; | ||
}); |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define(["require", "exports", "./DestroyBounds", "./Split"], factory); | ||
define(["require", "exports", "./DestroyBounds.js", "./Split.js"], factory); | ||
} | ||
@@ -14,9 +14,9 @@ })(function (require, exports) { | ||
exports.Destroy = void 0; | ||
const DestroyBounds_1 = require("./DestroyBounds"); | ||
const Split_1 = require("./Split"); | ||
const DestroyBounds_js_1 = require("./DestroyBounds.js"); | ||
const Split_js_1 = require("./Split.js"); | ||
class Destroy { | ||
constructor() { | ||
this.bounds = new DestroyBounds_1.DestroyBounds(); | ||
this.bounds = new DestroyBounds_js_1.DestroyBounds(); | ||
this.mode = "none"; | ||
this.split = new Split_1.Split(); | ||
this.split = new Split_js_1.Split(); | ||
} | ||
@@ -23,0 +23,0 @@ load(data) { |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define(["require", "exports", "@tsparticles/engine", "./SplitFactor", "./SplitRate"], factory); | ||
define(["require", "exports", "@tsparticles/engine", "./SplitFactor.js", "./SplitRate.js"], factory); | ||
} | ||
@@ -15,9 +15,9 @@ })(function (require, exports) { | ||
const engine_1 = require("@tsparticles/engine"); | ||
const SplitFactor_1 = require("./SplitFactor"); | ||
const SplitRate_1 = require("./SplitRate"); | ||
const SplitFactor_js_1 = require("./SplitFactor.js"); | ||
const SplitRate_js_1 = require("./SplitRate.js"); | ||
class Split { | ||
constructor() { | ||
this.count = 1; | ||
this.factor = new SplitFactor_1.SplitFactor(); | ||
this.rate = new SplitRate_1.SplitRate(); | ||
this.factor = new SplitFactor_js_1.SplitFactor(); | ||
this.rate = new SplitRate_js_1.SplitRate(); | ||
this.sizeOffset = true; | ||
@@ -24,0 +24,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
350093
75