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

vue-barrage

v0.0.13

Published

一个基于Canvas+Vue的弹幕组件

Downloads

73

Readme

barrage

一个基于canvas的弹幕组件

弹幕效果

barrage

功能点

  1. 支持循环弹幕
  2. 弹幕不重叠
  3. 支持选择轨道数
  4. 支持弹幕发送
  5. 支持弹幕头像
  6. 支持背景颜色配置
  7. 背景色和渐变背景色

使用

npm install vue-barrage

参数配置

| name | type | default | desc | | ------ | ------ | ------ | ------ | | barrageList | Array | [] | 弹幕数据 | | speed | Number | 4 | 弹幕滚动速度 | | loop | Boolean | true | 是否循环滚动 | | channels | Number | 2 | 弹幕轨道数 | | borderColor | String | '' | 弹幕边框颜色 | | background | String | '#FFFFFF' | 弹幕背景色 | | linearGradient | String | '' | 弹幕渐变背景色 |

使用

<barrage
    ref="barrage"
    class="barrage"
    :barrage-list="barrageList"
    :speed="speed"
    :loop="loop"
    :channels="channels"
    :border-color="borderColor"
    :background="background"
    :linear-gradient="linearGradient"/>
    
import Barrage from 'vue-barrage'

// 弹幕数据初始化  
this.barrageList = [{
	icon: 'https://user-gold-cdn.xitu.io/2019/3/3/169412b9920a8e31?imageView2/1/w/100/h/100/q/85/format/webp/interlace/1',
   content: '试数据测试数测试数据数测试数据',
   color: 'white'
}, {
   content: '试数据测试数测试数据数测试数据',
   color: 'white'
}]
// 新增弹幕
this.$refs.barrage.add({
   content: '增加一条新的弹幕增加一条新的弹幕',
   color: 'white'
})

源码地址