Skip to content

Commit

Permalink
starfield color and size variation
Browse files Browse the repository at this point in the history
  • Loading branch information
ittna committed Apr 2, 2016
1 parent 976cc61 commit fa1d4f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Starfield.elm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Time exposing (..)
import Random exposing (..)
import Window
import Debug
import Math.Vector2 exposing (..)

velocity : Float
velocity = 1.01
Expand Down Expand Up @@ -57,7 +58,10 @@ background w h =

starToForm : (Float, Float) -> Star -> Form
starToForm (w, h) star =
move (w * star.x, h * star.y) (filled white (square 3))
let
len = length(vec2 star.x star.y)
in
move (w * star.x, h * star.y) (filled (grayscale (0.8 - len)) (square (10.0 * len)))


tupleToStar : (Float, Float) -> Star
Expand Down

0 comments on commit fa1d4f4

Please sign in to comment.