npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

plinkfx

v0.3.0

Published

Game sound effects as code: 274 CC0 SFX (coin, jump, laser, UI clicks, cards, vehicles, horror, loops) and a 3.1 kB Web Audio player. CLI for WAV/OGG, no audio files.

Readme

plinkfx

274 个游戏音效,全部用代码写成。 金币、跳跃、打击、激光、爆炸、UI 点击……每个音效只是几个看得懂的参数,由 3.1 kB 的播放器在浏览器里实时合成。音效 CC0,可商用,无需署名;没有音频文件,无需注册。

▶ 在线试听全部音效 · 30 秒小游戏演示 · 30 秒有声视频

npm i plinkfx
import { play } from "plinkfx";

play("coin");

每个音效有 4 个变体,每次播放都会换一个和上次不同的,第一百个金币也不会听起来像在循环。

只打包用到的音效(播放器 + 一个音效约 3 kB gzip):

import { play } from "plinkfx/core";
import { coin, jump } from "plinkfx/sounds";

play(coin);
play(jump, { volume: 0.5 });

播放器会保护你的混音:同一个音效 30 ms 内重复触发会被跳过(cooldown),同一个音效最多同时播放 4 个(voices),再多就淡出最早的那个。 rain-loop、wind-loop、engine-idle、force-field 是无缝循环音效,会一直播放到你停止它:

const engine = play("engine-idle");
engine?.rate(1.6);   // 平滑升速
engine?.stop(0.5);   // 0.5 秒淡出
muted(true);         // 全部静音;不会自动保存,需要时自己存进 localStorage

包含哪些音效

| 分类 | 数量 | 示例 | |---|---:|---| | UI | 32 | click toggle-on confirm error notify plink | | 拾取 | 19 | coin coin-double gem key heart ka-ching | | 跳跃与落地 | 12 | jump jump-double land land-heavy spring | | 打击 | 20 | hit hit-heavy punch hurt enemy-die sword-hit | | 爆炸 | 10 | explosion explosion-big explosion-retro firework | | 强化 | 12 | powerup level-up extra-life shield-on heal | | 射击与激光 | 21 | laser blaster zap pew gunshot reload | | 脚步 | 12 | step-grass step-stone step-wood step-snow | | 魔法 | 13 | sparkle fireball ice teleport lightning | | 提示 | 13 | alarm warning low-health countdown | | 短旋律 | 11 | victory level-complete game-over achievement | | 门与机关 | 10 | door-open door-heavy chest-open lever | | 环境 | 18 | whoosh splash water-drop wind glass-break engine-idle(循环) | | 生物 | 13 | bat-flap slime-blob growl-small ghost-moan voice-babble | | 自然 | 12 | thunder-far rain-drop bird-chirp stone-drop rain-loop(循环) | | 卡牌与赌场 | 9 | card-flip card-shuffle chip-stack dice-roll jackpot | | 载具 | 7 | engine-start engine-rev tire-screech car-crash boost | | 恐怖 | 7 | jumpscare dread-drone whisper horror-sting music-box | | 农场与制作 | 9 | axe-chop tree-fall pickaxe-mine dig watering-can | | 科幻与科技 | 8 | computer-beep scan access-granted door-slide glitch | | 益智 | 6 | swap match combo-chain line-clear merge |

导出给游戏引擎

Godot、Unity、Phaser、Defold、LÖVE 等引擎都可以直接用导出的文件:

npx plinkfx export sfx/                 # 每个音效导出为 48 kHz 单声道 WAV,按分类放在子文件夹
npx plinkfx export sfx/ --format both   # WAV + OGG(OGG 需要 ffmpeg)
npx plinkfx export sfx/ --variants      # 每个音效的全部 4 个变体

Godot 导入时请关闭 Normalize,响度已经统一过了。Godot、Unity、Phaser 都有现成的示例。

Agent 技能

支持 Claude Code、Codex、Cursor 等。描述你想要的声音(例如“地牢里沉重的大门”),Agent 会从最接近的现有音效出发写出参数,然后渲染、测量(响度、真峰值、时长、亮度)并调整,完全离线运行。Agent 听不到声音,所以最后由你来试听。

npx skills add maximilianfeix/plinkfx

完整示例见 docs/skill-example.md。

怎么测量

  • 每个分类有响度目标(ITU-R BS.1770 最大瞬时响度),4 个变体都在目标 ±1.5 LU 以内。很短的点击、打击、脚步声会先碰到峰值上限,响度会略低于目标。
  • 真峰值 ≤ −1 dBTP,无直流偏移,首尾无爆音。
  • 同样的参数总是生成相同的采样,测试里有哈希校验,在 Linux、macOS、Windows 上运行。
  • 数字说明不了好不好听。用耳机逐个试听全部音效的工作还没做完;如果哪个听起来不对,欢迎提 issue。

对比

ZzFX 更小,适合 js13k;jsfxr 适合随机探索音色;Kenney 音效包是真实录音。plinkfx 适合想要一整套风格统一、能读懂、能修改、能直接上线的音效的人。详细对比表见 English README。

授权

音效:CC0 1.0(公共领域)

可用于任何游戏、应用、视频、直播,商用也可以,无需署名。LICENSE-SOUNDS

代码:MIT

引擎、CLI、在线音效库和技能。LICENSE

参与贡献

最有用的贡献是新音效:在在线音效库里调到适合你游戏的样子,把参数发 issue 或 PR。见 CONTRIBUTING.md。

Star 历史

English README