Skip to content

Commit a2cc7c1

Browse files
committed
Updated builds.
1 parent b44e5a6 commit a2cc7c1

File tree

4 files changed

+48
-49
lines changed

4 files changed

+48
-49
lines changed

build/three.cjs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
Object.defineProperty(exports, '__esModule', { value: true });
99

10-
const REVISION = '137';
10+
const REVISION = '138dev';
1111
const MOUSE = {
1212
LEFT: 0,
1313
MIDDLE: 1,
@@ -6759,11 +6759,11 @@ class Material extends EventDispatcher {
67596759
data.stencilZFail = this.stencilZFail;
67606760
data.stencilZPass = this.stencilZPass; // rotation (SpriteMaterial)
67616761

6762-
if (this.rotation && this.rotation !== 0) data.rotation = this.rotation;
6762+
if (this.rotation !== undefined && this.rotation !== 0) data.rotation = this.rotation;
67636763
if (this.polygonOffset === true) data.polygonOffset = true;
67646764
if (this.polygonOffsetFactor !== 0) data.polygonOffsetFactor = this.polygonOffsetFactor;
67656765
if (this.polygonOffsetUnits !== 0) data.polygonOffsetUnits = this.polygonOffsetUnits;
6766-
if (this.linewidth && this.linewidth !== 1) data.linewidth = this.linewidth;
6766+
if (this.linewidth !== undefined && this.linewidth !== 1) data.linewidth = this.linewidth;
67676767
if (this.dashSize !== undefined) data.dashSize = this.dashSize;
67686768
if (this.gapSize !== undefined) data.gapSize = this.gapSize;
67696769
if (this.scale !== undefined) data.scale = this.scale;
@@ -10963,7 +10963,7 @@ function WebGLBindingStates(gl, extensions, attributes, capabilities) {
1096310963
const stride = data.stride;
1096410964
const offset = geometryAttribute.offset;
1096510965

10966-
if (data && data.isInstancedInterleavedBuffer) {
10966+
if (data.isInstancedInterleavedBuffer) {
1096710967
for (let i = 0; i < programAttribute.locationSize; i++) {
1096810968
enableAttributeAndDivisor(programAttribute.location + i, data.meshPerAttribute);
1096910969
}
@@ -15536,7 +15536,7 @@ function WebGLShadowMap(_renderer, _objects, _capabilities) {
1553615536
_renderer.renderBufferDirect(camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null);
1553715537
}
1553815538

15539-
function getDepthMaterial(object, geometry, material, light, shadowCameraNear, shadowCameraFar, type) {
15539+
function getDepthMaterial(object, material, light, shadowCameraNear, shadowCameraFar, type) {
1554015540
let result = null;
1554115541
const customMaterial = light.isPointLight === true ? object.customDistanceMaterial : object.customDepthMaterial;
1554215542

@@ -15617,13 +15617,13 @@ function WebGLShadowMap(_renderer, _objects, _capabilities) {
1561715617
const groupMaterial = material[group.materialIndex];
1561815618

1561915619
if (groupMaterial && groupMaterial.visible) {
15620-
const depthMaterial = getDepthMaterial(object, geometry, groupMaterial, light, shadowCamera.near, shadowCamera.far, type);
15620+
const depthMaterial = getDepthMaterial(object, groupMaterial, light, shadowCamera.near, shadowCamera.far, type);
1562115621

1562215622
_renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, group);
1562315623
}
1562415624
}
1562515625
} else if (material.visible) {
15626-
const depthMaterial = getDepthMaterial(object, geometry, material, light, shadowCamera.near, shadowCamera.far, type);
15626+
const depthMaterial = getDepthMaterial(object, material, light, shadowCamera.near, shadowCamera.far, type);
1562715627

1562815628
_renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, null);
1562915629
}
@@ -16604,7 +16604,6 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
1660416604
const texture = renderTarget.texture;
1660516605
const renderTargetProperties = properties.get(renderTarget);
1660616606
const textureProperties = properties.get(texture);
16607-
if (!renderTarget) return;
1660816607

1660916608
if (textureProperties.__webglTexture !== undefined) {
1661016609
_gl.deleteTexture(textureProperties.__webglTexture);
@@ -17018,7 +17017,7 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
1701817017

1701917018
_gl.pixelStorei(_gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, _gl.NONE);
1702017019

17021-
const isCompressed = texture && (texture.isCompressedTexture || texture.image[0].isCompressedTexture);
17020+
const isCompressed = texture.isCompressedTexture || texture.image[0].isCompressedTexture;
1702217021
const isDataTexture = texture.image[0] && texture.image[0].isDataTexture;
1702317022
const cubeImage = [];
1702417023

@@ -20122,7 +20121,7 @@ function WebGLRenderer(parameters = {}) {
2012220121
}
2012320122
}
2012420123

20125-
if (!!geometry && (geometry.morphAttributes.position !== undefined || geometry.morphAttributes.normal !== undefined)) {
20124+
if (geometry.morphAttributes.position !== undefined || geometry.morphAttributes.normal !== undefined) {
2012620125
morphtargets.update(object, geometry, material, program);
2012720126
}
2012820127

@@ -23873,7 +23872,7 @@ class CurvePath extends Curve {
2387323872

2387423873
for (let i = 0, curves = this.curves; i < curves.length; i++) {
2387523874
const curve = curves[i];
23876-
const resolution = curve && curve.isEllipseCurve ? divisions * 2 : curve && (curve.isLineCurve || curve.isLineCurve3) ? 1 : curve && curve.isSplineCurve ? divisions * curve.points.length : divisions;
23875+
const resolution = curve.isEllipseCurve ? divisions * 2 : curve.isLineCurve || curve.isLineCurve3 ? 1 : curve.isSplineCurve ? divisions * curve.points.length : divisions;
2387723876
const pts = curve.getPoints(resolution);
2387823877

2387923878
for (let j = 0; j < pts.length; j++) {
@@ -26099,7 +26098,8 @@ function isUniqueEdge(start, end, edges) {
2609926098
if (edges.has(hash1) === true || edges.has(hash2) === true) {
2610026099
return false;
2610126100
} else {
26102-
edges.add(hash1, hash2);
26101+
edges.add(hash1);
26102+
edges.add(hash2);
2610326103
return true;
2610426104
}
2610526105
}
@@ -33526,11 +33526,11 @@ class Raycaster {
3352633526
}
3352733527

3352833528
setFromCamera(coords, camera) {
33529-
if (camera && camera.isPerspectiveCamera) {
33529+
if (camera.isPerspectiveCamera) {
3353033530
this.ray.origin.setFromMatrixPosition(camera.matrixWorld);
3353133531
this.ray.direction.set(coords.x, coords.y, 0.5).unproject(camera).sub(this.ray.origin).normalize();
3353233532
this.camera = camera;
33533-
} else if (camera && camera.isOrthographicCamera) {
33533+
} else if (camera.isOrthographicCamera) {
3353433534
this.ray.origin.set(coords.x, coords.y, (camera.near + camera.far) / (camera.near - camera.far)).unproject(camera); // set origin in plane of camera
3353533535

3353633536
this.ray.direction.set(0, 0, -1).transformDirection(camera.matrixWorld);
@@ -34029,7 +34029,7 @@ class SkeletonHelper extends LineSegments {
3402934029
function getBoneList(object) {
3403034030
const boneList = [];
3403134031

34032-
if (object && object.isBone) {
34032+
if (object.isBone === true) {
3403334033
boneList.push(object);
3403434034
}
3403534035

build/three.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.THREE = {}));
1010
})(this, (function (exports) { 'use strict';
1111

12-
const REVISION = '137';
12+
const REVISION = '138dev';
1313
const MOUSE = {
1414
LEFT: 0,
1515
MIDDLE: 1,
@@ -6761,11 +6761,11 @@
67616761
data.stencilZFail = this.stencilZFail;
67626762
data.stencilZPass = this.stencilZPass; // rotation (SpriteMaterial)
67636763

6764-
if (this.rotation && this.rotation !== 0) data.rotation = this.rotation;
6764+
if (this.rotation !== undefined && this.rotation !== 0) data.rotation = this.rotation;
67656765
if (this.polygonOffset === true) data.polygonOffset = true;
67666766
if (this.polygonOffsetFactor !== 0) data.polygonOffsetFactor = this.polygonOffsetFactor;
67676767
if (this.polygonOffsetUnits !== 0) data.polygonOffsetUnits = this.polygonOffsetUnits;
6768-
if (this.linewidth && this.linewidth !== 1) data.linewidth = this.linewidth;
6768+
if (this.linewidth !== undefined && this.linewidth !== 1) data.linewidth = this.linewidth;
67696769
if (this.dashSize !== undefined) data.dashSize = this.dashSize;
67706770
if (this.gapSize !== undefined) data.gapSize = this.gapSize;
67716771
if (this.scale !== undefined) data.scale = this.scale;
@@ -10965,7 +10965,7 @@
1096510965
const stride = data.stride;
1096610966
const offset = geometryAttribute.offset;
1096710967

10968-
if (data && data.isInstancedInterleavedBuffer) {
10968+
if (data.isInstancedInterleavedBuffer) {
1096910969
for (let i = 0; i < programAttribute.locationSize; i++) {
1097010970
enableAttributeAndDivisor(programAttribute.location + i, data.meshPerAttribute);
1097110971
}
@@ -15538,7 +15538,7 @@
1553815538
_renderer.renderBufferDirect(camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null);
1553915539
}
1554015540

15541-
function getDepthMaterial(object, geometry, material, light, shadowCameraNear, shadowCameraFar, type) {
15541+
function getDepthMaterial(object, material, light, shadowCameraNear, shadowCameraFar, type) {
1554215542
let result = null;
1554315543
const customMaterial = light.isPointLight === true ? object.customDistanceMaterial : object.customDepthMaterial;
1554415544

@@ -15619,13 +15619,13 @@
1561915619
const groupMaterial = material[group.materialIndex];
1562015620

1562115621
if (groupMaterial && groupMaterial.visible) {
15622-
const depthMaterial = getDepthMaterial(object, geometry, groupMaterial, light, shadowCamera.near, shadowCamera.far, type);
15622+
const depthMaterial = getDepthMaterial(object, groupMaterial, light, shadowCamera.near, shadowCamera.far, type);
1562315623

1562415624
_renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, group);
1562515625
}
1562615626
}
1562715627
} else if (material.visible) {
15628-
const depthMaterial = getDepthMaterial(object, geometry, material, light, shadowCamera.near, shadowCamera.far, type);
15628+
const depthMaterial = getDepthMaterial(object, material, light, shadowCamera.near, shadowCamera.far, type);
1562915629

1563015630
_renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, null);
1563115631
}
@@ -16606,7 +16606,6 @@
1660616606
const texture = renderTarget.texture;
1660716607
const renderTargetProperties = properties.get(renderTarget);
1660816608
const textureProperties = properties.get(texture);
16609-
if (!renderTarget) return;
1661016609

1661116610
if (textureProperties.__webglTexture !== undefined) {
1661216611
_gl.deleteTexture(textureProperties.__webglTexture);
@@ -17020,7 +17019,7 @@
1702017019

1702117020
_gl.pixelStorei(_gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, _gl.NONE);
1702217021

17023-
const isCompressed = texture && (texture.isCompressedTexture || texture.image[0].isCompressedTexture);
17022+
const isCompressed = texture.isCompressedTexture || texture.image[0].isCompressedTexture;
1702417023
const isDataTexture = texture.image[0] && texture.image[0].isDataTexture;
1702517024
const cubeImage = [];
1702617025

@@ -20124,7 +20123,7 @@
2012420123
}
2012520124
}
2012620125

20127-
if (!!geometry && (geometry.morphAttributes.position !== undefined || geometry.morphAttributes.normal !== undefined)) {
20126+
if (geometry.morphAttributes.position !== undefined || geometry.morphAttributes.normal !== undefined) {
2012820127
morphtargets.update(object, geometry, material, program);
2012920128
}
2013020129

@@ -23875,7 +23874,7 @@
2387523874

2387623875
for (let i = 0, curves = this.curves; i < curves.length; i++) {
2387723876
const curve = curves[i];
23878-
const resolution = curve && curve.isEllipseCurve ? divisions * 2 : curve && (curve.isLineCurve || curve.isLineCurve3) ? 1 : curve && curve.isSplineCurve ? divisions * curve.points.length : divisions;
23877+
const resolution = curve.isEllipseCurve ? divisions * 2 : curve.isLineCurve || curve.isLineCurve3 ? 1 : curve.isSplineCurve ? divisions * curve.points.length : divisions;
2387923878
const pts = curve.getPoints(resolution);
2388023879

2388123880
for (let j = 0; j < pts.length; j++) {
@@ -26101,7 +26100,8 @@
2610126100
if (edges.has(hash1) === true || edges.has(hash2) === true) {
2610226101
return false;
2610326102
} else {
26104-
edges.add(hash1, hash2);
26103+
edges.add(hash1);
26104+
edges.add(hash2);
2610526105
return true;
2610626106
}
2610726107
}
@@ -33528,11 +33528,11 @@
3352833528
}
3352933529

3353033530
setFromCamera(coords, camera) {
33531-
if (camera && camera.isPerspectiveCamera) {
33531+
if (camera.isPerspectiveCamera) {
3353233532
this.ray.origin.setFromMatrixPosition(camera.matrixWorld);
3353333533
this.ray.direction.set(coords.x, coords.y, 0.5).unproject(camera).sub(this.ray.origin).normalize();
3353433534
this.camera = camera;
33535-
} else if (camera && camera.isOrthographicCamera) {
33535+
} else if (camera.isOrthographicCamera) {
3353633536
this.ray.origin.set(coords.x, coords.y, (camera.near + camera.far) / (camera.near - camera.far)).unproject(camera); // set origin in plane of camera
3353733537

3353833538
this.ray.direction.set(0, 0, -1).transformDirection(camera.matrixWorld);
@@ -34031,7 +34031,7 @@
3403134031
function getBoneList(object) {
3403234032
const boneList = [];
3403334033

34034-
if (object && object.isBone) {
34034+
if (object.isBone === true) {
3403534035
boneList.push(object);
3403634036
}
3403734037

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: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright 2010-2022 Three.js Authors
44
* SPDX-License-Identifier: MIT
55
*/
6-
const REVISION = '137';
6+
const REVISION = '138dev';
77
const MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };
88
const TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };
99
const CullFaceNone = 0;
@@ -8766,13 +8766,13 @@ class Material extends EventDispatcher {
87668766
data.stencilZPass = this.stencilZPass;
87678767

87688768
// rotation (SpriteMaterial)
8769-
if ( this.rotation && this.rotation !== 0 ) data.rotation = this.rotation;
8769+
if ( this.rotation !== undefined && this.rotation !== 0 ) data.rotation = this.rotation;
87708770

87718771
if ( this.polygonOffset === true ) data.polygonOffset = true;
87728772
if ( this.polygonOffsetFactor !== 0 ) data.polygonOffsetFactor = this.polygonOffsetFactor;
87738773
if ( this.polygonOffsetUnits !== 0 ) data.polygonOffsetUnits = this.polygonOffsetUnits;
87748774

8775-
if ( this.linewidth && this.linewidth !== 1 ) data.linewidth = this.linewidth;
8775+
if ( this.linewidth !== undefined && this.linewidth !== 1 ) data.linewidth = this.linewidth;
87768776
if ( this.dashSize !== undefined ) data.dashSize = this.dashSize;
87778777
if ( this.gapSize !== undefined ) data.gapSize = this.gapSize;
87788778
if ( this.scale !== undefined ) data.scale = this.scale;
@@ -14243,7 +14243,7 @@ function WebGLBindingStates( gl, extensions, attributes, capabilities ) {
1424314243
const stride = data.stride;
1424414244
const offset = geometryAttribute.offset;
1424514245

14246-
if ( data && data.isInstancedInterleavedBuffer ) {
14246+
if ( data.isInstancedInterleavedBuffer ) {
1424714247

1424814248
for ( let i = 0; i < programAttribute.locationSize; i ++ ) {
1424914249

@@ -20705,7 +20705,7 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {
2070520705

2070620706
}
2070720707

20708-
function getDepthMaterial( object, geometry, material, light, shadowCameraNear, shadowCameraFar, type ) {
20708+
function getDepthMaterial( object, material, light, shadowCameraNear, shadowCameraFar, type ) {
2070920709

2071020710
let result = null;
2071120711

@@ -20817,7 +20817,7 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {
2081720817

2081820818
if ( groupMaterial && groupMaterial.visible ) {
2081920819

20820-
const depthMaterial = getDepthMaterial( object, geometry, groupMaterial, light, shadowCamera.near, shadowCamera.far, type );
20820+
const depthMaterial = getDepthMaterial( object, groupMaterial, light, shadowCamera.near, shadowCamera.far, type );
2082120821

2082220822
_renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, group );
2082320823

@@ -20827,7 +20827,7 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {
2082720827

2082820828
} else if ( material.visible ) {
2082920829

20830-
const depthMaterial = getDepthMaterial( object, geometry, material, light, shadowCamera.near, shadowCamera.far, type );
20830+
const depthMaterial = getDepthMaterial( object, material, light, shadowCamera.near, shadowCamera.far, type );
2083120831

2083220832
_renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, null );
2083320833

@@ -22325,8 +22325,6 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
2232522325
const renderTargetProperties = properties.get( renderTarget );
2232622326
const textureProperties = properties.get( texture );
2232722327

22328-
if ( ! renderTarget ) return;
22329-
2233022328
if ( textureProperties.__webglTexture !== undefined ) {
2233122329

2233222330
_gl.deleteTexture( textureProperties.__webglTexture );
@@ -22939,7 +22937,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
2293922937
_gl.pixelStorei( 3317, texture.unpackAlignment );
2294022938
_gl.pixelStorei( 37443, 0 );
2294122939

22942-
const isCompressed = ( texture && ( texture.isCompressedTexture || texture.image[ 0 ].isCompressedTexture ) );
22940+
const isCompressed = ( texture.isCompressedTexture || texture.image[ 0 ].isCompressedTexture );
2294322941
const isDataTexture = ( texture.image[ 0 ] && texture.image[ 0 ].isDataTexture );
2294422942

2294522943
const cubeImage = [];
@@ -27481,7 +27479,7 @@ function WebGLRenderer( parameters = {} ) {
2748127479

2748227480
}
2748327481

27484-
if ( !! geometry && ( geometry.morphAttributes.position !== undefined || geometry.morphAttributes.normal !== undefined ) ) {
27482+
if ( geometry.morphAttributes.position !== undefined || geometry.morphAttributes.normal !== undefined ) {
2748527483

2748627484
morphtargets.update( object, geometry, material, program );
2748727485

@@ -32762,9 +32760,9 @@ class CurvePath extends Curve {
3276232760
for ( let i = 0, curves = this.curves; i < curves.length; i ++ ) {
3276332761

3276432762
const curve = curves[ i ];
32765-
const resolution = ( curve && curve.isEllipseCurve ) ? divisions * 2
32766-
: ( curve && ( curve.isLineCurve || curve.isLineCurve3 ) ) ? 1
32767-
: ( curve && curve.isSplineCurve ) ? divisions * curve.points.length
32763+
const resolution = curve.isEllipseCurve ? divisions * 2
32764+
: ( curve.isLineCurve || curve.isLineCurve3 ) ? 1
32765+
: curve.isSplineCurve ? divisions * curve.points.length
3276832766
: divisions;
3276932767

3277032768
const pts = curve.getPoints( resolution );
@@ -36054,7 +36052,8 @@ function isUniqueEdge( start, end, edges ) {
3605436052

3605536053
} else {
3605636054

36057-
edges.add( hash1, hash2 );
36055+
edges.add( hash1 );
36056+
edges.add( hash2 );
3605836057
return true;
3605936058

3606036059
}
@@ -46552,13 +46551,13 @@ class Raycaster {
4655246551

4655346552
setFromCamera( coords, camera ) {
4655446553

46555-
if ( camera && camera.isPerspectiveCamera ) {
46554+
if ( camera.isPerspectiveCamera ) {
4655646555

4655746556
this.ray.origin.setFromMatrixPosition( camera.matrixWorld );
4655846557
this.ray.direction.set( coords.x, coords.y, 0.5 ).unproject( camera ).sub( this.ray.origin ).normalize();
4655946558
this.camera = camera;
4656046559

46561-
} else if ( camera && camera.isOrthographicCamera ) {
46560+
} else if ( camera.isOrthographicCamera ) {
4656246561

4656346562
this.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera
4656446563
this.ray.direction.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld );
@@ -47256,7 +47255,7 @@ function getBoneList( object ) {
4725647255

4725747256
const boneList = [];
4725847257

47259-
if ( object && object.isBone ) {
47258+
if ( object.isBone === true ) {
4726047259

4726147260
boneList.push( object );
4726247261

0 commit comments

Comments
 (0)