chore(ground-ai): checkpoint 3d replay and simulator work
This commit is contained in:
1 parent
f8bd79042b
commit
b276e686b0
47 files changed
+2613
-688
No files matched your search
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* The static map drawn once into an offscreen canvas: walkable polygons of one mesh tier coloured
|
||||
* The navigation image draped over the 3D terrain, drawn once into an offscreen canvas: walkable polygons of one mesh tier coloured
|
||||
* by surface, optionally the tactical grid's exposure and the baked cover points.
|
||||
*/
|
||||
import { NAV_AREA_NAMES, type NavPack } from '@wto/ground-sim';
|
||||
@@ -33,7 +33,8 @@ export function buildMapLayer(pack: NavPack, opts: MapLayerOptions): MapLayer {
|
||||
canvas.height = Math.ceil((z1 - z0) * pxPerM);
|
||||
const ctx = canvas.getContext('2d');
|
||||
if (ctx === null) return { canvas, x0, z1, pxPerM };
|
||||
ctx.fillStyle = '#121416';
|
||||
// Off the mesh (buildings, steep or blocked ground) when draped over the 3D terrain.
|
||||
ctx.fillStyle = '#55584f';
|
||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||
const tier = pack.tiers[opts.tier] ?? pack.tiers[1];
|
||||
if (tier !== undefined) {
|
||||
|
||||
Reference in new issue
Block a user