Adjust matrix

This commit is contained in:
Bill 2024-07-02 21:48:43 -04:00
parent cf8182d471
commit 8e83729071
2 changed files with 19 additions and 3 deletions

View File

@ -3,6 +3,7 @@ import { INitroEvent } from '../../../common';
export interface IRoomAreaSelectionManager
{
startSelecting(): void;
clearHighlight(): void;
handleTileMouseEvent(event: INitroEvent): void;
finishSelecting(): boolean;
activate(callback: (rootX: number, rootY: number, width: number, height: number) => void, highlightType: string): boolean;

View File

@ -47,15 +47,30 @@ export class RoomAreaSelectionManager implements IRoomAreaSelectionManager
const brightenFilter = new ColorMatrixFilter();
brightenFilter.matrix = [1.5, 0, 0, 0, 0, 0, 1.5, 0, 0, 20, 0, 0, 1.5, 0, 20, 0, 0, 0, 1, 0];
brightenFilter.matrix = [
1.5, 0, 0, 0,
0, 1.5, 0, 0,
0, 0, 1.5, 0,
0, 0, 0, 1,
0, 0.0784, 0.0784, 0];
const blueFilter = new ColorMatrixFilter();
brightenFilter.matrix = [1.05, 0, 0, 0, 0, 0, 1.3, 0, 0, 8, 0, 0, 1.8, 0, 20, 0, 0, 0, 1, 0];
blueFilter.matrix = [
1.05, 0, 0, 0,
0, 1.3, 0, 0,
0, 0, 1.8, 0,
0, 0, 0, 1,
0, 0.0314, 0.0784, 0];
const darkenFilter = new ColorMatrixFilter();
brightenFilter.matrix = [0.55, 0, 0, 0, -10, 0, 0.55, 0, 0, -10, 0, 0, 0.55, 0, -10, 0, 0, 0, 1, 0];
darkenFilter.matrix = [
0.55, 0, 0, 0,
0, 0.55, 0, 0,
0, 0, 0.55, 0,
0, 0, 0, 1,
-0.0392, -0.0392, -0.0392, 0];
RoomAreaSelectionManager.HIGHLIGHT_FILTERS[RoomAreaSelectionManager.HIGHLIGHT_DARKEN] = darkenFilter;
RoomAreaSelectionManager.HIGHLIGHT_FILTERS[RoomAreaSelectionManager.HIGHLIGHT_BRIGHTEN] = brightenFilter;