18 lines
296 B
JavaScript
18 lines
296 B
JavaScript
|
import {Text as PIXIText} from '@pixi/text';
|
||
|
|
||
|
import {Renderable} from './renderable';
|
||
|
|
||
|
export class Text extends Renderable {
|
||
|
|
||
|
constructor(text, style) {
|
||
|
super();
|
||
|
this.text = new PIXIText(text, style);
|
||
|
this.anchor = [0.5, 0.5];
|
||
|
}
|
||
|
|
||
|
get internal() {
|
||
|
return this.text;
|
||
|
}
|
||
|
|
||
|
}
|