@@ -9925,8 +9925,8 @@ THREE.Geometry = function () {
99259925
99269926 // update flags
99279927
9928- this.verticesNeedUpdate = false;
99299928 this.elementsNeedUpdate = false;
9929+ this.verticesNeedUpdate = false;
99309930 this.uvsNeedUpdate = false;
99319931 this.normalsNeedUpdate = false;
99329932 this.colorsNeedUpdate = false;
@@ -11718,18 +11718,19 @@ Object.assign( THREE.BufferGeometry.prototype, THREE.EventDispatcher.prototype,
1171811718
1171911719 var direct = geometry.__directGeometry;
1172011720
11721- if ( direct === undefined ) {
11721+ if ( direct === undefined || geometry.elementsNeedUpdate === true ) {
1172211722
1172311723 return this.fromGeometry( geometry );
1172411724
1172511725 }
1172611726
11727- direct.verticesNeedUpdate = geometry.verticesNeedUpdate;
11728- direct.normalsNeedUpdate = geometry.normalsNeedUpdate;
11729- direct.colorsNeedUpdate = geometry.colorsNeedUpdate;
11730- direct.uvsNeedUpdate = geometry.uvsNeedUpdate;
11731- direct.groupsNeedUpdate = geometry.groupsNeedUpdate;
11727+ direct.verticesNeedUpdate = geometry.verticesNeedUpdate || geometry.elementsNeedUpdate ;
11728+ direct.normalsNeedUpdate = geometry.normalsNeedUpdate || geometry.elementsNeedUpdate ;
11729+ direct.colorsNeedUpdate = geometry.colorsNeedUpdate || geometry.elementsNeedUpdate ;
11730+ direct.uvsNeedUpdate = geometry.uvsNeedUpdate || geometry.elementsNeedUpdate ;
11731+ direct.groupsNeedUpdate = geometry.groupsNeedUpdate || geometry.elementsNeedUpdate ;
1173211732
11733+ geometry.elementsNeedUpdate = false;
1173311734 geometry.verticesNeedUpdate = false;
1173411735 geometry.normalsNeedUpdate = false;
1173511736 geometry.colorsNeedUpdate = false;
@@ -11740,9 +11741,11 @@ Object.assign( THREE.BufferGeometry.prototype, THREE.EventDispatcher.prototype,
1174011741
1174111742 }
1174211743
11744+ var attribute;
11745+
1174311746 if ( geometry.verticesNeedUpdate === true ) {
1174411747
11745- var attribute = this.attributes.position;
11748+ attribute = this.attributes.position;
1174611749
1174711750 if ( attribute !== undefined ) {
1174811751
@@ -11757,7 +11760,7 @@ Object.assign( THREE.BufferGeometry.prototype, THREE.EventDispatcher.prototype,
1175711760
1175811761 if ( geometry.normalsNeedUpdate === true ) {
1175911762
11760- var attribute = this.attributes.normal;
11763+ attribute = this.attributes.normal;
1176111764
1176211765 if ( attribute !== undefined ) {
1176311766
@@ -11772,7 +11775,7 @@ Object.assign( THREE.BufferGeometry.prototype, THREE.EventDispatcher.prototype,
1177211775
1177311776 if ( geometry.colorsNeedUpdate === true ) {
1177411777
11775- var attribute = this.attributes.color;
11778+ attribute = this.attributes.color;
1177611779
1177711780 if ( attribute !== undefined ) {
1177811781
@@ -11787,7 +11790,7 @@ Object.assign( THREE.BufferGeometry.prototype, THREE.EventDispatcher.prototype,
1178711790
1178811791 if ( geometry.uvsNeedUpdate ) {
1178911792
11790- var attribute = this.attributes.uv;
11793+ attribute = this.attributes.uv;
1179111794
1179211795 if ( attribute !== undefined ) {
1179311796
@@ -11802,7 +11805,7 @@ Object.assign( THREE.BufferGeometry.prototype, THREE.EventDispatcher.prototype,
1180211805
1180311806 if ( geometry.lineDistancesNeedUpdate ) {
1180411807
11805- var attribute = this.attributes.lineDistance;
11808+ attribute = this.attributes.lineDistance;
1180611809
1180711810 if ( attribute !== undefined ) {
1180811811
@@ -24429,7 +24432,7 @@ THREE.UniformsLib = {
2442924432
2443024433// File:src/renderers/shaders/ShaderLib/cube_frag.glsl
2443124434
24432- THREE.ShaderChunk[ 'cube_frag' ] = "uniform samplerCube tCube;\nuniform float tFlip;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n gl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n #include <logdepthbuf_fragment>\n}\n";
24435+ THREE.ShaderChunk[ 'cube_frag' ] = "uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\ nvarying vec3 vWorldPosition;\n#include <common>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n gl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n gl_FragColor.a *= opacity ;\n #include <logdepthbuf_fragment>\n}\n";
2443324436
2443424437// File:src/renderers/shaders/ShaderLib/cube_vert.glsl
2443524438
@@ -24699,7 +24702,8 @@ THREE.ShaderLib = {
2469924702
2470024703 uniforms: {
2470124704 "tCube": { value: null },
24702- "tFlip": { value: - 1 }
24705+ "tFlip": { value: - 1 },
24706+ "opacity": { value: 1.0 }
2470324707 },
2470424708
2470524709 vertexShader: THREE.ShaderChunk[ 'cube_vert' ],
0 commit comments