File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,8 @@ Object.assign(pc, function () {
88
88
89
89
var textures2 = null ;
90
90
91
+ var numLoaded2 = 0 ;
92
+
91
93
var loadTexture = function ( index ) {
92
94
if ( data . version >= 4 ) {
93
95
textures2 = new Array ( numTextures ) ;
@@ -102,6 +104,10 @@ Object.assign(pc, function () {
102
104
103
105
texture . upload ( ) ;
104
106
textures2 [ index ] = texture ;
107
+ numLoaded2 ++ ;
108
+ if ( numLoaded === numTextures && numLoaded2 === numTextures ) {
109
+ callback ( null , [ textures , textures2 ] ) ;
110
+ }
105
111
} ;
106
112
107
113
if ( index === 0 ) {
@@ -122,7 +128,7 @@ Object.assign(pc, function () {
122
128
texture . upload ( ) ;
123
129
textures [ index ] = texture ;
124
130
numLoaded ++ ;
125
- if ( numLoaded === numTextures ) {
131
+ if ( numLoaded === numTextures && ( textures2 === null || numLoaded2 === numTextures ) ) {
126
132
callback ( null , [ textures , textures2 ] ) ;
127
133
}
128
134
} ;
You can’t perform that action at this time.
0 commit comments