Compare commits
2 Commits
d45b651d2d
...
1e8ba020e2
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e8ba020e2 | |||
| 4685a94f1d |
@@ -1,4 +1,4 @@
|
||||
import { Component} from '@angular/core';
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {Information} from '../information/information';
|
||||
import {MatCard, MatCardContent, MatCardHeader, MatCardTitle} from '@angular/material/card';
|
||||
import {TranslatePipe} from '@ngx-translate/core';
|
||||
@@ -35,7 +35,7 @@ import {MatIcon} from '@angular/material/icon';
|
||||
templateUrl: './fractal.component.html',
|
||||
styleUrl: './fractal.component.scss',
|
||||
})
|
||||
export class FractalComponent {
|
||||
export class FractalComponent implements OnInit {
|
||||
algoInformation: AlgorithmInformation = {
|
||||
title: 'FRACTAL.EXPLANATION.TITLE',
|
||||
entries: [
|
||||
@@ -85,10 +85,10 @@ export class FractalComponent {
|
||||
selectedAlgorithm = 0;
|
||||
selectedColorScheme = 0;
|
||||
|
||||
zoom = 0.2;
|
||||
offsetX = 0.0;
|
||||
offsetY = 0.0;
|
||||
maxIterations = 100;
|
||||
zoom = 0;
|
||||
offsetX = 0;
|
||||
offsetY = 0;
|
||||
maxIterations = 0;
|
||||
|
||||
juliaReal = -0.7;
|
||||
juliaImag = 0.27015;
|
||||
@@ -103,6 +103,10 @@ export class FractalComponent {
|
||||
material.setVector2("juliaC", new Vector2(this.juliaReal, this.juliaImag));
|
||||
};
|
||||
|
||||
ngOnInit() {
|
||||
this.onReset();
|
||||
}
|
||||
|
||||
onAlgorithmChange(algoName: string): void {
|
||||
this.onReset()
|
||||
|
||||
@@ -127,6 +131,7 @@ export class FractalComponent {
|
||||
this.zoom = 0.2;
|
||||
this.offsetX = 0.0;
|
||||
this.offsetY = 0.0;
|
||||
this.maxIterations = 100;
|
||||
}
|
||||
|
||||
onSceneReady(scene: Scene): void {
|
||||
|
||||
@@ -91,6 +91,7 @@ export class BabylonCanvas implements AfterViewInit, OnDestroy {
|
||||
private setup3dCamera(canvas: HTMLCanvasElement) {
|
||||
const cam = new ArcRotateCamera("Camera", 0, Math.PI / 2, 4, Vector3.Zero(), this.scene);
|
||||
cam.wheelPrecision = 100;
|
||||
cam.pinchPrecision = 200;
|
||||
cam.minZ = 0.1;
|
||||
cam.maxZ = 100;
|
||||
cam.lowerRadiusLimit = 1.5;
|
||||
|
||||
Reference in New Issue
Block a user