提交 fd58b358 编写于 作者: T Tristan Valcke

Simplifying if else statement as ternary in webgl_machingcubes

上级 8566c825
......@@ -421,25 +421,8 @@
m_s.setValue( mat.s );
m_l.setValue( mat.l );
if ( current_material === "textured" ) {
effect.enableUvs = true;
} else {
effect.enableUvs = false;
}
if ( current_material === "colors" ) {
effect.enableColors = true;
} else {
effect.enableColors = false;
}
effect.enableUvs = (current_material === "textured") ? true : false;
effect.enableColors = (current_material === "colors") ? true : false;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册