Skip to content

Commit 3d9baf2

Browse files
committed
Updated builds.
1 parent 78c2e35 commit 3d9baf2

File tree

3 files changed

+54
-23
lines changed

3 files changed

+54
-23
lines changed

build/three.js

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,6 +1930,7 @@
19301930
}
19311931

19321932
if (canvas.width > 2048 || canvas.height > 2048) {
1933+
console.warn('THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons', image);
19331934
return canvas.toDataURL('image/jpeg', 0.6);
19341935
} else {
19351936
return canvas.toDataURL('image/png');
@@ -7087,6 +7088,7 @@
70877088
this.polygonOffsetUnits = 0;
70887089
this.dithering = false;
70897090
this.alphaTest = 0;
7091+
this.alphaToCoverage = false;
70907092
this.premultipliedAlpha = false;
70917093
this.visible = true;
70927094
this.toneMapped = true;
@@ -7260,6 +7262,7 @@
72607262
if (this.scale !== undefined) data.scale = this.scale;
72617263
if (this.dithering === true) data.dithering = true;
72627264
if (this.alphaTest > 0) data.alphaTest = this.alphaTest;
7265+
if (this.alphaToCoverage === true) data.alphaToCoverage = this.alphaToCoverage;
72637266
if (this.premultipliedAlpha === true) data.premultipliedAlpha = this.premultipliedAlpha;
72647267
if (this.wireframe === true) data.wireframe = this.wireframe;
72657268
if (this.wireframeLinewidth > 1) data.wireframeLinewidth = this.wireframeLinewidth;
@@ -7345,6 +7348,7 @@
73457348
this.polygonOffsetUnits = source.polygonOffsetUnits;
73467349
this.dithering = source.dithering;
73477350
this.alphaTest = source.alphaTest;
7351+
this.alphaToCoverage = source.alphaToCoverage;
73487352
this.premultipliedAlpha = source.premultipliedAlpha;
73497353
this.visible = source.visible;
73507354
this.toneMapped = source.toneMapped;
@@ -15989,6 +15993,7 @@
1598915993
}
1599015994

1599115995
setPolygonOffset(material.polygonOffset, material.polygonOffsetFactor, material.polygonOffsetUnits);
15996+
material.alphaToCoverage === true ? enable(32926) : disable(32926);
1599215997
} //
1599315998

1599415999

@@ -16143,6 +16148,7 @@
1614316148
gl.disable(32823);
1614416149
gl.disable(3089);
1614516150
gl.disable(2960);
16151+
gl.disable(32926);
1614616152
gl.blendEquation(32774);
1614716153
gl.blendFunc(1, 0);
1614816154
gl.blendFuncSeparate(1, 0, 1, 0);
@@ -17346,6 +17352,15 @@
1734617352
var hand = this._hand;
1734717353

1734817354
if (inputSource && frame.session.visibilityState !== 'visible-blurred') {
17355+
if (targetRay !== null) {
17356+
inputPose = frame.getPose(inputSource.targetRaySpace, referenceSpace);
17357+
17358+
if (inputPose !== null) {
17359+
targetRay.matrix.fromArray(inputPose.transform.matrix);
17360+
targetRay.matrix.decompose(targetRay.position, targetRay.rotation, targetRay.scale);
17361+
}
17362+
}
17363+
1734917364
if (hand && inputSource.hand) {
1735017365
handPose = true;
1735117366

@@ -17400,15 +17415,6 @@
1740017415
});
1740117416
}
1740217417
} else {
17403-
if (targetRay !== null) {
17404-
inputPose = frame.getPose(inputSource.targetRaySpace, referenceSpace);
17405-
17406-
if (inputPose !== null) {
17407-
targetRay.matrix.fromArray(inputPose.transform.matrix);
17408-
targetRay.matrix.decompose(targetRay.position, targetRay.rotation, targetRay.scale);
17409-
}
17410-
}
17411-
1741217418
if (grip !== null && inputSource.gripSpace) {
1741317419
gripPose = frame.getPose(inputSource.gripSpace, referenceSpace);
1741417420

@@ -27350,6 +27356,10 @@
2735027356
texture.minFilter = LinearFilter;
2735127357
}
2735227358

27359+
if (texData.generateMipmaps !== undefined) {
27360+
texture.generateMipmaps = texData.generateMipmaps;
27361+
}
27362+
2735327363
texture.needsUpdate = true;
2735427364
if (onLoad) onLoad(texture, texData);
2735527365
}, onProgress, onError);
@@ -30026,6 +30036,8 @@
3002630036
if (json.morphTargets !== undefined) material.morphTargets = json.morphTargets;
3002730037
if (json.morphNormals !== undefined) material.morphNormals = json.morphNormals;
3002830038
if (json.dithering !== undefined) material.dithering = json.dithering;
30039+
if (json.alphaToCoverage !== undefined) material.alphaToCoverage = json.alphaToCoverage;
30040+
if (json.premultipliedAlpha !== undefined) material.premultipliedAlpha = json.premultipliedAlpha;
3002930041
if (json.vertexTangents !== undefined) material.vertexTangents = json.vertexTangents;
3003030042
if (json.visible !== undefined) material.visible = json.visible;
3003130043
if (json.toneMapped !== undefined) material.toneMapped = json.toneMapped;

