window.addEventListener('resize', resize, false);
init() {
createjs.Ticker.addEventListener('tick', handleTick);
resize();
}
function handleTick(event) {
stage.update();
}
function resize() {
stage.canvas.width = window.innerWidth;
stage.canvas.height = window.innerHeight;
}
--
You received this message because you are subscribed to the Google Groups "CreateJS Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to createjs-discus...@googlegroups.com.
To post to this group, send email to createjs-...@googlegroups.com.
Visit this group at https://groups.google.com/group/createjs-discussion.
For more options, visit https://groups.google.com/d/optout.
Have you created a stage?
On Thu, Dec 24, 2015 at 10:22 PM, Oren Shvalb <oren....@gmail.com> wrote:
Hi guys,I've read some articles about resizing the canvas , but non of them worked for me...Can some one direct me how to do it right with EaselJS?My best attempt was this:
window.addEventListener('resize', resize, false);
init() {
createjs.Ticker.addEventListener('tick', handleTick);
resize();
}
function handleTick(event) {
stage.update();
}
function resize() {
stage.canvas.width = window.innerWidth;
stage.canvas.height = window.innerHeight;
}
Any ideas?
--
You received this message because you are subscribed to the Google Groups "CreateJS Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to createjs-discussion+unsub...@googlegroups.com.
To post to this group, send email to createjs-...@googlegroups.com.
Visit this group at https://groups.google.com/group/createjs-discussion.
For more options, visit https://groups.google.com/d/optout.