Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
|
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. |
Yeah, I also need to make a validator for the title format.
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. |
|
Should we call it I'll have to figure out a way to use my Claude subscription when generating this. |
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. |
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
highlightto 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.
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
NaNpropagation issue inLine3.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 thepivotproperty if the source object's pivot was initiallynull.WebGPU & Three Shading Language (TSL)
Introduced a NodeMaterial and TSL compatibility layer for
WebGLRendererviaWebGLNodesHandler. 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 internalNodeBuilder.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
DynamicLightinginWebGPURenderer. Applyingrenderer.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 flexibleReadbackBufferclass allowing decoupled CPU readbacks, supports mapping portions of a buffer withoffsetandcount, pools target instances to prevent excessive GPU memory retention, and avoids parallel execution errors.Added a
WEBGL_multi_drawfallback forBatchedMeshwhen using the WebGL 2 backend ofWebGPURenderer. 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 inWebGPURenderer. This change alone yields an estimated 20% performance improvement duringrender()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.
WebGPURenderernow correctly aligns with expected default behaviors whenautoClearDepthis disabled.Renderers
Standardized device capability queries by introducing
WebGPUCapabilities, matching the established architecture ofWebGLCapabilities. 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_norm16formats, heavily expanding compatibility with normalized 16-bit integer and unsigned integer formats.Optimized WebGL parameter querying by internally caching
gl.pixelStorei()configuration withinWebGLState. This avoids heavy pipeline synchronization flushes that normally happen when checking storage parameters.Fixed a bug in
WebGLRenderer'scopyTextureToTexture()where active texture slots were mismatched when the target texture was already bound to slot 0, causinggl.INVALID_OPERATIONerrors.Enforced the usage of
ColorManagement.workingColorSpaceforWebGLRendererrender targets rather than rigidly hardcodingLinearSRGBColorSpace, natively supporting wide-gamut workflows without requiring post-processing hacks.Materials & Textures
Added the monumental
HTMLTexturecore class andInteractionManageraddon. 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—theInteractionManagermaps 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
Reflectorto natively supportOrthographicCameraprojections by dynamically adjusting the internal projective texture mapping math.Fixed a catastrophic
NaNanomaly inMeshPhysicalMaterialcausing 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
USDLoaderandUSDComposer. Added support for primitive geometric types (Cube, Sphere, Cylinder, Cone, Capsule),metersPerUnitscaling for dimension-accurate imports, faceVarying UV parsing for multi-material meshes, multi-reference parsing (prepend references), and complete MaterialXUsdPreviewSurfaceshader ingestion.Fixed pervasive skeletal distortion in
USDLoaderby 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 theYCbCrcolor space andB44/Acompression. Also introducedsetPart()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 properpenumbracalculation 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
ObjectLoaderthat previously crashed the execution thread completely upon receiving malformed JSON, rather than securely capturing and logging the syntax error.Upgraded
KTX2Loaderto natively extract and processR16G16B16A16_UNORMRGBA 16-bit unsigned normalized formats.Introduced WebP support to
GLTFExporterby registeringEXT_texture_webpand removing forced image degradation to PNG when a WebP MIME type is designated.Objects & Geometries
Expanded
SkinnedMesh.applyBoneTransformto accept aVector4. This permits developers to apply bone transformations to both positions (usingw === 1) and directions like normals or tangents (usingw === 0).Reverted custom array sorting in
SVGRendererback toArray.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
Timelinetab to intercept and record backend commands per frame, and aMemorytab 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 Graphextension, 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
TextGeometryparameter 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 ofXRHandMeshModelassets 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-actionstyle to an empty string instead of forcefully assigningauto, preventing unwanted CSS collision overrides on strictly styled UI canvases.Examples
New Examples:
Demonstrates dynamic marching cubes geometry generation interacting in a WebXR spatial environment.
Showcases the new
WebGLNodesHandlerexecuting heavily advanced TSL materials seamlessly via the traditional WebGL backend.Highlights the improved non-blocking async shader builder in WebGPURenderer keeping framerates stable while pre-compiling hundreds of materials.
Illustrates utilizing
DynamicLightingin WebGPURenderer to bypass pipeline recompilations when light properties dramatically change.Exhibits the implementation of the new TSL Graph visual node editor injected natively into the Inspector via the extensions API.
Modified Examples:
Refactored interaction models for tighter bounding physics, horizon view locking, and mapping to the updated
FirstPersonControls.Corrected sun disc environmental reflections, integrated improved PMREM generation alignments, and fixed hardcoded sky color variable scopes.
Updated underlying loading pipelines to handle newly supported codecs, HTML additions, UI optimizations, and cross-platform compatibilities.
General internal syntax cleanup formatting and alignment with modern GPU node specifications.
Removed Examples:
Removed from the active repository pool.
Migration Tips
The signature for
Renderer.getArrayBufferAsync()has significantly changed. It now accepts(attribute, target, offset, count)wheretargetcan be anArrayBufferor the newly introducedReadbackBuffer.Concurrently,
BufferAttribute.arrayis 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, theactiveLookboolean flag and thehandleResize()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.AudioListenercompletely stripsClockreferences and now relies entirely onTimer.BatchedMeshhas 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 viacreateShaderMaterial()will now be securely disposed of internally when callingdispose(). 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
LinearSRGBColorSpacein the WebGL renderer. They will inherit configuration fromColorManagement.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