fixed error
This commit is contained in:
1800
package-lock.json
generated
1800
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
48
package.json
48
package.json
@@ -10,31 +10,31 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular-devkit/build-angular": "~21.0.3",
|
"@angular-devkit/build-angular": "^21.0.3",
|
||||||
"@angular/animations": "21.0.5",
|
"@angular/animations": "^21.0.5",
|
||||||
"@angular/cdk": "21.0.3",
|
"@angular/cdk": "^21.0.3",
|
||||||
"@angular/common": "~21.0.5",
|
"@angular/common": "^21.0.5",
|
||||||
"@angular/compiler": "21.0.5",
|
"@angular/compiler": "^21.0.5",
|
||||||
"@angular/core": "21.0.5",
|
"@angular/core": "^21.0.5",
|
||||||
"@angular/forms": "~21.0.5",
|
"@angular/forms": "^21.0.5",
|
||||||
"@angular/material": "21.0.3",
|
"@angular/material": "^21.0.3",
|
||||||
"@angular/platform-browser": "~21.0.5",
|
"@angular/platform-browser": "^21.0.5",
|
||||||
"@angular/router": "~21.0.5",
|
"@angular/router": "^21.0.5",
|
||||||
"@ngx-translate/core": "~17.0.0",
|
"@ngx-translate/core": "^17.0.0",
|
||||||
"@ngx-translate/http-loader": "~17.0.0",
|
"@ngx-translate/http-loader": "^17.0.0",
|
||||||
"rxjs": "~7.8.0",
|
"@tsparticles/angular": "~3.0.0",
|
||||||
"tslib": "^2.3.0"
|
"@tsparticles/engine": "~3.9.1",
|
||||||
|
"rxjs": "^7.8.0",
|
||||||
|
"tslib": "^2.3.0",
|
||||||
|
"tsparticles": "~3.9.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular/build": "21.0.3",
|
"@angular/build": "^21.0.3",
|
||||||
"@angular/cli": "21.0.3",
|
"@angular/cli": "^21.0.3",
|
||||||
"@angular/compiler-cli": "21.0.5",
|
"@angular/compiler-cli": "^21.0.5",
|
||||||
"@angular/platform-browser-dynamic": "~21.0.5",
|
"@angular/platform-browser-dynamic": "^21.0.5",
|
||||||
"@types/jasmine": "~5.1.0",
|
"@types/jasmine": "^5.1.0",
|
||||||
"jasmine-core": "~5.9.0",
|
"jasmine-core": "^5.9.0",
|
||||||
"typescript": "~5.9.2"
|
"typescript": "^5.9.2"
|
||||||
},
|
|
||||||
"overrides": {
|
|
||||||
"@angular/*": "20.3.10"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,6 @@
|
|||||||
<canvas #canvas class="particles"></canvas>
|
<ngx-particles
|
||||||
|
[id]="id"
|
||||||
|
[options]="particlesOptions"
|
||||||
|
[particlesInit]="particlesInit"
|
||||||
|
(particlesLoaded)="particlesLoaded($event)"
|
||||||
|
></ngx-particles>
|
||||||
|
|||||||
@@ -1,68 +1,104 @@
|
|||||||
import {AfterViewInit, Component, ElementRef, OnDestroy, ViewChild} from '@angular/core';
|
import {
|
||||||
|
Container,
|
||||||
|
MoveDirection,
|
||||||
|
OutMode,
|
||||||
|
Engine
|
||||||
|
} from "@tsparticles/engine";
|
||||||
|
import {NgParticlesService, NgxParticlesModule} from "@tsparticles/angular";
|
||||||
|
import {Component} from '@angular/core';
|
||||||
import {loadFull} from 'tsparticles';
|
import {loadFull} from 'tsparticles';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-particles-bg',
|
selector: 'app-particles-bg',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [],
|
imports: [
|
||||||
|
NgxParticlesModule
|
||||||
|
],
|
||||||
templateUrl: './particles-bg.component.html',
|
templateUrl: './particles-bg.component.html',
|
||||||
styleUrl: './particles-bg.component.scss',
|
styleUrl: './particles-bg.component.scss',
|
||||||
})
|
})
|
||||||
export class ParticlesBgComponent implements AfterViewInit, OnDestroy {
|
export class ParticlesBgComponent {
|
||||||
@ViewChild('canvas', { static: true }) canvasRef!: ElementRef<HTMLCanvasElement>;
|
id = "tsparticles";
|
||||||
|
|
||||||
private container?: Container;
|
/* Starting from 1.19.0 you can use a remote url (AJAX request) to a JSON with the configuration */
|
||||||
|
particlesUrl = "http://foo.bar/particles.json";
|
||||||
|
|
||||||
async ngAfterViewInit() {
|
/* or the classic JavaScript object */
|
||||||
const engine = new Engine();
|
particlesOptions = {
|
||||||
await loadFull(engine);
|
/*background: {
|
||||||
|
color: {
|
||||||
const options: ISourceOptions = {
|
value: "#0d47a1",
|
||||||
fullScreen: { enable: false }, // we manage size via the canvas
|
|
||||||
background: { color: { value: 'transparent' } },
|
|
||||||
fpsLimit: 60,
|
|
||||||
detectRetina: true,
|
|
||||||
interactivity: {
|
|
||||||
events: {
|
|
||||||
onClick: { enable: true, mode: 'push' },
|
|
||||||
onHover: { enable: false, mode: 'repulse' },
|
|
||||||
resize: true
|
|
||||||
},
|
|
||||||
modes: {
|
|
||||||
push: { quantity: 4 } // <- number of new vertices per click
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
particles: {
|
},
|
||||||
number: { value: 55, density: { enable: true, area: 900 } },
|
fpsLimit: 120,
|
||||||
color: { value: '#23b7ff' },
|
interactivity: {
|
||||||
opacity: { value: 0.35 },
|
events: {
|
||||||
size: { value: { min: 1, max: 3 } },
|
onClick: {
|
||||||
move: {
|
|
||||||
enable: true,
|
enable: true,
|
||||||
speed: 0.7,
|
|
||||||
outModes: { default: 'out' }
|
|
||||||
},
|
},
|
||||||
links: {
|
onHover: {
|
||||||
enable: true,
|
enable: true,
|
||||||
distance: 140,
|
},
|
||||||
color: '#23b7ff',
|
resize: true,
|
||||||
opacity: 0.25,
|
},
|
||||||
width: 1
|
modes: {
|
||||||
}
|
push: {
|
||||||
}
|
quantity: 4,
|
||||||
};
|
},
|
||||||
|
repulse: {
|
||||||
|
distance: 200,
|
||||||
|
duration: 0.4,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
particles: {
|
||||||
|
color: {
|
||||||
|
value: "#ffffff",
|
||||||
|
},
|
||||||
|
links: {
|
||||||
|
color: "#ffffff",
|
||||||
|
distance: 150,
|
||||||
|
enable: true,
|
||||||
|
opacity: 0.5,
|
||||||
|
width: 1,
|
||||||
|
},
|
||||||
|
move: {
|
||||||
|
direction: MoveDirection.none,
|
||||||
|
enable: true,
|
||||||
|
outModes: {
|
||||||
|
default: OutMode.bounce,
|
||||||
|
},
|
||||||
|
random: false,
|
||||||
|
speed: 6,
|
||||||
|
straight: false,
|
||||||
|
},
|
||||||
|
number: {
|
||||||
|
density: {
|
||||||
|
enable: true,
|
||||||
|
area: 800,
|
||||||
|
},
|
||||||
|
value: 80,
|
||||||
|
},
|
||||||
|
opacity: {
|
||||||
|
value: 0.5,
|
||||||
|
},
|
||||||
|
shape: {
|
||||||
|
type: "circle",
|
||||||
|
},
|
||||||
|
size: {
|
||||||
|
value: { min: 1, max: 5 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
detectRetina: true,*/
|
||||||
|
};
|
||||||
|
|
||||||
this.container = await engine.load({
|
constructor(private readonly ngParticlesService: NgParticlesService) {}
|
||||||
element: this.canvasRef.nativeElement,
|
async particlesInit(engine: Engine): Promise<void> {
|
||||||
options
|
await loadFull(engine);
|
||||||
});
|
|
||||||
|
|
||||||
// Let clicks go through to the canvas (we want pointer events on canvas only)
|
|
||||||
this.canvasRef.nativeElement.style.pointerEvents = 'auto';
|
|
||||||
(this.canvasRef.nativeElement.parentElement as HTMLElement).style.pointerEvents = 'none';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
this.container?.destroy();
|
particlesLoaded(container: Container): void {
|
||||||
|
console.log(container);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {MatCard} from '@angular/material/card';
|
import {MatCard} from '@angular/material/card';
|
||||||
import {TranslatePipe} from '@ngx-translate/core';
|
import {TranslatePipe} from '@ngx-translate/core';
|
||||||
import {MatIcon} from '@angular/material/icon';
|
|
||||||
import {SharedFunctions} from '../../shared/SharedFunctions';
|
import {SharedFunctions} from '../../shared/SharedFunctions';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-imprint',
|
selector: 'app-imprint',
|
||||||
imports: [
|
imports: [
|
||||||
MatCard,
|
MatCard,
|
||||||
TranslatePipe,
|
TranslatePipe
|
||||||
MatIcon
|
|
||||||
],
|
],
|
||||||
templateUrl: './imprint.component.html',
|
templateUrl: './imprint.component.html',
|
||||||
styleUrl: './imprint.component.scss',
|
styleUrl: './imprint.component.scss',
|
||||||
|
|||||||
Reference in New Issue
Block a user