File: rotate-composition.html

package info (click to toggle)
firefox-esr 78.15.0esr-1~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,301,156 kB
  • sloc: cpp: 5,665,905; javascript: 4,798,386; ansic: 2,878,233; python: 977,004; asm: 270,347; xml: 181,456; java: 111,756; sh: 72,926; makefile: 21,819; perl: 13,380; cs: 4,725; yacc: 4,565; objc: 3,026; pascal: 1,787; lex: 1,720; ada: 1,681; exp: 505; php: 436; lisp: 260; awk: 152; ruby: 103; csh: 80; sed: 53; sql: 45
file content (167 lines) | stat: -rw-r--r-- 4,504 bytes parent folder | download | duplicates (4)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!DOCTYPE html>
<meta charset="utf-8">
<title> rotate composition</title>
<link rel="help" href="https://drafts.csswg.org/css-transforms-2/#propdef-rotate">
<meta name="assert" content="rotate supports animation">

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>

<body>
<script>
test_composition({
  property: 'rotate',
  underlying: '100deg',
  addFrom: '10deg',
  addTo: '30deg',
}, [
  {at: -1, expect: '90deg'},
  {at: 0, expect: '110deg'},
  {at: 0.25, expect: '115deg'},
  {at: 0.75, expect: '125deg'},
  {at: 1, expect: '130deg'},
  {at: 2, expect: '150deg'},
]);

test_composition({
  property: 'rotate',
  underlying: '1 0 0 200deg',
  addFrom: '1 0 0 -100deg',
  replaceTo: '1 0 0 40deg',
}, [
  {at: -1, expect: '1 0 0 160deg'},
  {at: 0, expect: '1 0 0 100deg'},
  {at: 0.25, expect: '1 0 0 85deg'},
  {at: 0.75, expect: '1 0 0 55deg'},
  {at: 1, expect: '1 0 0 40deg'},
  {at: 2, expect: '1 0 0 -20deg'},
]);

test_composition({
  property: 'rotate',
  underlying: '0 1 0 -40deg',
  replaceFrom: '0 1 0 50deg',
  addTo: '0 1 0 10deg',
}, [
  {at: -1, expect: '0 1 0 130deg'},
  {at: 0, expect: '0 1 0 50deg'},
  {at: 0.25, expect: '0 1 0 30deg'},
  {at: 0.75, expect: '0 1 0 -10deg'},
  {at: 1, expect: '0 1 0 -30deg'},
  {at: 2, expect: '0 1 0 -110deg'},
]);

test_composition({
  property: 'rotate',
  underlying: '1 2 3 40deg',
  addFrom: '2 4 6 10deg',
  addTo: '3 6 9 50deg',
}, [
  {at: -1, expect: '1 2 3 10deg'},
  {at: 0, expect: '1 2 3 50deg'},
  {at: 0.25, expect: '1 2 3 60deg'},
  {at: 0.75, expect: '1 2 3 80deg'},
  {at: 1, expect: '1 2 3 90deg'},
  {at: 2, expect: '1 2 3 130deg'},
]);

test_composition({
  property: 'rotate',
  underlying: '1 2 3 270deg',
  addFrom: '1 2 3 90deg',
  replaceTo: '0 1 0 100deg',
}, [
  {at: -1, expect: '-5.49276e-17 -1 -1.64783e-16 100deg'},
  {at: 0, expect: '1 2 3 360deg'},
  {at: 0.25, expect: '-1.20172e-16 1 -3.60516e-16 25deg'},
  {at: 0.75, expect: '-1.51909e-17 1 -4.55726e-17 75deg'},
  {at: 1, expect: '0 1 0 100deg'},
  {at: 2, expect: '-3.3235e-17 -1 -9.97049e-17 160deg'},
]);

test_composition({
  property: 'rotate',
  underlying: '1 2 3 90deg',
  addFrom: '2 4 6 270deg',
  replaceTo: '0 1 0 100deg',
}, [
  {at: -1, expect: '-5.49276e-17 -1 -1.64783e-16 100deg'},
  {at: 0, expect: '1 2 3 360deg'},
  {at: 0.25, expect: '-1.20172e-16 1 -3.60516e-16 25deg'},
  {at: 0.75, expect: '-1.51909e-17 1 -4.55726e-17 75deg'},
  {at: 1, expect: '0 1 0 100deg'},
  {at: 2, expect: '-3.3235e-17 -1 -9.97049e-17 160deg'},
]);

test_composition({
  property: 'rotate',
  underlying: '1 0 0 90deg',
  addFrom: '0 1 0 180deg',
  replaceTo: '0 0 1 90deg',
}, [
  {at: -1, expect: '-6.12323e-17 -1 1.57009e-16 90deg'},
  {at: 0, expect: '-4.32978e-17 -0.707107 -0.707107 180deg'},
  {at: 0.25, expect: '-1.48952e-16 -0.894427 -0.447214 131.81deg'},
  {at: 0.75, expect: '-2.94392e-17 -0.707107 0.707107 70.5288deg'},
  {at: 1, expect: '90deg'},
  {at: 2, expect: '-6.12323e-17 -1 -4.71028e-16 90deg'},
]);

test_composition({
  property: 'rotate',
  underlying: 'none',
  addFrom: 'none',
  replaceTo: '0 1 0 100deg',
}, [
  {at: -1, expect: '0 1 0 -100deg'},
  {at: 0, expect: 'none'},
  {at: 0.25, expect: '0 1 0 25deg'},
  {at: 0.75, expect: '0 1 0 75deg'},
  {at: 1, expect: '0 1 0 100deg'},
  {at: 2, expect: '0 1 0 200deg'},
]);

test_composition({
  property: 'rotate',
  underlying: 'none',
  addFrom: '2 4 6 270deg',
  replaceTo: 'none',
}, [
  {at: -1, expect: '2 4 6 540deg'},
  {at: 0, expect: '2 4 6 270deg'},
  {at: 0.25, expect: '2 4 6 202.5deg'},
  {at: 0.75, expect: '2 4 6 67.5deg'},
  {at: 1, expect: 'none'},
  {at: 2, expect: '2 4 6 -270deg'},
]);

test_composition({
  property: 'rotate',
  underlying: '1 2 3 90deg',
  addFrom: 'none',
  replaceTo: '0 1 0 100deg',
}, [
  {at: -1, expect: '0.31 -0.22 0.92 131.66deg'},
  {at: 0, expect: '1 2 3 90deg'},
  {at: 0.25, expect: '0.21 0.73 0.64 86.72deg'},
  {at: 0.75, expect: '0.07 0.97 0.21 92.05deg'},
  {at: 1, expect: '0 1 0 100deg'},
  {at: 2, expect: '-0.2 0.79 -0.59 151.11deg'},
]);

test_composition({
  property: 'rotate',
  underlying: '1 2 3 90deg',
  addFrom: '2 4 6 270deg',
  replaceTo: 'none',
}, [
  {at: -1, expect: '1 2 3 720deg'},
  {at: 0, expect: '1 2 3 360deg'},
  {at: 0.25, expect: '1 2 3 270deg'},
  {at: 0.75, expect: '1 2 3 90deg'},
  {at: 1, expect: 'none'},
  {at: 2, expect: '1 2 3 -360deg'},
]);
</script>
</body>