/*Copyright 2015, Pall Thayer (http://pallthayer.dyndns.org)*/ /*These program are free software: you can redistribute them and/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will rock your world, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see .*/ /*Objects In Motion II: Square flipping horizontally - 2017-10-07 22:02:37*/ var square = function(where) { this.there = where; var fair = false; var bear = fair; var air = 90; var hair = 90; var pear = hair + air; var square = document.createElement('div'); square.style.border = '5px solid black'; square.style.width = pear+'px'; square.style.height = pear+'px'; square.style.margin = 'auto'; if(fair) square.style['border-right'] = '5px solid red'; document.body.appendChild(square); var care = function(bear) { for(var i = 1;i < 9999;i++) { window.clearInterval(i); } share = setInterval(function(){mare(bear);}, 1000); }; var mare = function(bear) { pear *= -1; square.style.transform += 'rotateY('+pear+'deg)'; }; function share() { return true; }; care(bear); };