Permalink
Browse files

added canvas animations for performance

  • Loading branch information...
playerx committed Feb 25, 2014
1 parent f4a5c51 commit 8e13d6f9b74765e179e8a773914ac580bd941a33
@@ -1,4 +1,5 @@
-using System.Web;
+using System.Configuration;
+using System.Web;
using System.Web.Optimization;
namespace Jok.Pitching
@@ -8,13 +9,15 @@ public class BundleConfig
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
- bundles.Add(new ScriptBundle("~/bundles/js").Include(
+ bundles.UseCdn = true;
+
+ bundles.Add(new ScriptBundle("~/bundles/js", ConfigurationManager.AppSettings["SiteUrl"] + "bundles/js").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery-ui-{version}.js",
+ "~/Scripts/kinetic-v5.0.1.min.js",
"~/Scripts/Game.js"));
-
- bundles.Add(new StyleBundle("~/Content/css").Include(
+ bundles.Add(new StyleBundle("~/Content/css", ConfigurationManager.AppSettings["SiteUrl"] + "Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css"));
}
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
+
+namespace Jok.Pitching
+{
+ public static class UrlHelperExtensions
+ {
+ public static string ContentAbsUrl(this UrlHelper url, string relativeContentPath)
+ {
+ Uri contextUri = HttpContext.Current.Request.Url;
+
+ var baseUri = string.Format("{0}://{1}{2}", contextUri.Scheme,
+ contextUri.Host, contextUri.Port == 80 ? string.Empty : ":" + contextUri.Port);
+
+ return string.Format("{0}{1}", baseUri, VirtualPathUtility.ToAbsolute(relativeContentPath));
+ }
+ }
+}
@@ -3,6 +3,15 @@
background: black;
}
+img {
+ border: 0px;
+}
+
+#Container {
+ z-index: 200;
+ position: relative;
+}
+
#Game {
background: black url('/Images/background.jpg') center center no-repeat;
background-size: 100%;
@@ -12,6 +21,7 @@
margin-left: auto;
margin-right: auto;
position: relative;
+ top: 0px;
overflow: hidden;
}
@@ -44,7 +54,7 @@
#Game .balance {
position: absolute;
top: 10px;
- left: 10px;
+ left: 50px;
}
#Game .balance span {
@@ -79,72 +89,15 @@
}
-@-moz-keyframes spin {
- 0% {
- -moz-transform: rotate(0deg);
- }
-
- 100% {
- -moz-transform: rotate(360deg);
- }
-}
-
-@-webkit-keyframes spin {
- 0% {
- -webkit-transform: rotate(0deg);
- }
-
- 100% {
- -webkit-transform: rotate(360deg);
- }
-}
-
-@-moz-keyframes scale_anim {
- 0% {
- -moz-transform: scale(3);
- }
-
- 100% {
- -moz-transform: scale(1);
- }
-}
-
-@-webkit-keyframes scale_anim {
- 0% {
- -webkit-transform: scale(4,4);
- }
-
- 100% {
- -webkit-transform: scale(1,1);
- }
-}
-
-
-@media only screen and (orientation:portrait) {
- #wrapper {
- display: none;
- }
-
- #warning-message {
- display: block;
- }
-}
-
-@media only screen and (orientation:landscape) {
- #warning-message {
- display: none;
- }
-}
-
-
#Menu {
position: fixed;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
background: rgba(0, 0, 0, 0.54);
- z-index: 140;
+ z-index: 300;
+ display: none;
}
#Menu .start {
@@ -13,8 +13,10 @@ public ActionResult Index()
return RedirectToAction("Play");
}
- public ActionResult Play()
+ public ActionResult Play(string deviceid)
{
+ ViewBag.DeviceID = deviceid;
+
return View();
}
}
@@ -114,6 +114,7 @@
<Compile Include="App_Start\BundleConfig.cs" />
<Compile Include="App_Start\FilterConfig.cs" />
<Compile Include="App_Start\RouteConfig.cs" />
+ <Compile Include="Common\Extensions.cs" />
<Compile Include="Controllers\HomeController.cs" />
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
@@ -156,6 +157,7 @@
<Content Include="Scripts\Game.js" />
<Content Include="Scripts\jquery-1.10.2.js" />
<Content Include="Scripts\jquery-1.10.2.min.js" />
+ <Content Include="Scripts\kinetic-v5.0.1.min.js" />
<Content Include="Scripts\modernizr-2.6.2.js" />
<Content Include="Scripts\respond.js" />
<Content Include="Scripts\respond.min.js" />
Oops, something went wrong.

0 comments on commit 8e13d6f

Please sign in to comment.