A little chance. A dependable stream. @cranberry-forge/parcel is an independent, zero-dependency loot-table runtime: seeded weighted selection, inclusive item quantities, explicit hard pity, current probabilities, and portable random state.
Version 0.1.0 · ESM + TypeScript declarations · MIT · No Three.js, renderer, storage, global randomness, or Cranberry Forge imports.
Run the repository locally and open /parcel.html for Starlight Salvage. API · Integration tutorial
The laboratory
Starlight Salvage is a live Three.js treasure foundry: a hinged chest reveals a rarity-colored crystal over a floating astrolabe. Opening, current odds, guarantee progress and a 1,000-roll distribution experiment all use the public package. Resetting the seed replays the stream; the distribution experiment forks the current state and leaves live progress unchanged. Edit/import/export the table or save its complete stream. The page supports reduced motion, mobile controls and a working data interface when WebGL is unavailable. The Three.js scene is application code, not a runtime dependency.
Existing alternatives
Weighted selection and loot systems are established categories. Parcel packages a narrow policy and inspectable save contract for small JavaScript games.
| Alternative | Documented focus | Useful when |
|---|---|---|
| Chance weighted | Relative weighted selection, including fractional weights, in a broader random-data toolkit | You need general random data helpers and a weighted picker. |
| Silvermine weighted-random-selection | Weighted items with configurable repeat distance | You want weighted rotation with recent-repeat controls. |
| Unity's Loot Boxes sample | Cloud Code chooses rewards and Economy grants currency | You need a Unity service-backed reward flow. |
| Parcel | Flat integer-weight tables, explicit hard pity, current odds and deterministic local saves | Your host already owns inventory and persistence and needs a small reward-selection component. |
These are differences in documented scope, not claims of feature exclusivity. Primary sources reviewed September 8, 2026. See the API reference for bounds and guarantees.