|
@ -32,7 +32,7 @@ function createLight() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
class World { |
|
|
class World { |
|
|
constructor(container) { |
|
|
constructor(container, vue) { |
|
|
this.update = this.update.bind(this); |
|
|
this.update = this.update.bind(this); |
|
|
|
|
|
|
|
|
// Instances of camera, scene, and renderer
|
|
|
// Instances of camera, scene, and renderer
|
|
@ -72,7 +72,7 @@ class World { |
|
|
|
|
|
|
|
|
this.scene.add(light, terrain); |
|
|
this.scene.add(light, terrain); |
|
|
|
|
|
|
|
|
this.loadClaims(); |
|
|
this.loadClaims(vue); |
|
|
|
|
|
|
|
|
requestAnimationFrame(this.update); |
|
|
requestAnimationFrame(this.update); |
|
|
|
|
|
|
|
@ -95,7 +95,7 @@ class World { |
|
|
requestAnimationFrame(this.update); |
|
|
requestAnimationFrame(this.update); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
async loadClaims() { |
|
|
async loadClaims(vue) { |
|
|
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER; |
|
|
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER; |
|
|
try { |
|
|
try { |
|
|
const url = |
|
|
const url = |
|
@ -191,21 +191,21 @@ class World { |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
console.log( |
|
|
console.log( |
|
|
"Got bad response status & data of", |
|
|
"Got bad server response status & data of", |
|
|
resp.status, |
|
|
resp.status, |
|
|
resp.data |
|
|
resp.data |
|
|
); |
|
|
); |
|
|
// this.alertTitle = "Error With Server";
|
|
|
vue.setAlert( |
|
|
// this.alertMessage =
|
|
|
"Error With Server", |
|
|
// "Got an error retrieving your given time from the server.";
|
|
|
"There was an error retrieving your claims from the server." |
|
|
// this.isAlertVisible = true;
|
|
|
); |
|
|
} |
|
|
} |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.log("Got error of", error); |
|
|
console.log("Got exception contacting server:", error); |
|
|
// this.alertTitle = "Error With Server";
|
|
|
vue.setAlert( |
|
|
// this.alertMessage =
|
|
|
"Error With Server", |
|
|
// "Got an error retrieving your given time from the server.";
|
|
|
"There was a problem retrieving your claims from the server." |
|
|
// this.isAlertVisible = true;
|
|
|
); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|