Skip to content

Commit 33c65a5

Browse files
gdotdesignSijagus
authored
Standard library additions and cleanup. (#532)
Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl> Co-authored-by: gus <gus@guselementary.chello.hu>
1 parent ed67e72 commit 33c65a5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+3908
-2809
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
os: [ubuntu-latest, macos-latest]
18+
os: [ubuntu-20.04, macos-latest]
1919
crystal: [latest, nightly]
2020
runs-on: ${{ matrix.os }}
2121

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
crystal 1.4.1
1+
crystal 1.6.2

core/source/AnimationFrame.mint

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
/* This module provides a wrapper over the Animation Frame Web API. */
22
module AnimationFrame {
33
/*
4-
Schedules the function to run on the next frame, and returns its ID.
4+
Cancels a scheduled function call.
55
6-
id = AnimationFrame.request((timestamp : Number) { Debug.log("Hello") })
6+
AnimationFrame.cancel(id)
77
*/
8-
fun request (method : Function(Number, a)) : Number {
9-
`requestAnimationFrame(#{method})`
8+
fun cancel (id : Number) : Number {
9+
`cancelAnimationFrame(#{id}) || -1`
1010
}
1111

1212
/*
13-
Cancels a scheduled function call.
13+
Schedules the function to run on the next frame, and returns its ID.
1414
15-
AnimationFrame.cancel(id)
15+
id = AnimationFrame.request((timestamp : Number) { Debug.log("Hello") })
1616
*/
17-
fun cancel (id : Number) : Number {
18-
`cancelAnimationFrame(#{id}) || -1`
17+
fun request (function : Function(Number, a)) : Number {
18+
`requestAnimationFrame(#{function})`
1919
}
2020
}

0 commit comments

Comments
 (0)