提交 75580e83 编写于 作者: M Mr.doob

ColladaLoader2: Handle undefined samplers.

上级 4bb6a7ba
......@@ -495,14 +495,23 @@ THREE.ColladaLoader.prototype = {
function getTexture( sid ) {
var sampler = effect.profile.samplers[ sid ];
var surface = effect.profile.surfaces[ sampler.source ];
var texture = new THREE.Texture( getImage( surface.init_from ) );
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
texture.needsUpdate = true;
if ( sampler !== undefined ) {
return texture;
var surface = effect.profile.surfaces[ sampler.source ];
var texture = new THREE.Texture( getImage( surface.init_from ) );
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
texture.needsUpdate = true;
return texture;
}
console.error( 'ColladaLoder: Undefined sampler', sid );
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册