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

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.

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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.