sparkar-particle

0.2.2 • Public • Published

Particle

A wrapped tool for controlling emitters in SparkAR.

Install

Import

  1. Download Particle.js (Right click and Save as)

  2. Download PFTween.js (Right click and Save as)

  3. Drag/Drop or import them to Spark AR

  4. Import Particle module

    import { Particle } from './Particle';
    // Your script...
  5. You can also Click Here to Download a Sample Project.

npm

  1. Add package with yarn or npm

    yarn add sparkar-particle

    or

    npm i sparkar-particle
  2. Import Particle module

    import { Particle } from 'sparkar-particle';
    // Your script...

Usage

import { Particle } from './Particle';
 
const TouchGestures = require('TouchGestures');
 
const ps = Particle.findFirst('emitter0').setFadeout().stop();
//or
//const ps = Particle.findAll('emitter0').setFadeout().stop();
//or
//const ps = Particle.findByPath('**/emitter0').setFadeout().stop();
    
TouchGestures.onTap().subscribe(() => ps.burst())

Package Sidebar

Install

npm i sparkar-particle

Weekly Downloads

0

Version

0.2.2

License

MIT

Unpacked Size

21.4 kB

Total Files

3

Last publish

Collaborators

  • pofulu