UNPKG

threepipe

Version:

A modern 3D viewer framework built on top of three.js, written in TypeScript, designed to make creating high-quality, modular, and extensible 3D experiences on the web simple and enjoyable.

38 lines 1.52 kB
import { AViewerPluginSync, ThreeViewer } from '../../viewer'; /** * TailwindCSSCDNPlugin * * A plugin that dynamically loads Tailwind CSS from a CDN to enable rapid UI development with utility classes. * This allows you to use Tailwind CSS classes in your HTML elements without needing a build step. * * The plugin automatically injects the Tailwind CSS script tag when added to the viewer and removes it when the plugin is removed. * * @category Plugins * @example * ```typescript * import {ThreeViewer, TailwindCSSCDNPlugin} from 'threepipe' * * const viewer = new ThreeViewer({canvas: document.getElementById('canvas')}) * const tailwindPlugin = viewer.addPluginSync(new TailwindCSSCDNPlugin()) * * // Now you can use Tailwind CSS classes in your HTML elements * const button = document.createElement('button') * button.className = 'absolute top-4 right-4 bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded' * button.textContent = 'Click me' * viewer.container.appendChild(button) * ``` */ export declare class TailwindCSSCDNPlugin extends AViewerPluginSync { static readonly PluginType = "TailwindCDNPlugin"; enabled: boolean; private _tailwindScript; /** * The CDN URL for Tailwind CSS * @default 'https://cdn.tailwindcss.com' */ static CDN_URL: string; toJSON: any; onAdded(viewer: ThreeViewer): Promise<void>; onRemove(viewer: ThreeViewer): void; } //# sourceMappingURL=../../src/plugins/extras/TailwindCSSCDNPlugin.d.ts.map