mirror of https://github.com/axmolengine/axmol.git
Merge branch 'v3' into v3_fixGLProgramCrash
This commit is contained in:
commit
a08d0e4be3
|
@ -25,6 +25,7 @@ cocos2d-x-3.3-beta1
|
||||||
[FIX] Node: unscheduleAllSelectors() deprecated in favor of unscheudleAllCallbacks()
|
[FIX] Node: unscheduleAllSelectors() deprecated in favor of unscheudleAllCallbacks()
|
||||||
[FIX] Node: crashed if remove/add child too quickly when using integrated physics
|
[FIX] Node: crashed if remove/add child too quickly when using integrated physics
|
||||||
[FIX] TextFieldTTF: will get wrong characters if using Chinese input method on WP8
|
[FIX] TextFieldTTF: will get wrong characters if using Chinese input method on WP8
|
||||||
|
[FIX] UI: Button: button remains gray when releasing it, this issue only happened if enable scale9 and only has one texture
|
||||||
|
|
||||||
cocos2d-x-3.3-beta0 Sep.20 2014
|
cocos2d-x-3.3-beta0 Sep.20 2014
|
||||||
[NEW] 3d: added `BillBoard`
|
[NEW] 3d: added `BillBoard`
|
||||||
|
|
|
@ -1775,7 +1775,6 @@ NodeData* Bundle3D::parseNodesRecursivelyJson(const rapidjson::Value& jvalue)
|
||||||
|
|
||||||
if (modelnodedata->subMeshId == "" || modelnodedata->matrialId == "")
|
if (modelnodedata->subMeshId == "" || modelnodedata->matrialId == "")
|
||||||
{
|
{
|
||||||
std::string err = "Node " + nodedata->id + " part is missing meshPartId or materialId";
|
|
||||||
CCLOG("warning: Node %s part is missing meshPartId or materialId", nodedata->id.c_str());
|
CCLOG("warning: Node %s part is missing meshPartId or materialId", nodedata->id.c_str());
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,19 +69,15 @@ void DirectionLight::setDirection(const Vec3 &dir)
|
||||||
{
|
{
|
||||||
setRotationFromDirection(dir);
|
setRotationFromDirection(dir);
|
||||||
}
|
}
|
||||||
const Vec3& DirectionLight::getDirection() const
|
Vec3 DirectionLight::getDirection() const
|
||||||
{
|
{
|
||||||
static Vec3 dir;
|
|
||||||
Mat4 mat = getNodeToParentTransform();
|
Mat4 mat = getNodeToParentTransform();
|
||||||
dir.set(-mat.m[8], -mat.m[9], -mat.m[10]);
|
return Vec3(-mat.m[8], -mat.m[9], -mat.m[10]);
|
||||||
return dir;
|
|
||||||
}
|
}
|
||||||
const Vec3& DirectionLight::getDirectionInWorld() const
|
Vec3 DirectionLight::getDirectionInWorld() const
|
||||||
{
|
{
|
||||||
static Vec3 dir;
|
|
||||||
Mat4 mat = getNodeToWorldTransform();
|
Mat4 mat = getNodeToWorldTransform();
|
||||||
dir.set(-mat.m[8], -mat.m[9], -mat.m[10]);
|
return Vec3(-mat.m[8], -mat.m[9], -mat.m[10]);
|
||||||
return dir;
|
|
||||||
}
|
}
|
||||||
DirectionLight::DirectionLight()
|
DirectionLight::DirectionLight()
|
||||||
{
|
{
|
||||||
|
@ -131,20 +127,16 @@ void SpotLight::setDirection(const Vec3 &dir)
|
||||||
setRotationFromDirection(dir);
|
setRotationFromDirection(dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
const Vec3& SpotLight::getDirection() const
|
Vec3 SpotLight::getDirection() const
|
||||||
{
|
{
|
||||||
static Vec3 dir;
|
|
||||||
Mat4 mat = getNodeToParentTransform();
|
Mat4 mat = getNodeToParentTransform();
|
||||||
dir.set(-mat.m[8], -mat.m[9], -mat.m[10]);
|
return Vec3(-mat.m[8], -mat.m[9], -mat.m[10]);
|
||||||
return dir;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const Vec3& SpotLight::getDirectionInWorld() const
|
Vec3 SpotLight::getDirectionInWorld() const
|
||||||
{
|
{
|
||||||
static Vec3 dir;
|
|
||||||
Mat4 mat = getNodeToWorldTransform();
|
Mat4 mat = getNodeToWorldTransform();
|
||||||
dir.set(-mat.m[8], -mat.m[9], -mat.m[10]);
|
return Vec3(-mat.m[8], -mat.m[9], -mat.m[10]);
|
||||||
return dir;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpotLight::setInnerAngle(float angle)
|
void SpotLight::setInnerAngle(float angle)
|
||||||
|
@ -156,7 +148,7 @@ void SpotLight::setInnerAngle(float angle)
|
||||||
void SpotLight::setOuterAngle(float angle)
|
void SpotLight::setOuterAngle(float angle)
|
||||||
{
|
{
|
||||||
_outerAngle = angle;
|
_outerAngle = angle;
|
||||||
_cosInnerAngle = cosf(angle);
|
_cosOuterAngle = cosf(angle);
|
||||||
}
|
}
|
||||||
|
|
||||||
SpotLight::SpotLight()
|
SpotLight::SpotLight()
|
||||||
|
|
|
@ -120,12 +120,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* Returns the Direction in parent.
|
* Returns the Direction in parent.
|
||||||
*/
|
*/
|
||||||
const Vec3& getDirection() const;
|
Vec3 getDirection() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns direction in world.
|
* Returns direction in world.
|
||||||
*/
|
*/
|
||||||
const Vec3& getDirectionInWorld() const;
|
Vec3 getDirectionInWorld() const;
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
DirectionLight();
|
DirectionLight();
|
||||||
|
@ -190,12 +190,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* Returns the Direction in parent.
|
* Returns the Direction in parent.
|
||||||
*/
|
*/
|
||||||
const Vec3& getDirection() const;
|
Vec3 getDirection() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns direction in world.
|
* Returns direction in world.
|
||||||
*/
|
*/
|
||||||
const Vec3& getDirectionInWorld() const;
|
Vec3 getDirectionInWorld() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the range of point or spot light.
|
* Sets the range of point or spot light.
|
||||||
|
@ -238,7 +238,7 @@ public:
|
||||||
float getOuterAngle() const { return _outerAngle; }
|
float getOuterAngle() const { return _outerAngle; }
|
||||||
|
|
||||||
/** get cos outAngle */
|
/** get cos outAngle */
|
||||||
float getCosOuterAngle() const { return _cosInnerAngle; }
|
float getCosOuterAngle() const { return _cosOuterAngle; }
|
||||||
|
|
||||||
CC_CONSTRUCTOR_ACCESS:
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
SpotLight();
|
SpotLight();
|
||||||
|
|
|
@ -115,7 +115,11 @@ void ActionManagerEx::initWithDictionary(const char* jsonName,const rapidjson::V
|
||||||
|
|
||||||
ActionObject* ActionManagerEx::getActionByName(const char* jsonName,const char* actionName)
|
ActionObject* ActionManagerEx::getActionByName(const char* jsonName,const char* actionName)
|
||||||
{
|
{
|
||||||
auto iterator = _actionDic.find(jsonName);
|
std::string path = jsonName;
|
||||||
|
ssize_t pos = path.find_last_of("/");
|
||||||
|
std::string fileName = path.substr(pos+1,path.length());
|
||||||
|
CCLOG("find filename == %s",fileName.c_str());
|
||||||
|
auto iterator = _actionDic.find(fileName);
|
||||||
if (iterator == _actionDic.end())
|
if (iterator == _actionDic.end())
|
||||||
{
|
{
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
|
@ -373,13 +373,21 @@ void Button::onPressStateChangedToNormal()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (_scale9Enabled)
|
||||||
|
{
|
||||||
|
_buttonNormalRenderer->setColor(Color3B::WHITE);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
_buttonNormalRenderer->stopAllActions();
|
_buttonNormalRenderer->stopAllActions();
|
||||||
_buttonNormalRenderer->setScale(_normalTextureScaleXInSize, _normalTextureScaleYInSize);
|
_buttonNormalRenderer->setScale(_normalTextureScaleXInSize, _normalTextureScaleYInSize);
|
||||||
|
|
||||||
_titleRenderer->stopAllActions();
|
_titleRenderer->stopAllActions();
|
||||||
_titleRenderer->setScaleX(_normalTextureScaleXInSize);
|
_titleRenderer->setScaleX(_normalTextureScaleXInSize);
|
||||||
_titleRenderer->setScaleY(_normalTextureScaleYInSize);
|
_titleRenderer->setScaleY(_normalTextureScaleYInSize);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Button::onPressStateChangedToPressed()
|
void Button::onPressStateChangedToPressed()
|
||||||
|
|
|
@ -10,4 +10,4 @@
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-10
|
target=android-10
|
||||||
|
|
||||||
android.library.reference.1=../../../cocos/platform/android/java
|
android.library.reference.1=../cocos2d/cocos/platform/android/java
|
||||||
|
|
Loading…
Reference in New Issue