Skip to content

Demo sofort einsatzbereit

Diese Rezepte verwenden die offiziellen Voreinstellungen, die im Arbeitsbereich presets/presets verfügbar sind (Beta/Alpha zur Veröffentlichung).

Start/Stopp der Musterbasis (keine automatische Wiedergabe)

ts
import { tsParticles } from "@tsparticles/engine";
import type { Container, ISourceOptions } from "@tsparticles/engine";

let container: Container | undefined;

export async function start(id: string, options: ISourceOptions): Promise<void> {
  container?.destroy();
  container = await tsParticles.load({ id, options });
}

export function stop(): void {
  container?.pause();
}

export function resume(): void {
  container?.play();
}

Voreingestellte Rezepte

Um sie sofort in der Benutzeroberfläche zu testen, verwenden Sie Playground und starten Sie sie nur bei Bedarf mit Start.

Framework-Demoprojekte

Das Monorepo enthält auch ausführbare Integrationsdemos:

  • Quellordner: https://github.com/tsparticles/tsparticles/tree/main/demo
  • Zu den verfügbaren Demos gehören: angular, astro, electron, inferno, ionic, jquery, lit, nextjs, nextjs-legacy, nuxt2, nuxt3, nuxt4, preact, react, riot, solid, svelte, svelte-kit, vanilla, vanilla_new, vite, vue2, vue3, webcomponents.