Skip to content

houzisbw/vue-matrix-raindrop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-matrix-raindrop

基于Vue的黑客帝国数字雨特效实现

img

Installation

npm

  npm install vue-matrix-digit-rain --save

yarn

  yarn add vue-matrix-digit-rain

Usage

In your .vue file:

<template>
  <div id="app">
    <VueMatrixRaindrop></VueMatrixRaindrop>
  </div>
</template>

<script>
import VueMatrixRaindrop from 'vue-matrix-digit-rain'
export default {
  name: 'App',
  components:{
    VueMatrixRaindrop
  }
}
</script>

Props

Name Type Default Description
canvasWidth number 800 The width of canvas
canvasHeight number 600 The height of canvas
fontSize number 20 The font-size of digit rain letter
fontFamily string 'arial' The font-family of digit rain letter
textContent string 'abcdefghijklmnopqrstuvwxyz' The text of rain letter,which will choose the index of textContent randomly
textColor string '#0F0' The format of color only supports '#' style, not rgb
backgroundColor string 'rgba(0,0,0,0.1)' The background-color of canvas, please note the 0.1 in rgba, this value decides the tail length of rain drop, the bigger of the value, the shorter of the tail
speed number(int) 2 The speed of rain drop down,the bigger of the value, the slower of the speed

About

基于Vue的黑客帝国数字雨特效实现

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages