Skip to content

loadPixi

Unofficial

Load PixiJS and return a promise to the global PIXI object. Can also use Window.PIXI after this promise resolves to get the same reference.

PixiJS is no longer loaded at startup, so Window.PIXI stays unset until this (or a view that needs it, such as the graph) has loaded it.

Import:

import { loadPixi } from 'obsidian';

Signature:

function loadPixi(): Promise<PixiModule>

Returns: Promise<PixiModule> — A promise that resolves to the global Window.PIXI object.