Skip to content

Commit b29e3d4

Browse files
authored
Merge branch 'mrdoob:dev' into equirect-layers
2 parents f520ed5 + 55c095d commit b29e3d4

File tree

924 files changed

+55588
-23944
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

924 files changed

+55588
-23944
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Install Node
2121
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
2222
with:
23-
node-version: 22
23+
node-version: 24
2424
cache: 'npm'
2525
- name: Install dependencies
2626
run: npm ci
@@ -54,7 +54,7 @@ jobs:
5454
- name: Install Node
5555
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
5656
with:
57-
node-version: 22
57+
node-version: 24
5858
cache: 'npm'
5959
- name: Install dependencies
6060
run: npm ci
@@ -64,7 +64,7 @@ jobs:
6464
- name: === E2E testing ===
6565
run: npm run test-e2e
6666
- name: Upload output screenshots
67-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
67+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
6868
if: always()
6969
with:
7070
name: Output screenshots-${{ matrix.os }}-${{ matrix.CI }}

.github/workflows/codeql-code-scanning.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ jobs:
3030

3131
# Initializes the CodeQL tools for scanning.
3232
- name: Initialize CodeQL
33-
uses: github/codeql-action/init@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v4
33+
uses: github/codeql-action/init@0499de31b99561a6d14a36a5f662c2a54f91beee # v4
3434
with:
3535
languages: ${{ matrix.language }}
3636
config-file: ./.github/codeql-config.yml
3737
queries: security-and-quality
3838

3939
- name: Autobuild
40-
uses: github/codeql-action/autobuild@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v4
40+
uses: github/codeql-action/autobuild@0499de31b99561a6d14a36a5f662c2a54f91beee # v4
4141

4242
- name: Perform CodeQL Analysis
43-
uses: github/codeql-action/analyze@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v4
43+
uses: github/codeql-action/analyze@0499de31b99561a6d14a36a5f662c2a54f91beee # v4
4444
with:
4545
category: "/language:${{matrix.language}}"

.github/workflows/read-size.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Install Node
2525
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
2626
with:
27-
node-version: 22
27+
node-version: 24
2828
cache: 'npm'
2929
- name: Install dependencies
3030
run: npm ci
@@ -61,7 +61,7 @@ jobs:
6161
# write the output in a json file to upload it as artifact
6262
node -pe "JSON.stringify({ filesize: $WEBGL_FILESIZE, gzip: $WEBGL_FILESIZE_GZIP, treeshaken: $WEBGL_TREESHAKEN, treeshakenGzip: $WEBGL_TREESHAKEN_GZIP, filesize2: $WEBGPU_FILESIZE, gzip2: $WEBGPU_FILESIZE_GZIP, treeshaken2: $WEBGPU_TREESHAKEN, treeshakenGzip2: $WEBGPU_TREESHAKEN_GZIP, filesize3: $WEBGPU_NODES_FILESIZE, gzip3: $WEBGPU_NODES_FILESIZE_GZIP, treeshaken3: $WEBGPU_NODES_TREESHAKEN, treeshakenGzip3: $WEBGPU_NODES_TREESHAKEN_GZIP, pr: $PR })" > sizes.json
6363
- name: Upload artifact
64-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
64+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
6565
with:
6666
name: sizes
6767
path: sizes.json

.github/workflows/report-size.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- name: Install Node
6161
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
6262
with:
63-
node-version: 22
63+
node-version: 24
6464
cache: 'npm'
6565
- name: Install dependencies
6666
run: npm ci

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
[![NPM Package][npm]][npm-url]
44
[![Build Size][build-size]][build-size-url]
55
[![NPM Downloads][npm-downloads]][npmtrends-url]
6+
[![jsDelivr Downloads][jsdelivr-downloads]][jsdelivr-url]
67
[![Discord][discord]][discord-url]
7-
[![DeepWiki][deepwiki]][deepwiki-url]
88

99
#### JavaScript 3D library
1010

@@ -79,8 +79,7 @@ git clone --depth=1 https://github.com/mrdoob/three.js.git
7979
[build-size-url]: https://bundlephobia.com/result?p=three
8080
[npm-downloads]: https://img.shields.io/npm/dw/three
8181
[npmtrends-url]: https://www.npmtrends.com/three
82+
[jsdelivr-downloads]: https://data.jsdelivr.com/v1/package/npm/three/badge?style=rounded
83+
[jsdelivr-url]: https://www.jsdelivr.com/package/npm/three
8284
[discord]: https://img.shields.io/discord/685241246557667386
8385
[discord-url]: https://discord.gg/56GBJwAnUS
84-
[deepwiki]: https://deepwiki.com/badge.svg
85-
[deepwiki-url]: https://deepwiki.com/mrdoob/three.js
86-

build/three.cjs

Lines changed: 116 additions & 98 deletions
Large diffs are not rendered by default.

build/three.core.js

Lines changed: 36 additions & 39 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 = '181dev';
6+
const REVISION = '182dev';
77

