Skip to content

Commit 2d176f1

Browse files
author
bhupendra
committed
Merge branch 'main' of https://github.com/openalgorithmdevelopers/WebGL into main
2 parents 7968847 + efa9f51 commit 2d176f1

File tree

1 file changed

+32
-9
lines changed

1 file changed

+32
-9
lines changed

Computer Graphics/Matrix_multiplication.html

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,34 @@
1515
</head>
1616
<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">
1717
<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>
2644

27-
<br/>
45+
</div>
2846
<script>
2947
var mouseX, mouseY;
3048
var gl, shaderProgram;
@@ -138,6 +156,11 @@
138156
requestAnimationFrame(animate);
139157
}
140158
}
159+
function arbitraryRotate(){
160+
m = document.getElementById("x1").value;
161+
n = document.getElementById("y1").value;
162+
alert("raech");
163+
}
141164
function reflect(){
142165
var x1 = document.getElementById("x1").value;
143166
var y1 = document.getElementById("y1").value;

0 commit comments

Comments
 (0)