Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InstancedInterleavedBuffer: Fix incorrect clone result #21781

Merged
merged 1 commit into from
May 5, 2021

Conversation

gkjohnson
Copy link
Collaborator

Related issue: --

Description

When calling InstancedInterleavedBuffer.clone() an InterleavedBuffer was returned:

instanceBuffer = new THREE.InstancedInterleavedBuffer( new Float32Array( [ 1, 2, 3 ] ), 3, 1 );
a = new THREE.InstancedBufferGeometry()
a.setAttribute( 'test', new THREE.InterleavedBufferAttribute( instanceBuffer, 3, 0 ) );

b = a.clone()

console.log( a.attributes.test.data.isInstancedInterleavedBuffer, b.attributes.test.data.isInstancedInterleavedBuffer );

// BEFORE: true, undefined
// AFTER: true, true

@mrdoob mrdoob added this to the r129 milestone May 5, 2021
@mrdoob mrdoob merged commit 82d88ee into mrdoob:dev May 5, 2021
@mrdoob
Copy link
Owner

mrdoob commented May 5, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants