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

l2d

v2.1.1

Published

Loading Live2D in a browser is simpler.

Readme

简体中文 · English

npm downloads

什么是 l2d

l2d 是一个用于在浏览器驱动 Live2D 模型的javascript库,完全基于 Live2D 官方 Cubism SDK 进行二次封装。l2d 同时也是 Live2D 的简写,寓意着用更简单、更快捷、更低成本的方式在 Web 页面中加载 Live2D 模型。

  • 开箱即用 — 无需手动引入官方 SDK,三步完成Live2D模型加载
  • 全版本兼容 — 内置 Cubism 2 & 6 运行时,同时支持 .model.json(Cubism 2)和 .model3.json(Cubism 6),覆盖所有Live2D模型版本,并暴露规范统一的接口
  • 统一规范的API Cubism 2 & 6 所驱动的模型均使用完全相同规范的接口,尽可能保证两版本的能力与规范完全对称
  • 零依赖,轻量 — 单一 JS 文件,不绑定任何框架,Vue、React、原生项目均可直接使用

查阅文档

L2D Demos: https://l2d-demo.hacxy.cn

在线预览调试工具: https://l2d-viewer.hacxy.cn

通过 stackblitz 在线游玩l2d.

参与贡献

欢迎任何形式的贡献,包括提交 Bug 报告、功能建议或直接提交代码。

环境准备

项目使用 pnpm 管理依赖,Node.js 版本要求 v24.14.0

# 克隆仓库
git clone https://github.com/hacxy/l2d.git
cd l2d

# 安装依赖
pnpm install

开发流程

  1. 创建 Issue:建议先在 Issues 中描述你要解决的问题或新增的功能,获得反馈后再开始编码。

  2. 创建分支:以 <issue-id>-<github-username> 格式从 main 分支新建特性分支,例如 42-hacxy

  3. 启动开发环境

    pnpm run demo:dev   # 启动 demo 调试页面
  4. 运行测试

    pnpm run test
  5. 代码规范:项目使用 ESLint,pre-commit 钩子会自动对暂存文件执行 lint 修复,也可手动运行:

    pnpm run lint:fix
  6. 提交代码:使用项目内置的交互式提交工具,它会引导你填写符合 Conventional Commits 规范的提交信息:

    pnpm run commit
  7. 提交 Pull Request:向 main 分支发起 PR,说明改动内容和动机,关联对应 Issue。

贡献者们

感谢以下所有为 l2d 贡献过代码的 开发者们

讨论

微信群:

免责声明

Live2D 模型及其相关资源(贴图、动作、表情文件等)的著作权归原始权利人所有。l2d 仅提供技术加载能力,不包含、不分发任何模型资源

在使用 l2d 加载任何 Live2D 模型时,请确保:

  1. 你拥有该模型的使用权或已获得权利人的明确授权
  2. 你的使用行为符合模型附带的许可协议(如禁止商用、禁止二次分发等)
  3. 不得将本库用于侵权、违法或违反 Live2D Inc. 服务条款的用途

对于因不当使用模型资源而产生的任何版权纠纷或法律责任,l2d 及其贡献者不承担任何责任。

l2d 在运行时集成了 Live2D Cubism SDK。Cubism SDK 的使用须遵守 Live2D Proprietary Software License。若你的项目用于商业用途,请自行确认是否需要向 Live2D Inc. 申请商业许可。

License

MIT License © 2023-PRESENT Hacxy