Jump to content

Update arc


kazoo
 Share

Recommended Posts

Hi is it possible to update one of the properties of the arc, in the RequestAnimationFrame draw function. So I would like to update the endAngle of the arc, so that after each frame it looks like the arc is extending, getting longer.

Link to comment
Share on other sites

OK, understood, thanks. But here's a scenario. I have a primitive that is draggable, and after firing ondragmove, I call the renderer to redraw the stage, since I need a smooth drag. I don't use requestanimationframe draw loop btw, since I don't need it. But the question is, is redrawing the stage after each ondragmove execution too much? Also in there I wanted to put an update to the arc, but as you said it's a polygon and not possible to do that. So I would need to clear the graphics and then redraw it after each ondragmove, is that also too much of a performance impact, to clear and redraw so often, since obviously ondragmove is gonna get called a lot? Thanks.

Link to comment
Share on other sites

I tried using clear(), but it makes a weird result. So I have a new graphics object. I create an arc out of it, then I clear that graphic object and then just call lineStyle and arc again. But instead of drawing another normal arc, I get a weird shape like broken glass all over the canvas, where the arc is supposed to be, so what is all this about?

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...