mwg API
    Preparing search index...

    Function colorShiftMatrix

    • Build the Pixi 5x4 colour-matrix for a Wesnoth CS(r,g,b) shift.

      Parameters

      • red: number
      • green: number
      • blue: number

      Returns ColorMatrix

      import { colorShiftMatrix } from '@datamoc/mw_games/two-d/render';
      const matrix = colorShiftMatrix(-20, 0, 30);
      console.log(matrix.length); // 20