Skip to content

Commit 15cafb9

Browse files
committed
Merge remote-tracking branch 'ikerr/dev' into dev
2 parents 60fb4f8 + 20a8039 commit 15cafb9

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

Diff for: src/extras/loaders/ColladaLoader.js

+17-2
Original file line numberDiff line numberDiff line change
@@ -2288,7 +2288,12 @@ THREE.ColladaLoader = function () {
22882288
input = inputs[ k ];
22892289
source = sources[ input.source ];
22902290

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+
22922297
numParams = source.accessor.params.length;
22932298
idx32 = index * numParams;
22942299

@@ -2425,7 +2430,11 @@ THREE.ColladaLoader = function () {
24252430

24262431
}
24272432

2428-
i += maxOffset * vcount;
2433+
if ( primitive.vcount ){
2434+
i += vcount;
2435+
} else {
2436+
i += maxOffset * vcount;
2437+
}
24292438

24302439
}
24312440

@@ -2457,6 +2466,12 @@ THREE.ColladaLoader = function () {
24572466

24582467
this.inputs[ i ].source = vertices.input[ 'POSITION' ].source;
24592468

2469+
for(var key in vertices.input){
2470+
if(key != 'POSITION'){
2471+
var input = vertices.input[key];
2472+
this.inputs.push(input);
2473+
}
2474+
}
24602475
}
24612476

24622477
}

0 commit comments

Comments
 (0)