Skip to content

Commit

Permalink
Updated builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jan 31, 2022
1 parent b44e5a6 commit a2cc7c1
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 49 deletions.
30 changes: 15 additions & 15 deletions build/three.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

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

const REVISION = '137';
const REVISION = '138dev';
const MOUSE = {
LEFT: 0,
MIDDLE: 1,
Expand Down Expand Up @@ -6759,11 +6759,11 @@ class Material extends EventDispatcher {
data.stencilZFail = this.stencilZFail;
data.stencilZPass = this.stencilZPass; // rotation (SpriteMaterial)

if (this.rotation && this.rotation !== 0) data.rotation = this.rotation;
if (this.rotation !== undefined && this.rotation !== 0) data.rotation = this.rotation;
if (this.polygonOffset === true) data.polygonOffset = true;
if (this.polygonOffsetFactor !== 0) data.polygonOffsetFactor = this.polygonOffsetFactor;
if (this.polygonOffsetUnits !== 0) data.polygonOffsetUnits = this.polygonOffsetUnits;
if (this.linewidth && this.linewidth !== 1) data.linewidth = this.linewidth;
if (this.linewidth !== undefined && this.linewidth !== 1) data.linewidth = this.linewidth;
if (this.dashSize !== undefined) data.dashSize = this.dashSize;
if (this.gapSize !== undefined) data.gapSize = this.gapSize;
if (this.scale !== undefined) data.scale = this.scale;
Expand Down Expand Up @@ -10963,7 +10963,7 @@ function WebGLBindingStates(gl, extensions, attributes, capabilities) {
const stride = data.stride;
const offset = geometryAttribute.offset;

if (data && data.isInstancedInterleavedBuffer) {
if (data.isInstancedInterleavedBuffer) {
for (let i = 0; i < programAttribute.locationSize; i++) {
enableAttributeAndDivisor(programAttribute.location + i, data.meshPerAttribute);
}
Expand Down Expand Up @@ -15536,7 +15536,7 @@ function WebGLShadowMap(_renderer, _objects, _capabilities) {
_renderer.renderBufferDirect(camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null);
}

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

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

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

_renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, group);
}
}
} else if (material.visible) {
const depthMaterial = getDepthMaterial(object, geometry, material, light, shadowCamera.near, shadowCamera.far, type);
const depthMaterial = getDepthMaterial(object, material, light, shadowCamera.near, shadowCamera.far, type);

_renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, null);
}
Expand Down Expand Up @@ -16604,7 +16604,6 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
const texture = renderTarget.texture;
const renderTargetProperties = properties.get(renderTarget);
const textureProperties = properties.get(texture);
if (!renderTarget) return;

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

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

const isCompressed = texture && (texture.isCompressedTexture || texture.image[0].isCompressedTexture);
const isCompressed = texture.isCompressedTexture || texture.image[0].isCompressedTexture;
const isDataTexture = texture.image[0] && texture.image[0].isDataTexture;
const cubeImage = [];

Expand Down Expand Up @@ -20122,7 +20121,7 @@ function WebGLRenderer(parameters = {}) {
}
}

