File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff 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+ } ) ;
You can’t perform that action at this time.
0 commit comments