|
@@ -10,6 +10,8 @@ require("mkdirp").sync(path.join(__dirname, "tmp", "frames"));
|
10
|
10
|
|
11
|
11
|
var frameDir = path.join(__dirname, "tmp", "frames");
|
12
|
12
|
|
|
13
|
+var waveform = [[0, 1, 0], [1, 0.1, 1]];
|
|
14
|
+
|
13
|
15
|
tape.test("Draw frame", function(test){
|
14
|
16
|
|
15
|
17
|
var options = {
|
|
@@ -18,8 +20,7 @@ tape.test("Draw frame", function(test){
|
18
|
20
|
backgroundColor: "#f00",
|
19
|
21
|
foregroundColor: "#fff",
|
20
|
22
|
waveTop: 340,
|
21
|
|
- waveBottom: 380,
|
22
|
|
- waveform: [[0, 1, 0], [1, 0.1, 1]]
|
|
23
|
+ waveBottom: 380
|
23
|
24
|
};
|
24
|
25
|
|
25
|
26
|
initializeCanvas(options, function(err, renderer){
|
|
@@ -28,7 +29,10 @@ tape.test("Draw frame", function(test){
|
28
|
29
|
|
29
|
30
|
drawFrames(renderer, {
|
30
|
31
|
numFrames: 2,
|
31
|
|
- frameDir: frameDir
|
|
32
|
+ frameDir: frameDir,
|
|
33
|
+ width: options.width,
|
|
34
|
+ height: options.height,
|
|
35
|
+ waveform: waveform
|
32
|
36
|
}, function(err){
|
33
|
37
|
test.error(err);
|
34
|
38
|
checkFrame(test, options);
|
|
@@ -44,8 +48,7 @@ tape.test("Default colors", function(test){
|
44
|
48
|
width: 1280,
|
45
|
49
|
height: 720,
|
46
|
50
|
waveTop: 340,
|
47
|
|
- waveBottom: 380,
|
48
|
|
- waveform: [[0, 1, 0], [1, 0.1, 1]]
|
|
51
|
+ waveBottom: 380
|
49
|
52
|
};
|
50
|
53
|
|
51
|
54
|
initializeCanvas(options, function(err, renderer){
|
|
@@ -54,7 +57,10 @@ tape.test("Default colors", function(test){
|
54
|
57
|
|
55
|
58
|
drawFrames(renderer, {
|
56
|
59
|
numFrames: 2,
|
57
|
|
- frameDir: frameDir
|
|
60
|
+ frameDir: frameDir,
|
|
61
|
+ width: options.width,
|
|
62
|
+ height: options.height,
|
|
63
|
+ waveform: waveform
|
58
|
64
|
}, function(err){
|
59
|
65
|
test.error(err);
|
60
|
66
|
checkFrame(test, options);
|
|
@@ -69,11 +75,10 @@ tape.test("Square frame", function(test){
|
69
|
75
|
var options = {
|
70
|
76
|
width: 720,
|
71
|
77
|
height: 720,
|
72
|
|
- backgroundColor: "#fc0",
|
|
78
|
+ backgroundColor: "#f00",
|
73
|
79
|
foregroundColor: "#fff",
|
74
|
80
|
waveTop: 340,
|
75
|
|
- waveBottom: 380,
|
76
|
|
- waveform: [[0, 1, 0], [1, 0.1, 1]]
|
|
81
|
+ waveBottom: 380
|
77
|
82
|
};
|
78
|
83
|
|
79
|
84
|
initializeCanvas(options, function(err, renderer){
|
|
@@ -82,7 +87,10 @@ tape.test("Square frame", function(test){
|
82
|
87
|
|
83
|
88
|
drawFrames(renderer, {
|
84
|
89
|
numFrames: 2,
|
85
|
|
- frameDir: frameDir
|
|
90
|
+ frameDir: frameDir,
|
|
91
|
+ width: options.width,
|
|
92
|
+ height: options.height,
|
|
93
|
+ waveform: waveform
|
86
|
94
|
}, function(err){
|
87
|
95
|
test.error(err);
|
88
|
96
|
checkFrame(test, options);
|