0.6.1 • Published 4 years ago

sc-thanos v0.6.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

ScThanos

A SuperheroicCodings implementation of a Thanos like vaporize effect usable as an angular directive. This library was generated with Angular CLI version 8.x

Live Demo:

Click the technology cards on https://angularexamples.superheroiccoding.de

Usage

Depedencies:

To install run

npm install sc-thanos --save

This lib uses html2canvas. So please run

npm install html2canvas --save.

Prepare your angular app:

Add to your root app module.

@NgModule({
  ...
  imports: [...
    ScThanosModule.forRoot(options)
  ]
})
export class AppModule {...}

And add ScThanosModule to your shared module exports to make the directive available.

@NgModule({
  ...
  exports: [...
    ScThanosModule
  ]
})
export class SharedModule {...}
]

ScThanosOptions can be injected into the forRoot method:

fieldtypedefaultdescription
animationLengthnumber5000the animation length in ms
maxParticleCountnumber400000max amount of particles
particleAccelerationnumber30speed of the particle acceleration

###ScThanosDirective usage Use the directive scThanos on your element and reference it using @ViewChild(ScThanosDirective) in your component or directly in html via template ref:

<div scThanos 
  #thanos="thanos" 
  (scThanosComplete)=onComplete()>
  This div will be vaporized on click
  </div>
<button (click)="thanos.vaporize(removeElement)"> 

###ScThanosService usage Inject the 'ScThanosService' into your class. Call 'vaporize()' and subscribe to it.

Collaboration

Send issues or PRs to https://github.com/SuperheroicCoding/AngularExamples

0.6.1

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.4

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago