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: 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] 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
|
||||
[NEW] 3d: added `BillBoard`
|
||||
|
|
|
@ -1775,7 +1775,6 @@ NodeData* Bundle3D::parseNodesRecursivelyJson(const rapidjson::Value& jvalue)
|
|||
|
||||
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());
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -69,19 +69,15 @@ void DirectionLight::setDirection(const Vec3 &dir)
|
|||
{
|
||||
setRotationFromDirection(dir);
|
||||
}
|
||||
const Vec3& DirectionLight::getDirection() const
|
||||
Vec3 DirectionLight::getDirection() const
|
||||
{
|
||||
static Vec3 dir;
|
||||
Mat4 mat = getNodeToParentTransform();
|
||||
dir.set(-mat.m[8], -mat.m[9], -mat.m[10]);
|
||||
return dir;
|
||||
return Vec3(-mat.m[8], -mat.m[9], -mat.m[10]);
|
||||
}
|
||||
const Vec3& DirectionLight::getDirectionInWorld() const
|
||||
Vec3 DirectionLight::getDirectionInWorld() const
|
||||
{
|
||||
static Vec3 dir;
|
||||
Mat4 mat = getNodeToWorldTransform();
|
||||
dir.set(-mat.m[8], -mat.m[9], -mat.m[10]);
|
||||
return dir;
|
||||
return Vec3(-mat.m[8], -mat.m[9], -mat.m[10]);
|
||||
}
|
||||
DirectionLight::DirectionLight()
|
||||
{
|
||||
|
@ -131,20 +127,16 @@ void SpotLight::setDirection(const Vec3 &dir)
|
|||
setRotationFromDirection(dir);
|
||||
}
|
||||
|
||||
const Vec3& SpotLight::getDirection() const
|
||||
Vec3 SpotLight::getDirection() const
|
||||
{
|
||||
static Vec3 dir;
|
||||
Mat4 mat = getNodeToParentTransform();
|
||||
dir.set(-mat.m[8], -mat.m[9], -mat.m[10]);
|
||||
return dir;
|
||||
return Vec3(-mat.m[8], -mat.m[9], -mat.m[10]);
|
||||
}
|
||||
|
||||
const Vec3& SpotLight::getDirectionInWorld() const
|
||||
Vec3 SpotLight::getDirectionInWorld() const
|
||||
{
|
||||
static Vec3 dir;
|
||||
Mat4 mat = getNodeToWorldTransform();
|
||||
dir.set(-mat.m[8], -mat.m[9], -mat.m[10]);
|
||||
return dir;
|
||||
return Vec3(-mat.m[8], -mat.m[9], -mat.m[10]);
|
||||
}
|
||||
|
||||
void SpotLight::setInnerAngle(float angle)
|
||||
|
@ -156,7 +148,7 @@ void SpotLight::setInnerAngle(float angle)
|
|||
void SpotLight::setOuterAngle(float angle)
|
||||
{
|
||||
_outerAngle = angle;
|
||||
_cosInnerAngle = cosf(angle);
|
||||
_cosOuterAngle = cosf(angle);
|
||||
}
|
||||
|
||||
SpotLight::SpotLight()
|
||||
|
|
|
@ -120,12 +120,12 @@ public:
|
|||
/**
|
||||
* Returns the Direction in parent.
|
||||
*/
|
||||
const Vec3& getDirection() const;
|
||||
Vec3 getDirection() const;
|
||||
|
||||
/**
|
||||
* Returns direction in world.
|
||||
*/
|
||||
const Vec3& getDirectionInWorld() const;
|
||||
Vec3 getDirectionInWorld() const;
|
||||
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
DirectionLight();
|
||||
|
@ -190,12 +190,12 @@ public:
|
|||
/**
|
||||
* Returns the Direction in parent.
|
||||
*/
|
||||
const Vec3& getDirection() const;
|
||||
Vec3 getDirection() const;
|
||||
|
||||
/**
|
||||
* Returns direction in world.
|
||||
*/
|
||||
const Vec3& getDirectionInWorld() const;
|
||||
Vec3 getDirectionInWorld() const;
|
||||
|
||||
/**
|
||||
* Sets the range of point or spot light.
|
||||
|
@ -238,7 +238,7 @@ public:
|
|||
float getOuterAngle() const { return _outerAngle; }
|
||||
|
||||
/** get cos outAngle */
|
||||
float getCosOuterAngle() const { return _cosInnerAngle; }
|
||||
float getCosOuterAngle() const { return _cosOuterAngle; }
|
||||
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
SpotLight();
|
||||
|
|
|
@ -115,7 +115,11 @@ void ActionManagerEx::initWithDictionary(const char* jsonName,const rapidjson::V
|
|||
|
||||
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())
|
||||
{
|
||||
return nullptr;
|
||||
|
|
|
@ -374,11 +374,19 @@ void Button::onPressStateChangedToNormal()
|
|||
}
|
||||
else
|
||||
{
|
||||
_buttonNormalRenderer->stopAllActions();
|
||||
_buttonNormalRenderer->setScale(_normalTextureScaleXInSize, _normalTextureScaleYInSize);
|
||||
_titleRenderer->stopAllActions();
|
||||
_titleRenderer->setScaleX(_normalTextureScaleXInSize);
|
||||
_titleRenderer->setScaleY(_normalTextureScaleYInSize);
|
||||
if (_scale9Enabled)
|
||||
{
|
||||
_buttonNormalRenderer->setColor(Color3B::WHITE);
|
||||
}
|
||||
else
|
||||
{
|
||||
_buttonNormalRenderer->stopAllActions();
|
||||
_buttonNormalRenderer->setScale(_normalTextureScaleXInSize, _normalTextureScaleYInSize);
|
||||
|
||||
_titleRenderer->stopAllActions();
|
||||
_titleRenderer->setScaleX(_normalTextureScaleXInSize);
|
||||
_titleRenderer->setScaleY(_normalTextureScaleYInSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
# Project target.
|
||||
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