forked from jsnbuchanan/crowd-funder-for-time-pwa
Fix for missing scene-container
This commit is contained in:
@@ -80,6 +80,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<button class="float-right" @click="captureGraphics()">Screenshot</button>
|
||||
<div id="scene-container" class="h-screen"></div>
|
||||
<AlertMessage
|
||||
:alertTitle="alertTitle"
|
||||
:alertMessage="alertMessage"
|
||||
@@ -98,17 +99,22 @@ interface WorldProperties {
|
||||
endTime?: string;
|
||||
}
|
||||
|
||||
@Component({ components: { AlertMessage } })
|
||||
@Component({ components: { AlertMessage, World } })
|
||||
export default class StatisticsView extends Vue {
|
||||
world: World;
|
||||
worldProperties: WorldProperties = {};
|
||||
|
||||
// 'mounted' hook runs after initial render
|
||||
mounted() {
|
||||
const container = document.querySelector("#scene-container");
|
||||
const newWorld = new World(container, this);
|
||||
newWorld.start();
|
||||
this.world = newWorld;
|
||||
try {
|
||||
const container = document.querySelector("#scene-container");
|
||||
console.log(container);
|
||||
const newWorld = new World(container, this);
|
||||
newWorld.start();
|
||||
this.world = newWorld;
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
|
||||
public captureGraphics() {
|
||||
|
||||
Reference in New Issue
Block a user