UNPKG

@drincs/pixi-vn

Version:

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

1 lines 735 B
var o;(r=>(r.log=(t,...a)=>console.log(`[Pixi\u2019VN] ${t}`,...a),r.warn=(t,...a)=>console.warn(`[Pixi\u2019VN] ${t}`,...a),r.error=(t,...a)=>console.error(`[Pixi\u2019VN] ${t}`,...a),r.info=(t,...a)=>console.info(`[Pixi\u2019VN] ${t}`,...a)))(o||={});var s={};function i(n){return function(e){p(e,n);}}function p(n,e){e||(e=n.name),s[e]&&o.warn(`CanvasElement ${e} already registered`),n.prototype.pixivnId=e,s[e]=n;}function f(n){try{let e=s[n];if(!e){o.error(`CanvasElement ${n} not found, did you forget to register it with the canvasComponentDecorator?`);return}return new e,e}catch(e){o.error(`Error while getting CanvasElement ${n}`,e);return}}export{p as canvasComponentDecoratorFn,i as default,f as getCanvasElementTypeById};