@bloopjs/web 0.0.31 → 0.0.32

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/App.d.ts ADDED
@@ -0,0 +1,29 @@
1
+ import { type Bloop, type MountOpts, type Sim } from "@bloopjs/bloop";
2
+ export type StartOptions = {
3
+ /** A bloop game instance */
4
+ game: Bloop<any>;
5
+ /** A pre-mounted sim instance, defaults to mount with default options */
6
+ sim?: Sim;
7
+ /** An override url to use to fetch the engine wasm */
8
+ engineWasmUrl?: URL;
9
+ /** Whether the sim should pause before running the first frame, defaults to false */
10
+ startPaused?: boolean;
11
+ /** Whether the sim should be recording to tape from initialization, defaults to true */
12
+ startRecording?: boolean;
13
+ };
14
+ /** Start a bloop game on the web */
15
+ export declare function start(opts: StartOptions): Promise<App>;
16
+ export declare class App {
17
+ #private;
18
+ game: Bloop<any>;
19
+ constructor(sim: Sim, game: Bloop<any>);
20
+ get sim(): Sim;
21
+ set sim(sim: Sim);
22
+ /** Subscribe to the browser events and start the render loop */
23
+ subscribe(): void;
24
+ /** Clean up wasm resources and event listeners */
25
+ cleanup(): void;
26
+ acceptHmr(module: any, opts?: Partial<MountOpts>): Promise<void>;
27
+ }
28
+ export type UnsubscribeFn = () => void;
29
+ //# sourceMappingURL=App.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,SAAS,EAAS,KAAK,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAI7E,MAAM,MAAM,YAAY,GAAG;IACzB,4BAA4B;IAC5B,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACjB,yEAAyE;IACzE,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,sDAAsD;IACtD,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,qFAAqF;IACrF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wFAAwF;IACxF,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,oCAAoC;AACpC,wBAAsB,KAAK,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,CAY5D;AAED,qBAAa,GAAG;;IAEd,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;gBAML,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAOtC,IAAI,GAAG,IAIM,GAAG,CAFf;IAED,IAAI,GAAG,CAAC,GAAG,EAAE,GAAG,EAEf;IAED,gEAAgE;IAChE,SAAS;IAoET,kDAAkD;IAClD,OAAO;IAKD,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC;CAoBvD;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC"}
package/dist/mod.d.ts CHANGED
@@ -1,4 +1,2 @@
1
- import { type Runtime } from "@bloopjs/bloop";
2
- export type UnsubscribeFn = () => void;
3
- export declare function connect(runtime: Runtime, draw?: () => void): UnsubscribeFn;
1
+ export { App, start } from "./App.ts";
4
2
  //# sourceMappingURL=mod.d.ts.map
package/dist/mod.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC;AAEvC,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,IAAI,GAAG,aAAa,CAwE1E"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC"}