Add files via upload

This commit is contained in:
Rekushi authored and GitHub committed 2026-10-20 03:40:41 +01:00
1 parent aa11d6cb2b
commit 8f31bdd977
9 files changed
+990

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
# SPPM JavaScript tools
Dependency-free ES module for Node.js 20+ and modern browsers.
```js
import { readSppm, getSppmMetadata, getSppmThumbnail, SppmPlayer } from "./index.js";
const note = await readSppm("my-note.sppm");
console.log(await getSppmMetadata("my-note.sppm"));
const { width, height, data } = await getSppmThumbnail("my-note.sppm");
const player = new SppmPlayer(document.querySelector("canvas"), note);
await player.play(); // starts at the first frame; includes BGM and frame-cued effects
```
`readSppm` validates the container and CRCs. Current Ed25519 `SPP3` signatures
are verified through WebCrypto when supported. Legacy `SPPS` HMAC files are
reported as unverified unless `legacyHmacKey` is provided. This module reads and
renders notes; it does not create or sign SPPM files. The thumbnail is RGBA with
a solid white background by default and uses the note's cover frame.