import { Shape } from "../shapes/shape"; import { Module, ModuleObject } from "../module"; import { ParticleEffect } from "../particleEffect"; /** * `Module` that destroys all particles whose center location is outside generic bounds. * * ```ts * // Example usage * const destructor = new OutsideBoundsDestructor(particleSystem); * destructor.bounds = { * type: "triangle", * v1: { x: 100, y: 400 }, * v2: { x: 300, y: 400 }, * v3: { x: 200, y: 0 }, * }; * particleSystem.modules.push(destructor); * ``` * * @module * @category Destructor * bounds { * @tooltip TODO * @type Shape * @defaultValue { "type": "rectangle", "v1": {"x": -50, "y": -50}, "v2": {"x": 50, "y": 50} } * } */ export declare class OutsideBoundsDestructor extends Module { /** * Particles outside these bounds are destroyed. */ bounds?: Shape; 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): OutsideBoundsDestructor; /** * Serializable identifier for the module. * * This must be unique between all existing Modules in the library. */ static moduleTypeId: string; }