Skip to content

Commit 47e911a

Browse files
committed
Prettier formatting
1 parent 44a0980 commit 47e911a

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

index.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,24 @@ AFRAME.registerComponent("cubemap", {
5151
uniforms: shader.uniforms,
5252
depthWrite: false,
5353
side: THREE.BackSide,
54-
transparent: true
54+
transparent: true,
5555
}).clone();
56-
57-
// Starting in Three.js v146, `envMap` changed to `tCube`.
56+
57+
// Starting in Three.js v146, `envMap` changed to `tCube`.
5858
// This variable helps us keep track of the name across Three.js versions.
5959
// https://github.com/mrdoob/three.js/wiki/Migration-Guide#145--146
60-
this.envMapUniformName = this.material.uniforms["envMap"] ? "envMap" : "tCube";
61-
60+
this.envMapUniformName = this.material.uniforms["envMap"]
61+
? "envMap"
62+
: "tCube";
6263

6364
// Threejs seems to have removed the 'tCube' uniform.
6465
// Workaround from: https://stackoverflow.com/a/59454999/6591491
65-
66+
6667
Object.defineProperty(this.material, "envMap", {
6768
get: function () {
68-
return this.uniforms.envMap ? this.uniforms.envMap.value : this.uniforms.tCube.value;
69+
return this.uniforms.envMap
70+
? this.uniforms.envMap.value
71+
: this.uniforms.tCube.value;
6972
},
7073
});
7174

@@ -167,4 +170,4 @@ AFRAME.registerComponent("cubemap", {
167170
this.material.dispose();
168171
this.el.removeObject3D("cubemap");
169172
},
170-
});
173+
});

0 commit comments

Comments
 (0)