@tsparticles/fireworks
Version:
Easily create highly customizable particle animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.
29 lines (28 loc) • 1.26 kB
TypeScript
import { type Container, type RecursivePartial } from "@tsparticles/engine";
import type { IFireworkOptions } from "./IFireworkOptions.js";
type FireworksFunc = ((idOrOptions: string | RecursivePartial<IFireworkOptions>, sourceOptions?: RecursivePartial<IFireworkOptions>) => Promise<FireworksInstance | undefined>) & {
version: string;
};
declare global {
interface Window {
fireworks: FireworksFunc & {
create: (canvas: HTMLCanvasElement, options: RecursivePartial<IFireworkOptions>) => Promise<FireworksInstance | undefined>;
init: () => Promise<void>;
version: string;
};
}
}
declare class FireworksInstance {
private readonly _container;
constructor(container: Container);
pause(): void;
play(): void;
stop(): void;
}
export type { FireworksInstance };
export declare function fireworks(idOrOptions?: string | RecursivePartial<IFireworkOptions>, sourceOptions?: RecursivePartial<IFireworkOptions>): Promise<FireworksInstance | undefined>;
export declare namespace fireworks {
var create: (canvas: HTMLCanvasElement, options?: RecursivePartial<IFireworkOptions>) => Promise<FireworksInstance | undefined>;
var init: () => Promise<void>;
var version: string;
}