4.2.8 • Published 5 years ago

@vf.js/particles v4.2.8

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

vf-spine

Install

npm i @vf.js/particles

Usage

import { ParticlesSystem } from '@vf.js/particles';

Basic example

var app = new vf.Application();

document.body.appendChild(app.view);

app.loader
    .add('firecrackerCaidai_png', 'firecrackerCaidai.png')
    .add('firecrackerCaidai_json', 'firecrackerCaidai.json')
    .load(function (loader, resources) {
        const container = new vf.ParticleContainer();
        container.x =  this.app.view.width / 2 ;
        container.y =  this.app.view.height / 2 ;
        this.addChild(container);

        const image = stepLoader.take("firecrackerCaidai_png").texture;
        const data = stepLoader.take("firecrackerCaidai_json").data;
        const particles = ParticlesSystem.from(this.app,image,data,container);

        particles.on(ParticlesSystem.EVENT_START,()=>{
            console.log('EVENT_START');
        })
        particles.on(ParticlesSystem.EVENT_COMPLETE,()=>{
            console.log('EVENT_COMPLETE');
            particles.play();
        });
        //particles.getParticles().maxSpeed =1000;
        //particles.getParticles().startSpeed.value = 600;
        //particles.getParticles().minimumScaleMultiplier = 0.1;
        particles.play();
    });

Building

npm install
4.2.8

5 years ago

4.2.7

5 years ago

4.2.6

5 years ago

4.2.5

5 years ago

4.2.4

5 years ago

4.2.3

5 years ago

4.2.2

5 years ago

4.2.1

5 years ago