Jump to content

Animate BitmapData


veryafe
 Share

Recommended Posts

Im trying to generate different characters by combining multiple sprite sheets.

One combination might be: green body + pink shirt + hat.

 

I have created a BitmapData object with my combined sprites but have not found a way to animate it.

 

Is there any support for this today? Or do I approach this the wrong way?

 

 

Link to comment
Share on other sites

You should use a Group for this really. A BitmapData is like a blank canvas you can perform drawing operations on, it's not for animation.

 

Please, help me make it work:

 

var btmDrw = game.add.bitmapData(100, 100);
    btmDrw.beginFill(0xFF0000);
    btmDrw.beginPath();
    btmDrw.moveTo(200, 200);
    btmDrw.lineTo(300, 300);
    btmDrw.stroke();
 
why line is not appears?
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...