angry-pixel 1.1.8 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,6 +30,7 @@ export declare class Button extends Component {
|
|
|
30
30
|
private scaled;
|
|
31
31
|
onClick: () => void;
|
|
32
32
|
onPressed: () => void;
|
|
33
|
+
onHover: () => void;
|
|
33
34
|
get offset(): Vector2;
|
|
34
35
|
set offset(offset: Vector2);
|
|
35
36
|
protected init({ type, height, radius, touchEnabled, width, offset }: ButtonOptions): void;
|
|
@@ -8,9 +8,10 @@ export declare class AssetManagerFacade {
|
|
|
8
8
|
static getAssetsLoaded(): boolean;
|
|
9
9
|
/**
|
|
10
10
|
* @param url The url of the image
|
|
11
|
+
* @param preloadTexture [optional] preload the texture for this image
|
|
11
12
|
* @returns The created image element
|
|
12
13
|
*/
|
|
13
|
-
static loadImage(url: string): HTMLImageElement;
|
|
14
|
+
static loadImage(url: string, preloadTexture?: boolean): HTMLImageElement;
|
|
14
15
|
/**
|
|
15
16
|
* @param url The url of the audio file
|
|
16
17
|
* @returns The created audio element
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IRenderManager } from "angry-pixel-2d-renderer";
|
|
1
2
|
export declare enum AssetType {
|
|
2
3
|
Image = "Image",
|
|
3
4
|
Audio = "Audio",
|
|
@@ -5,12 +6,19 @@ export declare enum AssetType {
|
|
|
5
6
|
}
|
|
6
7
|
export interface IAssetManager {
|
|
7
8
|
getAssetsLoaded(): boolean;
|
|
8
|
-
loadImage(url: string): HTMLImageElement;
|
|
9
|
+
loadImage(url: string, preloadTexture?: boolean): HTMLImageElement;
|
|
10
|
+
loadAudio(url: string): HTMLAudioElement;
|
|
11
|
+
loadFont(family: string, url: string): FontFace;
|
|
12
|
+
getImage(url: string): HTMLImageElement;
|
|
13
|
+
getAudio(url: string): HTMLAudioElement;
|
|
14
|
+
getFont(family: string): FontFace;
|
|
9
15
|
}
|
|
10
|
-
export declare class AssetManager {
|
|
11
|
-
private
|
|
16
|
+
export declare class AssetManager implements IAssetManager {
|
|
17
|
+
private readonly renderManager;
|
|
18
|
+
private readonly assets;
|
|
19
|
+
constructor(renderManager: IRenderManager);
|
|
12
20
|
getAssetsLoaded(): boolean;
|
|
13
|
-
loadImage(url: string): HTMLImageElement;
|
|
21
|
+
loadImage(url: string, preloadTexture?: boolean): HTMLImageElement;
|
|
14
22
|
loadAudio(url: string): HTMLAudioElement;
|
|
15
23
|
loadFont(family: string, url: string): FontFace;
|
|
16
24
|
getImage(url: string): HTMLImageElement;
|