Skip to content

Commit 0ea4db2

Browse files
committed
Updated builds.
1 parent 668c495 commit 0ea4db2

7 files changed

Lines changed: 53 additions & 79 deletions

File tree

build/three.cjs

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
'use strict';
77

8-
const REVISION = '182';
8+
const REVISION = '183dev';
99

1010
/**
1111
* Represents mouse buttons and interaction types in context of controls.
@@ -3667,7 +3667,7 @@ class Quaternion {
36673667
* @param {number} srcOffset0 - An offset into the first source array.
36683668
* @param {Array<number>} src1 - The source array of the second quaternion.
36693669
* @param {number} srcOffset1 - An offset into the second source array.
3670-
* @param {number} t - The interpolation factor in the range `[0,1]`.
3670+
* @param {number} t - The interpolation factor. A value in the range `[0,1]` will interpolate. A value outside the range `[0,1]` will extrapolate.
36713671
* @see {@link Quaternion#slerp}
36723672
*/
36733673
static slerpFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t ) {
@@ -3682,28 +3682,6 @@ class Quaternion {
36823682
z1 = src1[ srcOffset1 + 2 ],
36833683
w1 = src1[ srcOffset1 + 3 ];
36843684

3685-
if ( t <= 0 ) {
3686-
3687-
dst[ dstOffset + 0 ] = x0;
3688-
dst[ dstOffset + 1 ] = y0;
3689-
dst[ dstOffset + 2 ] = z0;
3690-
dst[ dstOffset + 3 ] = w0;
3691-
3692-
return;
3693-
3694-
}
3695-
3696-
if ( t >= 1 ) {
3697-
3698-
dst[ dstOffset + 0 ] = x1;
3699-
dst[ dstOffset + 1 ] = y1;
3700-
dst[ dstOffset + 2 ] = z1;
3701-
dst[ dstOffset + 3 ] = w1;
3702-
3703-
return;
3704-
3705-
}
3706-
37073685
if ( w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1 ) {
37083686

37093687
let dot = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1;
@@ -4345,18 +4323,14 @@ class Quaternion {
43454323
}
43464324

43474325
/**
4348-
* Performs a spherical linear interpolation between quaternions.
4326+
* Performs a spherical linear interpolation between this quaternion and the target quaternion.
43494327
*
43504328
* @param {Quaternion} qb - The target quaternion.
4351-
* @param {number} t - The interpolation factor in the closed interval `[0, 1]`.
4329+
* @param {number} t - The interpolation factor. A value in the range `[0,1]` will interpolate. A value outside the range `[0,1]` will extrapolate.
43524330
* @return {Quaternion} A reference to this quaternion.
43534331
*/
43544332
slerp( qb, t ) {
43554333

4356-
if ( t <= 0 ) return this;
4357-
4358-
if ( t >= 1 ) return this.copy( qb ); // copy calls _onChangeCallback()
4359-
43604334
let x = qb._x, y = qb._y, z = qb._z, w = qb._w;
43614335

43624336
let dot = this.dot( qb );

build/three.core.js

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright 2010-2025 Three.js Authors
44
* SPDX-License-Identifier: MIT
55
*/
6-
const REVISION = '182';
6+
const REVISION = '183dev';
77

88
/**
99
* Represents mouse buttons and interaction types in context of controls.
@@ -3665,7 +3665,7 @@ class Quaternion {
36653665
* @param {number} srcOffset0 - An offset into the first source array.
36663666
* @param {Array<number>} src1 - The source array of the second quaternion.
36673667
* @param {number} srcOffset1 - An offset into the second source array.
3668-
* @param {number} t - The interpolation factor in the range `[0,1]`.
3668+
* @param {number} t - The interpolation factor. A value in the range `[0,1]` will interpolate. A value outside the range `[0,1]` will extrapolate.
36693669
* @see {@link Quaternion#slerp}
36703670
*/
36713671
static slerpFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t ) {
@@ -3680,28 +3680,6 @@ class Quaternion {
36803680
z1 = src1[ srcOffset1 + 2 ],
36813681
w1 = src1[ srcOffset1 + 3 ];
36823682

3683-
if ( t <= 0 ) {
3684-
3685-
dst[ dstOffset + 0 ] = x0;
3686-
dst[ dstOffset + 1 ] = y0;
3687-
dst[ dstOffset + 2 ] = z0;
3688-
dst[ dstOffset + 3 ] = w0;
3689-
3690-
return;
3691-
3692-
}
3693-
3694-
if ( t >= 1 ) {
3695-
3696-
dst[ dstOffset + 0 ] = x1;
3697-
dst[ dstOffset + 1 ] = y1;
3698-
dst[ dstOffset + 2 ] = z1;
3699-
dst[ dstOffset + 3 ] = w1;
3700-
3701-
return;
3702-
3703-
}
3704-
37053683
if ( w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1 ) {
37063684

37073685
let dot = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1;
@@ -4343,18 +4321,14 @@ class Quaternion {
43434321
}
43444322

43454323
/**
4346-
* Performs a spherical linear interpolation between quaternions.
4324+
* Performs a spherical linear interpolation between this quaternion and the target quaternion.
43474325
*
43484326
* @param {Quaternion} qb - The target quaternion.
4349-
* @param {number} t - The interpolation factor in the closed interval `[0, 1]`.
4327+
* @param {number} t - The interpolation factor. A value in the range `[0,1]` will interpolate. A value outside the range `[0,1]` will extrapolate.
43504328
* @return {Quaternion} A reference to this quaternion.
43514329
*/
43524330
slerp( qb, t ) {
43534331

4354-
if ( t <= 0 ) return this;
4355-
4356-
if ( t >= 1 ) return this.copy( qb ); // copy calls _onChangeCallback()
4357-
43584332
let x = qb._x, y = qb._y, z = qb._z, w = qb._w;
43594333

43604334
let dot = this.dot( qb );

build/three.core.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.webgpu.js

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47814,8 +47814,11 @@ class Background extends DataMap {
4781447814
// compute vertex position
4781547815
const modifiedPosition = isOrtho.select( positionLocal.mul( orthoScale ), positionLocal );
4781647816

47817-
// By using a w component of 0, the skybox will not translate when the camera moves through the scene
47818-
let viewProj = cameraProjectionMatrix.mul( modelViewMatrix.mul( vec4( modifiedPosition, 0.0 ) ) );
47817+
// by using a w component of 0, the skybox will not translate when the camera moves through the scene
47818+
const viewPosition = modelViewMatrix.mul( vec4( modifiedPosition, 0.0 ) );
47819+
47820+
// we force w=1.0 here to prevent the w_clip=0 divide-by-zero error for ortho cameras.
47821+
let viewProj = cameraProjectionMatrix.mul( vec4( viewPosition.xyz, 1.0 ) );
4781947822

4782047823
// force background to far plane so it does not occlude objects
4782147824
viewProj = viewProj.setZ( viewProj.w );
@@ -57670,8 +57673,7 @@ class Renderer {
5767057673
* and pipeline updates.
5767157674
*
5767257675
* @private
57673-
* @type {?Function}
57674-
* @default null
57676+
* @type {Function}
5767557677
*/
5767657678
this._handleObjectFunction = this._renderObjectDirect;
5767757679

@@ -57957,6 +57959,7 @@ class Renderer {
5795757959
const previousRenderId = nodeFrame.renderId;
5795857960
const previousRenderContext = this._currentRenderContext;
5795957961
const previousRenderObjectFunction = this._currentRenderObjectFunction;
57962+
const previousHandleObjectFunction = this._handleObjectFunction;
5796057963
const previousCompilationPromises = this._compilationPromises;
5796157964

5796257965
//
@@ -58040,7 +58043,15 @@ class Renderer {
5804058043

5804158044
//
5804258045

58043-
this._background.update( sceneRef, renderList, renderContext );
58046+
if ( targetScene !== scene ) {
58047+
58048+
this._background.update( targetScene, renderList, renderContext );
58049+
58050+
} else {
58051+
58052+
this._background.update( sceneRef, renderList, renderContext );
58053+
58054+
}
5804458055

5804558056
// process render lists
5804658057

@@ -58058,10 +58069,9 @@ class Renderer {
5805858069

5805958070
this._currentRenderContext = previousRenderContext;
5806058071
this._currentRenderObjectFunction = previousRenderObjectFunction;
58072+
this._handleObjectFunction = previousHandleObjectFunction;
5806158073
this._compilationPromises = previousCompilationPromises;
5806258074

58063-
this._handleObjectFunction = this._renderObjectDirect;
58064-
5806558075
// wait for all promises setup by backends awaiting compilation/linking/pipeline creation to complete
5806658076

5806758077
await Promise.all( compilationPromises );
@@ -58458,6 +58468,7 @@ class Renderer {
5845858468
const previousRenderId = nodeFrame.renderId;
5845958469
const previousRenderContext = this._currentRenderContext;
5846058470
const previousRenderObjectFunction = this._currentRenderObjectFunction;
58471+
const previousHandleObjectFunction = this._handleObjectFunction;
5846158472

5846258473
//
5846358474

@@ -58490,6 +58501,7 @@ class Renderer {
5849058501

5849158502
this._currentRenderContext = renderContext;
5849258503
this._currentRenderObjectFunction = this._renderObjectFunction || this.renderObject;
58504+
this._handleObjectFunction = this._renderObjectDirect;
5849358505

5849458506
//
5849558507

@@ -58689,6 +58701,7 @@ class Renderer {
5868958701

5869058702
this._currentRenderContext = previousRenderContext;
5869158703
this._currentRenderObjectFunction = previousRenderObjectFunction;
58704+
this._handleObjectFunction = previousHandleObjectFunction;
5869258705

5869358706
//
5869458707

@@ -70604,7 +70617,7 @@ const GPUPrimitiveTopology = {
7060470617
TriangleStrip: 'triangle-strip',
7060570618
};
7060670619

70607-
const GPUShaderStage = ( typeof self !== 'undefined' ) ? self.GPUShaderStage : { VERTEX: 1, FRAGMENT: 2, COMPUTE: 4 };
70620+
const GPUShaderStage = ( typeof self !== 'undefined' && self.GPUShaderStage ) ? self.GPUShaderStage : { VERTEX: 1, FRAGMENT: 2, COMPUTE: 4 };
7060870621

7060970622
const GPUCompareFunction = {
7061070623
Never: 'never',

build/three.webgpu.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.webgpu.nodes.js

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47814,8 +47814,11 @@ class Background extends DataMap {
4781447814
// compute vertex position
4781547815
const modifiedPosition = isOrtho.select( positionLocal.mul( orthoScale ), positionLocal );
4781647816

47817-
// By using a w component of 0, the skybox will not translate when the camera moves through the scene
47818-
let viewProj = cameraProjectionMatrix.mul( modelViewMatrix.mul( vec4( modifiedPosition, 0.0 ) ) );
47817+
// by using a w component of 0, the skybox will not translate when the camera moves through the scene
47818+
const viewPosition = modelViewMatrix.mul( vec4( modifiedPosition, 0.0 ) );
47819+
47820+
// we force w=1.0 here to prevent the w_clip=0 divide-by-zero error for ortho cameras.
47821+
let viewProj = cameraProjectionMatrix.mul( vec4( viewPosition.xyz, 1.0 ) );
4781947822

4782047823
// force background to far plane so it does not occlude objects
4782147824
viewProj = viewProj.setZ( viewProj.w );
@@ -57670,8 +57673,7 @@ class Renderer {
5767057673
* and pipeline updates.
5767157674
*
5767257675
* @private
57673-
* @type {?Function}
57674-
* @default null
57676+
* @type {Function}
5767557677
*/
5767657678
this._handleObjectFunction = this._renderObjectDirect;
5767757679

@@ -57957,6 +57959,7 @@ class Renderer {
5795757959
const previousRenderId = nodeFrame.renderId;
5795857960
const previousRenderContext = this._currentRenderContext;
5795957961
const previousRenderObjectFunction = this._currentRenderObjectFunction;
57962+
const previousHandleObjectFunction = this._handleObjectFunction;
5796057963
const previousCompilationPromises = this._compilationPromises;
5796157964

5796257965
//
@@ -58040,7 +58043,15 @@ class Renderer {
5804058043

5804158044
//
5804258045

58043-
this._background.update( sceneRef, renderList, renderContext );
58046+
if ( targetScene !== scene ) {
58047+
58048+
this._background.update( targetScene, renderList, renderContext );
58049+
58050+
} else {
58051+
58052+
this._background.update( sceneRef, renderList, renderContext );
58053+
58054+
}
5804458055

5804558056
// process render lists
5804658057

@@ -58058,10 +58069,9 @@ class Renderer {
5805858069

5805958070
this._currentRenderContext = previousRenderContext;
5806058071
this._currentRenderObjectFunction = previousRenderObjectFunction;
58072+
this._handleObjectFunction = previousHandleObjectFunction;
5806158073
this._compilationPromises = previousCompilationPromises;
5806258074

58063-
this._handleObjectFunction = this._renderObjectDirect;
58064-
5806558075
// wait for all promises setup by backends awaiting compilation/linking/pipeline creation to complete
5806658076

5806758077
await Promise.all( compilationPromises );
@@ -58458,6 +58468,7 @@ class Renderer {
5845858468
const previousRenderId = nodeFrame.renderId;
5845958469
const previousRenderContext = this._currentRenderContext;
5846058470
const previousRenderObjectFunction = this._currentRenderObjectFunction;
58471+
const previousHandleObjectFunction = this._handleObjectFunction;
5846158472

5846258473
//
5846358474

@@ -58490,6 +58501,7 @@ class Renderer {
5849058501

5849158502
this._currentRenderContext = renderContext;
5849258503
this._currentRenderObjectFunction = this._renderObjectFunction || this.renderObject;
58504+
this._handleObjectFunction = this._renderObjectDirect;
5849358505

5849458506
//
5849558507

@@ -58689,6 +58701,7 @@ class Renderer {
5868958701

5869058702
this._currentRenderContext = previousRenderContext;
5869158703
this._currentRenderObjectFunction = previousRenderObjectFunction;
58704+
this._handleObjectFunction = previousHandleObjectFunction;
5869258705

5869358706
//
5869458707

@@ -70604,7 +70617,7 @@ const GPUPrimitiveTopology = {
7060470617
TriangleStrip: 'triangle-strip',
7060570618
};
7060670619

70607-
const GPUShaderStage = ( typeof self !== 'undefined' ) ? self.GPUShaderStage : { VERTEX: 1, FRAGMENT: 2, COMPUTE: 4 };
70620+
const GPUShaderStage = ( typeof self !== 'undefined' && self.GPUShaderStage ) ? self.GPUShaderStage : { VERTEX: 1, FRAGMENT: 2, COMPUTE: 4 };
7060870621

7060970622
const GPUCompareFunction = {
7061070623
Never: 'never',

build/three.webgpu.nodes.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.

0 commit comments

Comments
 (0)