ThreePipe
    Preparing search index...

    Class TailwindCSSCDNPlugin

    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.

    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)

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _dirty: boolean = false
    _viewer?: ThreeViewer
    _viewerListeners: PartialRecord<IViewerEventTypes, (e: IViewerEvent) => void> = {}
    constructor: typeof AViewerPluginSync & typeof AViewerPlugin
    enabled: boolean = true
    isViewerPluginSync: true = ...
    toJSON: any = null
    uiConfig?: UiObjectConfig<any, string, any> = undefined
    CDN_URL: string = 'https://cdn.tailwindcss.com'

    The CDN URL for Tailwind CSS

    'https://cdn.tailwindcss.com'
    
    OldPluginType?: string
    PluginType: "TailwindCDNPlugin" = 'TailwindCDNPlugin'

    Accessors

    Methods