ne créé un sketch p5 que dans le contexte du browser
This commit is contained in:
parent
4048f92fa4
commit
bfef54523e
|
@ -7,7 +7,9 @@
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.p5Instance = new p5(this.sketch, this.$refs.canvasContainer);
|
if (process.client) {
|
||||||
|
this.p5Instance = new p5(this.sketch, this.$refs.canvasContainer);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (this.p5Instance) {
|
if (this.p5Instance) {
|
||||||
|
|
Loading…
Reference in New Issue