How apply_material(); works?


(Kanoute13) #1

Hi,

can anyone explain to me in the experiment of material_showcase experiment how the function apply_material(), which is the function that apply the materials on the object working???

the function is this:
function applyMaterial( id ) {
console.log(id)
var iframeURL = model + ‘#material_showcase=1,’ + materials[ id ].params;
console.log(iframeURL+" m ");
$( ‘iframe’ ).attr( ‘src’, iframeURL );
}

the “id” parameter is the name of the thumbnail picture that clicked.

console log on iframe gives back the CORS url’s of the textures.

how this function apply the materials without communicate with the API ?!?!?
Kind Regards,

Dimitris