forked from PencilCode/jquery-turtle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrevolve.html
More file actions
43 lines (43 loc) · 969 Bytes
/
revolve.html
File metadata and controls
43 lines (43 loc) · 969 Bytes
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
<script src="lib/qunit.js"></script>
<link href="lib/qunit.css" rel="stylesheet">
<script src="lib/jquery.js"></script>
<script src="../jquery-turtle.js"></script>
<body>
<div id="qunit" style="opacity:.2"></div>
<script>
eval($.turtle());
module("Revolve test.");
asyncTest("Draws 360 degree arcs, testing angle normalization.", function() {
speed(10);
pen(purple, 20);
rt(360, 100);
pen(10, tan);
lt(360, 100)
fill('red');
pen(null);
home();
speed(Infinity);
done(function() {
ok(touches(tan));
ok(touches(purple));
ok(touches(red));
moveto(100, 0);
ok(!touches(purple));
ok(!touches(tan));
ok(!touches(red));
moveto(200, 0);
ok(touches(purple));
ok(!touches(tan));
ok(!touches(red));
moveto(-100, 100);
ok(touches(tan));
ok(!touches(purple));
ok(touches(red));
moveto(-100, 0);
ok(!touches(purple));
ok(!touches(tan));
ok(touches(red));
start();
});
});
</script>