Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] dev from mrdoob:dev #420

Open
wants to merge 92 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
fd53a1f
Nodes: Document more modules. (#30163)
Mugen87 Dec 18, 2024
74b7a6f
TSL: More consistent names `shadowPositionWorld`, `materialAO` (#30152)
sunag Dec 18, 2024
86018eb
TSL: GLSL alias functions (#30150)
sunag Dec 18, 2024
428eb72
SkinningNode: Fix `previousBoneMatrices` (#30161)
sunag Dec 18, 2024
f28ec3c
Manual: update material feature table (#30164)
s-rigaud Dec 19, 2024
b1567a0
Nodes: Ensure `getBackgroundNode()` and `getEnvironmentNode()` only r…
Mugen87 Dec 19, 2024
2acfeaf
Node: Document more modules. (#30167)
Mugen87 Dec 19, 2024
d3b07d6
ShadowNode: Ensure background does not influence shadow map. (#30170)
Mugen87 Dec 19, 2024
463f476
WebGPURenderer: Rename `PostProcessingUtils` -> `RendererUtils` (#30172)
sunag Dec 20, 2024
083f233
NodeUtils: Add `getDataFromObject()` (#30171)
sunag Dec 20, 2024
3d26186
TSL: Add `vertexStage()` function (#30173)
sunag Dec 20, 2024
98170ef
Examples: Prettified webgpu_postprocessing_ssr example.
mrdoob Dec 20, 2024
7d25bc9
Updated builds.
mrdoob Dec 20, 2024
f6fd36c
Docs: Improve Material page (en/fr) (#30118)
borisghidaglia Dec 20, 2024
a66dfb0
Update webgpu_postprocessing_ssr.html
Mugen87 Dec 20, 2024
72feebd
Update SSRNode.js
Mugen87 Dec 20, 2024
6bbb05e
add missing @function in doclets (#30176)
ycw Dec 20, 2024
fbd54d5
fix misspelling (#30175)
ycw Dec 20, 2024
8e86f02
Renderer: Document more modules. (#30182)
Mugen87 Dec 21, 2024
0bdd6d1
WebGPURenderer: Fix and improve the dynamic updating of the scene nod…
sunag Dec 21, 2024
284c5fe
RendererUtils: Honor fog. (#30178)
Mugen87 Dec 21, 2024
ba908e4
Update actions/upload-artifact digest to 6f51ac0 (#30189)
renovate[bot] Dec 22, 2024
09a00af
Update github/codeql-action digest to 48ab28a (#30190)
renovate[bot] Dec 22, 2024
8b6d4c3
Update devDependencies (non-major) (#30191)
renovate[bot] Dec 22, 2024
bcdb914
Renderer: Document more modules. (#30188)
Mugen87 Dec 23, 2024
f9c4319
Renderer: Document more modules. (#30194)
Mugen87 Dec 23, 2024
05dbc5d
WebGPURenderer: Introduce RenderTarget3D and RenderTargetArray (#30155)
RenaudRohlinger Dec 23, 2024
309d347
Nodes - Document ComputeBuiltinNode and AtomicFunctionNode (#30162)
cmhhelgeson Dec 24, 2024
3e6034a
ReflectorNode: Force `autoClear` (#30199)
sunag Dec 24, 2024
c9e5e53
TextureNode: Fix matrix update (#30200)
sunag Dec 25, 2024
62b2a82
WebGPURenderer: Disable fog in shadow-material (#30204)
sunag Dec 26, 2024
a7500fd
TSL: add `addMethodsChaining` (#30201)
linbingquan Dec 26, 2024
574e954
[Doc/zh]: Improve Chinese translation. (#30205)
puxiao Dec 26, 2024
eb8c334
WebGPURenderer: Improved Shaders Names For Debug (#30209)
RenaudRohlinger Dec 26, 2024
34c428c
Renderer: Document more modules (#30213)
Mugen87 Dec 26, 2024
9b3ef7c
Examples: Removing antialias for `webgpu_backdrop_water` (#30206)
sunag Dec 26, 2024
25763c4
TSL: Removing `addMethodChaining` from `Three.TSL.js` (#30208)
linbingquan Dec 26, 2024
688976a
WebGPURenderer: Fix `material.depthTest` in `logarithmicDepthBuffer` …
sunag Dec 26, 2024
0eaea73
TextureNode: Improve error message (#30215)
sunag Dec 26, 2024
6462c8a
Revert "TSL: add `addMethodsChaining` (#30201)" (#30217)
sunag Dec 27, 2024
b35ad2a
Renderer: Document more modules. (#30221)
Mugen87 Dec 27, 2024
d24a6b4
WebGPURenderer: Respect TypedArray in StorageInstancedBufferAttribute…
RenaudRohlinger Dec 28, 2024
9d4c291
Renderer: Document more modules. (#30224)
Mugen87 Dec 28, 2024
a36f982
Update devDependencies (non-major) (#30227)
renovate[bot] Dec 29, 2024
5bad335
TSL: Use correct elementType with WorkgroupInfoNode (#30222)
RenaudRohlinger Dec 30, 2024
b1fd13b
ReflectorNode: No cache event if `bounces=false` (#30231)
sunag Dec 30, 2024
aa370f4
Node: Ensure that the child nodes are processed first for events (#30…
sunag Dec 30, 2024
1a4f44b
ConditionalNode: Fix setup process (#30229)
sunag Dec 30, 2024
2e72872
Editor: Add Farsi language. (#30196)
pkpedram Dec 30, 2024
2ef9864
Examples: Disable devicePixelRatio in webgpu ssr.
mrdoob Dec 30, 2024
1b48150
Updated builds.
mrdoob Dec 30, 2024
dcb1169
Update README.md
mrdoob Dec 30, 2024
7f6e1fd
GaussianBlurNode: Fix custom UV (#30232)
sunag Dec 30, 2024
7f4fc6f
Renderer: Document more modules. (#30233)
Mugen87 Dec 30, 2024
b78ad4c
Renderer: Document more modules. (#30235)
Mugen87 Dec 30, 2024
b641098
display language names using intl module (#30237)
ycw Dec 30, 2024
e8af245
Update WebGLTextureUtils.js (#30236) (#30238)
boytchev Dec 30, 2024
7969560
Updated builds.
mrdoob Dec 31, 2024
4fe111f
fix typo VertexNodeNode -> VertexNode (#30239)
ycw Dec 31, 2024
79497a2
r172
mrdoob Dec 31, 2024
eebeffe
Renderer: Document more modules. (#30244)
Mugen87 Dec 31, 2024
18f7365
Update constants.js
Mugen87 Dec 31, 2024
9a0137a
-> 2025 (#30240)
ycw Dec 31, 2024
4c1941f
Renderer: Document more modules. (#30246)
Mugen87 Jan 1, 2025
7d72e71
Examples: Improve `webgpu_lights_ies_spotlight` (#30243)
mrdoob Jan 1, 2025
604f412
WaterMesh: Improve lighting support (#30247)
sunag Jan 1, 2025
34c674a
Examples: Clean up. (#30248)
Methuselah96 Jan 2, 2025
cc81d68
Docs: clarify LineMaterial.linewidth units in relation to worldUnits …
nyan-left Jan 2, 2025
12095d2
Backend: Document missing interface method. (#30250)
Mugen87 Jan 2, 2025
00fa06f
WebGPURenderer: Reduce memory churn when using chain maps. (#30249)
Mugen87 Jan 2, 2025
575cc3a
docs: Offscreen Canvas fix touch pick and 2 fingers interactions (#29…
Arecsu Jan 2, 2025
3778581
Fix glossy material for Teapot example (#30253)
erich666 Jan 3, 2025
3abfd88
Do not try to create WebXRDepthSensing object with cpu-optimized dept…
dli7319 Jan 3, 2025
99eae50
RenderContexts: Introduce `getForClear()`. (#30256)
Mugen87 Jan 3, 2025
880d23e
WebGLBackground: Reset meshes in `dispose()`. (#30257)
Mugen87 Jan 3, 2025
8e6507f
ChainMap: Avoid a redundant internal weak map. (#30258)
ycw Jan 3, 2025
c0b0059
WebGPUTextureUtils: Improve `_copyImageToTexture()` (#30260)
ycw Jan 3, 2025
f30af84
Nodes: Optimize `getCacheKey()`. (#30259)
Mugen87 Jan 3, 2025
eea50d8
Examples: Add raycaster helper external demo. (#30262)
Mugen87 Jan 4, 2025
d42aea0
Update dependency rollup to v4.29.2 (#30265)
renovate[bot] Jan 5, 2025
549ee80
CCDIKSolver: fix algo broken ref (#30266)
satelllte Jan 5, 2025
4b2119b
InteractiveGroup: Add `disconnect()`. (#29975)
bbsimong Jan 6, 2025
c8662a2
Global: Clean up. (#30271)
Mugen87 Jan 6, 2025
9f2dc5d
Docs: Clean up. (#30272)
Mugen87 Jan 6, 2025
eb84f92
PostProcessing: Allow usage with more than one instance. (#30279)
Mugen87 Jan 7, 2025
3212be4
WebGPUAttributeUtils: Fix i16a/u16a patch (#30264)
ycw Jan 7, 2025
b7e3710
Node: typos (#30280)
s-rigaud Jan 7, 2025
be84ecf
Nodes: Fix recursion with environment nodes. (#30277)
Mugen87 Jan 7, 2025
d03d302
Docs: Improve `Matrix4` page. (#30276)
Mugen87 Jan 7, 2025
ac467cf
Updated builds.
Mugen87 Jan 7, 2025
73eddcb
WebGPURenderer: Introduced `.toConst()`, `Const()`, `Var()` (#30251)
RenaudRohlinger Jan 8, 2025
48df2ee
Introduce `VideoFrameTexture`. (#30270)
Mugen87 Jan 8, 2025
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
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"CodeMirror": "readonly",
"esprima": "readonly",
"jsonlint": "readonly",
"VideoFrame": "readonly"
"VideoFrame": "readonly",
"VideoDecoder": "readonly"
},
"rules": {
"no-throw-literal": [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
- name: === E2E testing ===
run: npm run test-e2e
- name: Upload output screenshots
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4
if: always()
with:
name: Output screenshots-${{ matrix.os }}-${{ matrix.CI }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-code-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3
uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql-config.yml
queries: security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3
uses: github/codeql-action/autobuild@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3
uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/read-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
# write the output in a json file to upload it as artifact
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
- name: Upload artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4
with:
name: sizes
path: sizes.json
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright © 2010-2024 three.js authors
Copyright © 2010-2025 three.js authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#### JavaScript 3D library

The aim of the project is to create an easy-to-use, lightweight, cross-browser, general-purpose 3D library. The current builds only include a WebGL renderer but WebGPU (experimental), SVG and CSS3D renderers are also available as addons.
The aim of the project is to create an easy-to-use, lightweight, cross-browser, general-purpose 3D library. The current builds only include WebGL and WebGPU renderers but SVG and CSS3D renderers are also available as addons.

[Examples](https://threejs.org/examples/) —
[Docs](https://threejs.org/docs/) —
Expand Down
77 changes: 69 additions & 8 deletions build/three.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* @license
* Copyright 2010-2024 Three.js Authors
* Copyright 2010-2025 Three.js Authors
* SPDX-License-Identifier: MIT
*/
'use strict';

const REVISION = '172dev';
const REVISION = '173dev';

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 };
Expand Down Expand Up @@ -3276,9 +3276,9 @@ class Data3DTexture extends Texture {
constructor( data = null, width = 1, height = 1, depth = 1 ) {

// We're going to add .setXXX() methods for setting properties later.
// Users can still set in DataTexture3D directly.
// Users can still set in Data3DTexture directly.
//
// const texture = new THREE.DataTexture3D( data, width, height, depth );
// const texture = new THREE.Data3DTexture( data, width, height, depth );
// texture.anisotropy = 16;
//
// See #14839
Expand Down Expand Up @@ -34381,6 +34381,42 @@ class AnimationMixer extends EventDispatcher {

}

class RenderTarget3D extends RenderTarget {

constructor( width = 1, height = 1, depth = 1, options = {} ) {

super( width, height, options );

this.isRenderTarget3D = true;

this.depth = depth;

this.texture = new Data3DTexture( null, width, height, depth );

this.texture.isRenderTargetTexture = true;

}

}

class RenderTargetArray extends RenderTarget {

constructor( width = 1, height = 1, depth = 1, options = {} ) {

super( width, height, options );

this.isRenderTargetArray = true;

this.depth = depth;

this.texture = new DataArrayTexture( null, width, height, depth );

this.texture.isRenderTargetTexture = true;

}

}

class Uniform {

constructor( value ) {
Expand Down Expand Up @@ -38541,13 +38577,17 @@ function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha,
boxMesh.geometry.dispose();
boxMesh.material.dispose();

boxMesh = undefined;

}

if ( planeMesh !== undefined ) {

planeMesh.geometry.dispose();
planeMesh.material.dispose();

planeMesh = undefined;

}

}
Expand Down Expand Up @@ -50700,8 +50740,11 @@ class WebXRManager extends EventDispatcher {
//

const enabledFeatures = session.enabledFeatures;
const gpuDepthSensingEnabled = enabledFeatures &&
enabledFeatures.includes( 'depth-sensing' ) &&
session.depthUsage == 'gpu-optimized';

if ( enabledFeatures && enabledFeatures.includes( 'depth-sensing' ) ) {
if ( gpuDepthSensingEnabled && glBinding ) {

const depthData = glBinding.getDepthInformation( views[ 0 ] );

Expand Down Expand Up @@ -52950,7 +52993,7 @@ class WebGLRenderer {

//

if ( _currentRenderTarget !== null ) {
if ( _currentRenderTarget !== null && _currentActiveMipmapLevel === 0 ) {

// resolve multisample renderbuffers to a single-sample texture if necessary

Expand Down Expand Up @@ -53945,6 +53988,7 @@ class WebGLRenderer {

};

const _scratchFrameBuffer = _gl.createFramebuffer();
this.setRenderTarget = function ( renderTarget, activeCubeFace = 0, activeMipmapLevel = 0 ) {

_currentRenderTarget = renderTarget;
Expand Down Expand Up @@ -54053,6 +54097,14 @@ class WebGLRenderer {

}

// Use a scratch frame buffer if rendering to a mip level to avoid depth buffers
// being bound that are different sizes.
if ( activeMipmapLevel !== 0 ) {

framebuffer = _scratchFrameBuffer;

}

const framebufferBound = state.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );

if ( framebufferBound && useDefaultFramebuffer ) {
Expand All @@ -54073,8 +54125,15 @@ class WebGLRenderer {
} else if ( isRenderTarget3D ) {

const textureProperties = properties.get( renderTarget.texture );
const layer = activeCubeFace || 0;
_gl.framebufferTextureLayer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, textureProperties.__webglTexture, activeMipmapLevel || 0, layer );
const layer = activeCubeFace;
_gl.framebufferTextureLayer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, textureProperties.__webglTexture, activeMipmapLevel, layer );

} else if ( renderTarget !== null && activeMipmapLevel !== 0 ) {

// Only bind the frame buffer if we are using a scratch frame buffer to render to a mipmap.
// If we rebind the texture when using a multi sample buffer then an error about inconsistent samples will be thrown.
const textureProperties = properties.get( renderTarget.texture );
_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, textureProperties.__webglTexture, activeMipmapLevel );

}

Expand Down Expand Up @@ -54933,6 +54992,8 @@ exports.RedFormat = RedFormat;
exports.RedIntegerFormat = RedIntegerFormat;
exports.ReinhardToneMapping = ReinhardToneMapping;
exports.RenderTarget = RenderTarget;
exports.RenderTarget3D = RenderTarget3D;
exports.RenderTargetArray = RenderTargetArray;
exports.RepeatWrapping = RepeatWrapping;
exports.ReplaceStencilOp = ReplaceStencilOp;
exports.ReverseSubtractEquation = ReverseSubtractEquation;
Expand Down
46 changes: 41 additions & 5 deletions build/three.core.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/three.core.min.js

Large diffs are not rendered by default.

Loading