Hello LWF for C++ with Cocos2d-x renderer
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Classes
Resources Merge branch 'cocos2d-x' May 5, 2015
cocos2d
lwf Sync with LWF Jul 17, 2015
proj.android
proj.ios_mac Merge branch 'cocos2d-x' May 5, 2015
proj.win32
.cocos-project.json Cocos2d-x 3.0 May 20, 2014
.gitignore
README.md Update README.md Jul 18, 2014

README.md

Hello-LWF-Cocos2d-x

An example of LWF for C++ with Cocos2d-x renderer.

What is LWF?

LWF http://gree.github.io/lwf/

LWF is an animation engine which can play animation data converted from FLASH contents in HTML5, Unity, Cocos2d-x, iOS UIKit, and more. LWF is designed to make game development easy and fun.

It means that LWF allows you to make animation using Adobe Flash for your Cocos2d-x Application.

The example

You'll see a Flash movie which is embedded on Cocos2d-x.

You can change LWF data in Classes/HelloWorldScene.cpp

//const char *path = "sample3_max_optimized/sample3_max_optimized.lwf";
const char *path = "mask/mask.lwf";

(This example animation is also available on HTML5 http://gree.github.io/lwf-demo/html5/lwf-loader/sample3.html)

How to use Adobe Flash for making animation

Please take a look at LWF Presentation and LWF Production Guide.

Install LWFS https://github.com/gree/lwfs to convert Adobe Flash data into LWF data. It automatically converts in ~/Desktop/LWFS_work folder and shows the data on Web browser.

Notice

This project does not use any texture atlas and batch node. It means that this project is not intended to show the rendering performance using LWF on Cocos2d-x.

How to use LWFNode with SpriteBatchNode

LWFNode *lwfNode = LWFNode::create("sample.lwf");
SpriteBatchNode *batch = SpriteBatchNode::createWithTexture(lwfNode->getTexture());
batch->addChild(lwfNode);
this->addChild(batch);

sample.lwf should be converted with one texture atlas.