diff --git a/frontend/src/app/particles/particles.component.ts b/frontend/src/app/particles/particles.component.ts index f78ea76..aff870f 100644 --- a/frontend/src/app/particles/particles.component.ts +++ b/frontend/src/app/particles/particles.component.ts @@ -1,4 +1,4 @@ -import {AfterViewInit, Component, ElementRef, OnDestroy, OnInit, ViewChild} from '@angular/core'; +import {AfterViewInit, Component, ElementRef, OnDestroy, ViewChild} from '@angular/core'; import {CommonModule} from '@angular/common'; import {FormsModule, ReactiveFormsModule} from '@angular/forms'; import {MatButtonModule} from '@angular/material/button'; @@ -49,7 +49,7 @@ import {MatSnackBar} from '@angular/material/snack-bar'; templateUrl: './particles.component.html', styleUrl: './particles.component.scss' }) -export class ParticlesComponent implements OnInit, AfterViewInit, OnDestroy { +export class ParticlesComponent implements AfterViewInit, OnDestroy { @ViewChild('rendererContainer') rendererContainer!: ElementRef; @ViewChild('planeSlider') planeSlider!: ElementRef; @@ -63,13 +63,6 @@ export class ParticlesComponent implements OnInit, AfterViewInit, OnDestroy { ) { } - /** - * Initialize component - */ - ngOnInit(): void { - // No initialization needed here - } - /** * Initialize Three.js scene after view is initialized */ @@ -82,7 +75,6 @@ export class ParticlesComponent implements OnInit, AfterViewInit, OnDestroy { * Clean up resources when component is destroyed */ ngOnDestroy(): void { - // Clean up event listeners if (this.rendererService.renderer) { this.inputHandlerService.cleanup(this.rendererService.renderer.domElement); } @@ -92,16 +84,9 @@ export class ParticlesComponent implements OnInit, AfterViewInit, OnDestroy { * Initialize the 3D scene and all related components */ private initializeScene(): void { - // Initialize renderer this.rendererService.initializeRenderer(this.rendererContainer); - - // Create player model this.playerModelService.createPlayerModel(); - - // Create intersection plane this.intersectionPlaneService.createIntersectionPlane(); - - // Initialize input handlers this.inputHandlerService.initializeInputHandlers(this.rendererService.renderer.domElement); } @@ -138,11 +123,7 @@ export class ParticlesComponent implements OnInit, AfterViewInit, OnDestroy { */ private animate(): void { requestAnimationFrame(this.animate.bind(this)); - - // Update plane orientation based on camera position this.intersectionPlaneService.updatePlaneOrientation(this.rendererService.camera); - - // Render the scene this.rendererService.render(); }