Sign in to follow this  

How can i control TexturePack with rotation

Recommended Posts

hi.  anwser is late.. sorry..



yes's wrong...


20 pixels were trimmed from above.. you right. but it's looks not 20 pixel..


this is right image when all trimmed image drawn




second and third don't have empty pixel..

but in this case it's not...!




Share this post

Link to post
Share on other sites

Trim and rotation are working! Build latest pixi from github dev branch. This thing will work: 

var atlas = assets.animation.spineAtlas;
var textures = {};
for (var i=0; i<atlas.regions.length; i++) {
    var region = atlas.regions;
    var baseTexture =;
    var frame = new PIXI.Rectangle(region.x, region.y, region.width, region.height);
    var crop = frame.clone();
    var trim = new PIXI.Rectangle(region.offsetX, region.originalHeight - region.height - region.offsetY, region.originalWidth, region.originalHeight);
    textures[] = new PIXI.Texture(baseTexture, frame, crop, trim, region.rotate?6:0));

You can mark that as solution on this topic.

Share this post

Link to post
Share on other sites

thx ivan.. always.. ^^/

Awesome.. 3.0.9 has your rotating system?

maybe it is  D4...

Is it good on canvas and webgl with pixi spine atlas when i set region.rotate to 6?

because i'm using own system to draw normal image 

if it is right i will update to new viersion. i;m using 3.0.8 now..

ps. 3.0.9 is a little bit slow than 3.0.8. i don't know correctly reason.. but i tested with my game and  example that only draw a lot of spine on scree




Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.