-
Notifications
You must be signed in to change notification settings - Fork 1
/
simpleTrans.json
75 lines (74 loc) · 1.84 KB
/
simpleTrans.json
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
65
66
67
68
69
70
71
72
73
74
75
[
{
"title": "A Square At The Origin",
"transformations": [
["fillRect", -10, -10, 20, 20, "red"]
]
},
{
"title": "A Square Not At The Origin",
"transformations": [
["fillRect", 20,20, 20,20, "red"]
]
},
{
"title": "Place by Translation",
"transformations": [
["translate",30,30],
["fillRect",-10,-10,20,20,"red"]
]
},
{
"title": "Same Square, 2 Ways",
"transformations": [
["fillRect",20,20,20,20,"blue"],
["translate",30,30],
["fillRect",-10,-10,20,20,"red"]
]
},
{
"title": "Same Square, 2 Ways, Not Centered",
"transformations": [
["fillRect",20,20,20,20,"blue"],
["translate",20,20],
["fillRect",0,0,20,20,"red"]
]
},
{
"title": "Translations Add Up",
"transformations":[
["translate",20,0],
["translate",0,20],
["fillRect",0,0,20,20,"red"],
["translate",-20,-20],
["fillRect",0,0,20,20,"blue"]
]
},
{
"title" : "triangles with translation",
"transformations" : [
["triangle",0,0,"red"],
["translate",20,0],
["triangle",0,0,"blue"],
["translate",0,20],
["triangle",0,0,"green"]
]
},
{
"title" : "triangles with save/restore",
"transformations" : [
["triangle",0,0,"red"],
["save"],
["translate",20,0],
["triangle",0,0,"blue"],
["restore"],
["save"],
["translate",20,20],
["triangle",0,0,"green"],
["restore"]
]
},
{
"title": "Your turn to play with it"
}
]