mirror of https://github.com/axmolengine/axmol.git
Merge pull request #3053 from dumganhar/iss2285-js-motionstreak
Adding MotionStreak test for TestJavascript.
This commit is contained in:
commit
7892f1ac9d
|
@ -65,7 +65,7 @@ MotionStreak::~MotionStreak()
|
|||
CC_SAFE_FREE(_texCoords);
|
||||
}
|
||||
|
||||
MotionStreak* MotionStreak::create(float fade, float minSeg, float stroke, ccColor3B color, const char* path)
|
||||
MotionStreak* MotionStreak::create(float fade, float minSeg, float stroke, const ccColor3B& color, const char* path)
|
||||
{
|
||||
MotionStreak *pRet = new MotionStreak();
|
||||
if (pRet && pRet->initWithFade(fade, minSeg, stroke, color, path))
|
||||
|
@ -78,7 +78,7 @@ MotionStreak* MotionStreak::create(float fade, float minSeg, float stroke, ccCol
|
|||
return NULL;
|
||||
}
|
||||
|
||||
MotionStreak* MotionStreak::create(float fade, float minSeg, float stroke, ccColor3B color, Texture2D* texture)
|
||||
MotionStreak* MotionStreak::create(float fade, float minSeg, float stroke, const ccColor3B& color, Texture2D* texture)
|
||||
{
|
||||
MotionStreak *pRet = new MotionStreak();
|
||||
if (pRet && pRet->initWithFade(fade, minSeg, stroke, color, texture))
|
||||
|
@ -91,7 +91,7 @@ MotionStreak* MotionStreak::create(float fade, float minSeg, float stroke, ccCol
|
|||
return NULL;
|
||||
}
|
||||
|
||||
bool MotionStreak::initWithFade(float fade, float minSeg, float stroke, ccColor3B color, const char* path)
|
||||
bool MotionStreak::initWithFade(float fade, float minSeg, float stroke, const ccColor3B& color, const char* path)
|
||||
{
|
||||
CCAssert(path != NULL, "Invalid filename");
|
||||
|
||||
|
@ -99,7 +99,7 @@ bool MotionStreak::initWithFade(float fade, float minSeg, float stroke, ccColor3
|
|||
return initWithFade(fade, minSeg, stroke, color, texture);
|
||||
}
|
||||
|
||||
bool MotionStreak::initWithFade(float fade, float minSeg, float stroke, ccColor3B color, Texture2D* texture)
|
||||
bool MotionStreak::initWithFade(float fade, float minSeg, float stroke, const ccColor3B& color, Texture2D* texture)
|
||||
{
|
||||
Node::setPosition(PointZero);
|
||||
setAnchorPoint(PointZero);
|
||||
|
@ -143,7 +143,7 @@ void MotionStreak::setPosition(const Point& position)
|
|||
_positionR = position;
|
||||
}
|
||||
|
||||
void MotionStreak::tintWithColor(ccColor3B colors)
|
||||
void MotionStreak::tintWithColor(const ccColor3B& colors)
|
||||
{
|
||||
setColor(colors);
|
||||
|
||||
|
|
|
@ -53,17 +53,17 @@ public:
|
|||
virtual ~MotionStreak();
|
||||
|
||||
/** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture filename */
|
||||
static MotionStreak* create(float fade, float minSeg, float stroke, ccColor3B color, const char* path);
|
||||
static MotionStreak* create(float fade, float minSeg, float stroke, const ccColor3B& color, const char* path);
|
||||
/** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture */
|
||||
static MotionStreak* create(float fade, float minSeg, float stroke, ccColor3B color, Texture2D* texture);
|
||||
static MotionStreak* create(float fade, float minSeg, float stroke, const ccColor3B& color, Texture2D* texture);
|
||||
|
||||
/** initializes a motion streak with fade in seconds, minimum segments, stroke's width, color and texture filename */
|
||||
bool initWithFade(float fade, float minSeg, float stroke, ccColor3B color, const char* path);
|
||||
bool initWithFade(float fade, float minSeg, float stroke, const ccColor3B& color, const char* path);
|
||||
/** initializes a motion streak with fade in seconds, minimum segments, stroke's width, color and texture */
|
||||
bool initWithFade(float fade, float minSeg, float stroke, ccColor3B color, Texture2D* texture);
|
||||
bool initWithFade(float fade, float minSeg, float stroke, const ccColor3B& color, Texture2D* texture);
|
||||
|
||||
/** color used for the tint */
|
||||
void tintWithColor(ccColor3B colors);
|
||||
void tintWithColor(const ccColor3B& colors);
|
||||
|
||||
/** Remove all living segments of the ribbon */
|
||||
void reset();
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 38374930ae707c70611ad1fcb3a5af91d50d72d0
|
||||
Subproject commit e4b1b15b70075dee1f20afff4741eb0be88b0a8b
|
|
@ -10,6 +10,7 @@
|
|||
15A3D5631682F20C002FB0C5 /* main.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3D4621682F14C002FB0C5 /* main.js */; };
|
||||
15A3D5651682F20C002FB0C5 /* tests_resources-jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3D4711682F14C002FB0C5 /* tests_resources-jsb.js */; };
|
||||
15A3D5681682F20C002FB0C5 /* tests-main.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3D4741682F14C002FB0C5 /* tests-main.js */; };
|
||||
1A42C7A81782CEA100F738F6 /* MotionStreakTest in Resources */ = {isa = PBXBuildFile; fileRef = 1A42C7A71782CEA100F738F6 /* MotionStreakTest */; };
|
||||
1A4C3F1317784B6000EDFB3B /* libchipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A4C3F0E17784B6000EDFB3B /* libchipmunk.a */; };
|
||||
1A4C3F1417784B6000EDFB3B /* libcocos2dx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A4C3F0F17784B6000EDFB3B /* libcocos2dx.a */; };
|
||||
1A4C3F1517784B6000EDFB3B /* libCocosDenshion.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A4C3F1017784B6000EDFB3B /* libCocosDenshion.a */; };
|
||||
|
@ -117,6 +118,7 @@
|
|||
15A3D4621682F14C002FB0C5 /* main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = main.js; path = ../../Shared/tests/main.js; sourceTree = "<group>"; };
|
||||
15A3D4711682F14C002FB0C5 /* tests_resources-jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "tests_resources-jsb.js"; path = "../../Shared/tests/tests_resources-jsb.js"; sourceTree = "<group>"; };
|
||||
15A3D4741682F14C002FB0C5 /* tests-main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "tests-main.js"; path = "../../Shared/tests/tests-main.js"; sourceTree = "<group>"; };
|
||||
1A42C7A71782CEA100F738F6 /* MotionStreakTest */ = {isa = PBXFileReference; lastKnownFileType = folder; name = MotionStreakTest; path = ../../Shared/tests/MotionStreakTest; sourceTree = "<group>"; };
|
||||
1A4C3F0E17784B6000EDFB3B /* libchipmunk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libchipmunk.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1A4C3F0F17784B6000EDFB3B /* libcocos2dx.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libcocos2dx.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1A4C3F1017784B6000EDFB3B /* libCocosDenshion.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libCocosDenshion.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
|
@ -333,14 +335,13 @@
|
|||
D401B5FC16FB169100F2529D /* js_src_raw */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A22656EE1743DCBB00598A2C /* ClippingNodeTest */,
|
||||
A218F7DB1743D97E00F65883 /* XHRTest */,
|
||||
1AA51A7816F708FA000FDF05 /* ActionManagerTest */,
|
||||
1AA51A7916F708FA000FDF05 /* ActionsTest */,
|
||||
1AA51A7A16F708FA000FDF05 /* BaseTestLayer */,
|
||||
1AA51A7B16F708FA000FDF05 /* Box2dTest */,
|
||||
1AA51A7C16F708FA000FDF05 /* ChipmunkTest */,
|
||||
1AA51A7D16F708FA000FDF05 /* ClickAndMoveTest */,
|
||||
A22656EE1743DCBB00598A2C /* ClippingNodeTest */,
|
||||
1AA51A7E16F708FA000FDF05 /* CocosDenshionTest */,
|
||||
1AA51A7F16F708FA000FDF05 /* CocosNodeTest */,
|
||||
1AA51A8016F708FA000FDF05 /* CurrentLanguageTest */,
|
||||
|
@ -355,7 +356,9 @@
|
|||
1AA51A8816F708FA000FDF05 /* IntervalTest */,
|
||||
1AA51A8916F708FA000FDF05 /* LabelTest */,
|
||||
1AA51A8A16F708FA000FDF05 /* LayerTest */,
|
||||
15A3D4621682F14C002FB0C5 /* main.js */,
|
||||
1AA51A8B16F708FA000FDF05 /* MenuTest */,
|
||||
1A42C7A71782CEA100F738F6 /* MotionStreakTest */,
|
||||
1AA51A8C16F708FA000FDF05 /* OpenGLTest */,
|
||||
1AA51A8D16F708FA000FDF05 /* ParallaxTest */,
|
||||
1AA51A8E16F708FA000FDF05 /* ParticleTest */,
|
||||
|
@ -368,16 +371,16 @@
|
|||
1AA51A9616F708FA000FDF05 /* SchedulerTest */,
|
||||
1AA51A9716F708FA000FDF05 /* SpriteTest */,
|
||||
1AA51A9816F708FA000FDF05 /* SysTest */,
|
||||
D401B6DE16FC071100F2529D /* tests-boot-jsb.js */,
|
||||
15A3D4741682F14C002FB0C5 /* tests-main.js */,
|
||||
15A3D4711682F14C002FB0C5 /* tests_resources-jsb.js */,
|
||||
1AA51A9916F708FA000FDF05 /* TextInputTest */,
|
||||
1AA51A9A16F708FA000FDF05 /* TextureCacheTest */,
|
||||
1AA51A9B16F708FA000FDF05 /* TileMapTest */,
|
||||
1AA51A9C16F708FA000FDF05 /* TouchesTest */,
|
||||
1AA51A9D16F708FA000FDF05 /* TransitionsTest */,
|
||||
1AA51A9E16F708FA000FDF05 /* UnitTest */,
|
||||
15A3D4621682F14C002FB0C5 /* main.js */,
|
||||
D401B6DE16FC071100F2529D /* tests-boot-jsb.js */,
|
||||
15A3D4741682F14C002FB0C5 /* tests-main.js */,
|
||||
15A3D4711682F14C002FB0C5 /* tests_resources-jsb.js */,
|
||||
A218F7DB1743D97E00F65883 /* XHRTest */,
|
||||
);
|
||||
name = js_src_raw;
|
||||
sourceTree = "<group>";
|
||||
|
@ -549,6 +552,7 @@
|
|||
1A80332C1728F1FB00240CC3 /* res in Resources */,
|
||||
A218F7DC1743D97E00F65883 /* XHRTest in Resources */,
|
||||
A22656EF1743DCBB00598A2C /* ClippingNodeTest in Resources */,
|
||||
1A42C7A81782CEA100F738F6 /* MotionStreakTest in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 1aef083d3959574072f234cd31c5a53ac52b58a9
|
||||
Subproject commit 5df9199315b9e9972da23e478808a2e9152e9980
|
|
@ -1 +1 @@
|
|||
Subproject commit 6a45a0770c4e6075f20d5049c88e3cb5f8aa83eb
|
||||
Subproject commit b09d920cdb2523ba7ee1a5ee4419fe11f1bc5e7b
|
|
@ -26,7 +26,7 @@ headers = %(cocosdir)s/cocos2dx/include/cocos2d.h %(cocosdir)s/CocosDenshion/inc
|
|||
|
||||
# what classes to produce code for. You can use regular expressions here. When testing the regular
|
||||
# expression, it will be enclosed in "^$", like this: "^Menu*$".
|
||||
classes = Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn Animat.* Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* TMX.* CallFunc RenderTexture GridAction Grid3DAction GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Speed ActionManager Set Data SimpleAudioEngine Scheduler Timer Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode .*3D$ Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram ShaderCache Application ClippingNode
|
||||
classes = Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn Animat.* Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* TMX.* CallFunc RenderTexture GridAction Grid3DAction GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Speed ActionManager Set Data SimpleAudioEngine Scheduler Timer Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode .*3D$ Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram ShaderCache Application ClippingNode MotionStreak
|
||||
|
||||
# what should we skip? in the format ClassName::[function function]
|
||||
# ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also
|
||||
|
@ -35,17 +35,17 @@ classes = Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.*
|
|||
# will apply to all class names. This is a convenience wildcard to be able to skip similar named
|
||||
# functions from all classes.
|
||||
|
||||
skip = Node::[convertToWindowSpace ^setPosition$ getGrid setGLServerState description getUserObject .*UserData getGLServerState .*schedule],
|
||||
skip = Node::[^setPosition$ getGrid setGLServerState description getUserObject .*UserData getGLServerState .*schedule],
|
||||
Sprite::[getQuad displayFrame getBlendFunc ^setPosition$ setBlendFunc setSpriteBatchNode getSpriteBatchNode],
|
||||
SpriteBatchNode::[getBlendFunc setBlendFunc],
|
||||
MotionStreak::[getBlendFunc setBlendFunc],
|
||||
MotionStreak::[getBlendFunc setBlendFunc draw update],
|
||||
AtlasNode::[getBlendFunc setBlendFunc],
|
||||
ParticleBatchNode::[getBlendFunc setBlendFunc],
|
||||
LayerColor::[getBlendFunc setBlendFunc],
|
||||
ParticleSystem::[getBlendFunc setBlendFunc],
|
||||
DrawNode::[getBlendFunc setBlendFunc drawPolygon],
|
||||
Director::[getAccelerometer (g|s)et.*Dispatcher getOpenGLView getProjection getClassTypeInfo],
|
||||
Layer.*::[didAccelerate (g|s)etBlendFunc],
|
||||
Layer.*::[didAccelerate (g|s)etBlendFunc keyPressed keyReleased unregisterScriptKeypadHandler],
|
||||
Menu.*::[.*Target getSubItems create initWithItems alignItemsInRows alignItemsInColumns],
|
||||
MenuItem.*::[create setCallback initWithCallback],
|
||||
Copying::[*],
|
||||
|
|
Loading…
Reference in New Issue