littlejsengine 1.23.0 → 1.23.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.
@@ -816,11 +816,11 @@ declare module "littlejsengine" {
816
816
  * @param {HTMLElement} element */
817
817
  onPanel(element: HTMLElement): void;
818
818
  /** Called by Save with the text of the file and its name; return true when the game kept it itself, and the
819
- * editor writes no file, to set or override
819
+ * editor writes no file, to set or override; it may be async
820
820
  * @param {string} text
821
821
  * @param {string} fileName
822
- * @return {boolean|void} */
823
- onSave(text: string, fileName: string): boolean | void;
822
+ * @return {boolean|void|Promise<boolean|void>} */
823
+ onSave(text: string, fileName: string): boolean | void | Promise<boolean | void>;
824
824
  /** True while the editor is open, the game is paused under it
825
825
  * @return {boolean} */
826
826
  get isOpen(): boolean;
@@ -3647,6 +3647,7 @@ declare module "littlejsengine" {
3647
3647
  * @param {SoundLoadCallback} [onloadCallback] - callback function to call when sound is loaded
3648
3648
  */
3649
3649
  constructor(asset?: string | URL | any[], randomness?: number, range?: number, taper?: number, onloadCallback?: SoundLoadCallback);
3650
+ loadedPercent: number;
3650
3651
  set range(arg: number);
3651
3652
  /** World space max range of sound, 0 for no limit; a range that is set is the sound's own, in 3D too
3652
3653
  * @type {number} */
@@ -3669,9 +3670,6 @@ declare module "littlejsengine" {
3669
3670
  /** @ignore
3670
3671
  * @type {Array<Array<number>|Float32Array>|undefined} */
3671
3672
  _sampleChannels: Array<Array<number> | Float32Array> | undefined;
3672
- /** @property {number} - Percentage of this sound currently loaded, sounds
3673
- * fetched from a url stay at 0 until decoding completes */
3674
- loadedPercent: number;
3675
3673
  /** @property {SoundLoadCallback|undefined} - function to call when sound is loaded
3676
3674
  * @type {SoundLoadCallback|undefined} */
3677
3675
  onloadCallback: SoundLoadCallback | undefined;
@@ -5318,6 +5316,8 @@ declare module "littlejsengine" {
5318
5316
  }
5319
5317
  /**
5320
5318
  * LittleJS ZzFXM Plugin
5319
+ * - A port of ZzFXM, the Zuper Zmall Zound Zynth music player, by Keith Clark and Frank Force, MIT licensed,
5320
+ * https://github.com/keithclark/ZzFXM; its notice is in COPYRIGHT.txt
5321
5321
  * @namespace ZzFXM
5322
5322
  */
5323
5323
  /**
@@ -5751,8 +5751,7 @@ declare module "littlejsengine" {
5751
5751
  * To end typing in a field, call its stopEditing(), which also fires its onChange and release sound
5752
5752
  * @type {UIObject|undefined} */
5753
5753
  get keyInputObject(): UIObject;
5754
- /** Destroy and remove all objects
5755
- * @memberof UISystem */
5754
+ /** Destroy and remove all objects */
5756
5755
  destroyObjects(): void;
5757
5756
  /** Get all navigable UI objects sorted by navigationIndex
5758
5757
  * @return {Array<UIObject>} */
@@ -8562,6 +8561,7 @@ declare module "littlejsengine" {
8562
8561
  /** @type {TextureInfo|undefined} */
8563
8562
  streamTileInfo: TextureInfo | undefined;
8564
8563
  streamState: any;
8564
+ streamUnlit: boolean;
8565
8565
  /** @type {Mesh|undefined} */
8566
8566
  capture: Mesh | undefined;
8567
8567
  /** @type {Array<{distance: number, state: Object, draw: function(): void}>|undefined} */
@@ -10685,7 +10685,8 @@ declare module "littlejsengine" {
10685
10685
  }
10686
10686
  /** How a level's block map is made: the sheet its blocks show tiles of, and a function to set it up
10687
10687
  * - A level's voxels block makes a VoxelMap when the level loads, with texture 0 and the default tile size unless
10688
- * a sheet is given here; a block's type shows that tile of the sheet on every face
10688
+ * a sheet is given here; a block's type shows that tile of the sheet on every face; a game that has loaded no
10689
+ * image gets plain blocks, a color for each type
10689
10690
  * - setup is called with each map a level makes, to give block types their own faces or make them see-through
10690
10691
  * - Call it before level3DLoad; with no arguments the defaults are back
10691
10692
  * @param {TileInfo} [tileInfo] - The sheet's first tile, as for a VoxelMap