Liquid layout correspondence of canvas that was generated by the Toolkit for Create.js
Getting start Create.js http://www.adobe.com/jp/devnet/createjs/articles/getting-started.html
↑demo
Ex) <script src="create.js"></script>
(function (lib, img, cjs, ss) {
var p; // shortcut to reference prototypes
// library properties:
lib.properties = {
width: 640,
height: 810,
fps: 60,
color: "#FFFFFF",
manifest: [
{src: url + "/bg01.jpg", id:"bg01"},
{src: url + "/bg02.jpg", id:"bg02"},
]
};
.
.
.
// symbols:
// RATIO
var MOVIEWRAP_RATIO = BASESTAGE_WIDTH/BASESTAGE_HEIGHT,
MOVIEWRAP_RATIO_MATH = Math.round(MOVIEWRAP_RATIO * 100),
nowRatio = Math.round($wWidth / $wHeight * 100);
Code is released under the MIT license.
http://opensource.org/licenses/mit-license.php