fixed pause state bug, minor tweaks
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
AFRAME.registerComponent('beams', {
|
||||
schema: {
|
||||
poolSize: {default: 10}
|
||||
poolSize: {default: 4}
|
||||
},
|
||||
init: function () {
|
||||
var redMaterial;
|
||||
|
||||
@@ -15,10 +15,6 @@ AFRAME.registerComponent('beat-loader', {
|
||||
horizontalPositions: [-0.60, -0.25, 0.25, 0.60],
|
||||
verticalPositions: [1.00, 1.35, 1.70],
|
||||
|
||||
init: function () {
|
||||
this.beams = document.getElementById('beams').components['beams'];
|
||||
},
|
||||
|
||||
update: function () {
|
||||
if (!this.data.challengeId || !this.data.difficulty) { return; }
|
||||
this.loadBeats();
|
||||
@@ -126,8 +122,6 @@ AFRAME.registerComponent('beat-loader', {
|
||||
el.object3D.rotation.z = THREE.Math.degToRad(this.orientations[noteInfo._cutDirection]);
|
||||
el.play();
|
||||
|
||||
this.beams.newBeam(color, el.object3D.position);
|
||||
|
||||
if (this.first) { return; }
|
||||
|
||||
this.first = {
|
||||
|
||||
@@ -49,6 +49,8 @@ AFRAME.registerComponent('beat', {
|
||||
this.missElLeft = document.querySelector('#missLeft');
|
||||
this.missElRight = document.querySelector('#missRight');
|
||||
|
||||
this.beams = document.getElementById('beams').components['beams'];
|
||||
|
||||
this.initBlock();
|
||||
this.initColliders();
|
||||
this.initFragments();
|
||||
@@ -320,6 +322,7 @@ AFRAME.registerComponent('beat', {
|
||||
this.destroyed = false;
|
||||
this.el.object3D.visible = true;
|
||||
this.blockEl.object3D.visible = true;
|
||||
this.beams.newBeam(this.data.color, this.el.object3D.position);
|
||||
},
|
||||
|
||||
initCuttingClippingPlanes: function () {
|
||||
|
||||
Reference in New Issue
Block a user