Skip to content

Commit 4fc6c5d

Browse files
Merge pull request #47 from nullinside-development-group/feature/web-gl
Feature/web gl
2 parents 84c812c + 7d25bef commit 4fc6c5d

13 files changed

+846
-375
lines changed

src/package-lock.json

Lines changed: 503 additions & 356 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,35 @@
1313
},
1414
"private": true,
1515
"dependencies": {
16-
"@angular/animations": "^18.2.7",
17-
"@angular/cdk": "^18.2.7",
18-
"@angular/common": "^18.2.7",
19-
"@angular/compiler": "^18.2.7",
20-
"@angular/core": "^18.2.7",
21-
"@angular/forms": "^18.2.7",
22-
"@angular/material": "^18.2.7",
23-
"@angular/platform-browser": "^18.2.7",
24-
"@angular/platform-browser-dynamic": "^18.2.7",
25-
"@angular/router": "^18.2.7",
16+
"@angular/animations": "^18.2.8",
17+
"@angular/cdk": "^18.2.9",
18+
"@angular/common": "^18.2.8",
19+
"@angular/compiler": "^18.2.8",
20+
"@angular/core": "^18.2.8",
21+
"@angular/forms": "^18.2.8",
22+
"@angular/material": "^18.2.9",
23+
"@angular/platform-browser": "^18.2.8",
24+
"@angular/platform-browser-dynamic": "^18.2.8",
25+
"@angular/router": "^18.2.8",
2626
"rxjs": "~7.8.1",
27-
"tslib": "^2.7.0",
27+
"tslib": "^2.8.0",
2828
"zone.js": "~0.14.10",
2929
"webpack-dev-middleware": ">=7.4.2"
3030
},
3131
"devDependencies": {
32-
"@angular-devkit/build-angular": "^18.2.7",
32+
"@angular-devkit/build-angular": "^18.2.9",
3333
"@angular-eslint/builder": "18.3.1",
3434
"@angular-eslint/eslint-plugin": "18.3.1",
3535
"@angular-eslint/eslint-plugin-template": "18.3.1",
3636
"@angular-eslint/schematics": "18.3.1",
3737
"@angular-eslint/template-parser": "18.3.1",
38-
"@angular/cli": "^18.2.7",
39-
"@angular/compiler-cli": "^18.2.7",
38+
"@angular/cli": "^18.2.9",
39+
"@angular/compiler-cli": "^18.2.8",
4040
"@types/jasmine": "~5.1.4",
41-
"@typescript-eslint/eslint-plugin": "^8.8.0",
42-
"@typescript-eslint/parser": "^8.8.0",
43-
"eslint": "^9.12.0",
44-
"jasmine-core": "~5.3.0",
41+
"@typescript-eslint/eslint-plugin": "^8.10.0",
42+
"@typescript-eslint/parser": "^8.10.0",
43+
"eslint": "^9.13.0",
44+
"jasmine-core": "~5.4.0",
4545
"karma": "~6.4.4",
4646
"karma-chrome-launcher": "~3.2.0",
4747
"karma-coverage": "~2.2.1",

src/src/app/app.routes.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ import {LoginComponent} from './view/login/login.component';
88
import {TwitchBotIndexComponent} from './view/twitch/twitch-bot-index/twitch-bot-index.component';
99
import {TwitchBotConfigComponent} from './view/twitch/twitch-bot-config/twitch-bot-config.component';
1010
import {ImdbSearchComponent} from './view/imdb-search/imdb-search.component';
11+
import {BackgroundWebglExampleComponent} from "./view/background-webgl-example/background-webgl-example.component";
1112

1213
export const routes: Routes = [
1314
{path: '', component: HomeComponent},
15+
{path: 'background', component: BackgroundWebglExampleComponent},
1416
{path: 'user/auth', component: LoginComponent},
1517
{path: 'user/login', component: LoginLandingComponent},
1618
{path: 'home', component: HomeComponent},

src/src/app/common/components/standard-banner/standard-banner.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Component, OnInit } from '@angular/core';
22
import { LogoComponent } from '../logo/logo.component';
33
import { environment } from '../../../../environments/environment';
4-
import { Router } from '@angular/router';
54
import { MatButton } from '@angular/material/button';
65

76
@Component({
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@if(enum === OpenGlBackgrounds.BOX) {
2+
<app-background-webgl></app-background-webgl>
3+
} @else {
4+
5+
}
6+
7+
<app-standard-banner />
8+
<div class="floating-button">
9+
<button mat-stroked-button color="primary" [matMenuTriggerFor]="menu">Menu</button>
10+
<mat-menu #menu="matMenu">
11+
<button mat-menu-item (click)="this.enum = OpenGlBackgrounds.BOX">Box</button>
12+
<button mat-menu-item (click)="this.enum = OpenGlBackgrounds.TEXTURE">Texture</button>
13+
</mat-menu>
14+
</div>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.floating-button {
2+
position: absolute;
3+
bottom: 0px;
4+
right: 50px;
5+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { BackgroundWebglExampleComponent } from './background-webgl-example.component';
4+
5+
describe('BackgroundWebglExampleComponent', () => {
6+
let component: BackgroundWebglExampleComponent;
7+
let fixture: ComponentFixture<BackgroundWebglExampleComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
imports: [BackgroundWebglExampleComponent]
12+
})
13+
.compileComponents();
14+
15+
fixture = TestBed.createComponent(BackgroundWebglExampleComponent);
16+
component = fixture.componentInstance;
17+
fixture.detectChanges();
18+
});
19+
20+
it('should create', () => {
21+
expect(component).toBeTruthy();
22+
});
23+
});
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { Component } from '@angular/core';
2+
import {BackgroundWebglComponent} from "../background-webgl/background-webgl.component";
3+
import {StandardBannerComponent} from "../../common/components/standard-banner/standard-banner.component";
4+
import {MatButton} from "@angular/material/button";
5+
import {MatMenu, MatMenuItem, MatMenuTrigger} from "@angular/material/menu";
6+
import {OpenGlBackgrounds} from "./backgrounds";
7+
8+
@Component({
9+
selector: 'app-background-webgl-example',
10+
standalone: true,
11+
imports: [
12+
BackgroundWebglComponent,
13+
StandardBannerComponent,
14+
MatButton,
15+
MatMenu,
16+
MatMenuItem,
17+
MatMenuTrigger
18+
],
19+
templateUrl: './background-webgl-example.component.html',
20+
styleUrl: './background-webgl-example.component.scss'
21+
})
22+
export class BackgroundWebglExampleComponent {
23+
public enum: OpenGlBackgrounds = OpenGlBackgrounds.BOX;
24+
protected readonly OpenGlBackgrounds = OpenGlBackgrounds;
25+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export enum OpenGlBackgrounds {
2+
BOX,
3+
TEXTURE
4+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<canvas style="position:fixed; top:0;left:0;" #canvas></canvas>

0 commit comments

Comments
 (0)