-
Notifications
You must be signed in to change notification settings - Fork 0
tri
Eric edited this page Jul 15, 2017
·
2 revisions
// triangle demo in javascript
function Pir(x,y,w,h,cx,cy) {
tri(x,y,w/2+cx,h/2+cy,x+w,y,1);
tri(x+w,y,w/2+cx,h/2+cy,x+w,y+h,2);
tri(x,y,w/2+cx,h/2+cy,x,y+h,8);
tri(x,y+h,w/2+cx,h/2+cy,x+w,y+h,15);
}
cls();
function TIC() {
for (var x=0; x<240; x=x+28) {
for (var y=0; y<136; y=y+28) {
cx=12*Math.sin(time()/30000*(x+y+1));
cy=12*Math.cos(time()/30000*(x+y+1));
Pir(x,y,25,25,x+cx,y+cy);
}
}
}
Coming soon.