Interface SVGLoaderPlugin

Loads custom components from an SVG image.

SVGLoader.fromString

interface SVGLoaderPlugin {
    visit(node: Element, loader: SVGLoaderControl): Promise<boolean>;
}

Methods

Methods

  • Called when the SVGLoader encounters a node.

    Call loader.addComponent to add new components to the image.

    Returning true prevents the SVGLoader from doing further processing on the node.

    Parameters

    • node: Element
    • loader: SVGLoaderControl

    Returns Promise<boolean>

OpenSource licenses