Skip to content

OXOYO/X-Particles-Vue-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

x-particles-vue

Version License NPM downloads Downloads JS gzip size

A Vue.js particles plugin base on particles.js .

Example

# git clone https://github.com/OXOYO/X-Particles-Vue-Demo.git

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

Usage

## Packages install
npm install x-particles --save

## main.js
import XParticles from 'x-particles'

Vue.use(XParticles)

## App.vue
<style lang="less">
  .particles-background {
    background: #383838;
    height: 100%;
    width: 100%;
  }
</style>

<template>
  <div id="app" class="layout">
    <x-particles id="myParticles" class="particles-background" :config="config"></x-particles>
  </div>
</template>

<script>
  import defConfig from './config/default.js'
  //  import defConfig from './config/nasa.js'
  //  import defConfig from './config/bubble.js'
  //  import defConfig from './config/snow.js'

    export default {
      name: 'app',
      data () {
        return {
          config: {}
        }
      },
      created: function () {
        let _t = this

        _t.config = defConfig
      }
    }
<script>

Preview

Demo

XParticles

Links

License

MIT

About

A Vue.js particles plugin base on particles.js

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published