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 🙏

© 2024 – Pkg Stats / Ryan Hefner

sakana

v1.0.8

Published

🐟「Sakana!」石蒜虚拟器

Downloads

39

Readme

🐟「Sakana!」石蒜模拟器

NPM License: MIT

地址 https://lab.magiconch.com/sakana/

さかなー---!!

支持引入多个模拟器了! 约会版

插画来源

大伏アオ @blue00f4 Pixiv

已从老师推特取得在网页中使用两张插画 ( その1その2 ) 的非商用授权 ヾ(^▽^ヾ)

功能

  • 按住立牌拖拽、松手后立牌会向反方向弹跳
  • 点击底座切换角色
  • 手机开启陀螺仪权限、摇一摇可甩动立牌 #12 待解决
  • 自走模式,以随机间隔、施加一个大小随机的力 #7 @milkybird98
  • 音效,在适当区间松手时的语音效果 #9 @zthxxx
  • 多语言支持 #26 @dsrkafuu

请求参数

  • 添加 ?v=chisato 请求参数,可获得 锦木千束 专属链接
  • 添加 ?v=takina 请求参数,可获得 井上泷奈 专属链接
  • 添加 ?alpha=true 请求参数,可获得透明背景
  • 添加 ?background=red 请求参数,可自定义背景 #FF00FF '#d77 url(chisato.png)' 均可
  • 添加 ?decay=0.99 请求参数,自定义衰减 无阻尼例 #11
  • 添加 ?inertia=0.1 请求参数,自定义惯性 超慢速例
  • 添加 ?lang=en-US 请求参数,自定义语言 英文 日语
  • 添加 ?scale=auto 请求参数,在小尺寸时适应高度调整缩放
  • 添加 ?scale=0.5 请求参数,自定义元素缩放比例
  • 添加 ?translateY=200px 请求参数,自定义元素垂直位移
  • 添加 ?r=60 请求参数,初始角色右倾 60 度
  • 添加 ?y=100 请求参数,初始角色下沉 100 单位

组合参数例

引入到个人网站

示例 源码

<div class="sakana-box"></div>
<script src="https://cdn.jsdelivr.net/npm/sakana"></script>
<script>
Sakana.init({
  el:         '.sakana-box',     // 启动元素 node 或 选择器
  scale:      .5,                // 缩放倍数
  canSwitchCharacter: true,      // 允许换角色
});
</script>

选项与方法

// 设定静音
Sakana.setMute(true);

// 获取静音状态
const { isMute } = Sakana.Voices;

// 启动
const sakana = Sakana.init({
  // 选项: 默认值
  el:         '.sakana-box',     // 启动元素 node 或 选择器
  character:  'takina',          // 启动角色 'chisato','takina' 
  inertia:    0.01,              // 惯性
  decay:      0.99,              // 衰减
  r:          60,                // 启动角度
  y:          10,                // 启动高度
  scale:      1,                 // 缩放倍数
  translateY: 0,                 // 位移高度
  canSwitchCharacter: false,     // 允许换角色
  onSwitchCharacter(character){  // 切换角色回调
    console.log(`${character} dayo~`);
  },
});

// 设定归零角度
sakana.setOriginRotate(10);

// 获取角色运行状态
const v = sakana.getValue();

// 确保运行
sakana.confirmRunning();

// 切换角色
sakana.switchCharacter();

// 暂停动作
sakana.pause();

// 恢复动作
sakana.play();

// 切换特定角色
sakana.setCharacter('chisato');

放在窗口右下

html .sakana-box{
  position: fixed;
  right: 0;
  bottom: 0;
  transform-origin: 100% 100%; /* 从右下开始变换 */
}

本地调试

document.less 需要编译成 .css 样式文件 #6

编译

  • npm i
  • npm run build

GitHub

https://github.com/itorr/sakana/

衍生

微博

https://weibo.com/1197780522/M2xbREtGI

License

MIT

Copyright (c) 2022, itorr