mirror of https://github.com/axmolengine/axmol.git
fix light3D reader error
This commit is contained in:
parent
320de102bb
commit
7280a963b3
|
@ -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)
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue