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() }
if ($.browser.msie) {
$("html").addClass("msie")
}
else {
$("html").addClass("notmsie")
}
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)
}
FastClick.attach(document.body)
window.environment && window.environment.init()
animate()
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 = $("