File tree 1 file changed +17
-2
lines changed
1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -2288,7 +2288,12 @@ THREE.ColladaLoader = function () {
2288
2288
input = inputs [ k ] ;
2289
2289
source = sources [ input . source ] ;
2290
2290
2291
- index = p [ i + ( j * maxOffset ) + input . offset ] ;
2291
+ if ( primitive . vcount ) {
2292
+ index = p [ i + j ] ;
2293
+ } else {
2294
+ index = p [ i + ( j * maxOffset ) + input . offset ] ;
2295
+ }
2296
+
2292
2297
numParams = source . accessor . params . length ;
2293
2298
idx32 = index * numParams ;
2294
2299
@@ -2425,7 +2430,11 @@ THREE.ColladaLoader = function () {
2425
2430
2426
2431
}
2427
2432
2428
- i += maxOffset * vcount ;
2433
+ if ( primitive . vcount ) {
2434
+ i += vcount ;
2435
+ } else {
2436
+ i += maxOffset * vcount ;
2437
+ }
2429
2438
2430
2439
}
2431
2440
@@ -2457,6 +2466,12 @@ THREE.ColladaLoader = function () {
2457
2466
2458
2467
this . inputs [ i ] . source = vertices . input [ 'POSITION' ] . source ;
2459
2468
2469
+ for ( var key in vertices . input ) {
2470
+ if ( key != 'POSITION' ) {
2471
+ var input = vertices . input [ key ] ;
2472
+ this . inputs . push ( input ) ;
2473
+ }
2474
+ }
2460
2475
}
2461
2476
2462
2477
}
You can’t perform that action at this time.
0 commit comments