texturepacker

Split parameter in a texture atlas file?

纵饮孤独 提交于 2020-01-15 08:00:27
问题 How exactly works the split parameter in a skin.atlas file. Libgdx texture packer creates these from 9-patches I believe. I need to manually add these sometimes (when using the texturepacker in the linked tag or when manually inserting/editing a texture) and cant seem to figure it out how they exactly work. Sometimes a single pixel makes my elements disappear or does not fill the split. Here is a example files: roundtext138.png format: RGBA8888 filter: Nearest,Nearest repeat: none button

glError 0x0501 when loading a large texture with OpenGL ES on the iPhone4

青春壹個敷衍的年華 提交于 2020-01-03 02:31:18
问题 I got this error when I try to load a PVR image on device. It works in iPhone 5s, 5, 4s and iPad well, but in 4 it doesn't work. My PVR image size is: width = 4096 and height = 2048 . Cocos2d: cocos2d: TexturePVR: Error uploading compressed texture level: 0 . glError: 0x0501 Cocos2d: cocos2d: Couldn't load PVR image /var/mobile/Applications/7CF6C347-8B63-4C1E-857A-41F48C8ACBEF/Race.app/Images/BackGround/bg1.pvr.ccz Cocos2d: cocos2d: Couldn't add PVRImage:Images/BackGround/bg1.pvr.ccz in

在Fedora 20下使用TexturePacker

你。 提交于 2019-12-28 03:39:18
TexturePacker应该是最流行的图片合并工具吧,它把多个小图组合成一个大图,以减少网络请求次数,还有利于内存的充分利用。在游戏开发和网页开发时经常会用到它,CanTK( https://github.com/drawapp8/cantk )是HTML5游戏和APP开发的利器,当然也支持TexturePacker生成的格式。但是我使用的Fedora系统,而TexturePacker却没有提供RPM安装包。我想程序本身是可以在Fedora下运行的,只是不能直接安装罢了。所以花了点时间去弄它,运气还不错,很快就搞定了: 1.下载安装包:https://www.codeandweb.com/download/texturepacker/3.6.0/TexturePacker-3.6.0-ubuntu64.deb 2.解开deb文件 [lixianjing@lixianjing texturepacker]$ ar x TexturePacker-3.6.0-ubuntu64.deb [lixianjing@lixianjing texturepacker]$ ls -l 总用量 37192 -rw-r--r--. 1 lixianjing lixianjing 4309 2月 14 17:50 control.tar.gz -rw-r--r--. 1 lixianjing

TmxMapLoader to use packed tileset

十年热恋 提交于 2019-12-24 16:34:12
问题 In the old libgdx map api, they used to have map = TiledLoader.createMap(Gdx.files.internal("maps/testmap.tmx")); atlas = new TileAtlas(map, Gdx.files.internal("maps")); tileMapRenderer = new TileMapRenderer(map, atlas, 8, 8); However in the new libgdx the rule changes, to load a tilemap there is no longer needed to use map packer first. You can directly use the .tmx file with the tileset png. Something like following will work, and then call render. TiledMap map = new TmxMapLoader().load(

Load Animation with Texture Packer in andengine

纵饮孤独 提交于 2019-12-23 12:07:35
问题 I use Texture Packer. I have .pvr.ccz file there are 10 frames. I need to create an AnimatedSprite with this animation, but TexturePacker extension return only TextureRegion files. How I can create TiledTextureRegion from this file? 回答1: public TiledTextureRegion getTiledTextureFromPack(String name) { TexturePackTextureRegionLibrary packer; TexturePack spritesheetTexturePack; try { spritesheetTexturePack = new TexturePackLoader(game.getTextureManager(), "packs/") .loadFromAsset(game.getAssets

Custom texture dimensions using TexturePacker and Cocos2D

帅比萌擦擦* 提交于 2019-12-12 04:37:31
问题 When I switched from POT to any size in TexturePacker, per this question, Cocos2D starting throwing this warning: cocos2d: WARNING. Current texture size=(1613,2047). Convert it to size=(1614,2047) in order to save memory cocos2d: WARNING: File: units_black-hd.pvr.ccz cocos2d: WARNING: For further info visit: http://www.cocos2d-iphone.org/forum/topic/31092 I cannot figure out how to explicitly set a texture size in TexturePacker so that it meets these constraints. POT fixes it, of course, but

Texture packing animation images/Sprite sheets efficiently-Libgdx

僤鯓⒐⒋嵵緔 提交于 2019-12-12 04:32:13
问题 For my LibGdx project,I have assets including single images and sprite sheets for animation.I know it is efficient to pack everything in to a single atlas. But when it comes to sprite sheets,how can I pack it?Do I have to use a single sprite sheet or single images of a sprite sheet while packing? Eg:I have a sprite sheet named 'snake' with 4 frames. also I have snake frames in snake_01,snake_02,snake_03 and snake_04. Which one is the better way? 回答1: The second way is much less time consuming

Fit elements into box

走远了吗. 提交于 2019-12-11 20:51:07
问题 I want to achieve the effect shown in the images attached. Given certain items, fit them into a shape (box or something else), with the option to resize the items or not. I know there has to be some algorithm related, but I don't know where to start looking. Any keyword , wikipedia article, or pdf will be welcome. 回答1: The problem, as NKamrath pointed out, was Bin packing problem , but more commonly refered to Texture Packing . Here are the resources I gathered: http://en.wikipedia.org/wiki

Texture from texturepacker in LibGDX

淺唱寂寞╮ 提交于 2019-12-09 06:44:57
问题 Trying get my head around the texture wrapper in (the awesome) LibGDX framework and I need help. I would like to bind a texture (according to Mesh, Color & Texture) that is extracted from a TextureAtlas packed with the TexturePacker. The texture is binding to a rectangular mesh. I want the texture (instance of Texture) to basically be extracted from a packed file. Is it doable to use a the createsprite or findregion methods and somehow skip the filehandle step? Additionally: Anything special