A wrapped tool for controlling emitters in SparkAR.
-
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
Particle
moduleimport { Particle } from './Particle'; // Your script...
-
You can also Click Here to Download a Sample Project.
-
Add package with
yarn
ornpm
yarn add sparkar-particle
or
npm i sparkar-particle
-
Import
Particle
moduleimport { Particle } from 'sparkar-particle'; // Your script...
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())
If this is useful for you, please consider a donation🙏🏼. One-time donations can be made with PayPal.