Projects > cpp > Issues > Docs #2784

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

Add js-binding and lua-binding document

Docs #2784 [Closed]
zhangxm 2013-09-10 01:33 . Updated over 11 years ago
samuele3hu 2013-09-13 06:26

For the constructor bound to js,add comments like these at the end of comment:
/***
** `js ctor
/
For the functions not bound in js or lua(the destructor always not bound),add comments like these at the end of comment:
/
*

  • js NA \*lua NA / For the rename functions in js or lua,add comments like these at the end of comment: /*
  • `js renamefunction * @lua renamefunction */

At the same time,add some deprecated functions instead of another functions:
Sprite::isFlipX instead of Sprite::isFlippedX
Sprite::isFlipY instead of Sprite::isFlippedY
camera::getEyeXYZ instead of camera::getEye
camera::getCenterXYZ instead of camera::getCenter
camera::getUpXYZ instead of camera::getUp
camera::setUpXYZ instead of camera::setUp
camera::setEyeXYZ instead of camera::setEye
camera::setCenterXYZ instead of camera::setCenter
Animation: addSpriteFrameWithFileName instead of Animation::addSpriteFrameWithFile
AnimationCache:animationByName instead of Animation::getAnimation
AnimationCache:animationByName::removeAnimationByName instead of removeAnimation
GLProgram::fragmentShaderLog instead of GLProgram::getFragmentShaderLog
GLProgram::programLog instead of GLProgram::getProgramLog
ShaderCache::programForKey instead of ShaderCache::getProgram

samuele3hu 2013-09-13 06:33

For the constructor bound to js,add comments like these at the end of comment:

/**
* @js ctor
*/

For the functions not bound in js or lua(the destructor always not bound),add comments like these at the end of comment:

/**
* @js NA
* @lua NA
*/

For the rename functions in js or lua,add comments like these at the end of comment:

/**
* @js renamefunction
* @lua renamefunction
*/

At the same time,add some deprecated functions instead of another functions:
Sprite::isFlipX instead of Sprite::isFlippedX
Sprite::isFlipY instead of Sprite::isFlippedY
camera::getEyeXYZ instead of camera::getEye
camera::getCenterXYZ instead of camera::getCenter
camera::getUpXYZ instead of camera::getUp
camera::setUpXYZ instead of camera::setUp
camera::setEyeXYZ instead of camera::setEye
camera::setCenterXYZ instead of camera::setCenter
Animation: addSpriteFrameWithFileName instead of Animation::addSpriteFrameWithFile
AnimationCache:animationByName instead of Animation::getAnimation
AnimationCache:animationByName::removeAnimationByName instead of removeAnimation
GLProgram::fragmentShaderLog instead of GLProgram::getFragmentShaderLog
GLProgram::programLog instead of GLProgram::getProgramLog
ShaderCache::programForKey instead of ShaderCache::getProgram

zhangxm 2013-09-23 08:05
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Atom PDF

Status:Closed
Start date:2013-09-10
Priority:Normal
Due date:
Assignee:samuele3hu
% Done:

100%

Category:js, lua
Target version:3.0-alpha0