html5gamedev Posted April 4, 2017 Share Posted April 4, 2017 function setupFrames(startName,endName){ var frames = []; for (var i = 0; i < 21; i++) { var val = i < 10 ? '0' + i : i; frames.push(PIXI.Texture.fromFrame(startName + val + '.png')); } for (var i = 21; i < 40; i++) { var val = i; frames.push(PIXI.Texture.fromFrame(endName + val + '.png')); } return frames; } //used with var anim = new PIXI.extras.AnimatedSprite(setupFrames("rot1","rot2")); anim.animationSpeed = 0.5; stage.addChild(anim); anim.play(); I am trying to create an animation from 2 texture atlases. The problem I am facing is a glitch-a freeze in the middle, when I switch from startName to endName texture. I want to switch between texture atlases, because my textures are quite big, and if I wanted to place all in 1 atlas, it's size would be 20000x20000 px, which is not supported even by desktop machines. Are there any tricks I can use to eliminate that glitch? Thanks, Tim Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 4, 2017 Share Posted April 4, 2017 Yeah. we had that discussion about "prepare" plugin, https://github.com/pixijs/pixi.js/pull/3830 https://github.com/pixijs/pixi.js/pull/3829 html5gamedev 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.