Add toggle for showing/hiding the character in RenderContainerComponent and implement binding to PlayerModelService
This commit is contained in:
+6
-1
@@ -17,8 +17,13 @@
|
||||
<mat-icon>{{ onlyIntersecting ? 'visibility_off' : 'visibility' }}</mat-icon>
|
||||
</button>
|
||||
|
||||
<button mat-mini-fab color="primary" (click)="toggleShowCharacter()"
|
||||
[matTooltip]="showCharacter ? 'Hide character' : 'Show character'">
|
||||
<mat-icon>{{ showCharacter ? 'person' : 'person_off' }}</mat-icon>
|
||||
</button>
|
||||
|
||||
<button mat-mini-fab color="primary" (click)="togglePlaneLock()"
|
||||
[matTooltip]="isPlaneLocked ? 'Unlock Plane' : 'Lock Plane'">
|
||||
[matTooltip]="isPlaneLocked ? 'Unlock plane' : 'Lock plane'">
|
||||
<mat-icon>{{ isPlaneLocked ? 'lock' : 'lock_open' }}</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
+11
@@ -102,6 +102,10 @@ export class RenderContainerComponent implements AfterViewInit, OnDestroy {
|
||||
this.particleManagerService.onlyIntersectingParticles = !this.particleManagerService.onlyIntersectingParticles;
|
||||
}
|
||||
|
||||
public toggleShowCharacter(): void {
|
||||
this.playerModelService.showCharacter = !this.playerModelService.showCharacter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current plane orientation
|
||||
*/
|
||||
@@ -116,6 +120,13 @@ export class RenderContainerComponent implements AfterViewInit, OnDestroy {
|
||||
return this.particleManagerService.onlyIntersectingParticles;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the value indicating whether the character is being rendered.
|
||||
*/
|
||||
public get showCharacter(): boolean {
|
||||
return this.playerModelService.showCharacter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the plane orientation
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user