import { ModuleObject } from "../module"; import { ParticleEffect } from "../particleEffect"; import { ParticleGenerator } from "./generator"; import { Shape } from "../shapes/shape"; /** * Module that can be used to generate particles with an initial position inside a generic _Shape_. * * Shape is assigned via `ShapeGenerator.shape` property, for example: * * ```ts * const generator = new ShapeGenerator(particleEffect) * generator.shape = { * type: 'rectangle', * v1: { x: 100, y: 100 }, * v2: { x: 300, y: 500 } * } * ``` * * @module * @category Generator * interval { * @tooltip TODO * @type Number * @min 0 * @step 0.01 * @defaultValue 0.1 * } * shape { * @tooltip TODO * @type Shape * @defaultValue { "type": "rectangle", "v1": {"x": -50, "y": -50}, "v2": {"x": 50, "y": 50} } * } * bursts { * @tooltip TODO * @type Burst[] * @defaultValue [] * } * edgesOnly { * @tooltip TODO * @type Boolean * @defaultValue false * } */ export declare class ShapeGenerator extends ParticleGenerator { shape?: Shape; edgesOnly: boolean; generateParticle(): 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): ShapeGenerator; /** * Serializable identifier for the module. * * This must be unique between all existing Modules in the library. */ static moduleTypeId: string; }