Merge pull request #506 from nantas/v1.0

add spine skeleton and audiosource tooltip
This commit is contained in:
Wang Nan
2016-03-21 12:20:49 +08:00
9 changed files with 43 additions and 32 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
Cocos2d-html5
Cocos Creator Game Engine
==================
[Cocos2d-html5][1] is a cross-platform 2D game engine written in Javascript, based on [Cocos2d-X][2] and licensed under MIT.
+3 -3
View File
@@ -119,12 +119,12 @@ cc.ActionInterval = cc.FiniteTimeAction.extend({
/**
* Implementation of ease motion.
*
* @method easing
* @param {Object} easeObj
* @returns {ActionInterval}
* @example
* //example
* action.easeing(cc.easeIn(3.0));
* @param {Object} easeObj
* @returns {ActionInterval}
*/
easing: function (easeObj) {
if (this._easeList)
+3 -3
View File
@@ -599,7 +599,7 @@ JS.mixin(cc.Audio.prototype, {
/**
* Pause playing sound effect.
* @method pauseEffect
* @param {Number} cc.Audio The return value of function playEffect.
* @param {Number} audio - The return value of function playEffect.
* @example
* //example
* cc.audioEngine.pauseEffect(audioID);
@@ -632,7 +632,7 @@ JS.mixin(cc.Audio.prototype, {
/**
* Resume playing sound effect.
* @method resumeEffect
* @param {Number} cc.Audio The return value of function playEffect.
* @param {Number} audioID - The return value of function playEffect.
* @audioID
* //example
* cc.audioEngine.resumeEffect(audioID);
@@ -662,7 +662,7 @@ JS.mixin(cc.Audio.prototype, {
/**
* Stop playing sound effect.
* @method stopEffect
* @param {Number} cc.Audio The return value of function playEffect.
* @param {Number} audioID - The return value of function playEffect.
* @example
* //example
* cc.audioEngine.stopEffect(audioID);
+6 -6
View File
@@ -45,8 +45,8 @@ var EventTarget = cc.EventTarget;
* @example
* var node = new cc.AtlasNode("pathOfTile", 16, 16, 1);
*
* @property {cc.Texture2D} texture - Current used texture
* @property {cc.TextureAtlas} textureAtlas - Texture atlas for cc.AtlasNode
* @property {Texture2D} texture - Current used texture
* @property {TextureAtlas} textureAtlas - Texture atlas for cc.AtlasNode
* @property {Number} quadsToDraw - Number of quads to draw
*/
cc.AtlasNode = _ccsg.Node.extend(/** @lends cc.AtlasNode# */{
@@ -215,7 +215,7 @@ cc.AtlasNode = _ccsg.Node.extend(/** @lends cc.AtlasNode# */{
/**
* Initializes an CCAtlasNode with an atlas texture, the width, the height of each tile and the quantity of tiles to render
* @function
* @param {cc.Texture2D} texture The atlas texture
* @param {Texture2D} texture The atlas texture
* @param {Number} tileWidth The width of each tile
* @param {Number} tileHeight The height of each tile
* @param {Number} itemsToRender The quantity of tiles to be rendered
@@ -228,7 +228,7 @@ cc.AtlasNode = _ccsg.Node.extend(/** @lends cc.AtlasNode# */{
/**
* Set node's color
* @function
* @param {cc.Color} color Color object created with cc.color(r, g, b).
* @param {Color} color Color object created with cc.color(r, g, b).
*/
setColor: function(color){
this._renderCmd.setColor(color);
@@ -246,7 +246,7 @@ cc.AtlasNode = _ccsg.Node.extend(/** @lends cc.AtlasNode# */{
/**
* Get the current texture
* @function
* @return {cc.Texture2D}
* @return {Texture2D}
*/
getTexture: function(){
return this._texture;
@@ -255,7 +255,7 @@ cc.AtlasNode = _ccsg.Node.extend(/** @lends cc.AtlasNode# */{
/**
* Replace the current texture with a new one
* @function
* @param {cc.Texture2D} texture The new texture
* @param {Texture2D} texture The new texture
*/
setTexture: function(texture){
this._texture = texture;
+1 -1
View File
@@ -807,7 +807,7 @@ _ccsg.Node = cc.Class({
* The contentSize remains the same no matter the node is scaled or rotated.<br/>
* All nodes has a size. Layer and Scene has the same size of the screen by default. <br/></p>
* @function
* @return {cc.Size} The untransformed size of the node.
* @return {Size} The untransformed size of the node.
*/
getContentSize: function () {
return cc.size(this._contentSize);
+5 -5
View File
@@ -81,7 +81,7 @@ var AudioSource = cc.Class({
this._clip = value;
},
url: cc.AudioClip,
tooltip: 'i18n.COMPONENT.audio.clip',
tooltip: 'i18n:COMPONENT.audio.clip',
animatable: false
},
@@ -106,7 +106,7 @@ var AudioSource = cc.Class({
}
}
},
tooltip: 'i18n.COMPONENT.audio.volume'
tooltip: 'i18n:COMPONENT.audio.volume'
},
/**
@@ -141,7 +141,7 @@ var AudioSource = cc.Class({
}
},
animatable: false,
tooltip: 'i18n.COMPONENT.audio.mute',
tooltip: 'i18n:COMPONENT.audio.mute',
},
/**
@@ -159,7 +159,7 @@ var AudioSource = cc.Class({
if (this.audio) this.audio.loop = this._loop;
},
animatable: false,
tooltip: 'i18n.COMPONENT.audio.loop'
tooltip: 'i18n:COMPONENT.audio.loop'
},
/**
@@ -170,7 +170,7 @@ var AudioSource = cc.Class({
*/
playOnLoad: {
default: false,
tooltip: 'i18n.COMPONENT.audio.play_on_load',
tooltip: 'i18n:COMPONENT.audio.play_on_load',
animatable: false
}
},
+1 -1
View File
@@ -29,7 +29,7 @@ var JS = require('../platform/js');
/**
* cc.Size is the class for size object, please do not use its constructor to create sizes, use cc.size() alias function instead.
* It will be deprecated soon, please use cc.Vec2 instead
* @class Size
* @class cc.Size
* @param {Number} width
* @param {Number} height
* @see cc.size
+7 -7
View File
@@ -108,7 +108,7 @@ _ccsg.TMXLayer = cc.SpriteBatchNode.extend(/** @lends _ccsg.TMXLayer# */{
/**
* Sets the untransformed size of the TMXLayer.
* @override
* @param {cc.Size|Number} size The untransformed size of the TMXLayer or The untransformed size's width of the TMXLayer.
* @param {Size|Number} size The untransformed size of the TMXLayer or The untransformed size's width of the TMXLayer.
* @param {Number} [height] The untransformed size's height of the TMXLayer.
*/
setContentSize:function (size, height) {
@@ -119,7 +119,7 @@ _ccsg.TMXLayer = cc.SpriteBatchNode.extend(/** @lends _ccsg.TMXLayer# */{
/**
* Return texture of cc.SpriteBatchNode
* @function
* @return {cc.Texture2D}
* @return {Texture2D}
*/
getTexture: function(){
return this._renderCmd.getTexture();
@@ -127,7 +127,7 @@ _ccsg.TMXLayer = cc.SpriteBatchNode.extend(/** @lends _ccsg.TMXLayer# */{
/**
* Gets layer size.
* @return {cc.Size}
* @return {Size}
*/
getLayerSize:function () {
return cc.size(this._layerSize.width, this._layerSize.height);
@@ -135,7 +135,7 @@ _ccsg.TMXLayer = cc.SpriteBatchNode.extend(/** @lends _ccsg.TMXLayer# */{
/**
* Set layer size
* @param {cc.Size} Var
* @param {Size} Var
*/
setLayerSize:function (Var) {
this._layerSize.width = Var.width;
@@ -157,7 +157,7 @@ _ccsg.TMXLayer = cc.SpriteBatchNode.extend(/** @lends _ccsg.TMXLayer# */{
/**
* Size of the map's tile (could be different from the tile's size)
* @return {cc.Size}
* @return {Size}
*/
getMapTileSize:function () {
return cc.size(this._mapTileSize.width,this._mapTileSize.height);
@@ -165,7 +165,7 @@ _ccsg.TMXLayer = cc.SpriteBatchNode.extend(/** @lends _ccsg.TMXLayer# */{
/**
* Set the map tile size.
* @param {cc.Size} Var
* @param {Size} Var
*/
setMapTileSize:function (Var) {
this._mapTileSize.width = Var.width;
@@ -317,7 +317,7 @@ _ccsg.TMXLayer = cc.SpriteBatchNode.extend(/** @lends _ccsg.TMXLayer# */{
* You can remove either by calling: <br/>
* - layer.removeChild(sprite, cleanup); <br/>
* - or layer.removeTileAt(ccp(x,y)); </p>
* @param {cc.Vec2|Number} pos or x
* @param {Vec2|Number} pos or x
* @param {Number} [y]
* @return {_ccsg.Sprite}
*/
+16 -5
View File
@@ -55,7 +55,7 @@ sp.Skeleton = cc.Class({
name: 'sp.Skeleton',
extends: cc._RendererUnderSG,
editor: CC_EDITOR && {
menu: 'i18n:MAIN_MENU.component.others/Spine Skeleton',
menu: 'i18n:MAIN_MENU.component.renderers/Spine Skeleton',
help: 'app://docs/html/components/spine.html',
//playOnFocus: true
},
@@ -76,6 +76,7 @@ sp.Skeleton = cc.Class({
this.defaultAnimation = '';
this._refresh();
},
tooltip: 'i18n:COMPONENT.skeleton.skeleton_data'
},
///**
@@ -171,7 +172,8 @@ sp.Skeleton = cc.Class({
},
type: DefaultSkinsEnum,
visible: true,
displayName: "Default Skin"
displayName: "Default Skin",
tooltip: 'i18n:COMPONENT.skeleton.default_skin'
},
// value of 0 represents no animation
@@ -212,7 +214,8 @@ sp.Skeleton = cc.Class({
},
type: DefaultAnimsEnum,
visible: true,
displayName: 'Animation'
displayName: 'Animation',
tooltip: 'i18n:COMPONENT.skeleton.animation'
},
//// for inspector
@@ -233,7 +236,12 @@ sp.Skeleton = cc.Class({
* @property {boolean} loop
* @default true
*/
loop: true,
loop: {
default: true,
type: Boolean,
tooltip: 'i18n:COMPONENT.skeleton.loop'
},
/**
* The time scale of this skeleton.
@@ -246,7 +254,8 @@ sp.Skeleton = cc.Class({
if (this._sgNode) {
this._sgNode.setTimeScale(this.timeScale);
}
}
},
tooltip: 'i18n:COMPONENT.skeleton.time_scale'
},
/**
@@ -262,6 +271,7 @@ sp.Skeleton = cc.Class({
}
},
editorOnly: true,
tooltip: 'i18n:COMPONENT.skeleton.debug_slots'
},
/**
@@ -277,6 +287,7 @@ sp.Skeleton = cc.Class({
}
},
editorOnly: true,
tooltip: 'i18n:COMPONENT.skeleton.debug_bones'
}
},