mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
修复反序列化场景是,把specular误当作数值的bug。
This commit is contained in:
parent
b219eb4ff6
commit
ef8da64ff6
@ -14,6 +14,8 @@ Supported Languages: 中文 / [繁體中文](README-tw.md) / [English](README-en
|
||||
3. 角色管理:添加角色、编辑角色、删除角色、查找角色。
|
||||
4. 用户管理:添加用户、编辑用户、删除用户、查找用户。
|
||||
5. `DataGrid`控件大幅度优化:每页显示条数设置;跳转第一页、前一页、后一页、最后一页;当前页和总页数;刷新按钮;每页条数和总记录数展示,加载数据显示LoadMask。
|
||||
6. 修复非高光材质切换高光材质报错的bug。
|
||||
7. 修复反序列化场景是,把`specular`误当作数值的bug。
|
||||
|
||||
## v0.3.3更新
|
||||
|
||||
|
||||
@ -547,7 +547,8 @@ class MaterialComponent extends React.Component {
|
||||
editor.execute(new SetMaterialColorCommand(object, 'emissive', emissive));
|
||||
}
|
||||
|
||||
if (material.specular !== undefined && `#${material.specular}` !== specular) {
|
||||
// bug: 切换材质时,由于新材质有specular属性,旧材质没有specular属性,可能会导致报错。
|
||||
if (material.specular !== undefined && `#${material.specular.getHexString()}` !== specular && specular !== null) {
|
||||
editor.execute(new SetMaterialValueCommand(object, 'specular', specular));
|
||||
}
|
||||
|
||||
|
||||
@ -127,7 +127,8 @@ MaterialSerializer.prototype.fromJSON = function (json, parent, server) {
|
||||
obj.emissiveMap = json.emissiveMap == null ? null : (new TexturesSerializer()).fromJSON(json.emissiveMap, undefined, server);
|
||||
|
||||
if (json.specular !== undefined) {
|
||||
obj.specular = json.specular;
|
||||
// bug: json.specular是颜色值。
|
||||
obj.specular = new THREE.Color(json.specular);
|
||||
}
|
||||
if (json.specularMap !== undefined) {
|
||||
obj.specularMap = (new TexturesSerializer()).toJSON(json.specularMap);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user