package elm_playground_web

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type number = float
type time =
  1. | Time of number
val spin : number -> time -> number
val wave : number -> number -> number -> time -> number
val zigzag : number -> number -> number -> time -> number
type color = Color.t
val rgb : int -> int -> int -> color
val white : color
val black : color
val red : color
val green : color
val blue : color
val yellow : color
val brown : color
val lightYellow : color
val lightPurple : color
val gray : color
val darkGray : color
type shape = {
  1. x : number;
  2. y : number;
  3. angle : number;
  4. scale : number;
  5. alpha : number;
  6. form : form;
}
and form =
  1. | Circle of color * number
  2. | Oval of color * number * number
  3. | Rectangle of color * number * number
  4. | Ngon of color * int * number
  5. | Polygon of color * (number * number) list
  6. | Image of number * number * string
  7. | Words of color * string
  8. | Group of shape list
val circle : color -> number -> shape
val oval : color -> number -> number -> shape
val rectangle : color -> number -> number -> shape
val square : color -> number -> shape
val triangle : color -> number -> shape
val pentagon : color -> number -> shape
val hexagon : color -> number -> shape
val octagon : color -> number -> shape
val polygon : color -> (number * number) list -> shape
val image : number -> number -> string -> shape
val words : color -> string -> shape
val group : shape list -> shape
val move : number -> number -> shape -> shape
val move_left : number -> shape -> shape
val move_right : number -> shape -> shape
val move_up : number -> shape -> shape
val move_down : number -> shape -> shape
val move_x : number -> shape -> shape
val move_y : number -> shape -> shape
val scale : number -> shape -> shape
val rotate : number -> shape -> shape
val fade : number -> shape -> shape
val default_width : float
val default_height : float
type screen = {
  1. width : number;
  2. height : number;
  3. top : number;
  4. left : number;
  5. right : number;
  6. bottom : number;
}
val to_screen : number -> number -> screen
type mouse = {
  1. mx : number;
  2. my : number;
  3. mdown : bool;
  4. mclick : bool;
}
type keyboard = {
  1. kup : bool;
  2. kdown : bool;
  3. kleft : bool;
  4. kright : bool;
  5. kw : bool;
  6. ks : bool;
  7. ka : bool;
  8. kd : bool;
  9. kspace : bool;
  10. kenter : bool;
  11. kshift : bool;
  12. kbackspace : bool;
  13. keys : string Set_.t;
}
val to_x : keyboard -> number
val to_y : keyboard -> number
val to_x2 : keyboard -> number
val to_y2 : keyboard -> number
val to_xy : keyboard -> number * number
type computer = {
  1. mouse : mouse;
  2. keyboard : keyboard;
  3. screen : screen;
  4. time : time;
}
val initial_computer : computer
type (!'model, !'msg) app = {
  1. init : unit -> 'model * 'msg Cmd.t;
  2. update : 'msg -> 'model -> 'model * 'msg Cmd.t;
  3. view : 'model -> shape list;
  4. subscriptions : 'model -> 'msg Sub.t;
}
type msg1 =
  1. | Resized1 of int * int
val picture : shape list -> (screen, msg1) app
type msg =
  1. | Tick of number
  2. | Resized of int * int
  3. | KeyChanged of bool * string
  4. | MouseMove of number * number
  5. | MouseClick
  6. | MouseButton of bool
type animation
val animation : (time -> shape list) -> (animation, msg) app
type 'memory game
val game : (computer -> 'memory -> shape list) -> (computer -> 'memory -> 'memory) -> 'memory -> ('memory game, msg) app
OCaml

Innovation. Community. Security.