Skip to content

Commit daa1900

Browse files
committed
translate files to portuguese
1 parent 10ebca8 commit daa1900

File tree

6 files changed

+217
-217
lines changed

6 files changed

+217
-217
lines changed

7-animation/3-js-animation/1-animate-ball/solution.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
To bounce we can use CSS property `top` and `position:absolute` for the ball inside the field with `position:relative`.
1+
Para quicar, podemos usar a propriedade CSS `top` e `position:absolute` para a bola dentro do campo com `position:relative`.
22

3-
The bottom coordinate of the field is `field.clientHeight`. But the `top` property gives coordinates for the top of the ball, the edge position is `field.clientHeight - ball.clientHeight`.
3+
A coordenada inferior do campo é `field.clientHeight`. Mas a propriedade `top` fornece coordenadas para o topo da bola, a posição da borda é `field.clientHeight - ball.clientHeight`.
44

5-
So we animate the `top` from `0` to `field.clientHeight - ball.clientHeight`.
5+
Então animamos a propriedade `top` a partir de `0` até `field.clientHeight - ball.clientHeight`.
66

7-
Now to get the "bouncing" effect we can use the timing function `bounce` in `easeOut` mode.
8-
9-
Here's the final code for the animation:
7+
Para obter o efeito de "quique", podemos usar a função de tempo `bounce` no modo `easeOut`
8+
.
9+
Aqui está o código final para a animação:
1010

1111
```js
1212
let to = field.clientHeight - ball.clientHeight;

7-animation/3-js-animation/1-animate-ball/task.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ importance: 5
22

33
---
44

5-
# Animate the bouncing ball
5+
# Animar a bola quicando
66

7-
Make a bouncing ball. Click to see how it should look:
7+
Faça uma bola quicando. Clique para ver como deve ficar:
88

99
[iframe height=250 src="solution"]
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
In the task <info:task/animate-ball> we had only one property to animate. Now we need one more: `elem.style.left`.
1+
Na atividade <info:task/animate-ball> nós tínhamos apenas uma propriedade para animar. Agora precisamos de mais uma: `elem.style.left`.
22

3-
The horizontal coordinate changes by another law: it does not "bounce", but gradually increases shifting the ball to the right.
3+
A coordenada horizontal é modificada por outra regra: ela não "quica", mas gradativamente aumenta a movimentação da bola para a direita.
44

5-
We can write one more `animate` for it.
5+
Podemos escrever mais um `animate` para isso.
66

7-
As the time function we could use `linear`, but something like `makeEaseOut(quad)` looks much better.
7+
Como função the temo podemos usar `liner`, mas algo como `makeEaseOut(quad)` parece bem melhor.
88

9-
The code:
9+
O código:
1010

1111
```js
12-
let height = field.clientHeight - ball.clientHeight;
13-
let width = 100;
12+
let height = field.clientHeight - ball.clientHeight
13+
let width = 100
1414

1515
// animate top (bouncing)
1616
animate({
1717
duration: 2000,
1818
timing: makeEaseOut(bounce),
19-
draw: function(progress) {
19+
draw: function (progress) {
2020
ball.style.top = height * progress + 'px'
2121
}
2222
});
@@ -25,8 +25,8 @@ animate({
2525
animate({
2626
duration: 2000,
2727
timing: makeEaseOut(quad),
28-
draw: function(progress) {
29-
ball.style.left = width * progress + "px"
28+
draw: function (progress) {
29+
ball.style.left = width * progress + 'px'
3030
}
3131
});
3232
```

7-animation/3-js-animation/2-animate-ball-hops/task.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ importance: 5
22

33
---
44

5-
# Animate the ball bouncing to the right
5+
# Anime a bola quicando para a direita
66

7-
Make the ball bounce to the right. Like this:
7+
Faça a bola quicar para a direita. Assim:
88

99
[iframe height=250 src="solution"]
1010

11-
Write the animation code. The distance to the left is `100px`.
11+
Escreva o código de animação. A distância para a esquerda é `100px`.
1212

13-
Take the solution of the previous task <info:task/animate-ball> as the source.
13+
Use a solução da atividade anterior <info:task/animate-ball> como a fonte.

0 commit comments

Comments
 (0)