Skip to content

AI-generated changelog#33181

Open
sunag wants to merge 22 commits intomrdoob:devfrom
sunag:dev-changelog
Open

AI-generated changelog#33181
sunag wants to merge 22 commits intomrdoob:devfrom
sunag:dev-changelog

Conversation

@sunag
Copy link
Copy Markdown
Collaborator

@sunag sunag commented Mar 15, 2026

Related
#32781

Description

The work is not complete yet, but so you can follow along, I’m updating the changelog to be generated by AI. It should read the first message of the PR, which is usually the most important one, gather everything into a file, and with a context window generate a summary mentioning the new features and migration tips. I’m also thinking about adding new examples.

I would also like to evolve the functionalities using github labels like highlight to make management easier to AI.

The description turned out fun to read, and even using a free token with the flash version it produced a great result, which you can see below in this release.

It’s also possible to specify a release, which can be useful for LLMs.

node utils/changelog.ai.js

AI Summary (r184)

Release r184 introduces monumental leaps in rendering flexibility, performance, and tooling. Highlighting this release is the new Three Shading Language (TSL) compatibility layer for WebGLRenderer, bridging the gap to WebGPU by allowing NodeMaterials to be compiled and run seamlessly under WebGL. Performance optimization is heavily emphasized across the board, featuring truly non-blocking async compilation in WebGPU, zero-allocation direct render hot-paths, and the introduction of Dynamic Lighting.

Developers will also discover highly requested additions like HTMLTexture, bringing native HTML DOM elements onto 3D surfaces via the HTML-in-Canvas API, alongside a drastically overhauled Inspector equipped with a timeline profiler, memory analyzer, and a new extension system.

Core & Math

  • Improved the instantiation performance of Math classes (Vector2, Vector3, Matrix4, etc.) by leveraging ECMAScript 2022 Static Initialization Blocks to set prototype flags. This significantly reduces redundant property assignments and garbage collection overhead during heavy mathematical operations.

  • Fixed a subtle reference-sharing bug in CatmullRomCurve3.getPoint() that caused geometry corruption on open curves containing exactly two points.

  • Prevented a NaN propagation issue in Line3.closestPointToPointParameter() when handling degenerate lines (where the start and end points are identical) by securely catching the zero-length condition.

  • Fixed a bug where Object3D.copy() failed to clone the pivot property if the source object's pivot was initially null.

WebGPU & Three Shading Language (TSL)

  • Introduced a NodeMaterial and TSL compatibility layer for WebGLRenderer via WebGLNodesHandler. This allows developers to write future-proof NodeMaterials that run on WebGL seamlessly. This functions as a crucial bridge, allowing projects to be progressively updated to TSL without entirely swapping out the renderer backend until ready.

  • Made WebGPURenderer.compileAsync() truly non-blocking. The internal NodeBuilder.buildAsync() now actively yields between shader stages. This maintains high responsiveness in the main thread and completely prevents frame drops or animation freezing when compiling hundreds of materials simultaneously.

  • Introduced DynamicLighting in WebGPURenderer. Applying renderer.lighting = new DynamicLighting() now allows the renderer to skip full recompilation and rebuilding of materials when lights are added, removed, or updated, providing a massive boost to scenes with highly dynamic lighting requirements.

  • Added an FSR 1 (FidelityFX Super Resolution) upscaling port for WebGPURenderer. Integrated natively through TSL, it runs in two passes (spatial upscaler and sharpener) to produce higher quality low-resolution upscaling compared to default Bilinear filtering, which is highly beneficial for fragment-shader-bound scenes.

  • Significantly refactored WebGPURenderer.getArrayBufferAsync(). It now introduces a highly flexible ReadbackBuffer class allowing decoupled CPU readbacks, supports mapping portions of a buffer with offset and count, pools target instances to prevent excessive GPU memory retention, and avoids parallel execution errors.

  • Added a WEBGL_multi_draw fallback for BatchedMesh when using the WebGL 2 backend of WebGPURenderer. This ensures batched geometry renders flawlessly even in browsers like Firefox that do not natively support the multi-draw extension.

  • Restructured local and global scope behavior in TSL. Variables explicitly declared as .toVar() are now registered in the global scope, except when used within a function's layout flow, resolving compilation conflicts when mixing TSL concepts.

  • Added a full suite of hyperbolic math nodes (tanh, sinh, cosh, asinh, acosh, atanh) to TSL, enabling higher precision native hardware optimization for advanced tone mapping and math functions.

  • Eliminated object allocations within the critical _renderObjectDirect() hot path in WebGPURenderer. This change alone yields an estimated 20% performance improvement during render() calls by removing inline function instantiations, significantly reducing garbage accumulation.

  • Resolved a critical discrepancy between WebGPU and WebGL backends where default uninitialized depth texture values varied. WebGPURenderer now correctly aligns with expected default behaviors when autoClearDepth is disabled.

