fix: night blues less intense
This commit is contained in:
parent
10d562b6e9
commit
e1e4b20fbd
|
@ -56,14 +56,15 @@ export class Container extends Renderable {
|
|||
let filter = new PIXI.filters.ColorMatrixFilter();
|
||||
const nightness = 0.1;
|
||||
const double = nightness * 2;
|
||||
const blueDown = 1 - (intensity * (1 + double));
|
||||
const blueUp = 0.6 * (1 - (intensity * (1 - double)));
|
||||
const half = nightness / 2;
|
||||
const redDown = 1 - (intensity * (1 + double));
|
||||
const blueUp = 1 - (intensity * (1 - half));
|
||||
const scale = intensity * nightness;
|
||||
const matrix = [
|
||||
blueDown , -scale , 0 , 0, 0,
|
||||
-scale , (1 - intensity), scale , 0, 0,
|
||||
0 , scale , blueUp , 0, 0,
|
||||
0 , 0 , 0 , 1, 0,
|
||||
redDown , -scale , 0 , 0, 0,
|
||||
-scale , (1 - intensity), scale , 0, 0,
|
||||
0 , scale , blueUp , 0, 0,
|
||||
0 , 0 , 0 , 1, 0,
|
||||
];
|
||||
filter._loadMatrix(matrix);
|
||||
this.internal.filters = [filter];
|
||||
|
|
Loading…
Reference in New Issue
Block a user