Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以使透明矩形可点击?我不想填充它,所以它看起来像
shape.graphics.setStrokeStyle(2).beginStroke("#000").rect(0, 0, 100, 100)
这是我如何做到的代码:
var shape = new createjs.Shape(); shape.graphics.setStrokeStyle(2).beginStroke("#000").rect(0, 0, 100, 100); var hit = new createjs.Shape(); hit.graphics.beginFill("#000").rect(0, 0, 100, 100); shape.hitArea = hit;