mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-01 16:53:25 +00:00
move terrain color computation to GPU compute shader
This commit is contained in:
@@ -995,6 +995,9 @@ export class GameImpl implements Game {
|
||||
tileStateView(): Uint16Array {
|
||||
return this._map.tileStateView();
|
||||
}
|
||||
terrainDataView(): Uint8Array {
|
||||
return this._map.terrainDataView();
|
||||
}
|
||||
numTilesWithFallout(): number {
|
||||
return this._map.numTilesWithFallout();
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ export interface GameMap {
|
||||
isDefended(ref: TileRef): boolean;
|
||||
setDefended(ref: TileRef, value: boolean): void;
|
||||
tileStateView(): Uint16Array;
|
||||
terrainDataView(): Uint8Array;
|
||||
isOnEdgeOfMap(ref: TileRef): boolean;
|
||||
isBorder(ref: TileRef): boolean;
|
||||
neighbors(ref: TileRef): TileRef[];
|
||||
@@ -231,6 +232,10 @@ export class GameMapImpl implements GameMap {
|
||||
return this.state;
|
||||
}
|
||||
|
||||
terrainDataView(): Uint8Array {
|
||||
return this.terrain;
|
||||
}
|
||||
|
||||
isOnEdgeOfMap(ref: TileRef): boolean {
|
||||
const x = this.x(ref);
|
||||
const y = this.y(ref);
|
||||
|
||||
@@ -889,6 +889,9 @@ export class GameView implements GameMap {
|
||||
tileStateView(): Uint16Array {
|
||||
return this._map.tileStateView();
|
||||
}
|
||||
terrainDataView(): Uint8Array {
|
||||
return this._map.terrainDataView();
|
||||
}
|
||||
isBorder(ref: TileRef): boolean {
|
||||
return this._map.isBorder(ref);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user