|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-10 23:15:58
|
Module: web
Branch: master
Commit: 8b4b50f65c088ee5d5f37949e4e34d3affa6457e
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Dec 5 20:17:05 2010 +0100
Cleanup and fix showcase scroll on Firefox
---
htdocs-binary/showcase.js | 14 ++++++++++++++
htdocs-binary/style.css | 8 --------
htdocs-source/Model.htm | 14 +-------------
htdocs-source/index.txt | 2 +-
4 files changed, 16 insertions(+), 22 deletions(-)
diff --git a/htdocs-binary/showcase.js b/htdocs-binary/showcase.js
new file mode 100644
index 0000000..b128f38
--- /dev/null
+++ b/htdocs-binary/showcase.js
@@ -0,0 +1,14 @@
+var img = Math.floor(Math.random() * 20);
+var anim = 0;
+function showcaseScroll() {
+ var e = document.getElementById('showcase');
+ var pos = 128 * (img + 0.5 * (1 - Math.cos(Math.PI * anim / 30)));
+ e.style.backgroundPosition = Math.round(-pos) + "px 0";
+ var timeout = 3500;
+ if (anim > 0) timeout = 16;
+ if (anim == 30) { anim = -1; ++img; }
+ ++anim;
+ setTimeout('showcaseScroll()', timeout);
+}
+showcaseScroll();
+
diff --git a/htdocs-binary/style.css b/htdocs-binary/style.css
index f0e4feb..e082228 100644
--- a/htdocs-binary/style.css
+++ b/htdocs-binary/style.css
@@ -138,14 +138,6 @@ h1 {
/*text-decoration: underline;*/
}
-#showcase {
- background: url('imgs/showcase.jpg') repeat-x;
- width: 640px;
- height: 96px;
- margin-bottom: 30px;
- -webkit-box-reflect:below 0 -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(0.6, transparent), to(rgba(255,255,255,0.3)));
-}
-
h3 {
font-size: 13px;
text-align: left;
diff --git a/htdocs-source/Model.htm b/htdocs-source/Model.htm
index b70bdec..f5c34bb 100644
--- a/htdocs-source/Model.htm
+++ b/htdocs-source/Model.htm
@@ -56,23 +56,11 @@
}
});
}
- var img = 0;
- var anim = 0;
- function showcaseScroll() {
- var e = document.getElementById('showcase');
- var pos = 128 * (img + 0.5 * (1 - Math.cos(Math.PI * anim / 30)));
- e.style.backgroundPositionX = Math.round(-pos) + "px";
- var timeout = 3500;
- if (anim > 0) timeout = 16;
- if (anim == 30) { anim = -1; ++img; }
- ++anim;
- setTimeout('showcaseScroll()', timeout);
- }
</script>
<!-- /TinyMCE -->
</head>
- <body onload="showcaseScroll();">
+ <body>
<div id="sitebox">
<div id="title"><img src="imgs/title.png" alt="Performous"/></div>
diff --git a/htdocs-source/index.txt b/htdocs-source/index.txt
index 29f8e97..e78ceda 100644
--- a/htdocs-source/index.txt
+++ b/htdocs-source/index.txt
@@ -1,6 +1,6 @@
The All-in-One Music Game
-<div id="showcase"></div>
+<div id="showcase" style="background: url('imgs/showcase.jpg') repeat-x; width: 640px; height: 96px; margin-bottom: 30px; -webkit-box-reflect:below 0 -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(0.6, transparent), to(rgba(255,255,255,0.3)));"></div><script type="text/javascript" src="showcase.js"></script>
Rock your friends or learn to sing better. If you are looking for a fun music game, this is it. No special hardware required, you may play guitar on your PC keyboard, sing on any microphone or webcam you happen to have and so on. If you do have SingStar microphones, Guitar Hero or RockBand instruments, or dance pads, just plug them into your USB ports and they will be autodetected by Performous.
|