Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
feat: http(s) protocol supports for model's json's textures
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazeyu committed Jan 13, 2018
1 parent cc76f02 commit d9b854a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit d9b854a

Please sign in to comment.