Skip to content

Commit 52a96bc

Browse files
committed
prettier
1 parent 14c6941 commit 52a96bc

19 files changed

+210
-237
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
package.json
22
*.gltf
3+
src/vendor/

src/behaviours/oculus-touch-joystick-dpad4.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@ oculus_touch_joystick_dpad4.prototype = {
1515
emitDPad4: function(event) {
1616
const x = event.detail.axis[0];
1717
const y = event.detail.axis[1];
18-
const inCenter =
19-
Math.abs(x) < this.centerRadius && Math.abs(y) < this.centerRadius;
20-
const current = inCenter
21-
? "center"
22-
: this.angleToDirection(Math.atan2(x, -y));
18+
const inCenter = Math.abs(x) < this.centerRadius && Math.abs(y) < this.centerRadius;
19+
const current = inCenter ? "center" : this.angleToDirection(Math.atan2(x, -y));
2320
if (current !== this.previous) {
2421
this.previous = current;
2522
event.target.emit(`${this.outputPrefix}_dpad4_${current}`);

src/behaviours/vive-trackpad-dpad4.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,8 @@ vive_trackpad_dpad4.prototype = {
2525
emitDPad4: function(event) {
2626
const x = event.detail.axis[0];
2727
const y = event.detail.axis[1];
28-
const inCenter =
29-
Math.abs(x) < this.centerRadius && Math.abs(y) < this.centerRadius;
30-
const direction = inCenter
31-
? "center"
32-
: angleTo4Direction(Math.atan2(x, -y));
28+
const inCenter = Math.abs(x) < this.centerRadius && Math.abs(y) < this.centerRadius;
29+
const direction = inCenter ? "center" : angleTo4Direction(Math.atan2(x, -y));
3330
const pressed = this.pressed ? "pressed_" : "";
3431
const current = `${pressed + direction}`; // e.g. "pressed_north"
3532

src/components/bone-mute-state-indicator.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ AFRAME.registerComponent("bone-mute-state-indicator", {
1212
init() {
1313
this.onStateToggled = this.onStateToggled.bind(this);
1414
this.el.addEventListener("model-loaded", () => {
15-
this.unmutedBone = this.el.object3D.getObjectByName(
16-
this.data.unmutedBoneName
17-
);
18-
this.mutedBone = this.el.object3D.getObjectByName(
19-
this.data.mutedBoneName
20-
);
15+
this.unmutedBone = this.el.object3D.getObjectByName(this.data.unmutedBoneName);
16+
this.mutedBone = this.el.object3D.getObjectByName(this.data.mutedBoneName);
2117
console.log(this.unmutedBone, this.mutedBone);
2218
this.modelLoaded = true;
2319

src/components/event-repeater.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,4 @@ AFRAME.registerComponent("event-repeater", {
2626
_handleEvent: function(event, e) {
2727
this.el.emit(event, e.details);
2828
}
29-
3029
});

src/components/networked-counter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ AFRAME.registerComponent("networked-counter", {
2020
item.el.removeEventListener(this.data.release_event, item.onReleaseHandler);
2121
}
2222
}
23-
23+
2424
for (const id in this.timeouts) {
2525
this._removeTimeout(id);
2626
}

src/components/networked-video-player.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ AFRAME.registerComponent("networked-video-player", {
2525
if (ownerId !== NAF.clientId && rejectScreenShares) {
2626
// Toggle material visibility since object visibility is network-synced
2727
// TODO: There ought to be a better way to disable network syncs on a remote entity
28-
this.el.setAttribute("material", {visible: false});
28+
this.el.setAttribute("material", { visible: false });
2929
return;
3030
}
3131

src/components/offset-relative-to.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ AFRAME.registerComponent("offset-relative-to", {
1212
},
1313
init() {
1414
this.updateOffset();
15-
this.el.sceneEl.addEventListener(
16-
this.data.on,
17-
this.updateOffset.bind(this)
18-
);
15+
this.el.sceneEl.addEventListener(this.data.on, this.updateOffset.bind(this));
1916
},
2017
updateOffset() {
2118
const offsetVector = new THREE.Vector3().copy(this.data.offset);

src/components/super-networked-interactable.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ AFRAME.registerComponent("super-networked-interactable", {
1111
NAF.utils.getNetworkedEntity(this.el).then(networkedEl => {
1212
this.networkedEl = networkedEl;
1313
if (!NAF.utils.isMine(networkedEl)) {
14-
this.el.setAttribute("body", {type: "dynamic", mass: 0});
14+
this.el.setAttribute("body", { type: "dynamic", mass: 0 });
1515
} else {
1616
this.counter.register(networkedEl);
1717
}
@@ -33,7 +33,7 @@ AFRAME.registerComponent("super-networked-interactable", {
3333
this.hand = e.detail.hand;
3434
if (this.networkedEl && !NAF.utils.isMine(this.networkedEl)) {
3535
if (NAF.utils.takeOwnership(this.networkedEl)) {
36-
this.el.setAttribute("body", {mass: this.data.mass});
36+
this.el.setAttribute("body", { mass: this.data.mass });
3737
this.counter.register(this.networkedEl);
3838
} else {
3939
this.el.emit("grab-end", { hand: this.hand });
@@ -43,7 +43,7 @@ AFRAME.registerComponent("super-networked-interactable", {
4343
},
4444

4545
_onOwnershipLost: function(e) {
46-
this.el.setAttribute("body", {mass: 0});
46+
this.el.setAttribute("body", { mass: 0 });
4747
this.el.emit("grab-end", { hand: this.hand });
4848
this.hand = null;
4949
this.counter.deregister(this.el);

src/components/super-spawner.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ AFRAME.registerComponent("super-spawner", {
3939

4040
this.entities.set(entity, {
4141
hand: hand,
42-
componentInitialized: false,
43-
bodyLoaded: false,
44-
componentinInitializedListener: componentinInitializedListener,
42+
componentInitialized: false,
43+
bodyLoaded: false,
44+
componentinInitializedListener: componentinInitializedListener,
4545
bodyLoadedListener: bodyLoadedListener
4646
});
47-
47+
4848
entity.addEventListener("componentinitialized", componentinInitializedListener);
4949
entity.addEventListener("body-loaded", bodyLoadedListener);
5050

0 commit comments

Comments
 (0)