Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
[B! programming][@AS3][math] proto_jpのブックマーク
[go: Go Back, main page]

タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

programmingと@AS3とmathに関するproto_jpのブックマーク (1)

  • getBounds + Matrixで、もう基準点にはこだわらない。 | _level0 - KAYAC Front Engineer Blog

    最近、getBoundsの存在と、Matrxの便利さにようやく気づきました。 基準点と違う場所を基準にオブジェクトを変形したい場面に遭遇して、 widthやheight、rotationにsin,cosまで持ち出して悩んでたんですが getBounds + Matrixを使うことでさくっと簡単にできちゃうんですね。 手順は (1).Matrix.translate でオブジェクトを移動して、基準点を変えて (2).Matrix.scale,Matrix.rotateでオブジェクトに任意の変形を加えて (3).Matrix.translate でオブジェクトを元の位置に移動してあげる の3STEP。 ここで、基準点を変えるときに役に立つのがgetBounds。 getBoundsは表示オブジェクトの領域を、矩形(Rectangle)で返してくれるメソッドで、 基準点の位置や、オブジェクトの変

    getBounds + Matrixで、もう基準点にはこだわらない。 | _level0 - KAYAC Front Engineer Blog
  • 1