File tree 2 files changed +29
-34
lines changed
2 files changed +29
-34
lines changed Original file line number Diff line number Diff line change @@ -8366,6 +8366,7 @@ THREE.Object3D.prototype = {
8366
8366
var isRootObject = ( meta === undefined );
8367
8367
8368
8368
var data = {};
8369
+ var output = { object: data };
8369
8370
8370
8371
// meta is a hash used to collect geometries, materials.
8371
8372
// not providing it implies that this is the root object
@@ -8380,7 +8381,7 @@ THREE.Object3D.prototype = {
8380
8381
images: {}
8381
8382
};
8382
8383
8383
- data .metadata = {
8384
+ output .metadata = {
8384
8385
version: 4.4,
8385
8386
type: 'Object',
8386
8387
generator: 'Object3D.toJSON'
@@ -8411,8 +8412,6 @@ THREE.Object3D.prototype = {
8411
8412
8412
8413
}
8413
8414
8414
- var output = {};
8415
-
8416
8415
if ( isRootObject ) {
8417
8416
8418
8417
var geometries = extractFromCache( meta.geometries );
@@ -8427,8 +8426,6 @@ THREE.Object3D.prototype = {
8427
8426
8428
8427
}
8429
8428
8430
- output.object = data;
8431
-
8432
8429
return output;
8433
8430
8434
8431
// extract data from the cache hash
@@ -10724,6 +10721,8 @@ THREE.BufferGeometry.prototype = {
10724
10721
console.warn( 'THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.' );
10725
10722
this.setIndex( attribute );
10726
10723
10724
+ return;
10725
+
10727
10726
}
10728
10727
10729
10728
this.attributes[ name ] = attribute;
@@ -20433,11 +20432,7 @@ THREE.WebGLRenderer = function ( parameters ) {
20433
20432
20434
20433
if ( index !== null ) {
20435
20434
20436
- count = index.count;
20437
-
20438
- } else if ( position instanceof THREE.InterleavedBufferAttribute ) {
20439
-
20440
- count = position.data.array.length / 3;
20435
+ count = index.array.length;
20441
20436
20442
20437
} else {
20443
20438
You can’t perform that action at this time.
0 commit comments