Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 4 additions & 30 deletions build/three.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
'use strict';

const REVISION = '182';
const REVISION = '183dev';

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

if ( t <= 0 ) {

dst[ dstOffset + 0 ] = x0;
dst[ dstOffset + 1 ] = y0;
dst[ dstOffset + 2 ] = z0;
dst[ dstOffset + 3 ] = w0;

return;

}

if ( t >= 1 ) {

dst[ dstOffset + 0 ] = x1;
dst[ dstOffset + 1 ] = y1;
dst[ dstOffset + 2 ] = z1;
dst[ dstOffset + 3 ] = w1;

return;

}

if ( w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1 ) {

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

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

if ( t <= 0 ) return this;

if ( t >= 1 ) return this.copy( qb ); // copy calls _onChangeCallback()

let x = qb._x, y = qb._y, z = qb._z, w = qb._w;

let dot = this.dot( qb );
Expand Down
34 changes: 4 additions & 30 deletions build/three.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright 2010-2025 Three.js Authors
* SPDX-License-Identifier: MIT
*/
const REVISION = '182';
const REVISION = '183dev';

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

if ( t <= 0 ) {

dst[ dstOffset + 0 ] = x0;
dst[ dstOffset + 1 ] = y0;
dst[ dstOffset + 2 ] = z0;
dst[ dstOffset + 3 ] = w0;

return;

}

if ( t >= 1 ) {

dst[ dstOffset + 0 ] = x1;
dst[ dstOffset + 1 ] = y1;
dst[ dstOffset + 2 ] = z1;
dst[ dstOffset + 3 ] = w1;

return;

}

if ( w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1 ) {

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

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

if ( t <= 0 ) return this;

if ( t >= 1 ) return this.copy( qb ); // copy calls _onChangeCallback()

let x = qb._x, y = qb._y, z = qb._z, w = qb._w;

let dot = this.dot( qb );
Expand Down
2 changes: 1 addition & 1 deletion build/three.core.min.js

Large diffs are not rendered by default.

29 changes: 21 additions & 8 deletions build/three.webgpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -47814,8 +47814,11 @@ class Background extends DataMap {
// compute vertex position
const modifiedPosition = isOrtho.select( positionLocal.mul( orthoScale ), positionLocal );

// By using a w component of 0, the skybox will not translate when the camera moves through the scene
let viewProj = cameraProjectionMatrix.mul( modelViewMatrix.mul( vec4( modifiedPosition, 0.0 ) ) );
// by using a w component of 0, the skybox will not translate when the camera moves through the scene
const viewPosition = modelViewMatrix.mul( vec4( modifiedPosition, 0.0 ) );

// we force w=1.0 here to prevent the w_clip=0 divide-by-zero error for ortho cameras.
let viewProj = cameraProjectionMatrix.mul( vec4( viewPosition.xyz, 1.0 ) );

// force background to far plane so it does not occlude objects
viewProj = viewProj.setZ( viewProj.w );
Expand Down Expand Up @@ -57670,8 +57673,7 @@ class Renderer {
* and pipeline updates.
*
* @private
* @type {?Function}
* @default null
* @type {Function}
*/
this._handleObjectFunction = this._renderObjectDirect;

Expand Down Expand Up @@ -57957,6 +57959,7 @@ class Renderer {
const previousRenderId = nodeFrame.renderId;
const previousRenderContext = this._currentRenderContext;
const previousRenderObjectFunction = this._currentRenderObjectFunction;
const previousHandleObjectFunction = this._handleObjectFunction;
const previousCompilationPromises = this._compilationPromises;

//
Expand Down Expand Up @@ -58040,7 +58043,15 @@ class Renderer {

//

this._background.update( sceneRef, renderList, renderContext );
if ( targetScene !== scene ) {

this._background.update( targetScene, renderList, renderContext );

} else {

this._background.update( sceneRef, renderList, renderContext );

}

// process render lists

Expand All @@ -58058,10 +58069,9 @@ class Renderer {

this._currentRenderContext = previousRenderContext;
this._currentRenderObjectFunction = previousRenderObjectFunction;
this._handleObjectFunction = previousHandleObjectFunction;
this._compilationPromises = previousCompilationPromises;

this._handleObjectFunction = this._renderObjectDirect;

// wait for all promises setup by backends awaiting compilation/linking/pipeline creation to complete

await Promise.all( compilationPromises );
Expand Down Expand Up @@ -58458,6 +58468,7 @@ class Renderer {
const previousRenderId = nodeFrame.renderId;
const previousRenderContext = this._currentRenderContext;
const previousRenderObjectFunction = this._currentRenderObjectFunction;
const previousHandleObjectFunction = this._handleObjectFunction;

//

Expand Down Expand Up @@ -58490,6 +58501,7 @@ class Renderer {

this._currentRenderContext = renderContext;
this._currentRenderObjectFunction = this._renderObjectFunction || this.renderObject;
this._handleObjectFunction = this._renderObjectDirect;

//

Expand Down Expand Up @@ -58689,6 +58701,7 @@ class Renderer {

this._currentRenderContext = previousRenderContext;
this._currentRenderObjectFunction = previousRenderObjectFunction;
this._handleObjectFunction = previousHandleObjectFunction;

//

Expand Down Expand Up @@ -70604,7 +70617,7 @@ const GPUPrimitiveTopology = {
TriangleStrip: 'triangle-strip',
};

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

const GPUCompareFunction = {
Never: 'never',
Expand Down
2 changes: 1 addition & 1 deletion build/three.webgpu.min.js

Large diffs are not rendered by default.

29 changes: 21 additions & 8 deletions build/three.webgpu.nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -47814,8 +47814,11 @@ class Background extends DataMap {
// compute vertex position
const modifiedPosition = isOrtho.select( positionLocal.mul( orthoScale ), positionLocal );

// By using a w component of 0, the skybox will not translate when the camera moves through the scene
let viewProj = cameraProjectionMatrix.mul( modelViewMatrix.mul( vec4( modifiedPosition, 0.0 ) ) );
// by using a w component of 0, the skybox will not translate when the camera moves through the scene
const viewPosition = modelViewMatrix.mul( vec4( modifiedPosition, 0.0 ) );

// we force w=1.0 here to prevent the w_clip=0 divide-by-zero error for ortho cameras.
let viewProj = cameraProjectionMatrix.mul( vec4( viewPosition.xyz, 1.0 ) );

// force background to far plane so it does not occlude objects
viewProj = viewProj.setZ( viewProj.w );
Expand Down Expand Up @@ -57670,8 +57673,7 @@ class Renderer {
* and pipeline updates.
*
* @private
* @type {?Function}
* @default null
* @type {Function}
*/
this._handleObjectFunction = this._renderObjectDirect;

Expand Down Expand Up @@ -57957,6 +57959,7 @@ class Renderer {
const previousRenderId = nodeFrame.renderId;
const previousRenderContext = this._currentRenderContext;
const previousRenderObjectFunction = this._currentRenderObjectFunction;
const previousHandleObjectFunction = this._handleObjectFunction;
const previousCompilationPromises = this._compilationPromises;

//
Expand Down Expand Up @@ -58040,7 +58043,15 @@ class Renderer {

//

this._background.update( sceneRef, renderList, renderContext );
if ( targetScene !== scene ) {

this._background.update( targetScene, renderList, renderContext );

} else {

this._background.update( sceneRef, renderList, renderContext );

}

// process render lists

Expand All @@ -58058,10 +58069,9 @@ class Renderer {

this._currentRenderContext = previousRenderContext;
this._currentRenderObjectFunction = previousRenderObjectFunction;
this._handleObjectFunction = previousHandleObjectFunction;
this._compilationPromises = previousCompilationPromises;

this._handleObjectFunction = this._renderObjectDirect;

// wait for all promises setup by backends awaiting compilation/linking/pipeline creation to complete

await Promise.all( compilationPromises );
Expand Down Expand Up @@ -58458,6 +58468,7 @@ class Renderer {
const previousRenderId = nodeFrame.renderId;
const previousRenderContext = this._currentRenderContext;
const previousRenderObjectFunction = this._currentRenderObjectFunction;
const previousHandleObjectFunction = this._handleObjectFunction;

//

Expand Down Expand Up @@ -58490,6 +58501,7 @@ class Renderer {

this._currentRenderContext = renderContext;
this._currentRenderObjectFunction = this._renderObjectFunction || this.renderObject;
this._handleObjectFunction = this._renderObjectDirect;

//

Expand Down Expand Up @@ -58689,6 +58701,7 @@ class Renderer {

this._currentRenderContext = previousRenderContext;
this._currentRenderObjectFunction = previousRenderObjectFunction;
this._handleObjectFunction = previousHandleObjectFunction;

//

Expand Down Expand Up @@ -70604,7 +70617,7 @@ const GPUPrimitiveTopology = {
TriangleStrip: 'triangle-strip',
};

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

const GPUCompareFunction = {
Never: 'never',
Expand Down
2 changes: 1 addition & 1 deletion build/three.webgpu.nodes.min.js

Large diffs are not rendered by default.

Loading
Loading