Skip to content

Commit

Permalink
feat(curriculum): add all english block 1 animations (freeCodeCamp#52557
Browse files Browse the repository at this point in the history
)
  • Loading branch information
moT01 authored Dec 18, 2023
1 parent 6cb2cbf commit 64b9415
Show file tree
Hide file tree
Showing 166 changed files with 6,802 additions and 231 deletions.
15 changes: 10 additions & 5 deletions client/src/templates/Challenges/components/scene/character.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,22 @@ export function Character({
}

if (isTalking) {
talkInterval = setInterval(() => {
const openDuration = getRandomInt(100, 200);
const closeDuration = getRandomInt(300, 400);
const talk = () => {
const openTimeout = getRandomInt(0, 100);
const closeTimeout = getRandomInt(150, 300);

setTimeout(() => {
setMouthIsOpen(true);
}, openDuration);
}, openTimeout);

setTimeout(() => {
setMouthIsOpen(false);
}, closeDuration);
}, closeTimeout);
};

talk();
talkInterval = setInterval(() => {
talk();
}, 300);
}

Expand Down
2 changes: 1 addition & 1 deletion client/src/templates/Challenges/dialogue/show.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class ShowDialogue extends Component<ShowDialogueProps, ShowDialogueState> {
<Spacer size='medium' />
</Col>

<Scene scene={scene} />
{scene && <Scene scene={scene} />}

<Col md={8} mdOffset={2} sm={10} smOffset={1} xs={12}>
<ObserveKeys>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@
"id": "656a1298f2a0400f56b31e25",
"title": "Task 27"
},
{
"id": "657bcf58b87d01890f9bdc93",
"title": "Task 28"
},
{
"id": "656a137523a9bc0f9d3bae01",
"title": "Task 29"
Expand Down Expand Up @@ -529,6 +533,10 @@
"id": "656cd52f0f43551be96b4640",
"title": "Task 127"
},
{
"id": "657e0d0037192f3d9e3d5417",
"title": "Task 128"
},
{
"id": "656cd63a45146d1c2c51e682",
"title": "Task 129"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ In the audio, `you're` is used, which is a contraction of `you are`. The verb `t
"characters": [
{
"character": "Maria",
"position": { "x": 50, "y": 0, "z": 1.5 },
"position": {"x":50,"y":0,"z":1.5},
"opacity": 0
}
],
"audio": {
"filename": "1.1-1.mp3",
"startTime": 1,
"startTimestamp": 0,
"finishTimestamp": 2.5
"finishTimestamp": 2.38
}
},
"commands": [
Expand All @@ -58,17 +58,17 @@ In the audio, `you're` is used, which is a contraction of `you are`. The verb `t
},
{
"character": "Maria",
"startTime": 0.5,
"finishTime": 2.9,
"startTime": 1,
"finishTime": 2.88,
"dialogue": {
"text": "Hello! You're the new graphic designer, right?",
"text": "Hello. You're the new graphic designer, right?",
"align": "center"
}
},
{
"character": "Maria",
"opacity": 0,
"startTime": 3.4
"startTime": 3.38
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ Pay attention to the verb in the sentence.
"characters": [
{
"character": "Maria",
"position": { "x": 50, "y": 0, "z": 1.5 },
"position": {"x":50,"y":0,"z":1.5},
"opacity": 0
}
],
"audio": {
"filename": "1.1-1.mp3",
"startTime": 1,
"startTimestamp": 0,
"finishTimestamp": 2.5
"finishTimestamp": 2.38
}
},
"commands": [
Expand All @@ -56,17 +56,17 @@ Pay attention to the verb in the sentence.
},
{
"character": "Maria",
"startTime": 0.5,
"finishTime": 2.9,
"startTime": 1,
"finishTime": 2.88,
"dialogue": {
"text": "Hello! You're the new graphic designer, right?",
"text": "Hello. You're the new graphic designer, right?",
"align": "center"
}
},
{
"character": "Maria",
"opacity": 0,
"startTime": 3.4
"startTime": 3.38
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Focus on the term Maria used to describe herself.
},
{
"character": "Maria",
"startTime": 0.5,
"startTime": 1,
"finishTime": 2.2,
"dialogue": {
"text": "I'm Maria, the team lead.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Focus on the term Maria used to describe herself.
},
{
"character": "Maria",
"startTime": 0.5,
"startTime": 1,
"finishTime": 2.2,
"dialogue": {
"text": "I'm Maria, the team lead.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,47 @@ Which phrase does Tom use to confirm Maria's statement about him?
## --video-solution--

3

# --scene--

```json
{
"setup": {
"background": "company2-center.png",
"characters": [
{
"character": "Tom",
"position": {"x":50,"y":15,"z":1.2},
"opacity": 0
}
],
"audio": {
"filename": "1.1-1.mp3",
"startTime": 1,
"startTimestamp": 4.62,
"finishTimestamp": 8.46
}
},
"commands": [
{
"character": "Tom",
"opacity": 1,
"startTime": 0
},
{
"character": "Tom",
"startTime": 1,
"finishTime": 4.34,
"dialogue": {
"text": "Hi, that's right. I'm Tom McKenzie. It's a pleasure to meet you.",
"align": "center"
}
},
{
"character": "Tom",
"opacity": 0,
"startTime": 4.84
}
]
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ id: 6543aae6f5f028dba112f277
title: Task 6
challengeType: 22
dashedName: task-6
audioPath: curriculum/js-music-player/We-Are-Going-to-Make-it.mp3
---

<!--
Expand All @@ -28,3 +27,47 @@ Listen to the audio and complete the sentence below.
---

`right`

# --scene--

```json
{
"setup": {
"background": "company2-center.png",
"characters": [
{
"character": "Tom",
"position": {"x":50,"y":15,"z":1.2},
"opacity": 0
}
],
"audio": {
"filename": "1.1-1.mp3",
"startTime": 1,
"startTimestamp": 4.62,
"finishTimestamp": 8.46
}
},
"commands": [
{
"character": "Tom",
"opacity": 1,
"startTime": 0
},
{
"character": "Tom",
"startTime": 1,
"finishTime": 4.34,
"dialogue": {
"text": "Hi, that's right. I'm Tom McKenzie. It's a pleasure to meet you.",
"align": "center"
}
},
{
"character": "Tom",
"opacity": 0,
"startTime": 4.84
}
]
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ id: 6543abeff5f028dba112f278
title: Task 7
challengeType: 19
dashedName: task-7
audioPath: curriculum/js-music-player/We-Are-Going-to-Make-it.mp3
---

<!--
Expand Down Expand Up @@ -52,3 +51,47 @@ Think about which verb form would correctly fit with `I` to talk about oneself i
## --video-solution--

2

# --scene--

```json
{
"setup": {
"background": "company2-center.png",
"characters": [
{
"character": "Tom",
"position": {"x":50,"y":15,"z":1.2},
"opacity": 0
}
],
"audio": {
"filename": "1.1-1.mp3",
"startTime": 1,
"startTimestamp": 4.5,
"finishTimestamp": 7
}
},
"commands": [
{
"character": "Tom",
"opacity": 1,
"startTime": 0
},
{
"character": "Tom",
"startTime": 1,
"finishTime": 3.3,
"dialogue": {
"text": "Hi, that's right. I'm Tom McKenzie.",
"align": "center"
}
},
{
"character": "Tom",
"opacity": 0,
"startTime": 3.8
}
]
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ id: 6543abf5f5f028dba112f279
title: Task 8
challengeType: 22
dashedName: task-8
audioPath: curriculum/js-music-player/We-Are-Going-to-Make-it.mp3
---

<!--
Expand All @@ -24,3 +23,47 @@ The word `I'm` is a contraction of `I am`. Contractions are a way to shorten com
## --blanks--

`I'm`

# --scene--

```json
{
"setup": {
"background": "company2-center.png",
"characters": [
{
"character": "Tom",
"position": {"x":50,"y":15,"z":1.2},
"opacity": 0
}
],
"audio": {
"filename": "1.1-1.mp3",
"startTime": 1,
"startTimestamp": 4.5,
"finishTimestamp": 7
}
},
"commands": [
{
"character": "Tom",
"opacity": 1,
"startTime": 0
},
{
"character": "Tom",
"startTime": 1,
"finishTime": 3.3,
"dialogue": {
"text": "Hi, that's right. I'm Tom McKenzie.",
"align": "center"
}
},
{
"character": "Tom",
"opacity": 0,
"startTime": 3.8
}
]
}
```
Loading

0 comments on commit 64b9415

Please sign in to comment.