mirror of
https://github.com/LucasDower/ObjToSchematic.git
synced 2025-03-07 14:06:41 +08:00
Fixed camera elevation epsilon being too large
This commit is contained in:
parent
b0b00fd796
commit
cc64c318c7
@ -2,7 +2,7 @@ import { m4, v3 } from 'twgl.js';
|
|||||||
import { MouseManager } from './mouse';
|
import { MouseManager } from './mouse';
|
||||||
import { between, degreesToRadians, roundToNearest } from './math';
|
import { between, degreesToRadians, roundToNearest } from './math';
|
||||||
import { Renderer } from './renderer';
|
import { Renderer } from './renderer';
|
||||||
import { SmoothVariable, SmoothVectorVariable } from './util';
|
import { LOG, SmoothVariable, SmoothVectorVariable } from './util';
|
||||||
import { Vector3 } from './vector';
|
import { Vector3 } from './vector';
|
||||||
|
|
||||||
export class ArcballCamera {
|
export class ArcballCamera {
|
||||||
@ -49,7 +49,7 @@ export class ArcballCamera {
|
|||||||
this.gl = Renderer.Get._gl;
|
this.gl = Renderer.Get._gl;
|
||||||
this.aspect = this.gl.canvas.width / this.gl.canvas.height;
|
this.aspect = this.gl.canvas.width / this.gl.canvas.height;
|
||||||
|
|
||||||
this._elevation.setClamp(0.01, Math.PI - 0.01);
|
this._elevation.setClamp(0.001, Math.PI - 0.01);
|
||||||
this._distance.setClamp(1.0, 100.0);
|
this._distance.setClamp(1.0, 100.0);
|
||||||
|
|
||||||
this.setCameraMode('perspective');
|
this.setCameraMode('perspective');
|
||||||
|
Loading…
Reference in New Issue
Block a user