fix not being to have more than one trail in scene (fixes #80)
This commit is contained in:
@@ -122,7 +122,7 @@ AFRAME.registerComponent('beat-loader', {
|
||||
this.beatsHeadStart -= delta;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.lastTime = lastTime + delta;
|
||||
},
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
AFRAME.registerComponent('trail', {
|
||||
schema: {
|
||||
color: {type: 'color'},
|
||||
enabled: {default: false}
|
||||
enabled: {default: false},
|
||||
hand: {type: 'string'}
|
||||
},
|
||||
|
||||
init: function () {
|
||||
@@ -61,7 +62,7 @@ AFRAME.registerComponent('trail', {
|
||||
mesh.vertices = vertices;
|
||||
//mesh.scale.set(0.4, 0.4, 0.4);
|
||||
//mesh.rotation.set(0, 0, Math.PI / 2.0);
|
||||
this.el.sceneEl.setObject3D('trail', mesh);
|
||||
this.el.sceneEl.setObject3D(`trail__${this.data.hand}`, mesh);
|
||||
},
|
||||
|
||||
addLayer: function (length) {
|
||||
|
||||
Reference in New Issue
Block a user