Skip to content

Commit e76364d

Browse files
authored
Merge pull request #476 from DNLHC/patch-1
Fixed some typos and improved translation
2 parents a5ff770 + 82555e2 commit e76364d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

5-animation/3-js-animation/article.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ If we run them separately, each one with its own `setInterval(..., 20)`, then th
6060

6161
Each `setInterval` triggers once per `20ms`, but they are independent, so we have several independent runs within `20ms`.
6262

63-
These several independant actions should be grouped together, because it's easier for the browser to redraw things once per `20ms`.
63+
These several independent actions should be grouped together, because it's easier for the browser to redraw things once per `20ms`.
6464

6565
In other words, this:
6666

@@ -105,7 +105,7 @@ The `callback` gets one argument -- the time passed from the beginning of the pa
105105

106106
Usually `callback` runs very soon, unless the CPU is overloaded or the laptop battery is almost discharged, or there's another reason.
107107

108-
The code below shows the time between first 20 runs fo `requestAnimationFrame`. Usually it's 10-20ms:
108+
The code below shows the time between first 20 runs for `requestAnimationFrame`. Usually it's 10-20ms:
109109

110110
```html run height=40 refresh
111111
<script>
@@ -148,13 +148,13 @@ function animate({timing, draw, duration}) {
148148
}
149149
```
150150

151-
Function `animate` accepts 3 parameters that essentially describe the animation:
151+
Function `animate` accepts 3 parameters that essentially describes the animation:
152152

153153
`duration`
154154
: Total time of animation. Like, `1000`.
155155

156156
`timing(timeFraction)`
157-
: Timing function, like CSS-property `transition-timing-function` that takes gets the fraction of time that passed (`0` at start, `1` at the end) and returns the animation completion (like `y` on the Bezier curve).
157+
: Timing function, like CSS-property `transition-timing-function` that gets the fraction of time that passed (`0` at start, `1` at the end) and returns the animation completion (like `y` on the Bezier curve).
158158

159159
For instance, a linear function means that the animation goes on uniformly with the same speed:
160160

@@ -204,7 +204,7 @@ animate({
204204
});
205205
```
206206

207-
Unlike CSS animation, we can make any timing function and any drawing function here. The timing function is not limited by Bezier curves. And `draw` can go beyound properties, create new elements for like fireworks animation or something.
207+
Unlike CSS animation, we can make any timing function and any drawing function here. The timing function is not limited by Bezier curves. And `draw` can go beyond properties, create new elements for like fireworks animation or something.
208208

209209
## Timing functions
210210

@@ -276,7 +276,7 @@ function back(x, timeFraction) {
276276

277277
![](back.png)
278278

279-
For animation we use it with a concrete value of `x`. Example for `x = 1.5`:
279+
For animation we use it with a specific value of `x`. Example for `x = 1.5`:
280280

281281
[iframe height=40 src="back" link]
282282

0 commit comments

Comments
 (0)