Skip to content

Commit 8821fac

Browse files
committed
Activate BloomLayer
1 parent 0d99251 commit 8821fac

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/game/board.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Scene, Mesh, Color, MeshStandardMaterial, BufferGeometry, Material, Vec
22
import { loadGLB } from "../loaders";
33
import { type Vec2 } from "./primitives";
44
import { Tile } from "./tile";
5+
import { BloomManager } from "./bloom-manager";
56

67
export async function create8x8BoardAsync(scene: Scene): Promise<Board> {
78
const boardSize = 8;
@@ -91,14 +92,17 @@ export class Board {
9192
highlightTile(tile: Mesh | null) {
9293
if (this.highlightedTile) {
9394
this.highlightedTile.material = this.restoreMaterial!;
95+
this.highlightedTile.layers.toggle(BloomManager.BLOOM_LAYER_ID);
9496
}
9597
if (!tile) {
98+
this.highlightedTile?.layers.toggle(BloomManager.BLOOM_LAYER_ID);
9699
this.highlightedTile = null;
97100
this.restoreMaterial = null;
98101
return;
99102
}
100103
this.highlightedTile = tile;
101104
this.restoreMaterial = tile.material;
102105
this.highlightedTile.material = this.highlighMaterial;
106+
this.highlightedTile.layers.toggle(BloomManager.BLOOM_LAYER_ID);
103107
}
104108
}

0 commit comments

Comments
 (0)