diff --git a/src/cModel.js b/src/cModel.js index df8889b..e9d169f 100644 --- a/src/cModel.js +++ b/src/cModel.js @@ -53,10 +53,13 @@ cModel.prototype.load = function(gl, modelSettingPath, callback) for (var i = 0; i < thisRef.modelSetting.getTextureNum(); i++) { + if( /^https?:\/\/|^\/\//i.test(thisRef.modelSetting.getTextureFile(i)) ){ - var texPaths = thisRef.modelHomeDir + - thisRef.modelSetting.getTextureFile(i); + var texPaths = thisRef.modelSetting.getTextureFile(i); + }else{ + var texPaths = thisRef.modelHomeDir + thisRef.modelSetting.getTextureFile(i); + } thisRef.loadTexture(i, texPaths, function() { if( thisRef.isTexLoaded ) {