This commit is contained in:
Patricio Gonzalez Vivo 2015-06-11 06:57:22 -04:00
parent e148b07be7
commit 3c296b52eb
4 changed files with 5 additions and 3 deletions

View File

@ -48,7 +48,7 @@
<ul class="navigationBar" >
<li class="navigationBar" onclick="previusPage()">&lt; &lt; Previous</li>
<li class="navigationBar" onclick="homePage()"> Home </li>
<!-- <li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li> -->
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
</ul>
<footer>

View File

@ -43,9 +43,11 @@ mat2 rotate2d(float _angle){
}
```
According to the way we've been drawing shapes, this is not exactly what we want. Our cross shape is drawn in the center of the canvas which corresponds to the position ```vec2(0.5)```. So, before we rotate the space we need to move shape from the `center` to the ```vec2(0.0)``` coordinate, rotate the space, then finally move it back to the original place.
![](rotate.jpg)
According to the way we've been drawing shapes, this is not exactly what we want. Our cross shape is drawn in the center of the canvas which corresponds to the position ```vec2(0.5)```. So, before we rotate the space we need to move shape from the `center` to the ```vec2(0.0)``` coordinate, rotate the space, then finally move it back to the original place.
That will looks like the following code:
<div class="codeAndCanvas" data="cross-rotate.frag"></div>

View File

@ -48,7 +48,7 @@
<ul class="navigationBar" >
<li class="navigationBar" onclick="previusPage()">&lt; &lt; Previous</li>
<li class="navigationBar" onclick="homePage()"> Home </li>
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
<!-- <li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li> -->
</ul>
<footer>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 60 KiB