god i hate web programming
|
@ -10,7 +10,7 @@ MY "WHY" FOR MAKING THIS:
|
|||
|
||||
-->
|
||||
|
||||
<!doctype>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@ function createCanvas(canvas, width, height){
|
|||
// Set difference in width & height
|
||||
canvas.width = width*2;
|
||||
canvas.height = height*2;
|
||||
canvas.style.width = width;
|
||||
canvas.style.height = height;
|
||||
canvas.style.width = (width) + "px";
|
||||
canvas.style.height = (height) + "px";
|
||||
|
||||
return canvas;
|
||||
|
||||
|
@ -180,9 +180,10 @@ function rotateVector(v, a){
|
|||
|
||||
// Cross Browser Crap
|
||||
function _getBoundingClientRect(dom){
|
||||
//debugger;
|
||||
var bounds = dom.getBoundingClientRect();
|
||||
if(!bounds.x) bounds.x = bounds.left; // crossbrowser crap
|
||||
if(!bounds.y) bounds.y = bounds.top; // crossbrowser crap
|
||||
if(bounds.x===undefined) bounds.x = bounds.left; // crossbrowser crap
|
||||
if(bounds.y===undefined) bounds.y = bounds.top; // crossbrowser crap
|
||||
return bounds;
|
||||
}
|
||||
function _stopPropButton(button){
|
||||
|
|
|
@ -41,10 +41,8 @@ subscribe("prepreload/done", function(){
|
|||
|
||||
// Go to THE SPLASH
|
||||
slideshow.gotoChapter("Preloader");
|
||||
/*
|
||||
slideshow.gotoChapter("Credits");
|
||||
$("#navigation").style.display = "block";
|
||||
*/
|
||||
//slideshow.gotoChapter("Credits");
|
||||
//$("#navigation").style.display = "block";
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -160,16 +160,16 @@ function Sim(config){
|
|||
|
||||
var container = $("#simulations_container");
|
||||
simOffset = _getBoundingClientRect(self.container.dom);
|
||||
self.canvas.style.left = -simOffset.x;
|
||||
self.canvas.style.top = -simOffset.y;
|
||||
self.canvas.style.left = (-simOffset.x) + "px";
|
||||
self.canvas.style.top = (-simOffset.y) + "px";
|
||||
|
||||
// Set difference in width & height
|
||||
var width = container.clientWidth;
|
||||
var height = container.clientHeight;
|
||||
self.canvas.width = width*2;
|
||||
self.canvas.height = height*2;
|
||||
self.canvas.style.width = width;
|
||||
self.canvas.style.height = height;
|
||||
self.canvas.style.width = (width) + "px";
|
||||
self.canvas.style.height = (height) + "px";
|
||||
|
||||
};
|
||||
self.resize();
|
||||
|
|
|
@ -34,18 +34,18 @@ function Boxes(){
|
|||
|
||||
// Standard box properties...
|
||||
if(config.id) box.id = config.id;
|
||||
if(config.x) box.style.left = config.x;
|
||||
if(config.y) box.style.top = config.y;
|
||||
if(config.w) box.style.width = config.w;
|
||||
if(config.h) box.style.height = config.h;
|
||||
if(config.x) box.style.left = config.x + "px";
|
||||
if(config.y) box.style.top = config.y + "px";
|
||||
if(config.w) box.style.width = config.w + "px";
|
||||
if(config.h) box.style.height = config.h + "px";
|
||||
if(config.hidden) box.style.display = "none";
|
||||
|
||||
// background
|
||||
if(config.background){
|
||||
box.style.left = "-1000px";
|
||||
box.style.top = "-1000px";
|
||||
box.style.width = 10000;
|
||||
box.style.height = 10000;
|
||||
box.style.width = 10000 + "px";
|
||||
box.style.height = 10000 + "px";
|
||||
box.style.background = config.background;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,13 +67,13 @@ function Navigation(){
|
|||
|
||||
var offset = _getBoundingClientRect(nav).x - _getBoundingClientRect($("#navigation")).x;
|
||||
var label = nav.children[1].innerHTML;
|
||||
bubble.style.left = offset - (220/2) + (36/2);
|
||||
bubble.style.left = ( offset - (220/2) + (36/2) ) + "px";
|
||||
bubble.innerHTML = label;
|
||||
|
||||
bubble.style.display = "block";
|
||||
setTimeout(function(){
|
||||
bubble.style.opacity = 1;
|
||||
bubble.style.top = -85;
|
||||
bubble.style.top = (-85) + "px";
|
||||
},1);
|
||||
isShowingBubble = true;
|
||||
|
||||
|
@ -81,7 +81,7 @@ function Navigation(){
|
|||
var _hideBubble = function(){
|
||||
isShowingBubble = false;
|
||||
bubble.style.opacity = 0;
|
||||
bubble.style.top = -80;
|
||||
bubble.style.top = (-80) + "px";
|
||||
};
|
||||
var _countdown = 0;
|
||||
subscribe("update", function(){
|
||||
|
|
|
@ -64,8 +64,8 @@ function Pencil(){
|
|||
self.draw = function(){
|
||||
|
||||
// Move DOM there
|
||||
self.canvas.style.left = self.x-_margin;
|
||||
self.canvas.style.top = self.y-_size+_margin;
|
||||
self.canvas.style.left = (self.x-_margin) + "px";
|
||||
self.canvas.style.top = (self.y-_size+_margin) + "px";
|
||||
|
||||
// Which sprite? (normal by default...)
|
||||
var sprite = self.sprite;
|
||||
|
|
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 1.0 MiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 268 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 613 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 469 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 791 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 313 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 506 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 422 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.2 KiB |