This library been moved to ngx-acuw!!!
Angular library to show images as particles with using three.js
This library is based on the great work and code of Bruno Imbrizi and brought to Angular.
A description and a tutorial how the project was created can be found on https://tympanus.net/codrops/2019/01/17/interactive-particles-with-three-js/
Original image | Image as interactive particles |
---|---|
ng-image-as-particles
used on a homepage on welcome page: https://lenny-the-samoyed.firebaseapp.com/
npm install [email protected]
npm install ng-image-as-particles
Once installed you need to import the main module:
import { NgImageAsParticlesModule } from 'ng-image-as-particles';
@NgModule({
declarations: [AppComponent, ...],
imports: [NgImageAsParticlesModule],
bootstrap: [AppComponent]
})
export class AppModule {
}
<lib-image-as-particles [imageUrl]="selectedUrl" touchAction="none"
imageWidth="90%" imageHeight="90%" backgroundColor="#222222"
horizontalAlignment="center" verticalAlignment="center">
</lib-image-as-particles>
Name | Default | Description |
---|---|---|
imageUrl | null | URL to the image |
backgroundColor | "##222222" | The background-color CSS property sets the background color of an element. (background-color) |
touchAction | "none" | The touch-action CSS property sets how an element's region can be manipulated by a touchscreen user. (touchAction) |
imageWidth | "100%" | Width of the generated image in "px" or "%" |
imageHeight | "100%" | Height of the generated image in "px" or "%" |
horizontalAlignment | "center" | Possible values: "start", "center", "end" |
verticalAlignment | "center" | Possible values: "top", "center", "bottom" |