Created
December 4, 2014 14:30
-
-
Save jcollard/539a4c4e0e4684b86285 to your computer and use it in GitHub Desktop.
elm-doc src/Playground/Input.elm
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
{ | |
"name": "Playground.Input", | |
"comment": "\n\n This module explains each type of Input that can be used in a Playground's\n update function.\n\n @docs RealWorld, Input", | |
"aliases": [ | |
{ | |
"name": "RealWorld", | |
"comment": "\n The RealWorld record contains information about the environment of the running\n program.\n\n * The `top`, `right`, `bottom`, and `left` fields represent the bounding box\n that will be rendered.\n\n * The `mouse` field is a record containing the most recent x and y positions\n of the mouse within the rendered bounding box.", | |
"args": [], | |
"type": { | |
"tag": "record", | |
"extension": null, | |
"fields": [ | |
[ | |
"top", | |
{ | |
"tag": "type", | |
"name": "Float" | |
} | |
], | |
[ | |
"right", | |
{ | |
"tag": "type", | |
"name": "Float" | |
} | |
], | |
[ | |
"bottom", | |
{ | |
"tag": "type", | |
"name": "Float" | |
} | |
], | |
[ | |
"left", | |
{ | |
"tag": "type", | |
"name": "Float" | |
} | |
], | |
[ | |
"mouse", | |
{ | |
"tag": "record", | |
"extension": null, | |
"fields": [ | |
[ | |
"x", | |
{ | |
"tag": "type", | |
"name": "Float" | |
} | |
], | |
[ | |
"y", | |
{ | |
"tag": "type", | |
"name": "Float" | |
} | |
] | |
] | |
} | |
] | |
] | |
} | |
} | |
], | |
"types": [ | |
{ | |
"name": "Input", | |
"comment": "\n\n Inputs are passed to a Playground's update function. If multiple inputs are\n generated, the update function is called multiple times accumulating all of\n the changes. Your update function will always be passed a Passive input and\n it is guaranteed that the Passive input will occur before all other inputs.\n\n * Tap k - Fires once when `k` is pressed\n\n * Key k - Fires every time the update function is called while `k` is pressed\n\n * MouseUp - Fires once when the left mouse button is released\n\n * MouseDown - Fires every time the update function is called while the mouse is down\n\n * Passive t - This input is always passed to the update function and expresses\n how many milliseconds have passed since the last update was accumulated.", | |
"args": [], | |
"cases": [ | |
[ | |
"Tap", | |
[ | |
{ | |
"tag": "type", | |
"name": "Keys.Key" | |
} | |
] | |
], | |
[ | |
"Key", | |
[ | |
{ | |
"tag": "type", | |
"name": "Keys.Key" | |
} | |
] | |
], | |
[ | |
"MouseUp", | |
[] | |
], | |
[ | |
"MouseDown", | |
[] | |
], | |
[ | |
"Passive", | |
[ | |
{ | |
"tag": "type", | |
"name": "Time" | |
} | |
] | |
] | |
] | |
} | |
], | |
"values": [] | |
} |
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
{ | |
"name": "Playground.Input", | |
"comment": "\nThis module explains each type of Input that can be used in a Playground's\nupdate function.\n\n@docs RealWorld, Input", | |
"aliases": [ | |
{ | |
"name": "RealWorld", | |
"comment": "\nThe RealWorld record contains information about the environment of the running\nprogram.\n\n* The `top`, `right`, `bottom`, and `left` fields represent the bounding box\n that will be rendered.\n\n* The `mouse` field is a record containing the most recent x and y positions\n of the mouse within the rendered bounding box.", | |
"args": [], | |
"type": { | |
"tag": "record", | |
"extension": null, | |
"fields": [ | |
[ | |
"top", | |
{ | |
"tag": "type", | |
"name": "Float" | |
} | |
], | |
[ | |
"right", | |
{ | |
"tag": "type", | |
"name": "Float" | |
} | |
], | |
[ | |
"bottom", | |
{ | |
"tag": "type", | |
"name": "Float" | |
} | |
], | |
[ | |
"left", | |
{ | |
"tag": "type", | |
"name": "Float" | |
} | |
], | |
[ | |
"mouse", | |
{ | |
"tag": "record", | |
"extension": null, | |
"fields": [ | |
[ | |
"x", | |
{ | |
"tag": "type", | |
"name": "Float" | |
} | |
], | |
[ | |
"y", | |
{ | |
"tag": "type", | |
"name": "Float" | |
} | |
] | |
] | |
} | |
] | |
] | |
} | |
} | |
], | |
"types": [ | |
{ | |
"name": "Input", | |
"comment": "\nInputs are passed to a Playground's update function. If multiple inputs are\ngenerated, the update function is called multiple times accumulating all of\nthe changes. Your update function will always be passed a Passive input and\nit is guaranteed that the Passive input will occur before all other inputs.\n\n* Tap k - Fires once when `k` is pressed\n\n* Key k - Fires every time the update function is called while `k` is pressed\n\n* MouseUp - Fires once when the left mouse button is released\n\n* MouseDown - Fires every time the update function is called while the mouse is down\n\n* Passive t - This input is always passed to the update function and expresses\n how many milliseconds have passed since the last update was accumulated.", | |
"args": [], | |
"cases": [ | |
[ | |
"Tap", | |
[ | |
{ | |
"tag": "type", | |
"name": "Keys.Key" | |
} | |
] | |
], | |
[ | |
"Key", | |
[ | |
{ | |
"tag": "type", | |
"name": "Keys.Key" | |
} | |
] | |
], | |
[ | |
"MouseUp", | |
[] | |
], | |
[ | |
"MouseDown", | |
[] | |
], | |
[ | |
"Passive", | |
[ | |
{ | |
"tag": "type", | |
"name": "Time" | |
} | |
] | |
] | |
] | |
} | |
], | |
"values": [] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment