Created
April 24, 2020 20:22
-
-
Save leochocolat/7bf904cc1318ecd5e9a504c499804d46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<canvas class="three-canvas"></canvas> | |
</template> | |
<script> | |
import ThreeCanvasComponent from '~/assets/javascript/components/ThreeCanvasComponent'; | |
export default { | |
props: { | |
}, | |
components: { | |
}, | |
methods: { | |
setup() { | |
this.threeScene = new ThreeCanvasComponent({ el: this.$el }); | |
} | |
}, | |
mounted() { | |
this.setup() | |
}, | |
beforeDestroy() { | |
this.threeScene.destroy() | |
} | |
} | |
</script> | |
<style> | |
canvas { | |
position: fixed; | |
left: 0; | |
top: 0; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment