forked from arne/asdf-games
Merge branch 'master' of https://gitea.arnweb.nl/arne/asdf-games
This commit is contained in:
commit
7c480c7a2c
14
lib/index.d.ts
vendored
14
lib/index.d.ts
vendored
@ -149,6 +149,12 @@ export class Texture {
|
|||||||
constructor(url: string);
|
constructor(url: string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface TextStyleOptions {
|
||||||
|
font?: string,
|
||||||
|
fill?: string | CanvasGradient | CanvasPattern,
|
||||||
|
align?: CanvasTextAlign
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Text class
|
* Text class
|
||||||
*/
|
*/
|
||||||
@ -158,18 +164,14 @@ export class Text {
|
|||||||
text: string;
|
text: string;
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
update?: (dt?: number, t?: number) => void;
|
update?: (dt?: number, t?: number) => void;
|
||||||
style: {
|
style: TextStyleOptions'
|
||||||
font?: string,
|
|
||||||
fill?: string | CanvasGradient | CanvasPattern,
|
|
||||||
align?: CanvasTextAlign
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prints styled text on canvas
|
* Prints styled text on canvas
|
||||||
* @param text Text to print
|
* @param text Text to print
|
||||||
* @param style Styles to apply to text
|
* @param style Styles to apply to text
|
||||||
*/
|
*/
|
||||||
constructor(text: string, style: {});
|
constructor(text: string, style: TextStyleOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user