Skip to content

Commit e98a8fb

Browse files
committed
Update builds.
1 parent ee2d261 commit e98a8fb

File tree

3 files changed

+282
-280
lines changed

3 files changed

+282
-280
lines changed

build/three.js

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2173,9 +2173,11 @@
21732173

21742174
angleTo: function ( v ) {
21752175

2176-
// assumes this and v are not the zero vector
2176+
var denominator = Math.sqrt( this.lengthSq() * v.lengthSq() );
21772177

2178-
var theta = this.dot( v ) / ( Math.sqrt( this.lengthSq() * v.lengthSq() ) );
2178+
if ( denominator === 0 ) { console.error( 'THREE.Vector3: angleTo() can\'t handle zero length vectors.' ); }
2179+
2180+
var theta = this.dot( v ) / denominator;
21792181

21802182
// clamp, to handle numerical problems
21812183

@@ -8312,7 +8314,6 @@
83128314
this.type = 'Material';
83138315

83148316
this.fog = true;
8315-
this.lights = true;
83168317

83178318
this.blending = NormalBlending;
83188319
this.side = FrontSide;
@@ -8636,7 +8637,6 @@
86368637
this.name = source.name;
86378638

86388639
this.fog = source.fog;
8639-
this.lights = source.lights;
86408640

86418641
this.blending = source.blending;
86428642
this.side = source.side;
@@ -8785,8 +8785,6 @@
87858785
this.skinning = false;
87868786
this.morphTargets = false;
87878787

8788-
this.lights = false;
8789-
87908788
this.setValues( parameters );
87918789

87928790
}
@@ -19319,7 +19317,6 @@
1931919317
this.wireframeLinewidth = 1;
1932019318

1932119319
this.fog = false;
19322-
this.lights = false;
1932319320

1932419321
this.setValues( parameters );
1932519322

@@ -19399,7 +19396,6 @@
1939919396
this.displacementBias = 0;
1940019397

1940119398
this.fog = false;
19402-
this.lights = false;
1940319399

1940419400
this.setValues( parameters );
1940519401

@@ -23059,6 +23055,8 @@
2305923055

2306023056
var session = null;
2306123057

23058+
// var framebufferScaleFactor = 1.0;
23059+
2306223060
var referenceSpace = null;
2306323061
var referenceSpaceType = 'local-floor';
2306423062

@@ -23146,7 +23144,9 @@
2314623144

2314723145
}
2314823146

23149-
this.setFramebufferScaleFactor = function ( value ) {
23147+
this.setFramebufferScaleFactor = function ( /* value */ ) {
23148+
23149+
// framebufferScaleFactor = value;
2315023150

2315123151
};
2315223152

@@ -23173,6 +23173,7 @@
2317323173
session.addEventListener( 'selectend', onSessionEvent );
2317423174
session.addEventListener( 'end', onSessionEnd );
2317523175

23176+
// eslint-disable-next-line no-undef
2317623177
session.updateRenderState( { baseLayer: new XRWebGLLayer( session, gl ) } );
2317723178

2317823179
session.requestReferenceSpace( referenceSpaceType ).then( onRequestReferenceSpace );
@@ -24938,9 +24939,10 @@
2493824939

2493924940
// store the light setup it was created for
2494024941

24942+
materialProperties.needsLights = materialNeedsLights( material );
2494124943
materialProperties.lightsStateVersion = lightsStateVersion;
2494224944

24943-
if ( material.lights ) {
24945+
if ( materialProperties.needsLights ) {
2494424946

2494524947
// wire up the material to this renderer's lighting state
2494624948

@@ -25006,7 +25008,7 @@
2500625008

2500725009
material.needsUpdate = true;
2500825010

25009-
} else if ( material.lights && materialProperties.lightsStateVersion !== lights.state.version ) {
25011+
} else if ( materialProperties.needsLights && ( materialProperties.lightsStateVersion !== lights.state.version ) ) {
2501025012

2501125013
material.needsUpdate = true;
2501225014

@@ -25190,7 +25192,7 @@
2519025192
p_uniforms.setValue( _gl, 'toneMappingExposure', _this.toneMappingExposure );
2519125193
p_uniforms.setValue( _gl, 'toneMappingWhitePoint', _this.toneMappingWhitePoint );
2519225194

25193-
if ( material.lights ) {
25195+
if ( materialProperties.needsLights ) {
2519425196

2519525197
// the current material requires lighting info
2519625198

@@ -25797,6 +25799,14 @@
2579725799

2579825800
}
2579925801

25802+
function materialNeedsLights( material ) {
25803+
25804+
return material.isMeshLambertMaterial || material.isMeshPhongMaterial ||
25805+
material.isMeshStandardMaterial || material.isShadowMaterial ||
25806+
( material.isShaderMaterial && material.lights === true );
25807+
25808+
}
25809+
2580025810
//
2580125811
this.setFramebuffer = function ( value ) {
2580225812

@@ -26340,7 +26350,6 @@
2634026350

2634126351
this.sizeAttenuation = true;
2634226352

26343-
this.lights = false;
2634426353
this.transparent = true;
2634526354

2634626355
this.setValues( parameters );
@@ -27080,8 +27089,6 @@
2708027089
this.linecap = 'round';
2708127090
this.linejoin = 'round';
2708227091

27083-
this.lights = false;
27084-
2708527092
this.setValues( parameters );
2708627093

2708727094
}
@@ -27467,8 +27474,6 @@
2746727474

2746827475
this.morphTargets = false;
2746927476

27470-
this.lights = false;
27471-
2747227477
this.setValues( parameters );
2747327478

2747427479
}
@@ -32874,7 +32879,6 @@
3287432879
this.wireframeLinewidth = 1;
3287532880

3287632881
this.fog = false;
32877-
this.lights = false;
3287832882

3287932883
this.skinning = false;
3288032884
this.morphTargets = false;
@@ -33101,8 +33105,6 @@
3310133105
this.morphTargets = false;
3310233106
this.morphNormals = false;
3310333107

33104-
this.lights = false;
33105-
3310633108
this.setValues( parameters );
3310733109

3310833110
}

0 commit comments

Comments
 (0)