mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-18 22:36:27 +01:00
Adjust matrix
This commit is contained in:
parent
cf8182d471
commit
8e83729071
@ -3,6 +3,7 @@ import { INitroEvent } from '../../../common';
|
|||||||
export interface IRoomAreaSelectionManager
|
export interface IRoomAreaSelectionManager
|
||||||
{
|
{
|
||||||
startSelecting(): void;
|
startSelecting(): void;
|
||||||
|
clearHighlight(): void;
|
||||||
handleTileMouseEvent(event: INitroEvent): void;
|
handleTileMouseEvent(event: INitroEvent): void;
|
||||||
finishSelecting(): boolean;
|
finishSelecting(): boolean;
|
||||||
activate(callback: (rootX: number, rootY: number, width: number, height: number) => void, highlightType: string): 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();
|
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();
|
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();
|
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_DARKEN] = darkenFilter;
|
||||||
RoomAreaSelectionManager.HIGHLIGHT_FILTERS[RoomAreaSelectionManager.HIGHLIGHT_BRIGHTEN] = brightenFilter;
|
RoomAreaSelectionManager.HIGHLIGHT_FILTERS[RoomAreaSelectionManager.HIGHLIGHT_BRIGHTEN] = brightenFilter;
|
||||||
|
Loading…
Reference in New Issue
Block a user