mirror of
https://github.com/BlueMap-Minecraft/BlueMapWeb.git
synced 2025-02-21 12:21:22 +01:00
Improve snapping
This commit is contained in:
parent
4ebb90f7d1
commit
5bfb775473
@ -177,9 +177,12 @@ export class MapControls {
|
||||
this.keyRotate.update(delta, map);
|
||||
this.touchRotate.update(delta, map);
|
||||
|
||||
const rotating = this.mouseRotate.moving || this.touchRotate.moving ||
|
||||
this.keyRotate.left || this.keyRotate.right
|
||||
|
||||
// snap rotation to north on orthographic view
|
||||
if (this.manager.ortho !== 0 && Math.abs(this.manager.rotation) < 0.3) {
|
||||
this.manager.rotation = softClamp(this.manager.rotation, 0, 0, 0.05);
|
||||
if (this.manager.ortho !== 0 && Math.abs(this.manager.rotation) < (rotating ? 0.05 : 0.3)) {
|
||||
this.manager.rotation = softClamp(this.manager.rotation, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
// tilt
|
||||
|
@ -94,7 +94,7 @@ void main() {
|
||||
float aoStrength = 0.0;
|
||||
if(lod == 1.0) {
|
||||
aoStrength = smoothstep(PI - 0.8, PI - 0.2, acos(-clamp(viewMatrix[1][2], 0.0, 1.0)));
|
||||
aoStrength *= 1.0 - smoothstep(200.0, 500.0, vDistance);
|
||||
aoStrength *= 1.0 - smoothstep(300.0, 500.0, vDistance);
|
||||
|
||||
if (aoStrength > 0.0) {
|
||||
const float r = 3.0;
|
||||
|
Loading…
Reference in New Issue
Block a user