Closed prnxdev closed 4 years ago
Thanks for the report!
I'll update the package soon™, but in the meantime you might be able to achieve the same effect using document.addEventListener
. Something like this should work:
new Vue({
el: '#app',
methods: {
setup(sketch) {
sketch.background('green');
sketch.text('Hello p5!', 20, 20);
document.addEventListener('resize', () => {
sketch.resizeCanvas(window.innerWidth, window.innerHeight);
});
}
}
});
Dope. Thanks :)
I'll keep this issue open until I get around to actually fixing it :)
Just released vue-p5@0.8.0-rc1
. It supports windowResized
and also allows registering new events in case there are others I missed.
When I defined windowResized method it doesn't work. I can't make responsive canvas.