summaryrefslogtreecommitdiff
path: root/site/public/javascripts/app.js
diff options
context:
space:
mode:
authorJulie Lala <jules@okfoc.us>2015-04-09 06:02:55 -0400
committerJulie Lala <jules@okfoc.us>2015-04-09 06:02:55 -0400
commit36da66908e8b124c4846a82ad4ccc2d1749e0b15 (patch)
tree0b46b2b9e18f1155d0474cafa23d76c2b8046df6 /site/public/javascripts/app.js
parentc65de768ccd5111567732854ca4ce50dbeebd6ea (diff)
moving assets
Diffstat (limited to 'site/public/javascripts/app.js')
-rw-r--r--site/public/javascripts/app.js90
1 files changed, 0 insertions, 90 deletions
diff --git a/site/public/javascripts/app.js b/site/public/javascripts/app.js
deleted file mode 100644
index dd68726..0000000
--- a/site/public/javascripts/app.js
+++ /dev/null
@@ -1,90 +0,0 @@
-
-if (is_mobile) {
- $("html").addClass("mobile")
-}
-else {
- $("html").addClass("desktop")
-}
-
-
-var scene, cam, map;
-
-var app = new function(){}
-
-app.mode = { editor: false, builder: false }
-
-app.init = function () {
- app.launch()
-}
-
-app.launch = function () {
- if ($.browser.msie || ! has3d()) { return app.fallback() }
-
- scene = new MX.Scene().addTo('#scene')
-
- $(window).resize(app.resize)
- app.resize()
-
- cam = scene.camera
-
- var last_t = 0
- function animate (t) {
- var dt = t - last_t
- last_t = t
- requestAnimationFrame(animate)
- environment.update(t)
- // app.movements.update(dt || 0)
- }
-
- var loader = new Loader(function(){
- $("#loader").hide()
- window.environment && window.environment.init()
- animate()
- })
-
- // loader.preloadImages([])
- loader.ready()
-
- window.scrollTo(0,0)
-}
-
-app.resize = function () {
- scene.width = window.innerWidth
- scene.height = window.innerHeight
- scene.perspective = min(window.innerWidth, scene.height)
- scene.update()
-}
-
-app.fallback = function(){
- app.unsupported = true
- var msg = "Sorry, your browser is not supported.<br><br>" +
- "Please use <a href='http://chrome.com/'>Chrome</a> or <a href='https://www.apple.com/safari/'>Safari</a> or <a href='http://getfirefox.com/'>Firefox</a>."
- var $fallback = $("<div>")
- $fallback.attr('id', 'fallback')
- $fallback.html(msg)
- $('body').append($fallback)
-}
-
-app.on = function(){
- app.tube.on.apply(app.tube, arguments)
-}
-
-app.off = function(){
- app.tube.off.apply(app.tube, arguments)
-}
-
-app.position = function(obj){
- var pos = {
- x: obj.x,
- y: obj.y,
- z: obj.z,
- rotationX: obj.rotationX,
- rotationY: obj.rotationY
- }
- if (obj.scale !== 1) {
- pos.scale = obj.scale
- }
- return pos
-}
-
-document.addEventListener('DOMContentLoaded', app.init)