@phaserjs/phaser
Version:
12 lines (11 loc) • 387 B
JavaScript
import { ColorMatrixStack } from "./ColorMatrixStack";
export function AddColorMatrix(colorMatrix, colorOffset) {
const entry = { colorMatrix, colorOffset };
ColorMatrixStack.index++;
if (ColorMatrixStack.index === ColorMatrixStack.stack.length) {
ColorMatrixStack.stack.push(entry);
} else {
ColorMatrixStack.stack[ColorMatrixStack.index] = entry;
}
return entry;
}