@@ -20,16 +20,16 @@ test( "copy", function() {
2020 var instanceMock1 = { } ;
2121 var instanceMock2 = { } ;
2222 var indexMock = createClonableMock ( ) ;
23- var attributeMock1 = { } ;
24- var attributeMock2 = { } ;
23+ var defaultAttribute1 = new THREE . BufferAttribute ( [ 1 ] ) ;
24+ var defaultAttribute2 = new THREE . BufferAttribute ( [ 2 ] ) ;
2525
2626 var instance = new THREE . InstancedBufferGeometry ( ) ;
2727
2828 instance . addGroup ( 0 , 10 , instanceMock1 ) ;
2929 instance . addGroup ( 10 , 5 , instanceMock2 ) ;
3030 instance . setIndex ( indexMock ) ;
31- instance . addAttribute ( 'attributeMock1 ' , attributeMock1 ) ;
32- instance . addAttribute ( 'attributeMock2 ' , attributeMock2 ) ;
31+ instance . addAttribute ( 'defaultAttribute1 ' , defaultAttribute1 ) ;
32+ instance . addAttribute ( 'defaultAttribute2 ' , defaultAttribute2 ) ;
3333
3434 var copiedInstance = instance . copy ( instance ) ;
3535
@@ -38,10 +38,10 @@ test( "copy", function() {
3838 ok ( copiedInstance . index === indexMock , "index was copied" ) ;
3939 ok ( copiedInstance . index . callCount === 1 , "index.clone was called once" ) ;
4040
41- ok ( copiedInstance . attributes [ 'attributeMock1 ' ] instanceof THREE . BufferAttribute , "attribute was created" ) ;
41+ ok ( copiedInstance . attributes [ 'defaultAttribute1 ' ] instanceof THREE . BufferAttribute , "attribute was created" ) ;
4242 // the given attribute mock was passed to the array property of the created buffer attribute
43- ok ( copiedInstance . attributes [ 'attributeMock1 ' ] . array === attributeMock1 , "attribute was copied" ) ;
44- ok ( copiedInstance . attributes [ 'attributeMock2 ' ] . array === attributeMock2 , "attribute was copied" ) ;
43+ ok ( copiedInstance . attributes [ 'defaultAttribute1 ' ] . array [ 0 ] === defaultAttribute1 . array , "attribute was copied" ) ;
44+ ok ( copiedInstance . attributes [ 'defaultAttribute2 ' ] . array [ 0 ] === defaultAttribute2 . array , "attribute was copied" ) ;
4545
4646 ok ( copiedInstance . groups [ 0 ] . start === 0 , "group was copied" ) ;
4747 ok ( copiedInstance . groups [ 0 ] . count === 10 , "group was copied" ) ;
0 commit comments