0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

createjsで点線のアニメーション

Last updated at Posted at 2024-01-05

点線が動いて見えるよう(photoshopとかで選択範囲指定した時みたいな感じの)にしたいな。

shape = new createjs.Shape();
let ofs = 0;
const draw = ()=>{
shape.graphics.setStrokeDash([4,4],ofs);
shape.graphics.beginStroke("#00ff00");
shape.graphics.setStrokeStyle(2,0,0,10,true);
shape.graphics.drawRoundRect(0,0,100,100,10);
shape.graphics.endStroke();
ofs++;
ofs = ofs % 8;
}
draw();
setInterval(draw,250);

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?