UNPKG

@drincs/pixi-vn

Version:

Pixi'VN is a npm package that provides various features for creating visual novels.

1 lines 694 B
var n;(e=>(e.log=(o,...i)=>console.log(`[Pixi\u2019VN] ${o}`,...i),e.warn=(o,...i)=>console.warn(`[Pixi\u2019VN] ${o}`,...i),e.error=(o,...i)=>console.error(`[Pixi\u2019VN] ${o}`,...i),e.info=(o,...i)=>console.info(`[Pixi\u2019VN] ${o}`,...i)))(n||={});var c={};function p(r){return function(t){r||(r=t.name),c[r]&&n.info(`Ticker ${r} already exists, it will be overwritten`),t.prototype.id=r,c[r]=t;}}function a(r,t,s,T){try{let e=c[r];if(!e){n.error(`Ticker ${r} not found, did you forget to register it with the tickerDecorator?`);return}return new e(t,s,T)}catch(e){n.error(`Error while getting Ticker ${r}`,e);return}}export{p as default,a as getTickerInstanceById,c as registeredTickers};