angry-pixel 2.1.0 → 2.1.1
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.
- package/lib/index.cjs.js +1 -1
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +19 -0
- package/lib/index.esm.js +1 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1579,6 +1579,13 @@ declare class AssetManager {
|
|
|
1579
1579
|
* @returns The HTML Video element created
|
|
1580
1580
|
*/
|
|
1581
1581
|
loadVideo(url: string, name?: string): HTMLVideoElement;
|
|
1582
|
+
/**
|
|
1583
|
+
* Loads a JSON asset
|
|
1584
|
+
* @param url The asset URL
|
|
1585
|
+
* @param name The asset name [optional]
|
|
1586
|
+
* @returns Promise<Record<string, any>>
|
|
1587
|
+
*/
|
|
1588
|
+
loadJson<T = Record<string, any>>(url: string, name?: string): Promise<T>;
|
|
1582
1589
|
/**
|
|
1583
1590
|
* Retrieves an image asset
|
|
1584
1591
|
* @param url The asset URL
|
|
@@ -1621,6 +1628,18 @@ declare class AssetManager {
|
|
|
1621
1628
|
* @returns The HTML Video element
|
|
1622
1629
|
*/
|
|
1623
1630
|
getVideo(name: string): HTMLVideoElement;
|
|
1631
|
+
/**
|
|
1632
|
+
* Retrieves a json asset
|
|
1633
|
+
* @param url The asset URL
|
|
1634
|
+
* @returns The JSON object
|
|
1635
|
+
*/
|
|
1636
|
+
getJson<T = Record<string, any>>(url: string): T;
|
|
1637
|
+
/**
|
|
1638
|
+
* Retrieves a json asset
|
|
1639
|
+
* @param name The asset name
|
|
1640
|
+
* @returns The JSON object
|
|
1641
|
+
*/
|
|
1642
|
+
getJson<T = Record<string, any>>(name: string): T;
|
|
1624
1643
|
private createAsset;
|
|
1625
1644
|
}
|
|
1626
1645
|
|