3 <title>Point mapping through
3D transform hierarchies
</title>
4 <script src=
"point-mapping-helpers.js" type=
"text/javascript" charset=
"utf-8"></script>
5 <script type=
"text/javascript" charset=
"utf-8">
9 // In non-test mode, show the mouse coords for testing
10 if (!window.testRunner)
11 document.body.addEventListener('mousemove', mousemoved, false);
13 dispatchEvent(
44,
44, 'box1',
2,
2);
14 dispatchEvent(
74,
68, 'box2',
2,
2);
15 dispatchEvent(
157,
164, 'box2',
98,
98);
17 dispatchEvent(
320,
68, 'box4',
2,
2);
18 dispatchEvent(
336,
87, 'box5',
2,
2);
20 dispatchEvent(
582,
87, 'box8',
2,
2);
21 dispatchEvent(
658,
174, 'box8',
86,
86);
23 dispatchEvent(
74,
314, 'box10',
2,
2);
24 dispatchEvent(
91,
351, 'box11',
2,
2);
26 dispatchEvent(
320,
314, 'box13',
2,
2);
27 dispatchEvent(
343,
351, 'box14',
2,
2);
28 dispatchEvent(
365,
375, 'box15',
2,
2);
30 dispatchEvent(
566,
314, 'box17',
2,
2);
31 dispatchEvent(
587,
352, 'box18',
2,
2);
32 dispatchEvent(
629,
401, 'box19',
2,
2);
33 dispatchEvent(
653,
422, 'box20',
2,
2);
34 dispatchEvent(
745,
505, 'box20',
86,
87);
37 <style type=
"text/css" media=
"screen">
41 border:
1px solid black;
49 border:
1px solid black;
81 -webkit-box-sizing: border-box;
82 background-color: #DDD;
83 border:
1px solid black;
87 outline:
3px solid orange;
94 border:
1px solid black;
95 -webkit-box-sizing: border-box;
96 -webkit-perspective:
400;
105 border:
1px solid black;
106 background-color: #
81AA8A;
107 -webkit-transform-style: preserve-
3d;
108 -webkit-box-sizing: border-box;
109 transform: rotateY(-
30deg);
118 border:
1px solid black;
119 background-color: #AA7994;
120 -webkit-transform-style: flat;
121 -webkit-box-sizing: border-box;
122 transform: rotateY(-
30deg);
126 background-color: blue;
146 <body onclick=
"clicked(event)">
148 <div id=
"results"></div>
150 <div class=
"test one">
151 <!-- Simple transformed div in perpsective; preserve-3d on leaf -->
152 <div class=
"container box" id=
"box1">
153 <div class=
"transformed-3d box" id=
"box2">
158 <div class=
"test two">
159 <!-- Transformed, preserve-3d div in perpsective with non-layer child -->
160 <div class=
"container box" id=
"box3">
161 <div class=
"transformed-3d box" id=
"box4">
162 <div class=
"inner box" id=
"box5">
168 <div class=
"test three">
169 <!-- Transformed, preserve-3d div in perpsective with layer child -->
170 <div class=
"container box" id=
"box6">
171 <div class=
"transformed-3d box" id=
"box7">
172 <div class=
"inner box" style=
"position: relative" id=
"box8">
177 <div class=
"test four">
178 <!-- Nested transformed, preserve-3d divs in perpsective -->
179 <div class=
"container box" id=
"box9">
180 <div class=
"transformed-3d box" id=
"box10">
181 <div class=
"transformed-3d box" style=
"transform: translateZ(20px) rotateY(50deg)" id=
"box11">
186 <div class=
"test five">
187 <!-- Transformed, preserve-3d div in perpsective with non-layer child -->
188 <div class=
"container box" id=
"box12">
189 <div class=
"transformed-3d box" id=
"box13">
190 <div class=
"transformed-3d box" style=
"transform: translateZ(10px) rotateY(50deg)" id=
"box14">
191 <div class=
"inner box" id=
"box15">
197 <div class=
"test six">
198 <!-- Flatten in the middle of 3d -->
199 <div class=
"container box" id=
"box16">
200 <div class=
"transformed-3d box" id=
"box17">
201 <div class=
"transformed-3d box" style=
"transform: translateZ(10px) rotateY(20deg)" id=
"box18">
202 <div class=
"transformed-flat box" style=
"-webkit-transform-style: flat; transform: rotateX(-20deg)" id=
"box19">
203 <div class=
"inner box" id=
"box20">
211 <div id=
"mousepos"></div>