14 changed files with 44 additions and 198 deletions
@ -1,35 +0,0 @@
|
||||
import { TestBed, async } from '@angular/core/testing'; |
||||
import { RouterTestingModule } from '@angular/router/testing'; |
||||
import { AppComponent } from './app.component'; |
||||
|
||||
describe('AppComponent', () => { |
||||
beforeEach(async(() => { |
||||
TestBed.configureTestingModule({ |
||||
imports: [ |
||||
RouterTestingModule |
||||
], |
||||
declarations: [ |
||||
AppComponent |
||||
], |
||||
}).compileComponents(); |
||||
})); |
||||
|
||||
it('should create the app', () => { |
||||
const fixture = TestBed.createComponent(AppComponent); |
||||
const app = fixture.debugElement.componentInstance; |
||||
expect(app).toBeTruthy(); |
||||
}); |
||||
|
||||
it(`should have as title 'anxin119'`, () => { |
||||
const fixture = TestBed.createComponent(AppComponent); |
||||
const app = fixture.debugElement.componentInstance; |
||||
expect(app.title).toEqual('anxin119'); |
||||
}); |
||||
|
||||
it('should render title', () => { |
||||
const fixture = TestBed.createComponent(AppComponent); |
||||
fixture.detectChanges(); |
||||
const compiled = fixture.debugElement.nativeElement; |
||||
expect(compiled.querySelector('.content span').textContent).toContain('anxin119 app is running!'); |
||||
}); |
||||
}); |
@ -1 +1,3 @@
|
||||
<p>三级预案!</p> |
||||
<div class="content"> |
||||
<canvas id="center"></canvas> |
||||
</div> |
@ -1,16 +1,7 @@
|
||||
nz-select { |
||||
margin: 0 8px 10px 0; |
||||
width: 120px; |
||||
// background-color: red; |
||||
} |
||||
|
||||
.logo-self { |
||||
font-size: 50px; |
||||
text-shadow: 0px 0px 6px #8df; |
||||
color: white; |
||||
font-weight: 600; |
||||
} |
||||
.font{ |
||||
font-size: 20px; |
||||
// font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif; |
||||
.content{ |
||||
width: 100%; |
||||
height: 100%; |
||||
overflow: hidden; |
||||
position: relative; |
||||
canvas{ width: 100%; height: 100%; border: none; outline: none; } |
||||
} |
@ -1,99 +0,0 @@
|
||||
import { NgModule } from '@angular/core'; |
||||
import { CommonModule } from '@angular/common'; |
||||
import { A11yModule } from '@angular/cdk/a11y'; |
||||
import { DragDropModule } from '@angular/cdk/drag-drop'; |
||||
import { PortalModule } from '@angular/cdk/portal'; |
||||
import { ScrollingModule } from '@angular/cdk/scrolling'; |
||||
import { CdkStepperModule } from '@angular/cdk/stepper'; |
||||
import { CdkTableModule } from '@angular/cdk/table'; |
||||
import { CdkTreeModule } from '@angular/cdk/tree'; |
||||
import { MatAutocompleteModule } from '@angular/material/autocomplete'; |
||||
import { MatBadgeModule } from '@angular/material/badge'; |
||||
import { MatBottomSheetModule } from '@angular/material/bottom-sheet'; |
||||
import { MatButtonModule } from '@angular/material/button'; |
||||
import { MatButtonToggleModule } from '@angular/material/button-toggle'; |
||||
import { MatCardModule } from '@angular/material/card'; |
||||
import { MatCheckboxModule } from '@angular/material/checkbox'; |
||||
import { MatStepperModule } from '@angular/material/stepper'; |
||||
import { MatChipsModule } from '@angular/material/chips'; |
||||
import { MatDatepickerModule } from '@angular/material/datepicker'; |
||||
import { MatDialogModule } from '@angular/material/dialog'; |
||||
import { MatDividerModule } from '@angular/material/divider'; |
||||
import { MatExpansionModule } from '@angular/material/expansion'; |
||||
import { MatGridListModule } from '@angular/material/grid-list'; |
||||
import { MatIconModule } from '@angular/material/icon'; |
||||
import { MatInputModule } from '@angular/material/input'; |
||||
import { MatListModule } from '@angular/material/list'; |
||||
import { MatMenuModule } from '@angular/material/menu'; |
||||
import { MatNativeDateModule, MatRippleModule } from '@angular/material/core'; |
||||
import { MatPaginatorModule } from '@angular/material/paginator'; |
||||
import { MatProgressBarModule } from '@angular/material/progress-bar'; |
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; |
||||
import { MatRadioModule } from '@angular/material/radio'; |
||||
import { MatSelectModule } from '@angular/material/select'; |
||||
import { MatSidenavModule } from '@angular/material/sidenav'; |
||||
import { MatSliderModule } from '@angular/material/slider'; |
||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle'; |
||||
import { MatSnackBarModule } from '@angular/material/snack-bar'; |
||||
import { MatSortModule } from '@angular/material/sort'; |
||||
import { MatTableModule } from '@angular/material/table'; |
||||
import { MatTabsModule } from '@angular/material/tabs'; |
||||
import { MatToolbarModule } from '@angular/material/toolbar'; |
||||
import { MatTooltipModule } from '@angular/material/tooltip'; |
||||
import { MatTreeModule } from '@angular/material/tree'; |
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; |
||||
import { ThreeHomeComponent } from './three-home/three-home.component'; |
||||
|
||||
|
||||
|
||||
@NgModule({ |
||||
declarations: [ThreeHomeComponent], |
||||
imports: [ |
||||
CommonModule, |
||||
A11yModule, |
||||
DragDropModule, |
||||
PortalModule, |
||||
ScrollingModule, |
||||
CdkStepperModule, |
||||
CdkTableModule, |
||||
CdkTreeModule, |
||||
MatAutocompleteModule, |
||||
MatBadgeModule, |
||||
MatBottomSheetModule, |
||||
MatButtonModule, |
||||
MatButtonToggleModule, |
||||
MatCardModule, |
||||
MatCheckboxModule, |
||||
MatChipsModule, |
||||
MatStepperModule, |
||||
MatDatepickerModule, |
||||
MatDialogModule, |
||||
MatDividerModule, |
||||
MatExpansionModule, |
||||
MatGridListModule, |
||||
MatIconModule, |
||||
MatInputModule, |
||||
MatListModule, |
||||
MatMenuModule, |
||||
MatNativeDateModule, |
||||
MatRippleModule, |
||||
MatPaginatorModule, |
||||
MatProgressBarModule, |
||||
MatProgressSpinnerModule, |
||||
MatRadioModule, |
||||
MatSelectModule, |
||||
MatSidenavModule, |
||||
MatSliderModule, |
||||
MatSlideToggleModule, |
||||
MatSnackBarModule, |
||||
MatSortModule, |
||||
MatTableModule, |
||||
MatTabsModule, |
||||
MatToolbarModule, |
||||
MatTooltipModule, |
||||
MatTreeModule, |
||||
FormsModule, |
||||
ReactiveFormsModule, |
||||
] |
||||
}) |
||||
export class ThreeDimensionalModule { } |
@ -1,3 +0,0 @@
|
||||
<div class="content"> |
||||
<canvas id="center"></canvas> |
||||
</div> |
@ -1,7 +0,0 @@
|
||||
.content{ |
||||
width: 100%; |
||||
height: 100%; |
||||
overflow: hidden; |
||||
position: relative; |
||||
canvas{ width: 100%; height: 100%; border: none; outline: none; } |
||||
} |
@ -1,23 +0,0 @@
|
||||
import { Component, ElementRef, OnInit } from '@angular/core'; |
||||
import { Game } from 'src/app/babylon/game'; |
||||
|
||||
@Component({ |
||||
selector: 'app-three-home', |
||||
templateUrl: './three-home.component.html', |
||||
styleUrls: ['./three-home.component.scss'] |
||||
}) |
||||
export class ThreeHomeComponent implements OnInit { |
||||
|
||||
constructor(private element: ElementRef,) { } |
||||
|
||||
static instance: ThreeHomeComponent; |
||||
public game: Game = new Game(); |
||||
public canvas: HTMLCanvasElement; //canvas 实例
|
||||
|
||||
ngOnInit(): void { |
||||
ThreeHomeComponent.instance = this; |
||||
this.canvas = this.element.nativeElement.querySelector('#center') as HTMLCanvasElement; |
||||
this.game.init(this.canvas); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue