All Projects → splhack → Hello-LWF-Cocos2d-x

splhack / Hello-LWF-Cocos2d-x

Licence: other
Hello LWF for C++ with Cocos2d-x renderer

Programming Languages

C++
36643 projects - #6 most used programming language
objective c
16641 projects - #2 most used programming language
c
50402 projects - #5 most used programming language
java
68154 projects - #9 most used programming language
Objective-C++
1391 projects
CMake
9771 projects

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].