Skip to content

Mesh.copy() does not copy the geometry or material #16224

@WestLangley

Description

@WestLangley

For example:

var geometry = new THREE.BoxBufferGeometry( 1, 1, 1 );

var material = new THREE.MeshNormalMaterial();

var mesh = new THREE.Mesh( geometry, material );


var m = new THREE.Mesh().copy( mesh );

console.log( m.geometry ); // BufferGeometry with no attributes

console.log( m.material ); // MeshBasicMaterial

Likewise for Line, LineSegments, and Point.

Sprite, does not copy the material.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions