Skip to content

Commit

Permalink
fix multiple instancing bug seen with examples/test/text/scenarios.html
Browse files Browse the repository at this point in the history
  • Loading branch information
machenmusik committed Jan 26, 2017
1 parent 69523f5 commit a5ebee0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module.exports.Component = registerComponent('text', {

this.createOrUpdateMaterial();
this.mesh = new THREE.Mesh(this.geometry, this.material);
this.el.setObject3D('text', this.mesh);
this.el.setObject3D(this.id, this.mesh);
},

update: function (oldData) {
Expand Down Expand Up @@ -120,7 +120,7 @@ module.exports.Component = registerComponent('text', {
remove: function () {
this.geometry.dispose();
this.geometry = null;
this.el.removeObject3D('text');
this.el.removeObject3D(this.id);
this.material.dispose();
this.material = null;
this.texture.dispose();
Expand Down

0 comments on commit a5ebee0

Please sign in to comment.