CreateJS / EaselJS

The Easel Javascript library provides a full, hierarchical display list, a core interaction model, and helper classes to make working with the HTML5 Canvas element much easier.
http://createjs.com/
MIT License
8.13k stars 1.97k forks source link

Scaling Easel JS stage responsively #733

Open smks opened 8 years ago

smks commented 8 years ago

I see all over the place snippets on how to resize the canvas. The problem is this doesn't resize all the display objects contained inside it. There should be a scale mode available for createjs! Like this http://haxeflixel.com/demos/ScaleModes/

Can someone shed some light on a solution to this?

Thank you, Shaun.

derz commented 8 years ago

You can use the scaleX & scaleY properties on a Container (or Stage), as you can see in the docs: http://www.createjs.com/docs/easeljs/classes/Stage.html

lannymcnie commented 7 years ago

@derz approach is probably the best solution. A built-in solution is unlikely, but a utility class could be useful. Leaving this open since that might be an easy win for /extras.