This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Signal exposing (Address) | |
import Html exposing (Html) | |
import Task exposing (Task) | |
import Time exposing (Time) | |
import Window | |
type Never = Never Never | |
type alias Init options state effect = options -> (state, Maybe effect) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Graphics.Element exposing (show) | |
import Signal exposing (Address) | |
import Html exposing (Html, div, span, text, input) | |
import Html.Events exposing (on, targetValue) | |
import Html.Attributes exposing (value, style) | |
import Maybe | |
import StartApp | |
--------------------------- | |
main = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Graphics.Element exposing (show) | |
import Signal exposing (Address) | |
import Html exposing (Html, div, button, text, input) | |
import Html.Events exposing (on, targetValue) | |
import Html.Attributes exposing (value) | |
import Maybe exposing (andThen) | |
-------------- | |
-- Suppose I have text inputs. | |
-- The state of these text inputs is the value of the string inside |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Signal exposing (Address) | |
import Json.Decode as Json exposing (Decoder, list, int, float, maybe, (:=)) | |
import Html exposing (Html, Attribute, div, ul, li, text, span, input) | |
import Html.Attributes exposing (style) | |
import Html.Events exposing (on, targetValue) | |
------------------- | |
-- MAIN ----------- | |
------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Graphics.Element exposing (Element) | |
import Graphics.Collage exposing (Form, collage, circle, rect, move, group, filled, solid, segment, traced) | |
import Time exposing (Time, fps) | |
import Color exposing (Color) | |
import Window | |
import Signal exposing (Signal, Mailbox) | |
import Task exposing (Task) | |
------------------------------ | |
main = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (Html, Attribute, ul, li, text, div) | |
import Html.Attributes exposing (style) | |
import Html.Events | |
import Json.Decode as Json exposing (Decoder, (:=)) | |
import Signal exposing (Address) | |
import StartApp | |
---------------------------------- | |
initial : State Int | |
initial = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (Html, Attribute, div, img, input) | |
import Html.Attributes exposing (style, src, width, height, type') | |
import Html.Events | |
import Json.Decode as Json exposing (Decoder, (:=)) | |
import Signal exposing (Address) | |
import StartApp | |
import String | |
import Debug |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form> | |
<input id = "myInput" type="file" accept="image/*" capture="camera"> | |
<img id ="myImage" src = "#"/> | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (..) | |
import String | |
import List | |
import Color exposing (Color) | |
-- | |
infixl 2 => | |
(=>) = (,) | |
-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Graphics.Element exposing (Element) | |
import Graphics.Collage exposing (..) | |
import Color | |
import Signal | |
import Time | |
-- Play with this value and hot swap the code | |
gravity = | |
{ x = 1 |