88
/**
99
* Represents mouse buttons and interaction types in context of controls.
@@ -11989,43 +11989,18 @@ class Matrix4 {
1198911989
const n31 = te[ 2 ], n32 = te[ 6 ], n33 = te[ 10 ], n34 = te[ 14 ];
1199011990
const n41 = te[ 3 ], n42 = te[ 7 ], n43 = te[ 11 ], n44 = te[ 15 ];
1199111991

11992-
//TODO: make this more efficient
11993-
11994-
return (
11995-
n41 * (
11996-
+ n14 * n23 * n32
11997-
- n13 * n24 * n32
11998-
- n14 * n22 * n33
11999-
+ n12 * n24 * n33
12000-
+ n13 * n22 * n34
12001-
- n12 * n23 * n34
12002-
) +
12003-
n42 * (
12004-
+ n11 * n23 * n34
12005-
- n11 * n24 * n33
12006-
+ n14 * n21 * n33
12007-
- n13 * n21 * n34
12008-
+ n13 * n24 * n31
12009-
- n14 * n23 * n31
12010-
) +
12011-
n43 * (
12012-
+ n11 * n24 * n32
12013-
- n11 * n22 * n34
12014-
- n14 * n21 * n32
12015-
+ n12 * n21 * n34
12016-
+ n14 * n22 * n31
12017-
- n12 * n24 * n31
12018-
) +
12019-
n44 * (
12020-
- n13 * n22 * n31
12021-
- n11 * n23 * n32
12022-
+ n11 * n22 * n33
12023-
+ n13 * n21 * n32
12024-
- n12 * n21 * n33
12025-
+ n12 * n23 * n31
12026-
)
11992+
const t11 = n23 * n34 - n24 * n33;
11993+
const t12 = n22 * n34 - n24 * n32;
11994+
const t13 = n22 * n33 - n23 * n32;
1202711995

12028-
);
11996+
const t21 = n21 * n34 - n24 * n31;
11997+
const t22 = n21 * n33 - n23 * n31;
11998+
const t23 = n21 * n32 - n22 * n31;
11999+
12000+
return n11 * ( n42 * t11 - n43 * t12 + n44 * t13 ) -
12001+
n12 * ( n41 * t11 - n43 * t21 + n44 * t22 ) +
12002+
n13 * ( n41 * t12 - n42 * t21 + n44 * t23 ) -
12003+
n14 * ( n41 * t13 - n42 * t22 + n43 * t23 );
1202912004

1203012005
}
1203112006

@@ -21241,9 +21216,22 @@ class ShaderMaterial extends Material {
2124121216
this.wireframeLinewidth = 1;
2124221217

2124321218
/**
21244-
* Define whether the material color is affected by global fog settings; `true`
21219+
* Defines whether the material color is affected by global fog settings; `true`
2124521220
* to pass fog uniforms to the shader.
2124621221
*
21222+
* Setting this property to `true` requires the definition of fog uniforms. It is
21223+
* recommended to use `UniformsUtils.merge()` to combine the custom shader uniforms
21224+
* with predefined fog uniforms.
21225+
*
21226+
* ```js
21227+
* const material = new ShaderMaterial( {
21228+
* uniforms: UniformsUtils.merge( [ UniformsLib[ 'fog' ], shaderUniforms ] );
21229+
* vertexShader: vertexShader,
21230+
* fragmentShader: fragmentShader,
21231+
* fog: true
21232+
* } );
21233+
* ```
21234+
*
2124721235
* @type {boolean}
2124821236
* @default false
2124921237
*/
@@ -21362,6 +21350,12 @@ class ShaderMaterial extends Material {
2136221350

2136321351
this.glslVersion = source.glslVersion;
2136421352

21353+
this.defaultAttributeValues = Object.assign( {}, source.defaultAttributeValues );
21354+
21355+
this.index0AttributeName = source.index0AttributeName;
21356+
21357+
this.uniformsNeedUpdate = source.uniformsNeedUpdate;
21358+
2136521359
return this;
2136621360

2136721361
}
@@ -27831,7 +27825,6 @@ class BatchedMesh extends Mesh {
2783127825
* Repacks the sub geometries in [name] to remove any unused space remaining from
2783227826
* previously deleted geometry, freeing up space to add new geometry.
2783327827
*
27834-
* @param {number} instanceId - The ID of the instance to remove from the batch.
2783527828
* @return {BatchedMesh} A reference to this batched mesh.
2783627829
*/
2783727830
optimize() {
@@ -27883,6 +27876,7 @@ class BatchedMesh extends Mesh {
2788327876

2788427877
index.array.copyWithin( nextIndexStart, indexStart, indexStart + reservedIndexCount );
2788527878
index.addUpdateRange( nextIndexStart, reservedIndexCount );
27879+
index.needsUpdate = true;
2788627880

2788727881
geometryInfo.indexStart = nextIndexStart;
2788827882

@@ -27903,6 +27897,7 @@ class BatchedMesh extends Mesh {
2790327897
const { array, itemSize } = attribute;
2790427898
array.copyWithin( nextVertexStart * itemSize, vertexStart * itemSize, ( vertexStart + reservedVertexCount ) * itemSize );
2790527899
attribute.addUpdateRange( nextVertexStart * itemSize, reservedVertexCount * itemSize );
27900+
attribute.needsUpdate = true;
2790627901

2790727902
}
2790827903

@@ -27919,6 +27914,8 @@ class BatchedMesh extends Mesh {
2791927914

2792027915
}
2792127916

27917+
this._visibilityChanged = true;
27918+
2792227919
return this;
2792327920

2792427921
}

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.

0 commit comments

Comments
 (0)