-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmouth.js
More file actions
64 lines (51 loc) · 1.65 KB
/
mouth.js
File metadata and controls
64 lines (51 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// import { reverseBits } from './matrix/utils';
// const left_0 = [12, 12, 28, 28, 12, 14, 6, 2];
// const left_1 = [12, 12, 60, 60, 28, 14, 6, 2];
// const left_2 = [28, 12, 4, 4, 4, 2, 2, 2];
// const left_3 = [14, 12, 28, 28, 14, 14, 6, 2];
// const left_4 = [6, 60, 28, 12, 4, 2, 2, 0];
// const middle_0 = [8, 56, 56, 56, 56, 56, 56, 8];
// const middle_1 = [8, 120, 120, 120, 120, 120, 120, 8];
// const middle_2 = [4, 6, 30, 30, 30, 30, 6, 4];
// const middle_3 = [14, 62, 63, 63, 63, 63, 62, 14];
// const middle_4 = [6, 6, 63, 63, 63, 63, 6, 6];
// let leftAnimation = [
// left_0,
// left_1,
// left_0,
// left_2,
// left_1,
// left_3
// ];
// let middleAnimation = [
// middle_0,
// middle_1,
// middle_0,
// middle_2,
// middle_1,
// middle_3
// ];
// let animationIndex = 0;
// let positiveDirection = true;
// function updateIndex() {
// if (positiveDirection) {
// animationIndex++;
// } else {
// animationIndex--;
// }
// }
// export const animate = (leftMatrix, middleMatrix, rightMatrix) => {
// setInterval(function () {
// const leftBitmap = leftAnimation[animationIndex];
// const middleBitmap = middleAnimation[animationIndex];
// const rightBitmap = leftBitmap.map(line => line).reverse();
// leftMatrix.render(leftBitmap);
// middleMatrix.render(middleBitmap);
// rightMatrix.render(rightBitmap);
// updateIndex();
// if (animationIndex === leftAnimation.length || animationIndex < 0) {
// positiveDirection = !positiveDirection;
// updateIndex();
// }
// }, 250);
// };