Skip to content

CSS-animations #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions 7-animation/2-css-animations/1-animate-logo-css/solution.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@

CSS to animate both `width` and `height`:
`width` ve `height` özelliklerinin animasyonu için CSS:
```css
/* original class */
/* orijinal class */

#flyjet {
transition: all 3s;
}

/* JS adds .growing */
/* JS .growing ekliyor*/
#flyjet.growing {
width: 400px;
height: 240px;
}
```

Please note that `transitionend` triggers two times -- once for every property. So if we don't perform an additional check then the message would show up 2 times.
Dikkat et! `transitionend` iki kere tetikleniyor -- her özellik için bir kere. Eğer bir konrol yapmazsak mesaj 2 kere gözükecek.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
flyjet.addEventListener('transitionend', function() {
if (!ended) {
ended = true;
alert('Done!');
alert('Bitti!');
}
});

Expand Down
12 changes: 6 additions & 6 deletions 7-animation/2-css-animations/1-animate-logo-css/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ importance: 5

---

# Animate a plane (CSS)
# Uçağa animasyon ekle (CSS)

Show the animation like on the picture below (click the plane):
Aşağıdaki gibi bir animasyon yap (Uçağa tıkla):

[iframe src="solution" height=300]

- The picture grows on click from `40x24px` to `400x240px` (10 times larger).
- The animation takes 3 seconds.
- At the end output: "Done!".
- During the animation process, there may be more clicks on the plane. They shouldn't "break" anything.
- Resim tıklanınca boyutu `40x24px`'den `400x240px`'e çıkıyor.
- Animasyon 3 saniye sürüyor.
- Bitince "Bitti!" diye mesaj göster.
- Animasyon süresince uçağa birden çok kere tıklanabilir. Bu tıklamalar bir şeyi bozmamalıdır.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
We need to choose the right Bezier curve for that animation. It should have `y>1` somewhere for the plane to "jump out".
Animasyon için doğru Bezier eğrisini seçmemiz gerekiyor. Bir yerinde `y>1` olmalı ki uçak "dışarı taşabilsin".

For instance, we can take both control points with `y>1`, like: `cubic-bezier(0.25, 1.5, 0.75, 1.5)`.
Örneğin iki kontrol noktasını da `y>1` olacak şekilde ayarlayabiliriz: `cubic-bezier(0.25, 1.5, 0.75, 1.5)`.

The graph:
Eğrinin grafiği:

![](bezier-up.svg)
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ importance: 5

---

# Animate the flying plane (CSS)
# Havadaki uçağa animasyon ekle (CSS)

Modify the solution of the previous task <info:task/animate-logo-css> to make the plane grow more than it's original size 400x240px (jump out), and then return to that size.
Bir önceki görevdeki çözümü değiştirerek <info:task/animate-logo-css> uçağı orijinal boyutu 400x240px'den daha büyük hale getir (dışarı taşır), ve o boyutuna geri çevir.

Here's how it should look (click on the plane):
Son hali böyle olmalı (uçağa tıkla):

[iframe src="solution" height=350]

Take the solution of the previous task as the source.
Bir önceki çözümü temel alarak ilerleyebirsiniz.
12 changes: 6 additions & 6 deletions 7-animation/2-css-animations/3-animate-circle/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ importance: 5

---

# Animated circle
# Animasyonlu Daire

Create a function `showCircle(cx, cy, radius)` that shows an animated growing circle.
`showCircle(cx, cy, radius)` şeklinde, animasyonlu bir şekilde daireyi genişleten, bir fonksiyon yarat.

- `cx,cy` are window-relative coordinates of the center of the circle,
- `radius` is the radius of the circle.
- `cx,cy` dairenin merkezinin pencereye göreceli olarak koordinatları,
- `radius` dairenin yarıçapı.

Click the button below to see how it should look like:
Aşağıdaki tuşa tıklayarak nasıl gözükmesi gerektiğini görebilirsin.

[iframe src="solution" height=260]

The source document has an example of a circle with right styles, so the task is precisely to do the animation right.
Kaynak dökümanın içinde aynı şekilde çizilmiş bir daire var, bu görevin amacı sadece animasyonu doğru bir şekilde yapmak.
Loading