var gdjs;(function(i){class d{constructor(t,e,r){this._object=t;const s=e.getGame().getImageManager().getPIXITexture(r);this._tiledSprite=new PIXI.TilingSprite(s,1024,1024),e.getLayer("").getRenderer().addRendererObject(this._tiledSprite,t.getZOrder()),this.updatePosition(),this.updateAngle(),this.updateXOffset(),this.updateYOffset()}getRendererObject(){return this._tiledSprite}updateOpacity(){this._tiledSprite.alpha=this._object.opacity/255}updatePosition(){this._tiledSprite.position.x=this._object.x+this._tiledSprite.width/2,this._tiledSprite.position.y=this._object.y+this._tiledSprite.height/2}setTexture(t,e){const r=e.getGame().getImageManager().getPIXITexture(t);this._tiledSprite.texture=r,this.updatePosition()}updateAngle(){this._tiledSprite.rotation=i.toRad(this._object.angle)}getWidth(){return this._tiledSprite.width}getHeight(){return this._tiledSprite.height}setWidth(t){this._tiledSprite.width=t,this._tiledSprite.pivot.x=t/2,this.updatePosition()}setHeight(t){this._tiledSprite.height=t,this._tiledSprite.pivot.y=t/2,this.updatePosition()}updateXOffset(){this._tiledSprite.tilePosition.x=-this._object._xOffset%this._tiledSprite.texture.width}updateYOffset(){this._tiledSprite.tilePosition.y=-this._object._yOffset%this._tiledSprite.texture.height}setColor(t){this._tiledSprite.tint=i.rgbOrHexStringToNumber(t)}getColor(){const t=new PIXI.Color(this._tiledSprite.tint).toRgbArray();return Math.round(t[0]*255)+";"+Math.round(t[1]*255)+";"+Math.round(t[2]*255)}getTextureWidth(){return this._tiledSprite.texture.width}getTextureHeight(){return this._tiledSprite.texture.height}destroy(){this._tiledSprite.destroy(!1)}}i.TiledSpriteRuntimeObjectRenderer=d})(gdjs||(gdjs={}));
//# sourceMappingURL=tiledspriteruntimeobject-pixi-renderer.js.map
