//Based on the app.js of Phil Nash and AR js by Jerome Etienne