Jump to content

One spritesheet vs frame files for PIXI.extras.MovieClip?


p1100i
 Share

Recommended Posts

I kinda like the concept, to have one spritesheet file for my whole animation. However I've found in most of the PIXI related animation tutorials the use of loading all the frames as separate files.

 

Is it a bad practice from performance standpoints to use a PIXI Rectangle over the same texture to have the frames?

 

I'm just curious about the performance when the animation plays. The initial load is ofc better w/ this solution, but if this causes worse animation times than I need to change it, so my code:

createFrame = function createFrame(texture, offset, size) {  return new PIXI.Texture(texture, new PIXI.Rectangle(offset.x, offset.y, size.x, size.y));}animation = new PIXI.extras.MovieClip([  createFrame(texture, ...),  createFrame(texture, ...),  ...]);
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...