var gdjs;(function(i){class o{constructor(t,e){this._object=t,this._pixiObject===void 0?this._pixiObject=new MultiStyleText(t._text,{default:{fontFamily:e.getGame().getFontManager().getFontFamily(t._fontFamily),fontSize:t._fontSize+"px",fill:i.rgbToHexNumber(t._color[0],t._color[1],t._color[2]),tagStyle:"bbcode",wordWrap:t._wordWrap,wordWrapWidth:t._wrappingWidth,align:t._align}}):(this.updateColor(),this.updateAlignment(),this.updateFontFamily(),this.updateFontSize()),e.getLayer("").getRenderer().addRendererObject(this._pixiObject,t.getZOrder()),this._pixiObject.anchor.x=.5,this._pixiObject.anchor.y=.5,this.updateText(),this.updatePosition(),this.updateAngle(),this.updateOpacity()}getRendererObject(){return this._pixiObject}updateWordWrap(){this._pixiObject._style.wordWrap=this._object._wordWrap,this._pixiObject.dirty=!0,this.updatePosition()}updateWrappingWidth(){this._pixiObject._style.wordWrapWidth=this._object._wrappingWidth,this._pixiObject.dirty=!0,this.updatePosition()}updateText(){this._pixiObject.text=this._object._text,this.updatePosition()}updateColor(){this._pixiObject.textStyles.default.fill=i.rgbToHexNumber(this._object._color[0],this._object._color[1],this._object._color[2]),this._pixiObject.dirty=!0}updateAlignment(){this._pixiObject._style.align=this._object._align,this._pixiObject.dirty=!0}updateFontFamily(){this._pixiObject.textStyles.default.fontFamily=this._object.getInstanceContainer().getGame().getFontManager().getFontFamily(this._object._fontFamily),this._pixiObject.dirty=!0}updateFontSize(){this._pixiObject.textStyles.default.fontSize=this._object._fontSize+"px",this._pixiObject.dirty=!0}updatePosition(){this._pixiObject.position.x=this._object.x+this._pixiObject.width/2,this._pixiObject.position.y=this._object.y+this._pixiObject.height/2}updateAngle(){this._pixiObject.rotation=i.toRad(this._object.angle)}updateOpacity(){this._pixiObject.alpha=this._object._opacity/255}getWidth(){return this._pixiObject.width}getHeight(){return this._pixiObject.height}}i.BBTextRuntimeObjectPixiRenderer=o,i.BBTextRuntimeObjectRenderer=o})(gdjs||(gdjs={}));
//# sourceMappingURL=bbtextruntimeobject-pixi-renderer.js.map
