minimojs 1.0.0-alpha.33 → 1.0.0-alpha.34
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/dist/minimo.d.ts +10 -4
- package/dist/minimo.js +10 -4
- package/package.json +1 -1
package/dist/minimo.d.ts
CHANGED
|
@@ -2072,9 +2072,12 @@ export declare class Game {
|
|
|
2072
2072
|
/**
|
|
2073
2073
|
* Plays a square-wave beep using the Web Audio API.
|
|
2074
2074
|
*
|
|
2075
|
-
* **
|
|
2076
|
-
*
|
|
2077
|
-
*
|
|
2075
|
+
* **Retro tone, not a game's sound.** This synthesizes a square-wave tone and
|
|
2076
|
+
* needs no file, so it sounds like an old arcade machine. A game's music and
|
|
2077
|
+
* sound effects are audio files: declare them as `sound` entries in an asset
|
|
2078
|
+
* file, or load them with {@link Game.loadSound}, and play them with
|
|
2079
|
+
* {@link Game.playSound}. Use tones only for a deliberately retro game, or
|
|
2080
|
+
* when no audio file can be obtained.
|
|
2078
2081
|
*
|
|
2079
2082
|
* The AudioContext is created lazily on first call. Browsers require a user
|
|
2080
2083
|
* gesture (click, keypress) before audio can play — always call `sound()` in
|
|
@@ -2092,13 +2095,16 @@ export declare class Game {
|
|
|
2092
2095
|
* ```ts
|
|
2093
2096
|
* game.sound(440, 100); // 440 Hz beep for 100ms
|
|
2094
2097
|
* game.sound(261, 500); // middle C for 500ms
|
|
2095
|
-
* game.sound(880, 50); // high beep for 50ms
|
|
2098
|
+
* game.sound(880, 50); // high beep for 50ms
|
|
2096
2099
|
* ```
|
|
2097
2100
|
*/
|
|
2098
2101
|
sound(freq: number, durationMs: number): void;
|
|
2099
2102
|
/**
|
|
2100
2103
|
* Plays multiple square-wave tones in strict sequence.
|
|
2101
2104
|
*
|
|
2105
|
+
* Like {@link Game.sound}, this is a retro tone, not a game's sound: for
|
|
2106
|
+
* music and sound effects, play audio files with {@link Game.playSound}.
|
|
2107
|
+
*
|
|
2102
2108
|
* Each tuple is `[frequencyHz, durationMs]`. The next tone starts when the
|
|
2103
2109
|
* previous one ends.
|
|
2104
2110
|
*
|
package/dist/minimo.js
CHANGED
|
@@ -2400,9 +2400,12 @@ export class Game {
|
|
|
2400
2400
|
/**
|
|
2401
2401
|
* Plays a square-wave beep using the Web Audio API.
|
|
2402
2402
|
*
|
|
2403
|
-
* **
|
|
2404
|
-
*
|
|
2405
|
-
*
|
|
2403
|
+
* **Retro tone, not a game's sound.** This synthesizes a square-wave tone and
|
|
2404
|
+
* needs no file, so it sounds like an old arcade machine. A game's music and
|
|
2405
|
+
* sound effects are audio files: declare them as `sound` entries in an asset
|
|
2406
|
+
* file, or load them with {@link Game.loadSound}, and play them with
|
|
2407
|
+
* {@link Game.playSound}. Use tones only for a deliberately retro game, or
|
|
2408
|
+
* when no audio file can be obtained.
|
|
2406
2409
|
*
|
|
2407
2410
|
* The AudioContext is created lazily on first call. Browsers require a user
|
|
2408
2411
|
* gesture (click, keypress) before audio can play — always call `sound()` in
|
|
@@ -2420,7 +2423,7 @@ export class Game {
|
|
|
2420
2423
|
* ```ts
|
|
2421
2424
|
* game.sound(440, 100); // 440 Hz beep for 100ms
|
|
2422
2425
|
* game.sound(261, 500); // middle C for 500ms
|
|
2423
|
-
* game.sound(880, 50); // high beep for 50ms
|
|
2426
|
+
* game.sound(880, 50); // high beep for 50ms
|
|
2424
2427
|
* ```
|
|
2425
2428
|
*/
|
|
2426
2429
|
sound(freq, durationMs) {
|
|
@@ -2429,6 +2432,9 @@ export class Game {
|
|
|
2429
2432
|
/**
|
|
2430
2433
|
* Plays multiple square-wave tones in strict sequence.
|
|
2431
2434
|
*
|
|
2435
|
+
* Like {@link Game.sound}, this is a retro tone, not a game's sound: for
|
|
2436
|
+
* music and sound effects, play audio files with {@link Game.playSound}.
|
|
2437
|
+
*
|
|
2432
2438
|
* Each tuple is `[frequencyHz, durationMs]`. The next tone starts when the
|
|
2433
2439
|
* previous one ends.
|
|
2434
2440
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "minimojs",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.34",
|
|
4
4
|
"description": "MinimoJS v1 — ultra-minimal, flat, deterministic 2D web game engine. Image-first sprites with emoji as a zero-asset alternative, rAF loop, TypeScript-first, LLM-friendly.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/minimo.js",
|