Skip to content

Commit 93c0cf3

Browse files
author
pigeonT
committed
bugfix, in Class Graphics, the method generateTexture should return type RenderTexture, but not current Texture. When use typescript to compile, there is a Error: Type 'Texture' is not assignable to type 'RenderTexture'.
1 parent 027725e commit 93c0cf3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

typescript/pixi.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ declare module PIXI {
637637
drawShape(shape: Ellipse): GraphicsData;
638638
drawShape(shape: Polygon): GraphicsData;
639639
endFill(): Graphics;
640-
generateTexture(resolution?: number, scaleMode?: number, padding?: number): Texture;
640+
generateTexture(resolution?: number, scaleMode?: number, padding?: number): RenderTexture;
641641
lineStyle(lineWidth?: number, color?: number, alpha?: number): Graphics;
642642
lineTo(x: number, y: number): Graphics;
643643
moveTo(x: number, y: number): Graphics;
@@ -1883,4 +1883,4 @@ declare function requestAnimFrame(callback: Function): void;
18831883

18841884
declare module PIXI.PolyK {
18851885
export function Triangulate(p: number[]): number[];
1886-
}
1886+
}

0 commit comments

Comments
 (0)