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.
" +
"Please use Chrome or Safari or Firefox."
var $fallback = $("