build/three.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/three.module.js

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,8 @@ const ImageUtils = {
13781378

13791379
if ( canvas.width > 2048 || canvas.height > 2048 ) {
13801380

1381+
console.warn( 'THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons', image );
1382+
13811383
return canvas.toDataURL( 'image/jpeg', 0.6 );
13821384

13831385
} else {
@@ -7893,6 +7895,7 @@ function Material() {
78937895
this.dithering = false;
78947896

78957897
this.alphaTest = 0;
7898+
this.alphaToCoverage = false;
78967899
this.premultipliedAlpha = false;
78977900

78987901
this.visible = true;
@@ -8132,6 +8135,7 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
81328135
if ( this.dithering === true ) data.dithering = true;
81338136

81348137
if ( this.alphaTest > 0 ) data.alphaTest = this.alphaTest;
8138+
if ( this.alphaToCoverage === true ) data.alphaToCoverage = this.alphaToCoverage;
81358139
if ( this.premultipliedAlpha === true ) data.premultipliedAlpha = this.premultipliedAlpha;
81368140

81378141
if ( this.wireframe === true ) data.wireframe = this.wireframe;
@@ -8255,6 +8259,7 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
82558259
this.dithering = source.dithering;
82568260

82578261
this.alphaTest = source.alphaTest;
8262+
this.alphaToCoverage = source.alphaToCoverage;
82588263
this.premultipliedAlpha = source.premultipliedAlpha;
82598264

82608265
this.visible = source.visible;
@@ -19700,6 +19705,10 @@ function WebGLState( gl, extensions, capabilities ) {
1970019705

1970119706
setPolygonOffset( material.polygonOffset, material.polygonOffsetFactor, material.polygonOffsetUnits );
1970219707

19708+
material.alphaToCoverage === true
19709+
? enable( 32926 )
19710+
: disable( 32926 );
19711+
1970319712
}
1970419713

1970519714
//
@@ -19943,6 +19952,7 @@ function WebGLState( gl, extensions, capabilities ) {
1994319952
gl.disable( 32823 );
1994419953
gl.disable( 3089 );
1994519954
gl.disable( 2960 );
19955+
gl.disable( 32926 );
1994619956

1994719957
gl.blendEquation( 32774 );
1994819958
gl.blendFunc( 1, 0 );
@@ -21698,6 +21708,19 @@ Object.assign( WebXRController.prototype, {
2169821708

2169921709
if ( inputSource && frame.session.visibilityState !== 'visible-blurred' ) {
2170021710

21711+
if ( targetRay !== null ) {
21712+
21713+
inputPose = frame.getPose( inputSource.targetRaySpace, referenceSpace );
21714+
21715+
if ( inputPose !== null ) {
21716+
21717+
targetRay.matrix.fromArray( inputPose.transform.matrix );
21718+
targetRay.matrix.decompose( targetRay.position, targetRay.rotation, targetRay.scale );
21719+
21720+
}
21721+
21722+
}
21723+
2170121724
if ( hand && inputSource.hand ) {
2170221725

2170321726
handPose = true;
@@ -21765,19 +21788,6 @@ Object.assign( WebXRController.prototype, {
2176521788

2176621789
} else {
2176721790

21768-
if ( targetRay !== null ) {
21769-
21770-
inputPose = frame.getPose( inputSource.targetRaySpace, referenceSpace );
21771-
21772-
if ( inputPose !== null ) {
21773-
21774-
targetRay.matrix.fromArray( inputPose.transform.matrix );
21775-
targetRay.matrix.decompose( targetRay.position, targetRay.rotation, targetRay.scale );
21776-
21777-
}
21778-
21779-
}
21780-
2178121791
if ( grip !== null && inputSource.gripSpace ) {
2178221792

2178321793
gripPose = frame.getPose( inputSource.gripSpace, referenceSpace );
@@ -34921,6 +34931,12 @@ DataTextureLoader.prototype = Object.assign( Object.create( Loader.prototype ),
3492134931

3492234932
}
3492334933

34934+
if ( texData.generateMipmaps !== undefined ) {
34935+
34936+
texture.generateMipmaps = texData.generateMipmaps;
34937+
34938+
}
34939+
3492434940
texture.needsUpdate = true;
3492534941

3492634942
if ( onLoad ) onLoad( texture, texData );
@@ -38007,6 +38023,9 @@ class MaterialLoader extends Loader {
3800738023
if ( json.morphNormals !== undefined ) material.morphNormals = json.morphNormals;
3800838024
if ( json.dithering !== undefined ) material.dithering = json.dithering;
3800938025

38026+
if ( json.alphaToCoverage !== undefined ) material.alphaToCoverage = json.alphaToCoverage;
38027+
if ( json.premultipliedAlpha !== undefined ) material.premultipliedAlpha = json.premultipliedAlpha;
38028+
3801038029
if ( json.vertexTangents !== undefined ) material.vertexTangents = json.vertexTangents;
3801138030

3801238031
if ( json.visible !== undefined ) material.visible = json.visible;

0 commit comments

Comments
 (0)