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

hexo-sakana

v1.0.2

Published

Sakana🐟 in hexo

Downloads

31

Readme

hexo-sakana

🐟Hexo「Sakana! Widget」网页组件注入🐟

NPM License


概述

此 Hexo 插件用于在渲染 HTML 时将 Sakana! Widget 组件注入进 body 内,以非侵入式方式加载石蒜组件。

注入代码参考 EYHN/hexo-helper-live2d

安装

npm install hexo-sakana --save

配置

_config.yml_config.[theme].yml 中添加配置。

默认配置如下:

sakana:
  # 默认角色
  character: takina
  # 是否启用
  enable: true
  # 是否在移动端启用
  enable_mobile: false
  #  组件大小,默认为 200
  size: 200
  # 自适应容器大小 (最小 120px)
  # 另见:https://github.com/dsrkafuu/sakana-widget/blob/main/README.zh.md#%E8%87%AA%E5%8A%A8%E7%BC%A9%E6%94%BE
  autoFit: false
  # 组件据底部距离,需填写单位或百分号
  bottom: 0px
  # 是否启用控制栏
  controls: true
  # 线条设置
  stroke:
    # 颜色
    color: "#b4b4b4"
    # 粗细
    width: 10
  # 停止动画的阈值
  threshold: 0.1
  # 旋转角度
  rotate: 0
  # 自定义角色
  # customCharacters:
  #   - base: takina
  #     name: takina1
  #     ...

customCharacters 为一个列表,每个元素如下:

# 基础角色,必须为 takina(即井之上泷奈)或 chisato(即锦木千束)
base: takina
# 名称,设置默认角色时可填写
name: takina1
# 自定义图片(url 或 base64)
image: >-
  https://raw.githubusercontent.com/dsrkafuu/sakana-widget/master/src/characters/takina.png
# 惯性
i: 0.08
# 粘性
s: 0.1
# 衰减
d: 0.988
# 角度
r: 12
# 高度
"y": 2
# 垂直速度
t: 0
# 水平速度
w: 0

其中 basename 为必填,未填写的则会使用 base 对应角色的默认值,见 https://github.com/dsrkafuu/sakana-widget/blob/main/src/characters/index.ts#L40-L64 。

许可

本项目代码基于 MIT 协议授权,不可用于任何商业活动

本项目基于 https://github.com/dsrkafuu/sakana-widget 开发。

许可证文件:LICENSE