UNPKG

dcl-npc-toolkit-ai-version

Version:

A collection of tools for creating Non-Player-Characters (NPCs). These are capable of having conversations with the player, and play different animations. AI usage is added atop of it

1 lines 1.21 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.httpie={})}(this,(function(t){function e(t,e){e.headers=t.headers||{},e.statusMessage=t.statusText,e.statusCode=t.status,e.data=t.response}function n(t,n,o){return new Promise((function(i,s){o=o||{};var a,r,d,u=new XMLHttpRequest,f=o.body,p=o.headers||{};for(a in o.timeout&&(u.timeout=o.timeout),u.ontimeout=u.onerror=function(t){t.timeout="timeout"==t.type,s(t)},u.open(t,n.href||n),u.onload=function(){for(d=u.getAllResponseHeaders().trim().split(/[\r\n]+/),e(u,u);r=d.shift();)r=r.split(": "),u.headers[r.shift().toLowerCase()]=r.join(": ");if((r=u.headers["content-type"])&&~r.indexOf("application/json"))try{u.data=JSON.parse(u.data,o.reviver)}catch(t){return e(u,t),s(t)}(u.status>=400?s:i)(u)},typeof FormData<"u"&&f instanceof FormData||f&&"object"==typeof f&&(p["content-type"]="application/json",f=JSON.stringify(f)),u.withCredentials=!!o.withCredentials,p)u.setRequestHeader(a,p[a]);u.send(f)}))}var o=n.bind(n,"GET"),i=n.bind(n,"POST"),s=n.bind(n,"PATCH"),a=n.bind(n,"DELETE"),r=n.bind(n,"PUT");t.del=a,t.get=o,t.patch=s,t.post=i,t.put=r,t.send=n}));