import { Module, ModuleObject } from "../module"; import { ParticleEffect } from "../particleEffect"; import { Position } from "../types"; /** * @module * @category Modifier * strength { * @tooltip TODO * @type Number * @step 10 * @defaultValue 100 * } * center { * @tooltip TODO * @type Position * @defaultValue { "x": 0, "y": 0 } * } * minPullStrengthMultiplier { * @tooltip TODO * @type Number * @step 0.1 * @defaultValue 0.2 * } * maxPullStrengthMultiplier { * @tooltip TODO * @type Number * @step 0.1 * @defaultValue 1.0 * } * minPullStrengthDistance { * @tooltip TODO * @type Number * @step 50 * @defaultValue 500 * } * maxPullStrengthDistance { * @tooltip TODO * @type Number * @step 50 * @defaultValue 100 * } */ export declare class GravityWithCenter extends Module { strength: number; /** * Center of gravity. Pulls particles towards that location with varying strength * based on how close the particle is to the location (closer = stronger pull). * The pull strength can be further configured with properties: `maxPullStrengthDistance`, `maxPullStrengthMultiplier`, `minPullStrengthDistance` and `minPullStrengthMultiplier` */ center: Position; /** * Particle distance from `center` that will correspond to gravity strength multiplier `maxPullStrengthMultiplier` */ maxPullStrengthDistance: number; /** * `strength` multiplier that is used when particle is `maxPullStrengthDistance` away from `center`. */ maxPullStrengthMultiplier: number; /** * Particle distance from `center` that will correspond to gravity strength multiplier `minPullStrengthMultiplier` */ minPullStrengthDistance: number; /** * `strength` multiplier that is used when particle is `minPullStrengthDistance` away from `center`. */ minPullStrengthMultiplier: number; update(dt: number): void; /** * Wrap the properties of the module into a JSON containing only primitive JavaScript data types * (such as numbers, strings, etc.) that can be serialized into strings natively. */ toObject(): ModuleObject; static fromObject(particleEffect: ParticleEffect, object: ModuleObject, hideWarnings: boolean): GravityWithCenter; /** * Serializable identifier for the module. * * This must be unique between all existing Modules in the library. */ static moduleTypeId: string; }