|
15 | 15 | </head>
|
16 | 16 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
17 | 17 | <body onload="main()">
|
18 |
| - <canvas id="canvas" ondblclick="mouseHandler()" width="600" height="600"> |
19 |
| - Your browser does not support HTML5 |
20 |
| - </canvas> |
21 |
| - <input type="number" min="-1" max="1" id="x1" placeholder="x1"> |
22 |
| - <input type="number" min="-1" max="1" id="y1" placeholder="y1"> |
23 |
| - <input type="number" min="-1" max="1" id="x2" placeholder="x2"> |
24 |
| - <input type="number" min="-1" max="1" id="y2" placeholder="y2"> |
25 |
| - <button type="button" onclick="reflect()" class="btn btn-primary">Reflect</button> |
| 18 | + <div id="main"> |
| 19 | + <div class="col-sm-3 col-lg-4 sidenav" id="left_panel"> |
| 20 | + <p class="h1 text-primary">Left Panel.</p> |
| 21 | + <div id="rotation_panel"> |
| 22 | + <p class="h3 text-info">Provide the arbitrary point.</p> |
| 23 | + <input type="number" min="-1" max="1" id="x1" placeholder="x1"> |
| 24 | + <input type="number" min="-1" max="1" id="y1" placeholder="y1"> |
| 25 | + <br> |
| 26 | + <button type="button" onclick="arbitraryRotate()" class="btn btn-primary">Rotate</button> |
| 27 | + </div> |
| 28 | + <div id="reflection_panel"> |
| 29 | + <p class="h3 text-info">Provide the arbitrary line.</p> |
| 30 | + <input type="number" min="-1" max="1" id="x1" placeholder="x1"> |
| 31 | + <input type="number" min="-1" max="1" id="y1" placeholder="y1"> |
| 32 | + <br> |
| 33 | + <input type="number" min="-1" max="1" id="x2" placeholder="x2"> |
| 34 | + <input type="number" min="-1" max="1" id="y2" placeholder="y2"> |
| 35 | + <br> |
| 36 | + <button type="button" onclick="reflect()" class="btn btn-primary">Reflect</button> |
| 37 | + </div> |
| 38 | + </div> |
| 39 | + <div id="canvas_content" class="col-lg-8"> |
| 40 | + <canvas id="canvas" ondblclick="mouseHandler()" width="600" height="600"> |
| 41 | + Your browser does not support HTML5 |
| 42 | + </canvas> |
| 43 | + </div> |
26 | 44 |
|
27 |
| - <br/> |
| 45 | + </div> |
28 | 46 | <script>
|
29 | 47 | var mouseX, mouseY;
|
30 | 48 | var gl, shaderProgram;
|
|
138 | 156 | requestAnimationFrame(animate);
|
139 | 157 | }
|
140 | 158 | }
|
| 159 | + function arbitraryRotate(){ |
| 160 | + m = document.getElementById("x1").value; |
| 161 | + n = document.getElementById("y1").value; |
| 162 | + alert("raech"); |
| 163 | + } |
141 | 164 | function reflect(){
|
142 | 165 | var x1 = document.getElementById("x1").value;
|
143 | 166 | var y1 = document.getElementById("y1").value;
|
|
0 commit comments