remove redundant theme parameter.
This commit is contained in:
parent
dc1ed8ffee
commit
b4fcbed781
|
|
@ -21,7 +21,7 @@ export class RendererService {
|
|||
this.themeService.theme$.subscribe(theme => {
|
||||
this.currentTheme = theme;
|
||||
if (this.scene) {
|
||||
this.setBackgroundColor(theme);
|
||||
this.setBackgroundColor();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -32,7 +32,7 @@ export class RendererService {
|
|||
initializeRenderer(container: ElementRef): void {
|
||||
// Create scene
|
||||
this.scene = new THREE.Scene();
|
||||
this.setBackgroundColor(this.currentTheme);
|
||||
this.setBackgroundColor();
|
||||
|
||||
// Get container dimensions
|
||||
const containerWidth = container.nativeElement.clientWidth;
|
||||
|
|
@ -66,7 +66,7 @@ export class RendererService {
|
|||
this.addLights();
|
||||
}
|
||||
|
||||
private setBackgroundColor(theme: THEME_MODE) {
|
||||
private setBackgroundColor() {
|
||||
this.scene.background = new THREE.Color(this.currentTheme === THEME_MODE.DARK ? 0x242526 : 0xFBFBFE);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user