2.1.3 • Published 1 year ago

@ff0000-ad-tech/ad-particles v2.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
1 year ago
RED Interactive Agency - Ad Technology

npm (tag) GitHub issues npm downloads

GitHub contributors GitHub commit-activity npm license PRs Welcome


Particles

Particle Emitter system

API

Emitter

  • new Emitter()
  • .tween
  • .init(canvasElement, setting)
  • .set(key, val, triggerChange)
  • .get(key)number | string | object | array
  • .setProperties(obj)
  • .addCustomBehavier(type, func)
  • .removeCustomBehavier(type, func)
  • .emit()
  • .stopEmitting()
  • .empty()
  • .pause()
  • .resume()
  • .to(duration, props)
  • .createParticles(amount)
  • .addModel(modelObj)
  • .removeModel(id)

Particle

  • new Particle()
  • .update()
  • .getAnimationStyle()
  • .render()
  • .applyForce()
  • .isDead()boolean
  • .checkWorld(w)
  • ._checkBorder(axis, val)

ParticleModel

  • new ParticleModel()

Graphic.Shape

  • new Shape()

Graphic.Image

  • new Image()

Graphic.Circle

  • new Circle(size, style)

Graphic.Rect

  • new Rect(width, height, style)

Graphic.Sprite

  • new Sprite(image, size, style, spriteSetting)