mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-18 14:36:26 +01:00
Adjust matrix
This commit is contained in:
parent
cf8182d471
commit
8e83729071
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user