[英]Change movement point of a shape in EaselJS
您可以從中心繪制形狀,也可以設置regX
和regY
。
// Draw from center
var s = new createjs.Shape();
s.graphics.beginFill("black").drawRect(-50,-50,100,100);
// Set registration point
var s = new createjs.Shape();
s.graphics.beginFill("black").drawRect(0,0,100,100);
s.regX = s.regY = 50; // Set the registration to half the width & height
希望能有所幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.