Renderers

  • Standardized device capability queries by introducing WebGPUCapabilities, matching the established architecture of WebGLCapabilities. Renderers, backends, and node builders now securely query centralized limits rather than conducting raw API inquiries.

  • Extended texture format support by adding WebGL and WebGPU implementation for eight new EXT_texture_norm16 formats, heavily expanding compatibility with normalized 16-bit integer and unsigned integer formats.

  • Optimized WebGL parameter querying by internally caching gl.pixelStorei() configuration within WebGLState. This avoids heavy pipeline synchronization flushes that normally happen when checking storage parameters.

  • Fixed a bug in WebGLRenderer's copyTextureToTexture() where active texture slots were mismatched when the target texture was already bound to slot 0, causing gl.INVALID_OPERATION errors.

  • Enforced the usage of ColorManagement.workingColorSpace for WebGLRenderer render targets rather than rigidly hardcoding LinearSRGBColorSpace, natively supporting wide-gamut workflows without requiring post-processing hacks.

Materials & Textures

  • Added the monumental HTMLTexture core class and InteractionManager addon. This leverages the browser's HTML-in-Canvas API to stream live, CSS-styled, and interactive HTML DOM elements onto 3D meshes. No raycasting is needed—the InteractionManager maps Pointer Events seamlessly so users can highlight text, click buttons, or type into inputs natively within the 3D space.

  • Brought support for packed Normal Maps (RG/EAC/RGTC2 formats) to the WebGL backend. This optimizes memory consumption by automatically injecting the required normal reconstruction shader logic when a packed map is bound.

  • Updated Reflector to natively support OrthographicCamera projections by dynamically adjusting the internal projective texture mapping math.

  • Fixed a catastrophic NaN anomaly in MeshPhysicalMaterial causing black artifact pixels when utilizing Anisotropy due to an unguarded division-by-zero during the Smith-Correlated GGX computations.

Loaders & Exporters

  • Implemented massive upgrades to the USDLoader and USDComposer. Added support for primitive geometric types (Cube, Sphere, Cylinder, Cone, Capsule), metersPerUnit scaling for dimension-accurate imports, faceVarying UV parsing for multi-material meshes, multi-reference parsing (prepend references), and complete MaterialX UsdPreviewSurface shader ingestion.

  • Fixed pervasive skeletal distortion in USDLoader by picking the 4 strongest joint weights per vertex instead of the first 4, and utilizing rest transforms rather than bind transforms to match the USD specification accurately.

  • Added Multi-part and Deep Scanline support to the EXRLoader, alongside compatibility for the YCbCr color space and B44/A compression. Also introduced setPart() to dictate which specific sub-image is returned from multi-part OpenEXR files.

  • Fixed numerous discrepancies in FBXLoader. Brought behavior closer to the Blender FBX Importer by handling morph delta translation component shifting, fixing Z-up coordinate space rotation logic, adding proper penumbra calculation logic for spot lights, and implementing reliable skeleton skinning (explicit TransformLink and bind matrix fallbacks).

  • Fixed a critical track duplication bug within GLTFLoader's morph target keyframe creation, preventing animation corruption and flickering on multi-primitive assets.

  • Resolved a variable shadowing bug in ObjectLoader that previously crashed the execution thread completely upon receiving malformed JSON, rather than securely capturing and logging the syntax error.

  • Upgraded KTX2Loader to natively extract and process R16G16B16A16_UNORM RGBA 16-bit unsigned normalized formats.

  • Introduced WebP support to GLTFExporter by registering EXT_texture_webp and removing forced image degradation to PNG when a WebP MIME type is designated.

Objects & Geometries

  • Expanded SkinnedMesh.applyBoneTransform to accept a Vector4. This permits developers to apply bone transformations to both positions (using w === 1) and directions like normals or tangents (using w === 0).

  • Reverted custom array sorting in SVGRenderer back to Array.prototype.sort(). The previous custom GC-avoidance algorithm caused an severe runtime regression (O(n²)), whereas leveraging the highly optimized native TimSort restores O(n log n) performance, boosting complex SVG parsing from seconds back to milliseconds.

  • Enhanced boundary threshold logic in FPS-style collision demos to strictly enforce surface normal checks, preventing physical bodies from clipping and "standing" on perfectly vertical walls.

