Jelajahi Sumber

added grayed()

ncannasse 10 tahun lalu
induk
melakukan
06914e2c46
1 mengubah file dengan 7 tambahan dan 0 penghapusan
  1. 7 0
      h2d/filter/ColorMatrix.hx

+ 7 - 0
h2d/filter/ColorMatrix.hx

@@ -20,4 +20,11 @@ class ColorMatrix extends Filter {
 		return h2d.Tile.fromTexture(tout);
 	}
 
+	public static function grayed() {
+		var m = new h3d.Matrix();
+		m.identity();
+		m.colorSaturation(0);
+		return new ColorMatrix(m);
+	}
+
 }