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

mouser-lqy

v0.0.1

Published

鼠标特效库,简单几行代码就可实现华丽的鼠标拖尾特效

Downloads

1

Readme

mouser

author: 猿某人

QQ: 1787750205

介绍

鼠标特效库,简单几行代码就可实现华丽的鼠标拖尾特效

菜单(改变drawType)

  1. 躁动线条
  2. 绚丽流星
  3. 大数据专用
  4. 街头涂鸦
  5. 连线点阵
  6. 萤火之光
  7. 多彩烟花
  8. 放大镜

火候及调料

| 字段 | 默认值 | 说明 | |:---:|:---:|:---| | drawType | 1 | 特效选择1 躁动线条2 绚丽流星3 大数据专用4 街头涂鸦5 连线点阵6 萤火之光7 多彩烟花8 放大镜 | | leaveAutoer | true | 鼠标移出后自动绘制(drawType为1时生效) | | showTime | 20 | 绘制的线条显示的时间(drawType为1时生效) | | maxWidth | 20 | 最大宽度(drawType为1时生效) | | minWidth | 5 | 最小宽度(drawType为1时生效) | | color | 2默认值#F8EC855默认值#A5FBFF | 星星的颜色(drawType为2和5时生效) | | dotColor | #9CD9F9 | 点的颜色(drawType为3时生效) | | lineColor | #9CD9F9 | 线的颜色(drawType为3时生效) | | number | 8000 | 点的数量(drawType为5时生效) | | colors | ['#FF1461', '#18FF92', '#5A87FF', '#FBF38C'] | 礼花颜色(drawType为7时生效) | | multi | 1.5 | 放大倍率(drawType为8时生效) | | multiDom | document.getElementById('app') | 需要放大的dom节点对象(暂不支持canvas或子节点包含canvas的节点) | | border | null | 放大镜镜框(drawType为8时生效) |

烹调方式

npm方式

npm i mouser-lqy -S
import 'mouser-lqy';

git下载方式

<script src="mouser/index.js" type="text/javascript" charset="utf-8"></script>
// 或者
import 'mouser/index.js';

配置并生成鼠标特效,以及实时更换鼠标特效功能

let mouserModel = 1, mouser;
const mouseModels = {
    1: {
        title: '彩色线条',
        options: {
            leaveAutoer: false,
            showTime: 20,
            maxWidth: 12,
            minWidth: 4,
        }
    },
    2: {
        title: '金闪闪',
        options: {
            color: '#F8EC85',
        }
    },
    3: {
        title: '大数据',
        options: {
            dotColor: '#F22323',
            lineColor: '#F2EC23'
        }
    },
    4: {
        title: '街头涂鸦',
        options: {}
    },
    5: {
        title: '连线点阵',
        options: {
            color: '#FFF300',
            number: 10000
        }
    },
    6: {
        title: '萤火之光',
        options: {}
    },
    7: {
        title: '多彩烟花',
        options: {
            colors: ['#FF1461', '#18FF92', '#5A87FF', '#FBF38C']
        }
    },
    8: {
        title: '放大镜',
        options: {
            multi: 1.5,
            multiDom: document.getElementById('body'),
            border: {
                width: 10,
                color: '#069'
            }
        }
    }
}
mouser = new Mouser({
    ...{
        drawType: mouserModel
    },
    ...mouseModels[mouserModel].options
});
function changeMouser(type) {
    mouserModel = type;
    document.title = `Canvas绘制鼠标${mouseModels[mouserModel].title}特效`;
    mouser.changeModel({
        ...{
            drawType: mouserModel
        },
        ...mouseModels[mouserModel].options
    });
}

效果

'躁动线条' '绚丽流星' '大数据专用' '街头涂鸦' '连线点阵' '萤火之光' '多彩烟花' '放大镜'