среда, 26 октября 2011 г.

TexturePacker 2.4.0 available

This is a really big fat update for TexturePacker. I packed 25 new features inside it!
What do you get in detail?

Flash importer

Simply drag your flash files (.swf) onto TexturePacker and it extracts the images and builds a sprite sheet from them! Requires installed Flash Player Plugin.
This feature works on Windows & MacOS – Linux is currently not working well.

.pvr and .pvr.ccz QuickLook plugin on MacOS

No need to open TexturePacker to view your .pvr and .pvr.ccz files anymore. TexturePacker now contains a QuickView plugin so you can view the files right from finder!

Save defaults

Many people requested a way to save the default settings so that they don’t have to set exporter and other stuff on restarting. – Here it is! (Pro only)

Ubuntu support

Since many users build for Android I also added support for Linux – currently Ubuntu 10.x. It might still have some quirks (e.g. Flash does not yet work) but is a good start. I decided to build on Ubuntu since it seem to be the most used platform.

New Exporters

I also added a ton of new exporters such as

User interface improvements

I also added a lot of interface improvements to make work with TexturePacker easier.
  • New layout of the left side panel allowing easier change of exporter
  • Auto update sprite sheet when re-entering TexturePacker
  • Sprite highlighting
  • Reveal in Finder / Explorer
  • Preferences to change checkerboard color and hightlight color
  • New icons
  • Hotkeys
  • Backspace / delete to remove sprites
  • Dialog to select the Flash Player plugin to use
  • Drag your sprites here – to give new users a faster start
  • Allowing free choice of texture data file name
  • Fit button for zoom
  • Folders inside a smart folder are now blue
  • Auto populate file names from other names e.g. save blah.tps also sets blah.png and blah.plist
  •  

Image features

Here are some new image export features. Main function is support for flipped PVRs and RGB888 as output format.
  • Option to use flipped PVR files
  • Support for RGB888
  • Unflip flipped pvrs in viewer
  • Allow free size for PVR textures (might not work on all targets)
  •  

Other stuff

  • Rotation support for AndEngine
  • Default padding is now 2 – This effects the command line client!
  • Corona exporter uses better module concept (http://blog.anscamobile.com/ 2011/09/a-better-approach-to-external-modules/)

A more detailed blog post is available here:
http://www.texturepacker.com/texturepacker/big-fat-texturepacker-2-4-0-update/

четверг, 24 марта 2011 г.

Установка и настройка WebSockets Server на PhpDaemon в Ubuntu

Тестировалось на Ubuntu 10.10.

1. Загружаем последнюю версию phpDaemon из https://github.com/kakserpom/phpdaemon и распаковываем в удобную для вас директорию. Я распаковывал в /var/www/phpdaemon.

2.  Устанавливаем PEAR.
sudo apt-get install php-pear

3. Устанавливаем php5 и php5-dev для компилирования расширений php из pecl.
sudo apt-get install php5 php5-dev

4. Устанавливаем libevent.
pecl install libevent

Если ругнётся и выведет урл channel://..., то устанавливаем из канала:
pecl install channel://...

5. Устанавливаем proctitle.

pecl install proctitle

6. Прописываем расширения в /etc/php5/cli/php.ini

extension=libevent.so
extension=proctitle.so

7. Привязываем демона к команде phpd.
sudo ln -s /var/www/phpdaemon/bin/phpdaemon /usr/bin/phpd

8. Настраиваем /etc/phpd/phpd.conf

log-errors  1;
path    /var/www/phpdaemon/conf/AppResolver.php;

WebSocketServer {
  privileged;
}

HTTP {
  listenport 8080;
  path  /var/www/phpdaemon/app-servers/HTTP.php;
  privileged;
}

ExampleWebSocket {
    enable    1;
    path    /var/www/phpdaemon/app-examples/ExampleWebSocket.php;
    listenport    8047;
    user    www;
    group    www;
}

WebSocketOverCOMET {
  enable    1;
}

FlashPolicy {
  enable    1;
  path  /var/www/phpdaemon/app-servers/FlashPolicy.php;
}

9. Запускаем демона sudo phpd start.

При удачном запуске он должен вернуть что-то вроде:

[PHPD] M#6413 IPCManager instantiated.
[PHPD] M#6413 WebSocketServer instantiated.
[PHPD] M#6413 WebSocketServer up.
[PHPD] W#6419 HTTP instantiated.
[PHPD] W#6419 HTTP up.
[PHPD] W#6419 ExampleWebSocket instantiated.
[PHPD] W#6419 ExampleWebSocket up.
[PHPD] W#6417 HTTP instantiated.
[PHPD] W#6417 HTTP up.
[PHPD] W#6418 HTTP instantiated.
[PHPD] HTTP: Couldn't bind TCP-socket '0.0.0.0:8080' (98 - Address already in use).
[PHPD] W#6418 HTTP up.
[PHPD] W#6417 ExampleWebSocket instantiated.
[PHPD] W#6417 ExampleWebSocket up.
[PHPD] W#6419 WebSocketOverCOMET instantiated.
[PHPD] W#6419 WebSocketOverCOMET up.
...

10. Правим /var/www/phpdaemon/clientside-connectors/websocket/index.html

ws: 'ws://' + document.domain + ':8047/exampleApp'

comet: 'http://' + document.domain + ':8080/WebSocketOverCOMET/?_route=exampleApp'

polling: 'http://' + document.domain + ':8080/WebSocketOverCOMET/?_route=exampleApp'

11. Запускаем /var/www/phpdaemon/clientside-connectors/websocket/index.html в браузерах и наслаждаемся WebSockets. В Firefox 3 заработал только флэш эмулятор. Iframe-эмулятор выдавал ошибку "WebSocket not found" и отказывался работать. =(