Best JavaScript code snippet using ng-mocks
jsb_property_apis.js
Source: jsb_property_apis.js
1/*2 * Copyright (c) 2014 Chukong Technologies Inc.3 *4 * Permission is hereby granted, free of charge, to any person obtaining a copy5 * of this software and associated documentation files (the "Software"), to deal6 * in the Software without restriction, including without limitation the rights7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell8 * copies of the Software, and to permit persons to whom the Software is9 * furnished to do so, subject to the following conditions:10 *11 * The above copyright notice and this permission notice shall be included in12 * all copies or substantial portions of the Software.13 *14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN20 * THE SOFTWARE.21 */22/**23 * <p>Properties configuration function </br>24 * All properties in attrs will be set to the node, </br>25 * when the setter of the node is available, </br>26 * the property will be set via setter function.</br>27 * </p>28 * @param {Object} attrs Properties to be set to node29 */30cc.Node.prototype.attr = function(attrs) {31 for(var key in attrs) {32 this[key] = attrs[key];33 }34};35var _proto = cc.Action.prototype;36cc.defineGetterSetter(_proto, "tag", _proto.getTag, _proto.setTag);37// Overrides38_proto = cc.AtlasNode.prototype;39cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);40cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);41cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);42_proto = cc.LabelTTF.prototype;43cc.defineGetterSetter(_proto, "size", _proto.getContentSize, _proto.setContentSize);44cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);45cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);46_proto = cc.LayerColor.prototype;47cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);48cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);49cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);50cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);51cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);52_proto = cc.LayerGradient.prototype;53cc.defineGetterSetter(_proto, "size", _proto.getContentSize, _proto.setContentSize);54cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);55cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);56_proto = cc.Sprite.prototype;57cc.defineGetterSetter(_proto, "ignoreAnchor", _proto.isIgnoreAnchorPointForPosition, _proto.ignoreAnchorPointForPosition);58_proto = cc.LabelAtlas.prototype;59cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);60_proto = cc.LabelBMFont.prototype;61cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);62cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);63cc.defineGetterSetter(_proto, "scale", _proto.getScale, _proto.setScale);64cc.defineGetterSetter(_proto, "scaleX", _proto.getScaleX, _proto.setScaleX);65cc.defineGetterSetter(_proto, "scaleY", _proto.getScaleY, _proto.setScaleY);66cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);67cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);68cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);69cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);70cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);71_proto = cc.Menu.prototype;72cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);73cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);74cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);75cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);76cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);77_proto = cc.MenuItem.prototype;78cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);79cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);80cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);81cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);82cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);83_proto = cc.MotionStreak.prototype;84cc.defineGetterSetter(_proto, "x", _proto.getPositionX, _proto.setPositionX);85cc.defineGetterSetter(_proto, "y", _proto.getPositionY, _proto.setPositionY);86cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);87cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);88cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);89cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);90cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);91_proto = cc.ParticleSystem.prototype;92cc.defineGetterSetter(_proto, "rotation", _proto.getRotation, _proto.setRotation);93cc.defineGetterSetter(_proto, "scale", _proto.getScale, _proto.setScale);94cc.defineGetterSetter(_proto, "scaleX", _proto.getScaleX, _proto.setScaleX);95cc.defineGetterSetter(_proto, "scaleY", _proto.getScaleY, _proto.setScaleY);96_proto = cc.PhysicsSprite.prototype;97cc.defineGetterSetter(_proto, "body", _proto.getBody, _proto.setBody);98cc.defineGetterSetter(_proto, "x", _proto.getPositionX, _proto.setPositionX);99cc.defineGetterSetter(_proto, "y", _proto.getPositionY, _proto.setPositionY);100cc.defineGetterSetter(_proto, "rotation", _proto.getRotation, _proto.setRotation);101cc.defineGetterSetter(_proto, "dirty", _proto.isDirty, _proto.setDirty);102_proto = cc.ProgressTimer.prototype;103cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);104cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);105cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);106_proto = cc.TextFieldTTF.prototype;107cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);108_proto = ccs.Bone.prototype;109cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);110cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);111cc.defineGetterSetter(_proto, "zIndex", _proto.getLocalZOrder, _proto.setLocalZOrder);112_proto = ccui.Widget.prototype;113cc.defineGetterSetter(_proto, "x", _proto.getPositionX, _proto.setPositionX);114cc.defineGetterSetter(_proto, "y", _proto.getPositionY, _proto.setPositionY);115cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);116cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);117cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX);118cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY);119cc.defineGetterSetter(_proto, "children", _proto.getChildren);120cc.defineGetterSetter(_proto, "childrenCount", _proto.getChildrenCount);121_proto = ccui.ScrollView.prototype;122cc.defineGetterSetter(_proto, "children", _proto.getChildren);123cc.defineGetterSetter(_proto, "childrenCount", _proto.getChildrenCount);124cc.defineGetterSetter(_proto, "layoutType", _proto.getLayoutType, _proto.setLayoutType);125_proto = ccui.Button.prototype;126cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);127cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);128cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX);129cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY);130cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);131_proto = ccui.CheckBox.prototype;132cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);133cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);134cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX);135cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY);136cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);137cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);138_proto = ccui.ImageView.prototype;139cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);140cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);141cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX);142cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY);143cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);144cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);145_proto = ccui.Text.prototype;146cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);147cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);148cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);149cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);150cc.defineGetterSetter(_proto, "scaleX", _proto.getScaleX, _proto.setScaleX);151cc.defineGetterSetter(_proto, "scaleY", _proto.getScaleY, _proto.setScaleY);152cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX);153cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY);154_proto = ccui.TextAtlas.prototype;155cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);156cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);157cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);158cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);159_proto = ccui.TextBMFont.prototype;160cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);161cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);162cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);163cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);164_proto = ccui.LoadingBar.prototype;165cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);166cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);167_proto = ccui.Slider.prototype;168cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);169cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);170_proto = ccui.TextField.prototype;171cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);172cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);173cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);174cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);175_proto = cc.Control.prototype;176cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);177_proto = cc.ControlButton.prototype;178cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);179cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);180_proto = cc.ControlColourPicker.prototype;181cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);182cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);183_proto = cc.ControlHuePicker.prototype;184cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);185_proto = cc.ControlPotentiometer.prototype;186cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);187_proto = cc.ControlSaturationBrightnessPicker.prototype;188cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);189_proto = cc.ControlSlider.prototype;190cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);191_proto = cc.ControlSwitch.prototype;192cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);193_proto = cc.Scale9Sprite.prototype;194cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);195cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);196cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);197cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);198cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);199_proto = cc.ScrollView.prototype;200cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);201cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);202// Extends203var _proto = cc.ClippingNode.prototype;204cc.defineGetterSetter(_proto, "alphaThreshold", _proto.getAlphaThreshold, _proto.setAlphaThreshold);205cc.defineGetterSetter(_proto, "inverted", _proto.getInverted, _proto.setInverted);206cc.defineGetterSetter(_proto, "stencil", _proto.getStencil, _proto.setStencil);207_proto = cc.AtlasNode.prototype;208cc.defineGetterSetter(_proto, "texture", _proto.getTexture, _proto.setTexture);209cc.defineGetterSetter(_proto, "textureAtlas", _proto.getTextureAtlas, _proto.setTextureAtlas);210cc.defineGetterSetter(_proto, "quadsToDraw", _proto.getQuadsToDraw, _proto.setQuadsToDraw);211_proto = cc.Node.prototype;212cc.defineGetterSetter(_proto, "x", _proto.getPositionX, _proto.setPositionX);213cc.defineGetterSetter(_proto, "y", _proto.getPositionY, _proto.setPositionY);214cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);215cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);216cc.defineGetterSetter(_proto, "anchorX", _proto._getAnchorX, _proto._setAnchorX);217cc.defineGetterSetter(_proto, "anchorY", _proto._getAnchorY, _proto._setAnchorY);218cc.defineGetterSetter(_proto, "skewX", _proto.getSkewX, _proto.setSkewX);219cc.defineGetterSetter(_proto, "skewY", _proto.getSkewY, _proto.setSkewY);220cc.defineGetterSetter(_proto, "zIndex", _proto.getLocalZOrder, _proto.setLocalZOrder);221cc.defineGetterSetter(_proto, "vertexZ", _proto.getVertexZ, _proto.setVertexZ);222cc.defineGetterSetter(_proto, "rotation", _proto.getRotation, _proto.setRotation);223cc.defineGetterSetter(_proto, "rotationX", _proto.getRotationX, _proto.setRotationX);224cc.defineGetterSetter(_proto, "rotationY", _proto.getRotationY, _proto.setRotationY);225cc.defineGetterSetter(_proto, "scale", _proto.getScale, _proto.setScale);226cc.defineGetterSetter(_proto, "scaleX", _proto.getScaleX, _proto.setScaleX);227cc.defineGetterSetter(_proto, "scaleY", _proto.getScaleY, _proto.setScaleY);228cc.defineGetterSetter(_proto, "children", _proto.getChildren);229cc.defineGetterSetter(_proto, "childrenCount", _proto.getChildrenCount);230cc.defineGetterSetter(_proto, "parent", _proto.getParent, _proto.setParent);231cc.defineGetterSetter(_proto, "visible", _proto.isVisible, _proto.setVisible);232cc.defineGetterSetter(_proto, "running", _proto.isRunning);233cc.defineGetterSetter(_proto, "ignoreAnchor", _proto.isIgnoreAnchorPointForPosition, _proto.ignoreAnchorPointForPosition);234cc.defineGetterSetter(_proto, "actionManager", _proto.getActionManager, _proto.setActionManager);235cc.defineGetterSetter(_proto, "scheduler", _proto.getScheduler, _proto.setScheduler);236cc.defineGetterSetter(_proto, "shaderProgram", _proto.getShaderProgram, _proto.setShaderProgram);237cc.defineGetterSetter(_proto, "glServerState", _proto.getGLServerState, _proto.setGLServerState);238cc.defineGetterSetter(_proto, "tag", _proto.getTag, _proto.setTag);239cc.defineGetterSetter(_proto, "userData", _proto.getUserData, _proto.setUserData);240cc.defineGetterSetter(_proto, "userObject", _proto.getUserObject, _proto.setUserObject);241cc.defineGetterSetter(_proto, "arrivalOrder", _proto.getArrivalOrder, _proto.setArrivalOrder);242_proto = cc.NodeRGBA.prototype;243cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);244cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);245cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);246cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);247cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);248_proto = cc.LabelTTF.prototype;249cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);250cc.defineGetterSetter(_proto, "textAlign", _proto.getHorizontalAlignment, _proto.setHorizontalAlignment);251cc.defineGetterSetter(_proto, "verticalAlign", _proto.getVerticalAlignment, _proto.setVerticalAlignment);252cc.defineGetterSetter(_proto, "fontSize", _proto.getFontSize, _proto.setFontSize);253cc.defineGetterSetter(_proto, "fontName", _proto.getFontName, _proto.setFontName);254cc.defineGetterSetter(_proto, "font", _proto._getFont, _proto._setFont);255cc.defineGetterSetter(_proto, "boundingWidth", _proto._getBoundingWidth, _proto._setBoundingWidth);256cc.defineGetterSetter(_proto, "boundingHeight", _proto._getBoundingHeight, _proto._setBoundingHeight);257cc.defineGetterSetter(_proto, "fillStyle", _proto._getFillStyle, _proto.setFontFillColor);258cc.defineGetterSetter(_proto, "strokeStyle", _proto._getStrokeStyle, _proto._setStrokeStyle);259cc.defineGetterSetter(_proto, "lineWidth", _proto._getLineWidth, _proto._setLineWidth);260cc.defineGetterSetter(_proto, "shadowOffsetX", _proto._getShadowOffsetX, _proto._setShadowOffsetX);261cc.defineGetterSetter(_proto, "shadowOffsetY", _proto._getShadowOffsetY, _proto._setShadowOffsetY);262cc.defineGetterSetter(_proto, "shadowOpacity", _proto._getShadowOpacity, _proto._setShadowOpacity);263cc.defineGetterSetter(_proto, "shadowBlur", _proto._getShadowBlur, _proto._setShadowBlur);264cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);265cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);266cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);267cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);268cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);269_proto = cc.LayerRGBA.prototype;270cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);271cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);272cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);273cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);274cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);275_proto = cc.LayerColor.prototype;276cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);277cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);278cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);279cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);280cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);281cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);282cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);283_proto = cc.LayerGradient.prototype;284cc.defineGetterSetter(_proto, "startColor", _proto.getStartColor, _proto.setStartColor);285cc.defineGetterSetter(_proto, "endColor", _proto.getEndColor, _proto.setEndColor);286cc.defineGetterSetter(_proto, "startOpacity", _proto.getStartOpacity, _proto.setStartOpacity);287cc.defineGetterSetter(_proto, "endOpacity", _proto.getEndOpacity, _proto.setEndOpacity);288cc.defineGetterSetter(_proto, "vector", _proto.getVector, _proto.setVector);289cc.defineGetterSetter(_proto, "compresseInterpolation", _proto.isCompressedInterpolation, _proto.setCompressedInterpolation);290cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);291cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);292cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);293cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);294cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);295_proto = cc.Sprite.prototype;296cc.defineGetterSetter(_proto, "dirty", _proto.getDirty, _proto.setDirty);297cc.defineGetterSetter(_proto, "flippedX", _proto.isFlippedX, _proto.setFlippedX);298cc.defineGetterSetter(_proto, "flippedY", _proto.isFlippedY, _proto.setFlippedY);299cc.defineGetterSetter(_proto, "offsetX", _proto._getOffsetX);300cc.defineGetterSetter(_proto, "offsetY", _proto._getOffsetY);301cc.defineGetterSetter(_proto, "atlasIndex", _proto.getAtlasIndex, _proto.setAtlasIndex);302cc.defineGetterSetter(_proto, "texture", _proto.getTexture, _proto.setTexture);303cc.defineGetterSetter(_proto, "textureRectRotated", _proto.isTextureRectRotated);304cc.defineGetterSetter(_proto, "textureAtlas", _proto.getTextureAtlas, _proto.setTextureAtlas);305cc.defineGetterSetter(_proto, "batchNode", _proto.getBatchNode, _proto.setBatchNode);306cc.defineGetterSetter(_proto, "quad", _proto.getQuad);307cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);308cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);309cc.defineGetterSetter(_proto, "cascadeOpacity", _proto.isCascadeOpacityEnabled, _proto.setCascadeOpacityEnabled);310cc.defineGetterSetter(_proto, "color", _proto.getColor, _proto.setColor);311cc.defineGetterSetter(_proto, "cascadeColor", _proto.isCascadeColorEnabled, _proto.setCascadeColorEnabled);312_proto = cc.SpriteBatchNode.prototype;313cc.defineGetterSetter(_proto, "textureAtlas", _proto.getTextureAtlas, _proto.setTextureAtlas);314cc.defineGetterSetter(_proto, "descendants", _proto.getDescendants);315cc.defineGetterSetter(_proto, "texture", _proto.getTexture, _proto.setTexture);316_proto = cc.Texture2D.prototype;317cc.defineGetterSetter(_proto, "name", _proto.getName);318cc.defineGetterSetter(_proto, "pixelFormat", _proto.getPixelFormat);319cc.defineGetterSetter(_proto, "defaultPixelFormat", _proto.getDefaultAlphaPixelFormat, _proto.setDefaultAlphaPixelFormat);320cc.defineGetterSetter(_proto, "pixelsWidth", _proto.getPixelsWide);321cc.defineGetterSetter(_proto, "pixelsHeight", _proto.getPixelsHigh);322cc.defineGetterSetter(_proto, "width", _proto._getWidth);323cc.defineGetterSetter(_proto, "height", _proto._getHeight);324cc.defineGetterSetter(_proto, "shaderProgram", _proto.getShaderProgram, _proto.setShaderProgram);325cc.defineGetterSetter(_proto, "maxS", _proto.getMaxS, _proto.setMaxS);326cc.defineGetterSetter(_proto, "maxT", _proto.getMaxT, _proto.setMaxT);327_proto = cc.LabelAtlas.prototype;328cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);329cc.defineGetterSetter(_proto, "opacity", _proto.getOpacity, _proto.setOpacity);330_proto = cc.LabelBMFont.prototype;331cc.defineGetterSetter(_proto, "string", _proto.getString, _proto._setStringForSetter);332cc.defineGetterSetter(_proto, "textAlign", _proto._getAlignment, _proto.setAlignment);333cc.defineGetterSetter(_proto, "boundingWidth", _proto._getBoundingWidth, _proto.setBoundingWidth);334_proto = cc.Menu.prototype;335cc.defineGetterSetter(_proto, "enabled", _proto.getEnabled, _proto.setEnabled);336_proto = cc.MenuItem.prototype;337cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);338_proto = cc.MenuItemLabel.prototype;339cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);340cc.defineGetterSetter(_proto, "label", _proto.getLabel, _proto.setLabel);341cc.defineGetterSetter(_proto, "disabledColor", _proto.getDisabledColor, _proto.setDisabledColor);342_proto = cc.MenuItemFont.prototype;343cc.defineGetterSetter(_proto, "fontSize", _proto.fontSize, _proto.setFontSize);344cc.defineGetterSetter(_proto, "fontName", _proto.fontName, _proto.setFontName);345_proto = cc.MenuItemSprite.prototype;346cc.defineGetterSetter(_proto, "normalImage", _proto.getNormalImage, _proto.setNormalImage);347cc.defineGetterSetter(_proto, "selectedImage", _proto.getSelectedImage, _proto.setSelectedImage);348cc.defineGetterSetter(_proto, "disabledImage", _proto.getDisabledImage, _proto.setDisabledImage);349_proto = cc.ParticleBatchNode.prototype;350cc.defineGetterSetter(_proto, "textureAtlas", _proto.getTextureAtlas, _proto.setTextureAtlas);351cc.defineGetterSetter(_proto, "texture", _proto.getTexture, _proto.setTexture);352_proto = cc.ParticleSystem.prototype;353cc.defineGetterSetter(_proto, "opacityModifyRGB", _proto.isOpacityModifyRGB, _proto.setOpacityModifyRGB);354cc.defineGetterSetter(_proto, "batchNode", _proto.getBatchNode, _proto.setBatchNode);355cc.defineGetterSetter(_proto, "active", _proto.isActive);356cc.defineGetterSetter(_proto, "shapeType", _proto.getShapeType, _proto.setShapeType);357cc.defineGetterSetter(_proto, "atlasIndex", _proto.getAtlasIndex, _proto.setAtlasIndex);358cc.defineGetterSetter(_proto, "particleCount", _proto.getParticleCount, _proto.setParticleCount);359cc.defineGetterSetter(_proto, "duration", _proto.getDuration, _proto.setDuration);360cc.defineGetterSetter(_proto, "sourcePos", _proto.getSourcePosition, _proto.setSourcePosition);361cc.defineGetterSetter(_proto, "posVar", _proto.getPosVar, _proto.setPosVar);362cc.defineGetterSetter(_proto, "life", _proto.getLife, _proto.setLife);363cc.defineGetterSetter(_proto, "lifeVar", _proto.getLifeVar, _proto.setLifeVar);364cc.defineGetterSetter(_proto, "angle", _proto.getAngle, _proto.setAngle);365cc.defineGetterSetter(_proto, "angleVar", _proto.getAngleVar, _proto.setAngleVar);366cc.defineGetterSetter(_proto, "startSize", _proto.getStartSize, _proto.setStartSize);367cc.defineGetterSetter(_proto, "startSizeVar", _proto.getStartSizeVar, _proto.setStartSizeVar);368cc.defineGetterSetter(_proto, "endSize", _proto.getEndSize, _proto.setEndSize);369cc.defineGetterSetter(_proto, "endSizeVar", _proto.getEndSizeVar, _proto.setEndSizeVar);370cc.defineGetterSetter(_proto, "startSpin", _proto.getStartSpin, _proto.setStartSpin);371cc.defineGetterSetter(_proto, "startSpinVar", _proto.getStartSpinVar, _proto.setStartSpinVar);372cc.defineGetterSetter(_proto, "endSpin", _proto.getEndSpin, _proto.setEndSpin);373cc.defineGetterSetter(_proto, "endSpinVar", _proto.getEndSpinVar, _proto.setEndSpinVar);374cc.defineGetterSetter(_proto, "gravity", _proto.getGravity, _proto.setGravity);375cc.defineGetterSetter(_proto, "speed", _proto.getSpeed, _proto.setSpeed);376cc.defineGetterSetter(_proto, "speedVar", _proto.getSpeedVar, _proto.setSpeedVar);377cc.defineGetterSetter(_proto, "tangentialAccel", _proto.getTangentialAccel, _proto.setTangentialAccel);378cc.defineGetterSetter(_proto, "tangentialAccelVar", _proto.getTangentialAccelVar, _proto.setTangentialAccelVar);379cc.defineGetterSetter(_proto, "tangentialAccel", _proto.getTangentialAccel, _proto.setTangentialAccel);380cc.defineGetterSetter(_proto, "tangentialAccelVar", _proto.getTangentialAccelVar, _proto.setTangentialAccelVar);381cc.defineGetterSetter(_proto, "rotationIsDir", _proto.getRotationIsDir, _proto.setRotationIsDir);382cc.defineGetterSetter(_proto, "startRadius", _proto.getStartRadius, _proto.setStartRadius);383cc.defineGetterSetter(_proto, "startRadiusVar", _proto.getStartRadiusVar, _proto.setStartRadiusVar);384cc.defineGetterSetter(_proto, "endRadius", _proto.getEndRadius, _proto.setEndRadius);385cc.defineGetterSetter(_proto, "endRadiusVar", _proto.getEndRadiusVar, _proto.setEndRadiusVar);386cc.defineGetterSetter(_proto, "rotatePerS", _proto.getRotatePerSecond, _proto.setRotatePerSecond);387cc.defineGetterSetter(_proto, "rotatePerSVar", _proto.getRotatePerSecondVar, _proto.setRotatePerSecondVar);388cc.defineGetterSetter(_proto, "startColor", _proto.getStartColor, _proto.setStartColor);389cc.defineGetterSetter(_proto, "startColorVar", _proto.getStartColorVar, _proto.setStartColorVar);390cc.defineGetterSetter(_proto, "endColor", _proto.getEndColor, _proto.setEndColor);391cc.defineGetterSetter(_proto, "endColorVar", _proto.getEndColorVar, _proto.setEndColorVar);392cc.defineGetterSetter(_proto, "emissionRate", _proto.getEmissionRate, _proto.setEmissionRate);393cc.defineGetterSetter(_proto, "emitterMode", _proto.getEmitterMode, _proto.setEmitterMode);394cc.defineGetterSetter(_proto, "positionType", _proto.getPositionType, _proto.setPositionType);395cc.defineGetterSetter(_proto, "totalParticles", _proto.getTotalParticles, _proto.setTotalParticles);396cc.defineGetterSetter(_proto, "autoRemoveOnFinish", _proto.getAutoRemoveOnFinish, _proto.setAutoRemoveOnFinish);397cc.defineGetterSetter(_proto, "texture", _proto.getTexture, _proto.setTexture);398_proto = cc.ProgressTimer.prototype;399cc.defineGetterSetter(_proto, "midPoint", _proto.getMidpoint, _proto.setMidpoint);400cc.defineGetterSetter(_proto, "barChangeRate", _proto.getBarChangeRate, _proto.setBarChangeRate);401cc.defineGetterSetter(_proto, "type", _proto.getType, _proto.setType);402cc.defineGetterSetter(_proto, "percentage", _proto.getPercentage, _proto.setPercentage);403cc.defineGetterSetter(_proto, "sprite", _proto.getSprite, _proto.setSprite);404cc.defineGetterSetter(_proto, "reverseDir", _proto.isReverseDirection, _proto.setReverseDirection);405_proto = cc.RenderTexture.prototype;406cc.defineGetterSetter(_proto, "sprite", _proto.getSprite, _proto.setSprite);407cc.defineGetterSetter(_proto, "clearFlags", _proto.getClearFlags, _proto.setClearFlags);408cc.defineGetterSetter(_proto, "clearDepthVal", _proto.getClearDepthVal, _proto.setClearDepthVal);409cc.defineGetterSetter(_proto, "clearStencilVal", _proto.getClearStencilVal, _proto.setClearStencilVal);410cc.defineGetterSetter(_proto, "clearColorVal", _proto.getClearColor, _proto.setClearColor);411cc.defineGetterSetter(_proto, "autoDraw", _proto.getAutoDraw, _proto.setAutoDraw);412_proto = cc.NodeGrid.prototype;413cc.defineGetterSetter(_proto, "grid", _proto.getGrid, _proto.setGrid);414cc.defineGetterSetter(_proto, "target", null, _proto.setTarget);415_proto = cc.TMXLayer.prototype;416cc.defineGetterSetter(_proto, "tiles", _proto.getTiles, _proto.setTiles);417cc.defineGetterSetter(_proto, "tileset", _proto.getTileset, _proto.setTileset);418cc.defineGetterSetter(_proto, "layerOrientation", _proto.getLayerOrientation, _proto.setLayerOrientation);419cc.defineGetterSetter(_proto, "properties", _proto.getProperties, _proto.setProperties);420cc.defineGetterSetter(_proto, "layerName", _proto.getLayerName, _proto.setLayerName);421cc.defineGetterSetter(_proto, "layerWidth", _proto._getLayerWidth, _proto._setLayerWidth);422cc.defineGetterSetter(_proto, "layerHeight", _proto._getLayerHeight, _proto._setLayerHeight);423cc.defineGetterSetter(_proto, "tileWidth", _proto._getTileWidth, _proto._setTileWidth);424cc.defineGetterSetter(_proto, "tileHeight", _proto._getTileHeight, _proto._setTileHeight);425cc.defineGetterSetter(_proto, "texture", _proto.getTexture, _proto.setTexture);426_proto = cc.TMXTiledMap.prototype;427cc.defineGetterSetter(_proto, "properties", _proto.getProperties, _proto.setProperties);428cc.defineGetterSetter(_proto, "mapOrientation", _proto.getMapOrientation, _proto.setMapOrientation);429cc.defineGetterSetter(_proto, "objectGroups", _proto.getObjectGroups, _proto.setObjectGroups);430cc.defineGetterSetter(_proto, "mapWidth", _proto._getMapWidth, _proto._setMapWidth);431cc.defineGetterSetter(_proto, "mapHeight", _proto._getMapHeight, _proto._setMapHeight);432cc.defineGetterSetter(_proto, "tileWidth", _proto._getTileWidth, _proto._setTileWidth);433cc.defineGetterSetter(_proto, "tileHeight", _proto._getTileHeight, _proto._setTileHeight);434_proto = ccs.Armature.prototype;435cc.defineGetterSetter(_proto, "parentBone", _proto.getParentBone, _proto.setParentBone);436cc.defineGetterSetter(_proto, "animation", _proto.getAnimation, _proto.setAnimation);437cc.defineGetterSetter(_proto, "armatureData", _proto.getArmatureData, _proto.setArmatureData);438cc.defineGetterSetter(_proto, "name", _proto.getName, _proto.setName);439cc.defineGetterSetter(_proto, "batchNode", _proto.getBatchNode, _proto.setBatchNode);440cc.defineGetterSetter(_proto, "version", _proto.getVersion, _proto.setVersion);441cc.defineGetterSetter(_proto, "body", _proto.getBody, _proto.setBody);442cc.defineGetterSetter(_proto, "colliderFilter", _proto.setColliderFilter);443_proto = ccs.Bone.prototype;444cc.defineGetterSetter(_proto, "boneData", _proto.getBoneData, _proto.setBoneData);445cc.defineGetterSetter(_proto, "armature", _proto.getArmature, _proto.setArmature);446cc.defineGetterSetter(_proto, "parentBone", _proto.getParentBone, _proto.setParentBone);447cc.defineGetterSetter(_proto, "childArmature", _proto.getChildArmature, _proto.setChildArmature);448cc.defineGetterSetter(_proto, "childrenBone", _proto.getChildrenBone);449cc.defineGetterSetter(_proto, "tween", _proto.getTween);450cc.defineGetterSetter(_proto, "tweenData", _proto.getTweenData);451cc.defineGetterSetter(_proto, "transformDirty", _proto.getTransformDirty, _proto.setTransformDirty);452cc.defineGetterSetter(_proto, "colliderFilter", _proto.getColliderFilter, _proto.setColliderFilter);453cc.defineGetterSetter(_proto, "displayManager", _proto.getDisplayManager, _proto.setDisplayManager);454cc.defineGetterSetter(_proto, "ignoreMovementBoneData", _proto.getIgnoreMovementBoneData, _proto.setIgnoreMovementBoneData);455cc.defineGetterSetter(_proto, "name", _proto.getName, _proto.setName);456cc.defineGetterSetter(_proto, "blendDirty", _proto.getBlendDirty, _proto.setBlendDirty);457_proto = ccs.Skin.prototype;458cc.defineGetterSetter(_proto, "skinData", _proto.getSkinData, _proto.setSkinData);459cc.defineGetterSetter(_proto, "bone", _proto.getBone, _proto.setBone);460cc.defineGetterSetter(_proto, "displayName", _proto.getDisplayName);461_proto = ccs.ColliderDetector.prototype;462cc.defineGetterSetter(_proto, "colliderFilter", _proto.getColliderFilter, _proto.setColliderFilter);463cc.defineGetterSetter(_proto, "active", _proto.getActive, _proto.setActive);464cc.defineGetterSetter(_proto, "body", _proto.getBody, _proto.setBody);465_proto = ccui.Widget.prototype;466cc.defineGetterSetter(_proto, "xPercent", _proto._getXPercent, _proto._setXPercent);467cc.defineGetterSetter(_proto, "yPercent", _proto._getYPercent, _proto._setYPercent);468cc.defineGetterSetter(_proto, "widthPercent", _proto._getWidthPercent, _proto._setWidthPercent);469cc.defineGetterSetter(_proto, "heightPercent", _proto._getHeightPercent, _proto._setHeightPercent);470cc.defineGetterSetter(_proto, "widgetParent", _proto.getWidgetParent);471cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);472cc.defineGetterSetter(_proto, "focused", _proto.isFocused, _proto.setFocused);473cc.defineGetterSetter(_proto, "sizeType", _proto.getSizeType, _proto.setSizeType);474cc.defineGetterSetter(_proto, "widgetType", _proto.getWidgetType);475cc.defineGetterSetter(_proto, "touchEnabled", _proto.isTouchEnabled, _proto.setTouchEnabled);476cc.defineGetterSetter(_proto, "updateEnabled", _proto.isUpdateEnabled, _proto.setUpdateEnabled);477cc.defineGetterSetter(_proto, "bright", _proto.isBright, _proto.setBright);478cc.defineGetterSetter(_proto, "name", _proto.getName, _proto.setName);479cc.defineGetterSetter(_proto, "actionTag", _proto.getActionTag, _proto.setActionTag);480_proto = ccui.Layout.prototype;481cc.defineGetterSetter(_proto, "clippingEnabled", _proto.isClippingEnabled, _proto.setClippingEnabled);482cc.defineGetterSetter(_proto, "clippingType", _proto.setClippingType);483cc.defineGetterSetter(_proto, "layoutType", _proto.getLayoutType, _proto.setLayoutType);484_proto = ccui.Button.prototype;485cc.defineGetterSetter(_proto, "width", _proto._getWidth, _proto._setWidth);486cc.defineGetterSetter(_proto, "height", _proto._getHeight, _proto._setHeight);487cc.defineGetterSetter(_proto, "titleText", _proto.getTitleText, _proto.setTitleText);488cc.defineGetterSetter(_proto, "titleFont", _proto._getTitleFont, _proto._setTitleFont);489cc.defineGetterSetter(_proto, "titleFontSize", _proto.getTitleFontSize, _proto.setTitleFontSize);490cc.defineGetterSetter(_proto, "titleFontName", _proto.getTitleFontName, _proto.setTitleFontName);491cc.defineGetterSetter(_proto, "titleFontColor", _proto.getTitleFontColor, _proto.setTitleFontColor);492cc.defineGetterSetter(_proto, "pressedActionEnabled", _proto.getPressedActionEnabled, _proto.setPressedActionEnabled);493_proto = ccui.CheckBox.prototype;494cc.defineGetterSetter(_proto, "selected", _proto.getSelected, _proto.setSelected);495_proto = ccui.Text.prototype;496cc.defineGetterSetter(_proto, "boundingWidth", _proto._getBoundingWidth, _proto._setBoundingWidth);497cc.defineGetterSetter(_proto, "boundingHeight", _proto._getBoundingHeight, _proto._setBoundingHeight);498cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);499cc.defineGetterSetter(_proto, "stringLength", _proto.getStringLength);500cc.defineGetterSetter(_proto, "font", _proto._getFont, _proto._setFont);501cc.defineGetterSetter(_proto, "fontName", _proto.getFontName, _proto.setFontName);502cc.defineGetterSetter(_proto, "fontSize", _proto.getFontSize, _proto.setFontSize);503cc.defineGetterSetter(_proto, "textAlign", _proto.getHorizontalAlignment, _proto.setTextHorizontalAlignment);504cc.defineGetterSetter(_proto, "verticalAlign", _proto.getVerticalAlignment, _proto.setTextVerticalAlignment);505cc.defineGetterSetter(_proto, "touchScaleEnabled", _proto.getTouchScaleEnabled, _proto.setTouchScaleEnabled);506_proto = ccui.TextAtlas.prototype;507cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);508_proto = ccui.TextBMFont.prototype;509cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);510_proto = ccui.LoadingBar.prototype;511cc.defineGetterSetter(_proto, "direction", _proto.getDirection, _proto.setDirection);512cc.defineGetterSetter(_proto, "percent", _proto.getPercent, _proto.setPercent);513_proto = ccui.Slider.prototype;514cc.defineGetterSetter(_proto, "percent", _proto.getPercent, _proto.setPercent);515_proto = ccui.TextField.prototype;516cc.defineGetterSetter(_proto, "maxLengthEnabled", _proto.isMaxLengthEnabled, _proto.setMaxLengthEnabled);517cc.defineGetterSetter(_proto, "maxLength", _proto.getMaxLength, _proto.setMaxLength);518cc.defineGetterSetter(_proto, "passwordEnabled", _proto.isPasswordEnabled, _proto.setPasswordEnabled);519cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);520cc.defineGetterSetter(_proto, "font", _proto._getFont, _proto._setFont);521cc.defineGetterSetter(_proto, "fontSize", _proto.getFontSize, _proto.setFontSize);522cc.defineGetterSetter(_proto, "fontName", _proto.getFontName, _proto.setFontName);523_proto = ccui.ScrollView.prototype;524cc.defineGetterSetter(_proto, "innerWidth", _proto._getInnerWidth, _proto._setInnerWidth);525cc.defineGetterSetter(_proto, "innerHeight", _proto._getInnerHeight, _proto._setInnerHeight);526cc.defineGetterSetter(_proto, "bounceEnabled", _proto.getBounceEnabled, _proto.setBounceEnabled);527cc.defineGetterSetter(_proto, "inertiaScrollEnabled", _proto.getInertiaScrollEnabled, _proto.setInertiaScrollEnabled);528_proto = cc.EditBox.prototype;529cc.defineGetterSetter(_proto, "font", null, _proto._setFont);530cc.defineGetterSetter(_proto, "fontName", null, _proto.setFontName);531cc.defineGetterSetter(_proto, "fontSize", null, _proto.setFontSize);532cc.defineGetterSetter(_proto, "string", _proto.getString, _proto.setString);533cc.defineGetterSetter(_proto, "maxLength", _proto.getMaxLength, _proto.setMaxLength);534_proto = cc.Control.prototype;535cc.defineGetterSetter(_proto, "state", _proto.getState);536cc.defineGetterSetter(_proto, "enabled", _proto.isEnabled, _proto.setEnabled);537cc.defineGetterSetter(_proto, "selected", _proto.isSelected, _proto.setSelected);538cc.defineGetterSetter(_proto, "highlighted", _proto.isHighlighted, _proto.setHighlighted);539_proto = cc.ControlButton.prototype;540cc.defineGetterSetter(_proto, "adjustBackgroundImage", _proto.getAdjustBackgroundImage, _proto.setAdjustBackgroundImage);541cc.defineGetterSetter(_proto, "zoomOnTouchDown", _proto.getZoomOnTouchDown, _proto.setZoomOnTouchDown);542cc.defineGetterSetter(_proto, "preferredSize", _proto.getPreferredSize, _proto.setPreferredSize);543cc.defineGetterSetter(_proto, "labelAnchor", _proto.getLabelAnchorPoint, _proto.setLabelAnchorPoint);544_proto = cc.ControlColourPicker.prototype;545cc.defineGetterSetter(_proto, "background", _proto.getBackground);546_proto = cc.ControlHuePicker.prototype;547cc.defineGetterSetter(_proto, "hue", _proto.getHue, _proto.setHue);548cc.defineGetterSetter(_proto, "huePercent", _proto.getHuePercentage, _proto.setHuePercentage);549cc.defineGetterSetter(_proto, "background", _proto.getBackground);550cc.defineGetterSetter(_proto, "slider", _proto.getSlider);551cc.defineGetterSetter(_proto, "startPos", _proto.getStartPos);552_proto = cc.ControlPotentiometer.prototype;553cc.defineGetterSetter(_proto, "value", _proto.getValue, _proto.setValue);554cc.defineGetterSetter(_proto, "minValue", _proto.getMinimumValue, _proto.setMinimumValue);555cc.defineGetterSetter(_proto, "maxValue", _proto.getMaximumValue, _proto.setMaximumValue);556cc.defineGetterSetter(_proto, "progressTimer", _proto.getProgressTimer, _proto.setProgressTimer);557cc.defineGetterSetter(_proto, "thumbSprite", _proto.getThumbSprite, _proto.setThumbSprite);558cc.defineGetterSetter(_proto, "prevLocation", _proto.getPreviousLocation, _proto.setPreviousLocation);559_proto = cc.ControlSaturationBrightnessPicker.prototype;560cc.defineGetterSetter(_proto, "saturation", _proto.getSaturation);561cc.defineGetterSetter(_proto, "brightness", _proto.getBrightness);562cc.defineGetterSetter(_proto, "background", _proto.getBackground);563cc.defineGetterSetter(_proto, "overlay", _proto.getOverlay);564cc.defineGetterSetter(_proto, "shadow", _proto.getShadow);565cc.defineGetterSetter(_proto, "slider", _proto.getSlider);566cc.defineGetterSetter(_proto, "startPos", _proto.getStartPos);567_proto = cc.ControlSlider.prototype;568cc.defineGetterSetter(_proto, "value", _proto.getValue, _proto.setValue);569cc.defineGetterSetter(_proto, "minValue", _proto.getMinimumValue, _proto.setMinimumValue);570cc.defineGetterSetter(_proto, "maxValue", _proto.getMaximumValue, _proto.setMaximumValue);571cc.defineGetterSetter(_proto, "minAllowedValue", _proto.getMinimumAllowedValue, _proto.setMinimumAllowedValue);572cc.defineGetterSetter(_proto, "maxAllowedValue", _proto.getMaximumAllowedValue, _proto.setMaximumAllowedValue);573cc.defineGetterSetter(_proto, "thumbSprite", _proto.getThumbSprite);574cc.defineGetterSetter(_proto, "progressSprite", _proto.getProgressSprite);575cc.defineGetterSetter(_proto, "backgroundSprite", _proto.getBackgroundSprite);576_proto = cc.ControlStepper.prototype;577cc.defineGetterSetter(_proto, "wraps", _proto.getWraps, _proto.setWraps);578cc.defineGetterSetter(_proto, "value", _proto.getValue, _proto.setValue);579cc.defineGetterSetter(_proto, "minValue", _proto.getMinimumValue, _proto.setMinimumValue);580cc.defineGetterSetter(_proto, "maxValue", _proto.getMaximumValue, _proto.setMaximumValue);581cc.defineGetterSetter(_proto, "stepValue", _proto.getStepValue, _proto.setStepValue);582cc.defineGetterSetter(_proto, "continuous", _proto.isContinuous);583cc.defineGetterSetter(_proto, "minusSprite", _proto.getMinusSprite, _proto.setMinusSprite);584cc.defineGetterSetter(_proto, "plusSprite", _proto.getPlusSprite, _proto.setPlusSprite);585cc.defineGetterSetter(_proto, "minusLabel", _proto.getMinusLabel, _proto.setMinusLabel);586cc.defineGetterSetter(_proto, "plusSLabel", _proto.getPlusSLabel, _proto.setPlusSLabel);587_proto = cc.Scale9Sprite.prototype;588cc.defineGetterSetter(_proto, "preferredSize", _proto.getPreferredSize, _proto.setPreferredSize);589cc.defineGetterSetter(_proto, "capInsets", _proto.getCapInsets, _proto.setCapInsets);590cc.defineGetterSetter(_proto, "insetLeft", _proto.getInsetLeft, _proto.setInsetLeft);591cc.defineGetterSetter(_proto, "insetTop", _proto.getInsetTop, _proto.setInsetTop);592cc.defineGetterSetter(_proto, "insetRight", _proto.getInsetRight, _proto.setInsetRight);593cc.defineGetterSetter(_proto, "insetBottom", _proto.getInsetBottom, _proto.setInsetBottom);594_proto = cc.ScrollView.prototype;595cc.defineGetterSetter(_proto, "direction", _proto.getDirection, _proto.setDirection);596_proto = cc.TableViewCell.prototype;...
526.js
Source: 526.js
1GGCommon.ra.DQ = PROTO.Message("GGCommon.ProtocolDefs.CliLogin", {2 Cwa: {3 options: {},4 multiplicity: PROTO.required,5 type: function () {6 return PROTO.string;7 },8 id: 19 },10 dj: {11 options: {},12 multiplicity: PROTO.required,13 type: function () {14 return PROTO.bytes;15 },16 id: 217 },18 hash: {19 options: {},20 multiplicity: PROTO.optional,21 type: function () {22 return PROTO.bytes;23 },24 id: 325 },26 qna: {27 options: {},28 multiplicity: PROTO.optional,29 type: function () {30 return PROTO.uint32;31 },32 id: 433 },34 version: {35 options: {},36 multiplicity: PROTO.optional,37 type: function () {38 return PROTO.fixed32;39 },40 id: 541 },42 me: {43 options: {},44 multiplicity: PROTO.optional,45 type: function () {46 return PROTO.fixed32;47 },48 id: 649 },50 kwa: {51 options: {},52 multiplicity: PROTO.required,53 type: function () {54 return PROTO.string;55 },56 id: 757 },58 status: {59 options: {},60 multiplicity: PROTO.required,61 type: function () {62 return PROTO.fixed32;63 },64 id: 865 },66 description: {67 options: {},68 multiplicity: PROTO.optional,69 type: function () {70 return PROTO.string;71 },72 id: 973 },74 AEa: {75 options: {},76 multiplicity: PROTO.optional,77 type: function () {78 return PROTO.bytes;79 },80 id: 1081 },82 hFa: {83 options: {},84 multiplicity: PROTO.optional,85 type: function () {86 return PROTO.bytes;87 },88 id: 1189 },90 Dna: {91 options: {92 Zd: 093 },94 multiplicity: PROTO.optional,95 type: function () {96 return PROTO.uint32;97 },98 id: 1299 },100 Jpa: {101 options: {102 Zd: 0103 },104 multiplicity: PROTO.optional,105 type: function () {106 return PROTO.uint32;107 },108 id: 13109 },110 FCa: {111 options: {112 Zd: 0113 },114 multiplicity: PROTO.optional,115 type: function () {116 return PROTO.fixed32;117 },118 id: 14119 },120 GCa: {121 options: {122 Zd: 0123 },124 multiplicity: PROTO.optional,125 type: function () {126 return PROTO.uint32;127 },128 id: 15129 },130 tAa: {131 options: {132 Zd: 0133 },134 multiplicity: PROTO.optional,135 type: function () {136 return PROTO.fixed32;137 },138 id: 16139 },140 uAa: {141 options: {142 Zd: 0143 },144 multiplicity: PROTO.optional,145 type: function () {146 return PROTO.uint32;147 },148 id: 17149 },150 ICa: {151 options: {},152 multiplicity: PROTO.optional,153 type: function () {154 return PROTO.string;155 },156 id: 18157 },158 aDa: {159 options: {},160 multiplicity: PROTO.optional,161 type: function () {162 return PROTO.string;163 },164 id: 19165 },166 $Ca: {167 options: {},168 multiplicity: PROTO.repeated,169 type: function () {170 return PROTO.string;171 },172 id: 20173 },174 KCa: {175 options: {},176 multiplicity: PROTO.optional,177 type: function () {178 return PROTO.uint32;179 },180 id: 21181 },182 uDa: {183 options: {},184 multiplicity: PROTO.optional,185 type: function () {186 return PROTO.string;187 },188 id: 22189 },190 vDa: {191 options: {},192 multiplicity: PROTO.optional,193 type: function () {194 return PROTO.uint32;195 },196 id: 23197 },198 zwa: {199 options: {},200 multiplicity: PROTO.optional,201 type: function () {202 return PROTO.string;203 },204 id: 24205 },206 zDa: {207 options: {208 Zd: 0209 },210 multiplicity: PROTO.optional,211 type: function () {212 return PROTO.uint32;213 },214 id: 25215 },216 qwa: {217 options: {},218 multiplicity: PROTO.optional,219 type: function () {220 return PROTO.fixed64;221 },222 id: 26223 },224 fza: {225 options: {},226 multiplicity: PROTO.optional,227 type: function () {228 return PROTO.fixed64;229 },230 id: 27231 },232 Noa: {233 options: {},234 multiplicity: PROTO.optional,235 type: function () {236 return PROTO.fixed64;237 },238 id: 28239 },240 fCa: {241 options: {},242 multiplicity: PROTO.optional,243 type: function () {244 return PROTO.string;245 },246 id: 29247 },248 geolocation: {249 options: {},250 multiplicity: PROTO.optional,251 type: function () {252 return GGCommon.ra.gba;253 },254 id: 30255 },256 language: {257 options: {},258 multiplicity: PROTO.optional,259 type: function () {260 return PROTO.string;261 },262 id: 33263 }...
dictionary-prototype-caching.js
Source: dictionary-prototype-caching.js
1description("Test to ensure correct behaviour of prototype caching with dictionary prototypes");2function protoTest(o) {3 return o.protoProp;4}5var proto = {protoProp: "PASS", propToRemove: "foo"};6var o = { __proto__: proto };7delete proto.propToRemove;8// Prototype lookup caching will attempt to convert proto back to an ordinary structure9protoTest(o);10protoTest(o);11protoTest(o);12shouldBe("protoTest(o)", "'PASS'");13delete proto.protoProp;14proto.fakeProtoProp = "FAIL";15shouldBeUndefined("protoTest(o)");16function protoTest2(o) {17 return o.b;18}19var proto = {a:1, b:"meh", c:2};20var o = { __proto__: proto };21delete proto.b;22proto.d = 3;23protoTest2(o);24protoTest2(o);25protoTest2(o);26var protoKeys = [];27for (var i in proto)28 protoKeys.push(proto[i]);29shouldBe("protoKeys", "[1,2,3]");30function protoTest3(o) {31 return o.b;32}33var proto = {a:1, b:"meh", c:2};34var o = { __proto__: proto };35delete proto.b;36protoTest2(o);37protoTest2(o);38protoTest2(o);39proto.d = 3;40var protoKeys = [];41for (var i in proto)42 protoKeys.push(proto[i]);43shouldBe("protoKeys", "[1,2,3]");44function testFunction(o) {45 return o.test;46}47var proto = { test: true };48var subclass1 = { __proto__: proto };49var subclass2 = { __proto__: proto };50for (var i = 0; i < 500; i++)51 subclass2["a"+i]="a"+i;52testFunction(subclass1);53shouldBeTrue("testFunction(subclass1)");54shouldBeTrue("testFunction(subclass2)");55proto.test = false56subclass2.test = true;...
Using AI Code Generation
1import {mock} from 'ng-mocks';2import {AppComponent} from './app.component';3describe('AppComponent', () => {4 it('should create the app', () => {5 const fixture = mock(AppComponent);6 const app = fixture.componentInstance;7 expect(app).toBeTruthy();8 });9});10import { Component } from '@angular/core';11@Component({12})13export class AppComponent {14 title = 'my-app';15 constructor() {16 console.log('AppComponent constructor');17 }18}19h1 {20 color: #369;21 font-family: Arial, Helvetica, sans-serif;22 font-size: 250%;23}24import { Component, Input } from '@angular/core';25@Component({26 <h1>{{title}}</h1>27 h1 {28 color: #369;29 font-family: Arial, Helvetica, sans-serif;30 font-size: 250%;31 }32})33export class HeaderComponent {34 @Input() title: string = '';35}36import {mock} from 'ng-mocks';37import {HeaderComponent} from './app-header.component';38describe('HeaderComponent', () => {39 it('should create the app', () => {40 const fixture = mock(HeaderComponent);41 const app = fixture.componentInstance;42 expect(app).toBeTruthy();43 });44});45<h1>{{title}}</h1>46h1 {47 color: #369;48 font-family: Arial, Helvetica, sans-serif;49 font-size: 250%;50}51import { NgModule } from '@angular/core';52import { BrowserModule } from '@angular/platform-browser';53import { AppComponent } from './app.component';54import { HeaderComponent } from './app-header.component';55@NgModule({
Using AI Code Generation
1import { MockBuilder, MockRender } from 'ng-mocks';2import { AppModule } from './app.module';3beforeEach(() => MockBuilder(AppModule));4it('renders the component', () => {5 const fixture = MockRender(MyComponent);6 expect(fixture.point.componentInstance).toBeDefined();7});8import { NgModule } from '@angular/core';9import { MyComponent } from './my.component';10@NgModule({11})12export class AppModule {}13import { Component } from '@angular/core';14@Component({15})16export class MyComponent {}17import { MockBuilder, MockRender } from 'ng-mocks';18import { AppModule } from './app.module';19beforeEach(() => MockBuilder(AppModule));20it('renders the component', () => {21 const fixture = MockRender(MyComponent);22 expect(fixture.point.componentInstance).toBeDefined();23});24import { NgModule } from '@angular/core';25import { MyComponent } from './my.component';26@NgModule({27})28export class AppModule {}29import { Component } from '@angular/core';30@Component({31})32export class MyComponent {}33import { MockBuilder, MockRender } from 'ng-mocks';34import { AppModule } from './app.module';35beforeEach(() => MockBuilder(AppModule));36it('renders the component', () => {37 const fixture = MockRender(MyComponent);38 expect(fixture.point.componentInstance).toBeDefined();39});40import { NgModule } from '@angular/core';41import { MyComponent } from './my.component';42@NgModule({43})44export class AppModule {}45import { Component } from '@angular/core';46@Component({47})48export class MyComponent {}49import { MockBuilder, MockRender } from 'ng-mocks';50import { AppModule } from './app.module';51beforeEach(() => MockBuilder(AppModule));52it('renders the component', () => {53 const fixture = MockRender(MyComponent);54 expect(fixture.point.componentInstance).toBeDefined();55});
Using AI Code Generation
1import { MockBuilder, MockRender } from 'ng-mocks';2import { AppModule } from './app.module';3beforeEach(() => MockBuilder(AppModule));4it('should render', () => {5 const fixture = MockRender();6 expect(fixture).toBeDefined();7});8import { NgModule } from '@angular/core';9import { AppComponent } from './app.component';10@NgModule({11 imports: [],12})13export class AppModule {}14import { Component, OnInit } from '@angular/core';15@Component({16})17export class AppComponent implements OnInit {18 constructor() {}19 ngOnInit(): void {}20}21import { async, ComponentFixture, TestBed } from '@angular/core/testing';22import { AppComponent } from './app.component';23describe('AppComponent', () => {24 let component: AppComponent;25 let fixture: ComponentFixture<AppComponent>;26 beforeEach(async(() => {27 TestBed.configureTestingModule({28 }).compileComponents();29 }));30 beforeEach(() => {31 fixture = TestBed.createComponent(AppComponent);32 component = fixture.componentInstance;33 fixture.detectChanges();34 });35 it('should create', () => {36 expect(component).toBeTruthy();37 });38});39I am using Jest for my testing. I have a service that I am trying to test. I am trying to mock the service and return a value from a method in the service. I have tried to mock the service using jest.mock() and jest.spyOn() but I am getting the following error:40import { TestBed } from '@angular/core/testing';41import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';42import { HttpClient, HttpErrorResponse } from '@angular/common/http';43import { TestService } from './test.service';44describe('TestService', () => {45 let service: TestService;46 let httpClient: HttpClient;47 let httpTestingController: HttpTestingController;48 beforeEach(() => {49 TestBed.configureTestingModule({50 imports: [HttpClientTestingModule],51 });
Using AI Code Generation
1import { createComponentFactory, mockProvider, Spectator } from '@ngneat/spectator/jest';2import { MockBuilder } from 'ng-mocks';3import { AppModule } from '../app.module';4import { AppComponent } from '../app.component';5import { environment } from '../environments/environment';6import { HttpClient } from '@angular/common/http';7import { of } from 'rxjs';8import { HttpClientTestingModule } from '@angular/common/http/testing';9import { RouterTestingModule } from '@angular/router/testing';10import { Router } from '@angular/router';11describe('AppComponent', () => {12 let spectator: Spectator<AppComponent>;13 const createComponent = createComponentFactory({14 imports: [15 MockBuilder(AppModule)16 .mock(HttpClient)17 .mock(Router),18 });19 beforeEach(() => {20 spectator = createComponent();21 });22 it('should create the app', () => {23 expect(spectator.component).toBeTruthy();24 });25 it('should render title', () => {26 expect(spectator.query('h1')?.textContent).toContain('Welcome to app!');27 });28 it('should render logo', () => {29 expect(spectator.query('img')).toBeTruthy();30 });31 it('should render links', () => {32 expect(spectator.queryAll('a').length).toBe(3);33 });34 it('should render footer', () => {35 expect(spectator.query('footer')).toBeTruthy();36 });37 it('should render footer with correct text', () => {38 expect(spectator.query('footer')?.textContent).toContain(39 `© 2019-${new Date().getFullYear()}`40 );41 });42 it('should render footer with correct link', () => {43 expect(spectator.query('footer a')?.getAttribute('href')).toBe(
Using AI Code Generation
1import {ngMocks} from 'ng-mocks';2import {ngMocks} from 'ng-mocks';3import {ngMocks} from 'ng-mocks';4import {ngMocks} from 'ng-mocks';5import {ngMocks} from 'ng-mocks';6import {ngMocks} from 'ng-mocks';7import {ngMocks} from 'ng-mocks';8import {ngMocks} from 'ng-mocks';9import {ngMocks} from 'ng-mocks';10import {ngMocks} from 'ng-mocks';11import {ngMocks} from 'ng-mocks';12import {ngMocks} from 'ng-mocks';13import {ngMocks} from 'ng-mocks';14import {ngMocks} from 'ng-mocks';15import {ngMocks} from 'ng-mocks';16import {ngMocks} from 'ng-mocks';17import {ngMocks} from 'ng-mocks';18import {ngMocks} from 'ng-mocks';19import {ngMocks} from 'ng-mocks';20import {ngMocks} from 'ng-mocks';
Using AI Code Generation
1import { TestBed } from '@angular/core/testing';2import { AppComponent } from './app.component';3describe('AppComponent', () => {4 let component;5 beforeEach(() => {6 TestBed.configureTestingModule({7 });8 component = TestBed.createComponent(AppComponent).componentInstance;9 });10 it('should create the app', () => {11 expect(component).toBeTruthy();12 });13 it('should have as title "ng-mocks" in ngOnInit', () => {14 const spy = spyOn(component, 'ngOnInit');15 component.ngOnInit();16 expect(spy).toHaveBeenCalled();17 expect(component.title).toEqual('ng-mocks');18 });19});20import { Component, OnInit } from '@angular/core';21@Component({22})23export class AppComponent implements OnInit {24 title = 'ng-mocks';25 ngOnInit(): void {26 this.title = 'ng-mocks';27 }28}29<h1> {{ title }} </h1>30h1 {31 font-size: 3rem;32 font-weight: 400;33}34const path = require('path');35const { getAngularCliWebpackConfigPartial } = require('@angular-builders/custom-webpack');36module.exports = function (config) {37 config.set({38 require('karma-jasmine'),39 require('karma-chrome-launcher'),40 require('karma-jasmine-html-reporter'),41 require('karma-coverage-istanbul-reporter'),42 require('@angular-devkit/build-angular/plugins/karma'),43 client: {44 },45 customLaunchers: {46 ChromeHeadlessNoSandbox: {
Check out the latest blogs from LambdaTest on this topic:
Estimates are critical if you want to be successful with projects. If you begin with a bad estimating approach, the project will almost certainly fail. To produce a much more promising estimate, direct each estimation-process issue toward a repeatable standard process. A smart approach reduces the degree of uncertainty. When dealing with presales phases, having the most precise estimation findings can assist you to deal with the project plan. This also helps the process to function more successfully, especially when faced with tight schedules and the danger of deviation.
Unit testing is typically software testing within the developer domain. As the QA role expands in DevOps, QAOps, DesignOps, or within an Agile team, QA testers often find themselves creating unit tests. QA testers may create unit tests within the code using a specified unit testing tool, or independently using a variety of methods.
One of the most important skills for leaders to have is the ability to prioritize. To understand how we can organize all of the tasks that must be completed in order to complete a project, we must first understand the business we are in, particularly the project goals. There might be several project drivers that stimulate project execution and motivate a company to allocate the appropriate funding.
Anyone who has worked in the software industry for a while can tell you stories about projects that were on the verge of failure. Many initiatives fail even before they reach clients, which is especially disheartening when the failure is fully avoidable.
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!