UNPKG

@animech-public/playcanvas

Version:
2 lines (1 loc) 356 B
import{SceneParser as t}from"./parsers/scene.js";class e{constructor(t,e){this._app=void 0,this._data=void 0,this._templateRoot=null,this._app=t,this._data=e}instantiate(){return this._templateRoot||this._parseTemplate(),this._templateRoot.clone()}_parseTemplate(){const e=new t(this._app,!0);this._templateRoot=e.parse(this._data)}}export{e as Template};