@simpludify/web 0.1.7 → 0.2.0
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/README.md +3 -3
- package/dist/asset-loaders.d.ts +6 -0
- package/dist/assets.d.ts +158 -0
- package/dist/audio.d.ts +97 -0
- package/dist/canvas-visual.d.ts +2 -0
- package/dist/game.d.ts +30 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1425 -197
- package/dist/index.js.map +1 -1
- package/dist/renderer.d.ts +7 -2
- package/dist/shared-images.d.ts +9 -2
- package/package.json +2 -2
package/dist/renderer.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { CanvasUI, PointerRouting, VirtualInput } from "@simpludify/core";
|
|
2
2
|
import { type PreparedScene, type RendererPort, type Scene } from "@simpludify/core";
|
|
3
|
+
import { type AssetStore } from "./assets.js";
|
|
3
4
|
import { type CanvasPresentation } from "./canvas-visual.js";
|
|
5
|
+
import type { SharedImages } from "./shared-images.js";
|
|
4
6
|
import { type VirtualInputPresentation } from "./virtual-input-visual.js";
|
|
5
7
|
export declare class PixiRenderer implements RendererPort {
|
|
6
8
|
private readonly host;
|
|
7
9
|
private readonly background;
|
|
8
10
|
private readonly onError;
|
|
11
|
+
private readonly assetServices?;
|
|
9
12
|
private readonly app;
|
|
10
13
|
private readonly pendingUITextKeys;
|
|
11
14
|
private readonly canvasPresentations;
|
|
@@ -50,7 +53,6 @@ export declare class PixiRenderer implements RendererPort {
|
|
|
50
53
|
private ready;
|
|
51
54
|
private dead;
|
|
52
55
|
private visualCount;
|
|
53
|
-
private textureCount;
|
|
54
56
|
get diagnostics(): {
|
|
55
57
|
imageReferences: number;
|
|
56
58
|
imageEntries: number;
|
|
@@ -59,7 +61,10 @@ export declare class PixiRenderer implements RendererPort {
|
|
|
59
61
|
visuals: number;
|
|
60
62
|
textures: number;
|
|
61
63
|
};
|
|
62
|
-
constructor(host: HTMLElement, background?: string, onError?: (error: unknown) => void
|
|
64
|
+
constructor(host: HTMLElement, background?: string, onError?: (error: unknown) => void, assetServices?: {
|
|
65
|
+
store: AssetStore;
|
|
66
|
+
images: SharedImages;
|
|
67
|
+
} | undefined);
|
|
63
68
|
init(): Promise<void>;
|
|
64
69
|
private image;
|
|
65
70
|
private acquireImage;
|
package/dist/shared-images.d.ts
CHANGED
|
@@ -7,19 +7,26 @@ export interface ImageResource {
|
|
|
7
7
|
}
|
|
8
8
|
export interface ImageLease extends ImageResource {
|
|
9
9
|
textureFor(frame?: SpriteFrame): Texture;
|
|
10
|
+
useFrames?(frames: () => Iterable<SpriteFrame>): void;
|
|
11
|
+
onChange?(listener: () => void): () => void;
|
|
10
12
|
}
|
|
11
13
|
/** Renderer-local, live-reference cache. No idle retention or process-global state. */
|
|
12
14
|
export declare class SharedImages {
|
|
13
15
|
private readonly load;
|
|
14
16
|
private readonly entries;
|
|
17
|
+
private loaded;
|
|
15
18
|
private references;
|
|
16
19
|
private dead;
|
|
17
|
-
constructor(load: (url: string, signal: AbortSignal) => Promise<ImageResource>);
|
|
20
|
+
constructor(load: (url: string, signal: AbortSignal, mode?: "explicit" | "reload") => Promise<ImageResource>);
|
|
18
21
|
get diagnostics(): {
|
|
19
22
|
imageReferences: number;
|
|
20
23
|
imageEntries: number;
|
|
21
24
|
pendingImages: number;
|
|
22
25
|
};
|
|
23
|
-
|
|
26
|
+
get textures(): number;
|
|
27
|
+
acquire(key: string | symbol, signal: AbortSignal, request?: {
|
|
28
|
+
url: string;
|
|
29
|
+
mode: "explicit" | "reload";
|
|
30
|
+
}): Promise<ImageLease>;
|
|
24
31
|
dispose(): void;
|
|
25
32
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simpludify/web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"./package.json": "./package.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@simpludify/core": "0.
|
|
17
|
+
"@simpludify/core": "0.2.0",
|
|
18
18
|
"pixi.js": "8.22.0"
|
|
19
19
|
},
|
|
20
20
|
"description": "Browser host, PixiJS rendering and input for the experimental Simpludify 2D engine.",
|