aframe-particle-system-component icon indicating copy to clipboard operation
aframe-particle-system-component copied to clipboard

Expose SPE.Emitter.disable() and SPE.Emitter.enable()

Open UXVirtual opened this issue 8 years ago • 1 comments

I'd be great to expose the disable() and enable() methods on SPE.Emitter as component methods. Currently I have to do the following if I want to start / stop the emitter:

var particleEntity = document.querySelector('[particle-system]');
particleEntity.components['particle-system'].particleGroup.emitters[0].disable();
particleEntity.components['particle-system'].particleGroup.emitters[0].enable();

Having the above would allow the component to be used more easily for temporary effects such as object collisions / teleport effects etc.

I'm assuming this component only ever creates one particle emitter?

UXVirtual avatar May 15 '17 04:05 UXVirtual

This issue can be closed? Looks complete with https://github.com/joshmarinacci/aframe-particle-system-component/commit/551488c58c5828fb498ae993c96842750bec6547

kfarr avatar Dec 03 '17 05:12 kfarr