提交 3fd4f8e8 编写于 作者: J Jeff Terrace

Added support for picking up <double_sided> flags inside <effect>/<extra>,...

Added support for picking up <double_sided> flags inside <effect>/<extra>, applying it to the Material. This is half of Issue #2280.
上级 ee7d002a
......@@ -3158,6 +3158,7 @@ THREE.ColladaLoader = function () {
}
props[ 'shading' ] = preferredShading;
props[ 'doubleSided' ] = this.effect.doubleSided;
switch ( this.type ) {
......@@ -3315,6 +3316,16 @@ THREE.ColladaLoader = function () {
this.id = element.getAttribute( 'id' );
this.name = element.getAttribute( 'name' );
this.doubleSided = false;
var double_sided = COLLADA.evaluate( './/dae:extra//dae:double_sided', element, _nsResolver, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null );
if (double_sided) {
double_sided = double_sided.iterateNext();
if ( double_sided && parseInt( double_sided.textContent, 10 ) === 1) {
this.doubleSided = true;
}
}
this.shader = null;
for ( var i = 0; i < element.childNodes.length; i ++ ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册