SOURCE / PINNED RELEASE
Made of little things.
Pickle Rustlers
- Release
- 039e51f55e34…
- Author-recorded commit
- 40608586a8a1…
- License
- LICENSE
- Author’s source reference
- nostr://npub12lm3rxsva8kfempyjkxupt09e02n3fezurkyadyqfejdc5e0r2kscqty6r/wss%3A%2F%2Fgit.napplet.soy%2F/n-bad44e7ab35
Archive hash verified: f38e99afa0992052…. The source-to-build association is the author’s claim; it has not been independently rebuilt.
// The score-card share contract between the game (SDK-free) and src/share.
/** The finished campaign run shown on the card and in the note. */
export interface RunSummary {
score: number;
brined: number;
onions: number;
tears: number;
wins: number;
newBest: boolean;
}
export interface ScoreCard {
/** The drawn card, shown as the composer preview. */
preview: HTMLCanvasElement;
png: Blob;
}
export interface ShareResult {
ok: boolean;
/** No further attempt should be offered (posted, or partly posted). */
done: boolean;
message: string;
}
export interface ScoreShare {
/** A viewer is signed in and identity, upload and outbox are all present. */
readonly available: boolean;
onChange(listener: () => void): void;
/** Draw the card over a 16:9 snapshot of the victory scene. */
makeCard(run: RunSummary, scene: HTMLCanvasElement): Promise<ScoreCard>;
/** Upload the PNG, then publish a kind 1 note that embeds it. */
post(png: Blob, text: string, onStatus: (text: string) => void): Promise<ShareResult>;
}
