@animech-public/playcanvas
Version:
PlayCanvas WebGL game engine
2 lines (1 loc) • 593 B
JavaScript
import{Http as t,http as r}from"../../platform/net/http.js";import{AnimStateGraph as e}from"../anim/state-graph/anim-state-graph.js";import{ResourceHandler as a}from"./handler.js";class o extends a{constructor(t){super(t,"animstategraph")}load(e,a){"string"==typeof e&&(e={load:e,original:e});const o={retry:this.maxRetries>0,maxRetries:this.maxRetries};e.load.startsWith("blob:")&&(o.responseType=t.ResponseType.JSON),r.get(e.load,o,((t,r)=>{t?a(`Error loading animation state graph resource: ${e.original} [${t}]`):a(null,r)}))}open(t,r){return new e(r)}}export{o as AnimStateGraphHandler};