MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / onSuccess

Method onSuccess

src/monogatari.ts:1610–1612  ·  view source on GitHub ↗
(name: string, type: string, category: string)

Source from the content-addressed store, hash-verified

1608 const directory = `${assetsPath.root}/${assetsPath[category as keyof typeof assetsPath]}`;
1609
1610 const onSuccess = (name: string, type: string, category: string) => {
1611 this.trigger('assetLoaded', { name, type, category });
1612 }
1613
1614 if (FileSystem.isImage(asset)) {
1615 promises.push(Preload.image(`${directory}/${asset}`).then(() => onSuccess(asset, 'image', category)));

Callers

nothing calls this directly

Calls 1

triggerMethod · 0.95

Tested by

no test coverage detected