Editor, Inspector & DevTools

  • Deployed a completely revamped Inspector architecture. It now features an active Timeline tab to intercept and record backend commands per frame, and a Memory tab to precisely analyze program and buffer allocations.

  • Added an Extension module system to the Inspector. External addons can now inject native tools. This prominently brings the new TSL Graph extension, allowing users to visually manipulate NodeMaterials and automatically reflect structural changes.

  • Started the foundation for a simplified, dedicated Three.js DevTools application designed to provide cleaner internal metrics out-of-the-box.

  • Completed TextGeometry parameter mapping and inclusion within the core Editor UI.

Controls & WebXR

  • Completely overhauled the interaction model for FirstPersonControls. The camera orientation is now strictly anchored to the drag-press coordinate instead of the screen center, implementing native pointer event capture for mobile touch support without requiring CSS hacks.

  • Implemented powerful model caching into XRHandModelFactory. This ensures the heavy network fetching and parsing of XRHandMeshModel assets occurs only once. Consecutive hand reconnections or alternative hand displays securely instantiate deep clones, eradicating fetch overhead.

  • Disconnecting interaction controls now thoroughly resets the canvas touch-action style to an empty string instead of forcefully assigning auto, preventing unwanted CSS collision overrides on strictly styled UI canvases.

Examples

Migration Tips

  • The signature for Renderer.getArrayBufferAsync() has significantly changed. It now accepts (attribute, target, offset, count) where target can be an ArrayBuffer or the newly introduced ReadbackBuffer.

  • Concurrently, BufferAttribute.array is strictly ignored by the readback processes in WebGL and WebGPU. Users can and should dynamically truncate CPU-side backing arrays immediately after upload if aiming to reduce memory loads.

  • In FirstPersonControls, the activeLook boolean flag and the handleResize() method have been completely removed due to the ground-up restructuring of the internal pointer interaction engine. Any code executing those hooks must be deleted.

  • AudioListener completely strips Clock references and now relies entirely on Timer.

  • BatchedMesh has forcibly removed all deprecated instancing render paths previously kept as fallbacks. Ensure you are utilizing the updated Multi-Draw or WebGPU pathways to prevent runtime crashes.

  • If utilizing GPUComputationRenderer, variables allocated via createShaderMaterial() will now be securely disposed of internally when calling dispose(). Ensure you aren't running external custom GC hooks targeting those precise shader materials, to avoid double-free warnings.

  • Render Targets no longer blindly default to LinearSRGBColorSpace in the WebGL renderer. They will inherit configuration from ColorManagement.workingColorSpace. Any deep pipeline relying on hardcoded post-processing color conversion might need validation to prevent color-space double conversions.

Generated by gemini-3.1-pro-preview

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 15, 2026

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 359.97
85.54
359.97
85.54
+0 B
+0 B
WebGPU 631.8
175.3
631.8
175.3
+0 B
+0 B
WebGPU Nodes 629.92
175.01
629.92
175.01
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 492.17
120.12
492.17
120.12
+0 B
+0 B
WebGPU 704.24
190.16
704.24
190.16
+0 B
+0 B
WebGPU Nodes 653.46
177.53
653.46
177.53
+0 B
+0 B

@sunag sunag changed the title AI-assisted changelog AI-generated changelog Mar 15, 2026
@danrossi
Copy link
Copy Markdown
Contributor

That is really good. i will make sure to add better descriptive titles if needed. I already use the format WebXRController:description etc.

The tokens might need to come from environment variables. And the model selector could be a config rather than dynamic maybe. So you post to the google api the prompt with the collated commits.

@sunag
Copy link
Copy Markdown
Collaborator Author

sunag commented Mar 15, 2026

That is really good. i will make sure to add better descriptive titles if needed. I already use the format WebXRController:description etc.

Yeah, I also need to make a validator for the title format.

The tokens might need to come from environment variables. And the model selector could be a config rather than dynamic maybe. So you post to the google api the prompt with the collated commits.

This is just a perspective between defining the configuration dynamically or statically; there is no need to store tokens in environment variables since we are working with direct access to memory.

To be honest, we’re going to use it once a month/release, and I think defining it dynamically is more fun. We can have both if we consider it necessary.

@mrdoob
Copy link
Copy Markdown
Owner

mrdoob commented Mar 20, 2026

Should we call it changelog.summary.js and make changelog.js call it when running node changelog.js?

I'll have to figure out a way to use my Claude subscription when generating this.
Using the Claude via API key is too expensive.

@sunag sunag marked this pull request as ready for review March 20, 2026 06:29
@sunag
Copy link
Copy Markdown
Collaborator Author

sunag commented Mar 20, 2026

I'll have to figure out a way to use my Claude subscription when generating this.
Using the Claude via API key is too expensive.

I had created an option to generate a file with the PR descriptions and AI context so that some other LLM can create the summary(copying and pasting); I can add it again if you find it interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants