var gdjs;(function(i){const c=new i.Logger("CustomRuntimeObject");class u extends i.RuntimeInstanceContainer{constructor(n,t){super();this._isLoaded=!1;this._parent=n,this._customObject=t,this._runtimeScene=n.getScene(),this._renderer=new i.CustomObjectRenderer(t,this,n),this._debuggerRenderer=new i.DebuggerRenderer(this)}addLayer(n){const t=new i.RuntimeCustomObjectLayer(n,this);this._layers.put(n.name,t),this._orderedLayers.push(t)}createObject(n){const t=super.createObject(n);return this._customObject.onChildrenLocationChanged(),t}loadFrom(n){this._isLoaded&&this.onDestroyFromScene(this._parent);const t=this._runtimeScene.getGame().getEventsBasedObjectData(n.type);if(!t){c.error("loadFrom was called without an events-based object");return}for(let s=0,e=t.objects.length;s