-
Notifications
You must be signed in to change notification settings - Fork 105
How to support a new feature of creator
minggo edited this page Feb 5, 2018
·
2 revisions
The workflow of this plugin are:
- find a
xxx.fire
inCREATOR_PROJECT_ROOT/assets
- parse founded .fire file and generate .json file for the corresponding .fire file
- invoke flatbuffer executable to convert generate .json file to .ccreator(flatbuffer binary format)
- modify
CreatorReader
to parse new generated content
The steps to parse new feature are:
- modify Node.guess_type()(Node.js) to support a new type of node
- modify Utils.create_node()(Utils.js) to support new type
- add a new javascript file in
creator-luacpp-support/core/parser
to parse new feature
The steps to convert .json to .ccreator are:
- Modify
creator-luacpp-support/CreatorReader.fbs
to add a new type for new feature. Should add properties that needed when creating cocos2d-x node to support new feature. For example, if want to create a new Sprite, then you many need: texture, blend function and so on. - invoke
creator-cpp-support/bin/flatc|flatc.exe -c creator-luacpp-support/CreatorReader.fbs
to updatecreator-luacpp-support/reader/CreatorReader_generated.h