~firefox
25 itemsDownload ./*

..
stylish
circuit-canvas.html
gamemaker.html
hidecaption.ahk
homepage-centered-iframe.html
homepage-centered-slideshow.html
homepage-masonry.html
homepage-panels.html
homepage-sidebar.html
homepage-slide3d.html
homepage-stars.html
mailorder.html
noise.html
noise2.html
noise3.html
noise3.jpg
remoteButter.html
simple-homepage.html
sintest.html
slideshow.html
template.ajax.php
template.html
template.min.html
trigonometry.html
videoeditor.html


firefoxsintest.html
2 KB• 9•  5 days ago•  DownloadRawClose
5 days ago•  9

{}
<html>
<head>

<style type="text/css">
.tbl { display: table; table-layout: fixed; width: 100%; }
.tr { display: table-row; }
.td { display: table-cell; text-align: left; }
.td:nth-child(1) { display: table-cell; text-align: center; }
</style>
<script type="text/javascript">
var $=function(id) { return document.getElementById(id); };
</script>
</head>
<body>

    rad=Math.PI / 180<br />
    sinloops=(360 / 512) * 20<br />
    <br />
    sinloop=i * sinloops<br />
    sintest=(Math.sin(sinloop * rad) * .25) + .75<br />
    <br /> 
    20 cycles 0.5 to 1 across 512(ie pixels nightvision)~
    <br />
    <br />
    <hr />

<div id="sintest"></div>

<script type="text/javascript">
var rad=Math.PI / 180;
var sinloops=(360 / 512) * 20;
var sinloop=0;
var sintest=0;
var costest=0;
var html="<div class='tbl'>";
html+="<div class='tr'>";
html+="<div class='td'>i=</div>";
html+="<div class='td'>sinloop=</div>";
html+="<div class='td' style='width: 100px;'>&nbsp</div>";
html+="<div class='td' style='width: 100px;'>&nbsp</div>";
html+="<div class='td'>sintest=</div>";
//html+="<div class='td'>costest=</div>";
html+="</div>";
html+="<div class='tr'>";
html+="<div class='td'>&nbsp;</div>";
html+="<div class='td'>&nbsp;</div>";
html+="<div class='td'>&nbsp;</div>";
html+="<div class='td'>&nbsp;</div>";
html+="<div class='td'>&nbsp;</div>";
html+="</div>";
for(var i=0;i<512;i++) {
    sinloop=i * sinloops;
    sintest=(Math.sin(sinloop * rad) * .25) + .75;
    sinleft=Math.round(((sintest * 2) - 1)*100);
    //costest=Math.cos(sinloop * rad);
    html+="<div class='tr'>";
    html+="<div class='td'>"+i+"</div>";
    html+="<div class='td'>"+sinloop+"</div>";
        html+="<div class='td'><div style='position:relative;width:100%;height:100%;'>&nbsp;<div style='position:absolute;width:10px;height:100%;background:#000;left:"+sinleft+"%;'>&nbsp;</div></div></div>";

    html+="<div class='td'></div>";
    html+="<div class='td'>"+sintest+"</div>";
    //html+="<div class='td'>"+costest+"</div>";
    html+="</div>";
}
html+="</div>";
$('sintest').innerHTML=html;
</script>

</body>
</html>

Top
©twily.info 2013 - 2025
twily at twily dot info



2 190 417 visits
... ^ v