This commit is contained in:
Jack Wines 2019-06-28 20:38:14 -04:00
parent 6448278c40
commit bbeb2a41cc
3 changed files with 4 additions and 31 deletions

View file

@ -1,26 +0,0 @@
let
nixpkgs = fetchGit {
url = git://github.com/NixOS/nixpkgs-channels;
ref = "nixos-18.09";
};
config = {
packageOverrides = pkgs: rec {
haskellPackages = pkgs.haskellPackages.override {
overrides = haskellPackagesNew: haskellPackagesOld: rec {
SVGFonts
= pkgs.haskellPackages.callHackage "SVGFonts" "1.6.0.3" {};
project
= haskellPackagesNew.callCabal2nix "image-triangles" ../image-triangles {};
};
};
};
};
pkgs = import nixpkgs {inherit config;};
in
{
project = pkgs.haskellPackages.project;
}

View file

@ -1 +0,0 @@
(import ./release.nix).project.env

View file

@ -27,7 +27,7 @@ defaultOpts = Options {
}
genList :: StdGen -> [StdGen]
genList = map mkStdGen . randoms
genList = map snd . iterate (split . fst) . split
-- CL.rgb might be the wrong fn...
tosRGB' :: (Ord b, Floating b) => Pixel G.RGB b -> CL.Colour b
@ -48,10 +48,10 @@ renderTri image dimensions gen progress = Ren.makeTriangle (Ren.toPointList dime
-- the following should be considered triangle shaders
-- modify them to your liking, their outputs are expected to be in [0, 1]
-- TODO: move these into a separate module
opacity' = 0.4
--opacity' = 1 - area
-- opacity' = 0.4
opacity' = 0.3 + ((1 - progress) * 0.5)
area = max ((progress ** 2) * 0.2) 0.01
area = max ((progress ** 2) * 0.2) 0.02