LogoPixi’VN
pixi-jsFunctions

Function: loadSVGImage()

> loadSVGImage(image, url, delay): Promise<void>

Defined in: node_modules/pixi.js/lib/scene/text-html/utils/loadSVGImage.d.ts:13

Internal

This function loads an SVG image into an IImage element. The image can then be uploaded as texture to the GPU. iOS has a bug where embedded fonts are not available immediately after the image loads, so we wait an arbitrary amount of time before resolving the promise.

Parameters

image

ImageLike

The image to load the SVG into

url

string

The url to load the SVG from

delay

boolean

Whether to delay the load

Returns

Promise<void>

  • A promise that resolves when the image has loaded