Changing texture and color on Three.js collada object

前端 未结 4 1344
栀梦
栀梦 2021-01-12 00:48

I recently got three.js example from the official site working with my collada objects (.dae) using the ColladaLoader.js. Now my question is, how do i change t

4条回答
  •  既然无缘
    2021-01-12 01:32

    if ( url !== undefined ) {
        var parts = url.split( '/' );
        parts.pop();
        baseUrl = ( parts.length < 1 ? '.' : parts.join( '/' ) ) + '/';
    
    }
    
    parseAsset();
    setUpConversion();
    images = parseLib( "//dae:library_images/dae:image", _Image, "image" );
    
    for(var i in imageReplace) {
        var iR = imageReplace[i];
    
        for(var i in images) {
            var image = images[i];
    
            var patt=new RegExp('[a-zA-Z0-9\-\_]*\/'+iR.name,'g');
    
            //if(image.id==iR.id)
            if(patt.test(image.init_from))
                image.init_from = iR.new_image; 
        }//for
    }
    

提交回复
热议问题