Improve summit terrain, mobile HUD and multiplayer night equipment
Add the Blender flashlight asset with a 600 lm beam and reduced bloom, shared-mode self badge, and compact phone controls. Relocate the summit marker, blend terrain seams, widen walking routes, and align local server configuration on port 2027.
This commit is contained in:
@@ -5,6 +5,7 @@ import { Mesh, MeshBasicMaterial, Raycaster, Vector3 } from 'three';
|
||||
import { createTerrainGeometry, terrainGeometryHeightAt } from '../src/scene/terrainGeometry.ts';
|
||||
import { applySummitTerrain } from '../src/scene/summitTerrain.ts';
|
||||
import { SUMMIT_TERRAIN } from '../src/constants/summitTerrain.ts';
|
||||
import { SUMMIT_PLATEAU } from '../src/constants/summitPlateau.ts';
|
||||
import { structurePosition } from '../src/scene/structures.ts';
|
||||
import { STRUCTURES } from '../src/constants/structures.ts';
|
||||
|
||||
@@ -13,6 +14,30 @@ const bytes = readFileSync(new URL('../public/terrain/gwanaksan.f32', import.met
|
||||
const heights = new Float32Array(bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength));
|
||||
const start = structurePosition(SUMMIT_TERRAIN.start.latitude, SUMMIT_TERRAIN.start.longitude, meta.origin);
|
||||
|
||||
test('authored terrain edges join the surrounding slope without vertical steps', () => {
|
||||
const geometry = createTerrainGeometry(meta, heights, true);
|
||||
applySummitTerrain(geometry, meta);
|
||||
const [left, top, right, bottom] = SUMMIT_PLATEAU.atlasBounds;
|
||||
const height = (x: number, z: number) => terrainGeometryHeightAt(geometry, start.x+x, start.z+z);
|
||||
try {
|
||||
// Scan across all four seams, including the last authored half-metre cell.
|
||||
for (const [edge, from, to, horizontal] of [
|
||||
[left, top, bottom, true], [right, top, bottom, true],
|
||||
[top, left, right, false], [bottom, left, right, false],
|
||||
] as const) {
|
||||
for (let along = from; along <= to; along += .5) {
|
||||
for (let offset = -1; offset < 1; offset += .25) {
|
||||
const a = horizontal ? height(edge+offset, along) : height(along, edge+offset);
|
||||
const b = horizontal ? height(edge+offset+.25, along) : height(along, edge+offset+.25);
|
||||
assert.ok(Math.abs(b-a) < .5, `terrain seam at ${edge}, ${along}: ${Math.abs(b-a)}m step over 0.25m`);
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
geometry.dispose();
|
||||
}
|
||||
});
|
||||
|
||||
test('local reconstruction preserves source data and every vertex outside 200m', () => {
|
||||
const geometry = createTerrainGeometry(meta, heights, true);
|
||||
const p = geometry.getAttribute('position');
|
||||
|
||||
Reference in New Issue
Block a user