-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
238 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
<section class="container"> | ||
<div class="main"> | ||
<canvas id="canvas-host" #canvas></canvas> | ||
<!-- <div class="canvas-handler"></div>--> | ||
<div class="canvas-handler"> | ||
<span class="title">Try Some Controls</span> | ||
<ng-component *ngComponentOutlet="getHandlerComponent(); inputs: { particleService }"></ng-component> | ||
</div> | ||
</div> | ||
<button mat-raised-button color="primary" (click)="toGalleryHome()">Back</button> | ||
<div class="footer"> | ||
<button mat-raised-button color="primary" (click)="toGalleryHome()">Back</button> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/gallery/gallery-handler/gravity-handler/gravity-handler.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>gravity-handler works!</p> |
Empty file.
23 changes: 23 additions & 0 deletions
23
src/gallery/gallery-handler/gravity-handler/gravity-handler.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { GravityHandlerComponent } from './gravity-handler.component'; | ||
|
||
describe('GravityHandlerComponent', () => { | ||
let component: GravityHandlerComponent; | ||
let fixture: ComponentFixture<GravityHandlerComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [GravityHandlerComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(GravityHandlerComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
13 changes: 13 additions & 0 deletions
13
src/gallery/gallery-handler/gravity-handler/gravity-handler.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Component } from '@angular/core'; | ||
import {ParticleGravityService} from "../../../services/particle-gravity.service"; | ||
|
||
@Component({ | ||
selector: 'app-gravity-handler', | ||
templateUrl: './gravity-handler.component.html', | ||
styleUrl: './gravity-handler.component.scss', | ||
providers: [ParticleGravityService] | ||
}) | ||
export class GravityHandlerComponent { | ||
constructor(private particleGravityService: ParticleGravityService) { | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/gallery/gallery-handler/harmonic-handler/harmonic-handler.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<div class="handler-control-row"> | ||
<label>Composite two waves</label> | ||
<mat-slide-toggle [(ngModel)]="isComposite" (ngModelChange)="toggleComposite()">{{ isComposite ? 'Composited' : 'Divided'}}</mat-slide-toggle> | ||
</div> | ||
<div class="handler-control-row"> | ||
<label>Particle Style</label> | ||
<mat-radio-group [(ngModel)]="particleStyle" (ngModelChange)="setParticleParticle($event)"> | ||
<mat-radio-button value="circle"> | ||
Circle | ||
</mat-radio-button> | ||
<mat-radio-button value="rect"> | ||
Rectangle | ||
</mat-radio-button> | ||
</mat-radio-group> | ||
|
||
</div> |
Empty file.
23 changes: 23 additions & 0 deletions
23
src/gallery/gallery-handler/harmonic-handler/harmonic-handler.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { HarmonicHandlerComponent } from './harmonic-handler.component'; | ||
|
||
describe('HarmonicHandlerComponent', () => { | ||
let component: HarmonicHandlerComponent; | ||
let fixture: ComponentFixture<HarmonicHandlerComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [HarmonicHandlerComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(HarmonicHandlerComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
29 changes: 29 additions & 0 deletions
29
src/gallery/gallery-handler/harmonic-handler/harmonic-handler.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import {Component, Input, OnInit} from '@angular/core'; | ||
import {HarmonicParticleStyle, ParticleHarmonicService} from "../../../services/particle-harmonic.service"; | ||
|
||
@Component({ | ||
selector: 'app-harmonic-handler', | ||
templateUrl: './harmonic-handler.component.html', | ||
styleUrl: './harmonic-handler.component.scss', | ||
}) | ||
export class HarmonicHandlerComponent implements OnInit{ | ||
// use the output service from factory | ||
@Input() particleService: ParticleHarmonicService; | ||
|
||
isComposite = false; | ||
particleStyle: HarmonicParticleStyle = "circle"; | ||
|
||
constructor() { | ||
} | ||
|
||
ngOnInit() { | ||
} | ||
|
||
toggleComposite() { | ||
this.particleService.toggleComposite(); | ||
} | ||
|
||
setParticleParticle(style: HarmonicParticleStyle) { | ||
this.particleService.setParticleStyle(style); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
src/gallery/gallery-handler/image-handler/image-handler.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>image-handler works!</p> |
Empty file.
23 changes: 23 additions & 0 deletions
23
src/gallery/gallery-handler/image-handler/image-handler.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ImageHandlerComponent } from './image-handler.component'; | ||
|
||
describe('ImageHandlerComponent', () => { | ||
let component: ImageHandlerComponent; | ||
let fixture: ComponentFixture<ImageHandlerComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ImageHandlerComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(ImageHandlerComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
10 changes: 10 additions & 0 deletions
10
src/gallery/gallery-handler/image-handler/image-handler.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-image-handler', | ||
templateUrl: './image-handler.component.html', | ||
styleUrl: './image-handler.component.scss' | ||
}) | ||
export class ImageHandlerComponent { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,35 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import {FormsModule} from "@angular/forms"; | ||
import {MatButtonModule} from "@angular/material/button"; | ||
import {MatCardModule} from "@angular/material/card"; | ||
import {MatRadioModule} from "@angular/material/radio"; | ||
import {MatSlideToggleModule} from "@angular/material/slide-toggle"; | ||
import {GalleryDetailComponent} from "./gallery-detail/gallery-detail.component"; | ||
import {GalleryHomeComponent} from "./gallery-home/gallery-home.component"; | ||
|
||
import { GalleryRoutingModule } from './gallery-routing.module'; | ||
import { HarmonicHandlerComponent } from './gallery-handler/harmonic-handler/harmonic-handler.component'; | ||
import { GravityHandlerComponent } from './gallery-handler/gravity-handler/gravity-handler.component'; | ||
import { ImageHandlerComponent } from './gallery-handler/image-handler/image-handler.component'; | ||
|
||
|
||
@NgModule({ | ||
declarations: [GalleryHomeComponent, GalleryDetailComponent], | ||
declarations: [ | ||
GalleryHomeComponent, | ||
GalleryDetailComponent, | ||
HarmonicHandlerComponent, | ||
GravityHandlerComponent, | ||
ImageHandlerComponent | ||
], | ||
imports: [ | ||
CommonModule, | ||
GalleryRoutingModule, | ||
MatCardModule, | ||
MatButtonModule | ||
MatButtonModule, | ||
MatSlideToggleModule, | ||
FormsModule, | ||
MatRadioModule | ||
] | ||
}) | ||
export class GalleryModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters