Compare commits

...

2 Commits

Author SHA1 Message Date
1e8ba020e2 Merge pull request 'Imporoved pinching for 3d fractals' (#22) from bugfix/betterPinching into main
All checks were successful
Build, Test & Push Frontend / quality-check (push) Successful in 17m23s
Build, Test & Push Frontend / docker (push) Successful in 53s
Reviewed-on: #22
2026-02-12 21:13:01 +01:00
4685a94f1d Imporoved pinching for 3d fractals
Some checks failed
Build, Test & Push Frontend / docker (pull_request) Has been cancelled
Build, Test & Push Frontend / quality-check (pull_request) Has been cancelled
2026-02-12 21:12:40 +01:00
2 changed files with 12 additions and 6 deletions

View File

@@ -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 {

View File

@@ -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;