fix light3D reader error

This commit is contained in:
Liam 2015-10-20 15:24:34 +08:00
parent 320de102bb
commit 7280a963b3
2 changed files with 1 additions and 9 deletions

View File

@ -426,14 +426,6 @@ namespace cocostudio
node->removeComponent(ComExtensionData::COMPONENT_NAME); node->removeComponent(ComExtensionData::COMPONENT_NAME);
} }
node->addComponent(extensionData); node->addComponent(extensionData);
bool useDefaultLight = options->useDefaultLight();
if (useDefaultLight)
{
AmbientLight* defaultLight = AmbientLight::create(Color3B::WHITE);
defaultLight->setIntensity(0.5f);
node->addChild(defaultLight);
}
} }
Node* GameNode3DReader::createNodeWithFlatBuffers(const flatbuffers::Table *node3DOptions) Node* GameNode3DReader::createNodeWithFlatBuffers(const flatbuffers::Table *node3DOptions)

View File

@ -78,7 +78,7 @@ namespace cocostudio
auto temp = Node3DReader::getInstance()->createOptionsWithFlatBuffers(objectData, builder); auto temp = Node3DReader::getInstance()->createOptionsWithFlatBuffers(objectData, builder);
auto node3DOptions = *(Offset<Node3DOption>*)(&temp); auto node3DOptions = *(Offset<Node3DOption>*)(&temp);
bool enabled = false; bool enabled = true;
int type = 0; int type = 0;
int flag = 0; int flag = 0;
float intensity = 1.0f; float intensity = 1.0f;