if (!!geometry && (geometry.morphAttributes.position !== undefined || geometry.morphAttributes.normal !== undefined)) {
if (geometry.morphAttributes.position !== undefined || geometry.morphAttributes.normal !== undefined) {
morphtargets.update(object, geometry, material, program);
}

Expand Down Expand Up @@ -23873,7 +23872,7 @@ class CurvePath extends Curve {

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

for (let j = 0; j < pts.length; j++) {
Expand Down Expand Up @@ -26099,7 +26098,8 @@ function isUniqueEdge(start, end, edges) {
if (edges.has(hash1) === true || edges.has(hash2) === true) {
return false;
} else {
edges.add(hash1, hash2);
edges.add(hash1);
edges.add(hash2);
return true;
}
}
Expand Down Expand Up @@ -33526,11 +33526,11 @@ class Raycaster {
}

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

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

if (object && object.isBone) {
if (object.isBone === true) {
boneList.push(object);
}

Expand Down
30 changes: 15 additions & 15 deletions build/three.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.THREE = {}));
})(this, (function (exports) { 'use strict';

const REVISION = '137';
const REVISION = '138dev';
const MOUSE = {
LEFT: 0,
MIDDLE: 1,
Expand Down Expand Up @@ -6761,11 +6761,11 @@
data.stencilZFail = this.stencilZFail;
data.stencilZPass = this.stencilZPass; // rotation (SpriteMaterial)

if (this.rotation && this.rotation !== 0) data.rotation = this.rotation;
if (this.rotation !== undefined && this.rotation !== 0) data.rotation = this.rotation;
if (this.polygonOffset === true) data.polygonOffset = true;
if (this.polygonOffsetFactor !== 0) data.polygonOffsetFactor = this.polygonOffsetFactor;
if (this.polygonOffsetUnits !== 0) data.polygonOffsetUnits = this.polygonOffsetUnits;
if (this.linewidth && this.linewidth !== 1) data.linewidth = this.linewidth;
if (this.linewidth !== undefined && this.linewidth !== 1) data.linewidth = this.linewidth;
if (this.dashSize !== undefined) data.dashSize = this.dashSize;
if (this.gapSize !== undefined) data.gapSize = this.gapSize;
if (this.scale !== undefined) data.scale = this.scale;
Expand Down Expand Up @@ -10965,7 +10965,7 @@
const stride = data.stride;
const offset = geometryAttribute.offset;

if (data && data.isInstancedInterleavedBuffer) {
if (data.isInstancedInterleavedBuffer) {
for (let i = 0; i < programAttribute.locationSize; i++) {
enableAttributeAndDivisor(programAttribute.location + i, data.meshPerAttribute);
}
Expand Down Expand Up @@ -15538,7 +15538,7 @@
_renderer.renderBufferDirect(camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null);
}

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

Expand Down Expand Up @@ -15619,13 +15619,13 @@
const groupMaterial = material[group.materialIndex];

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

_renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, group);
}
}
} else if (material.visible) {
const depthMaterial = getDepthMaterial(object, geometry, material, light, shadowCamera.near, shadowCamera.far, type);
const depthMaterial = getDepthMaterial(object, material, light, shadowCamera.near, shadowCamera.far, type);

_renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, null);
}
Expand Down Expand Up @@ -16606,7 +16606,6 @@
const texture = renderTarget.texture;
const renderTargetProperties = properties.get(renderTarget);
const textureProperties = properties.get(texture);
if (!renderTarget) return;

if (textureProperties.__webglTexture !== undefined) {
_gl.deleteTexture(textureProperties.__webglTexture);
Expand Down Expand Up @@ -17020,7 +17019,7 @@

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

const isCompressed = texture && (texture.isCompressedTexture || texture.image[0].isCompressedTexture);
const isCompressed = texture.isCompressedTexture || texture.image[0].isCompressedTexture;
const isDataTexture = texture.image[0] && texture.image[0].isDataTexture;
const cubeImage = [];

Expand Down Expand Up @@ -20124,7 +20123,7 @@
}
}

if (!!geometry && (geometry.morphAttributes.position !== undefined || geometry.morphAttributes.normal !== undefined)) {
if (geometry.morphAttributes.position !== undefined || geometry.morphAttributes.normal !== undefined) {
morphtargets.update(object, geometry, material, program);
}

Expand Down Expand Up @@ -23875,7 +23874,7 @@

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

for (let j = 0; j < pts.length; j++) {
Expand Down Expand Up @@ -26101,7 +26100,8 @@
if (edges.has(hash1) === true || edges.has(hash2) === true) {
return false;
} else {
edges.add(hash1, hash2);
edges.add(hash1);
edges.add(hash2);
return true;
}
}
Expand Down Expand Up @@ -33528,11 +33528,11 @@
}

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

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

