0.2.2 • Published 5 years ago
sparkar-particle v0.2.2
Particle
A wrapped tool for controlling emitters in SparkAR.
Install
Import
Download Particle.js (Right click and Save as)
Download PFTween.js (Right click and Save as)
Drag/Drop or import them to Spark AR
Import
Particlemoduleimport { Particle } from './Particle'; // Your script...You can also Click Here to Download a Sample Project.
npm
Add package with
yarnornpmyarn add sparkar-particleor
npm i sparkar-particleImport
Particlemoduleimport { 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())