AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
![]() ![]() SetAttachmentTexture(skeleton.FindSlotIndex("hammer"), "hammer", "hammer/" + SwungWeaponComponent. Spine.AtlasRegion region = textureAtlas.FindRegion(attachmentTexture.Replace("\\", "/")) Īttachment.SetUVs(region.u, region.v, region.u2, region.v2, region.rotate) Īttachment.SetUVs(region.u2, region.v, region.u, region.v2, region.rotate) Īttachment.RegionOffsetX = region.offsetX Īttachment.RegionOffsetY = region.offsetY Īttachment.RegionOriginalWidth = region.originalWidth Īttachment.RegionOriginalHeight = region.originalHeight Īttachment.Height = attachment.RegionOriginalHeight Īttachment.Width = attachment.RegionOriginalWidth We look at two methods of doing this, using. If the texture has many images, then it's an atlas and you will need to get that region and make an individual texture from that using Pixmap. In this part of the ongoing LibGDX tutorial series, we look at how to perform sprite based animations in LibGDX. Inspired from AtlasAttachmentLoader.cs:NewAttachment TextureAtlas at new TextureAtlas (a new file pack.json to the folder and put:.Add a new file texpacker.bat to the folder and put:.Download libgdx texpacker.jar and put it into the folder.Put all the raw spine images (not the spine exported images) AND the images you will swap in into a folder together.This uses an older version of the spine libraries so Iâm not sure if it still works but it should be similar. This will tell TexturePacker to duplicate the pixels on the edge which will get rid of the sprite/alpha bleed. png files and then you can swap them out in code. In TexturePacker make sure you have PaddingX and PaddingY set to 2 or higher and put a check mark on the Duplicate padding. Reduce overdraw, vertex count and draw calls. I couldnât figure out how to use any images that arenât in the spine export pngâs and atlas so I use the libgdx texture packer to replace the. We currently have these 49 tutorials tagged with texturepacker: Boosting Unity Game Performance: Sprite Sheet Optimization Free Tutorial: Create optmized sprite sheets for you Unity game. ![]()
0 Comments
Read More
Leave a Reply. |