if (object && object.isBone) {
if (object.isBone === true) {
boneList.push(object);
}

Expand Down
2 changes: 1 addition & 1 deletion build/three.min.js

Large diffs are not rendered by default.

35 changes: 17 additions & 18 deletions build/three.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright 2010-2022 Three.js Authors
* SPDX-License-Identifier: MIT
*/
const REVISION = '137';
const REVISION = '138dev';
const MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };
const TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };
const CullFaceNone = 0;
Expand Down Expand Up @@ -8766,13 +8766,13 @@ class Material extends EventDispatcher {
data.stencilZPass = this.stencilZPass;

// rotation (SpriteMaterial)
if ( this.rotation && this.rotation !== 0 ) data.rotation = this.rotation;
if ( this.rotation !== undefined && this.rotation !== 0 ) data.rotation = this.rotation;

if ( this.polygonOffset === true ) data.polygonOffset = true;
if ( this.polygonOffsetFactor !== 0 ) data.polygonOffsetFactor = this.polygonOffsetFactor;
if ( this.polygonOffsetUnits !== 0 ) data.polygonOffsetUnits = this.polygonOffsetUnits;

if ( this.linewidth && this.linewidth !== 1 ) data.linewidth = this.linewidth;
if ( this.linewidth !== undefined && this.linewidth !== 1 ) data.linewidth = this.linewidth;
if ( this.dashSize !== undefined ) data.dashSize = this.dashSize;
if ( this.gapSize !== undefined ) data.gapSize = this.gapSize;
if ( this.scale !== undefined ) data.scale = this.scale;
Expand Down Expand Up @@ -14243,7 +14243,7 @@ function WebGLBindingStates( gl, extensions, attributes, capabilities ) {
const stride = data.stride;
const offset = geometryAttribute.offset;

if ( data && data.isInstancedInterleavedBuffer ) {
if ( data.isInstancedInterleavedBuffer ) {

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

Expand Down Expand Up @@ -20705,7 +20705,7 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {

}

function getDepthMaterial( object, geometry, material, light, shadowCameraNear, shadowCameraFar, type ) {
function getDepthMaterial( object, material, light, shadowCameraNear, shadowCameraFar, type ) {

let result = null;

Expand Down Expand Up @@ -20817,7 +20817,7 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {

if ( groupMaterial && groupMaterial.visible ) {

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

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

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

} else if ( material.visible ) {

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

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

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

if ( ! renderTarget ) return;

if ( textureProperties.__webglTexture !== undefined ) {

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

const isCompressed = ( texture && ( texture.isCompressedTexture || texture.image[ 0 ].isCompressedTexture ) );
const isCompressed = ( texture.isCompressedTexture || texture.image[ 0 ].isCompressedTexture );
const isDataTexture = ( texture.image[ 0 ] && texture.image[ 0 ].isDataTexture );

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

}

if ( !! geometry && ( geometry.morphAttributes.position !== undefined || geometry.morphAttributes.normal !== undefined ) ) {
if ( geometry.morphAttributes.position !== undefined || geometry.morphAttributes.normal !== undefined ) {

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

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

const curve = curves[ i ];
const resolution = ( curve && curve.isEllipseCurve ) ? divisions * 2
: ( curve && ( curve.isLineCurve || curve.isLineCurve3 ) ) ? 1
: ( curve && curve.isSplineCurve ) ? divisions * curve.points.length
const resolution = curve.isEllipseCurve ? divisions * 2
: ( curve.isLineCurve || curve.isLineCurve3 ) ? 1
: curve.isSplineCurve ? divisions * curve.points.length
: divisions;

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

} else {

edges.add( hash1, hash2 );
edges.add( hash1 );
edges.add( hash2 );
return true;

}
Expand Down Expand Up @@ -46552,13 +46551,13 @@ class Raycaster {

setFromCamera( coords, camera ) {

if ( camera && camera.isPerspectiveCamera ) {
if ( camera.isPerspectiveCamera ) {

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

} else if ( camera && camera.isOrthographicCamera ) {
} else if ( camera.isOrthographicCamera ) {

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

const boneList = [];

if ( object && object.isBone ) {
if ( object.isBone === true ) {

boneList.push( object );

Expand Down

0 comments on commit a2cc7c1

Please sign in to comment.