MCPcopy Create free account
hub / github.com/KilledByAPixel/LittleJS / destroy

Method destroy

src/engineParticles.js:464–472  ·  view source on GitHub ↗

Destroy this particle

()

Source from the content-addressed store, hash-verified

462
463 /** Destroy this particle */
464 destroy()
465 {
466 const destroyCallback = this.emitter.particleDestroyCallback;
467 const c = this.colorEnd;
468 this.color.set(c.r, c.g, c.b, c.a);
469 this.size.set(this.sizeEnd, this.sizeEnd);
470 this.destroyed = true;
471 destroyCallback?.(this);
472 }
473
474 /** Render the particle, automatically called each frame */
475 render()

Callers 3

updateMethod · 0.95
engineObjectsDestroyFunction · 0.45
destroyMethod · 0.45

Calls 1

setMethod · 0.45

Tested by

no test coverage detected