Skip to content

Commit 7525b2b

Browse files
committed
Object3D cloning userData too.
1 parent d6d74b8 commit 7525b2b

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

build/three.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6576,6 +6576,8 @@ THREE.Object3D.prototype = {
65766576

65776577
object.frustumCulled = this.frustumCulled;
65786578

6579+
object.userData = JSON.parse( JSON.stringify( this.userData ) );
6580+
65796581
for ( var i = 0; i < this.children.length; i ++ ) {
65806582

65816583
var child = this.children[ i ];

build/three.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/Object3D.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,8 @@ THREE.Object3D.prototype = {
441441

442442
object.frustumCulled = this.frustumCulled;
443443

444+
object.userData = JSON.parse( JSON.stringify( this.userData ) );
445+
444446
for ( var i = 0; i < this.children.length; i ++ ) {
445447

446448
var child = this.children[ i ];

0 commit comments

Comments
 (0)