Three.js r182

r182

https://github.com/mrdoob/three.js/wiki/Migration-Guide#181--182 https://github.com/mrdoob/three.js/milestone/95?closed=1

  • Global
    • Migrate to ESLint 9, flat config. #32471, #32518, #32519, #32520 (@gkjohnson, @Mugen87)
  • BatchedMesh
    • Fix index and attribute updates in optimize(). #32185 (@querielo)
  • BatchNode
    • Optimize generated shader code. #32203 (@Mugen87)
  • BufferGeometry
    • Add indirectOffset parameter for indirect drawing. #32392, #32413 (@holtsetio, @RenaudRohlinger)
  • ChainMap
    • Improve dynamic key size. #32510 (@sunag)
  • ExtrudeGeometry
    • Honor closed property of CatmullRomCurve3. #32410 (@Mugen87)
  • InstanceNode
    • Add support for StorageInstancedBufferAttribute. #32240 (@RenaudRohlinger)
  • Light
    • Unify toJSON() implementations. #32414 (@Mugen87)
  • LightProbe
    • Remove fromJSON(). #32415 (@Mugen87)
  • Line2NodeMaterial
    • Align wide lines with WebGLRenderer version. #32234 (@Mugen87)
  • Material
    • Fix copy() to include allowOverride. #32269, ba1655cf3587349768665c442a4f7cc0ecd23759 (@crazylogic03, @Mugen87)
  • Matrix4
    • Optimize determinant() calculation. #32157 (@mrdoob)
    • Avoid NaN values when scale is zero. #32440 (@Om-Mishra09)
  • MeshPhysicalMaterial
    • Fix iridescence energy conservation for mixed materials. #32309 (@mrdoob)
    • Improve Sheen energy conservation and analytic approximation. #32356, #32397 (@mrdoob)
  • MeshStandardMaterial
    • Fix furnace test energy loss for intermediate metalness values. #32190, #32201 (@mrdoob)
    • Improve physical accuracy. #32330 (@mrdoob)
  • NodeBuilder
    • Add missing vector types to generateConst(). #32162 (@cmhhelgeson)
    • Cache node attributes for vertex stage only. #32189 (@Mugen87)
    • Ignore events for shared context. #32492 (@sunag)
  • NormalMapNode
    • Add basic support for normal unpacking. #31695 (@castano)
  • PMREMGenerator
    • Improve GGX VNDF accuracy and match Blender roughness. #32311 (@mrdoob)
    • Reduce DFG LUT resolution to 16x16. #32358 (@mrdoob)
  • PointShadowNode
    • Refactor to use native cube depth texture. #32379 (@mrdoob)
  • PolyhedronGeometry
    • Fix typo in fromJSON(). #32475 (@Ayush123-e)
  • ShaderMaterial
    • Fix copy() to include missing properties. #32219 (@NssGourav)
  • Source
    • Guard reference to VideoFrame. #32301 (@Mugen87)
  • StructTypeNode
    • Fix memory length calculations. #32377 (@holtsetio)
  • TSL
    • Add renderer context node (global). #32295 (@sunag)
    • Check for undefined in uniform(). #32183 (@Mugen87)
    • Add texture3DLoad() and texture3DLevel(). #32171 (@RenaudRohlinger)
    • Add bitcount related functions. #31990 (@cmhhelgeson)
    • Add support for mat3 and mat4 using bufferAttribute(). #32204 (@sunag)
    • Do not auto-generate tangent attribute. #32220 (@Mugen87)
    • Pre-pass using global context. #32276, #32345 (@sunag)
    • Introduce float packing / unpacking intrinsics. #32329 (@Ne0nWinds)
    • Introduce builtinShadowContext() and builtinAOContext(). #32384, #32378 (@sunag, @querielo)
    • Renamed DFGApprox to DFGLUT. #32399 (@mrdoob)
    • Fix non-stack function call with loops. #32420 (@sunag)
    • Prevent memory leaks in ShadowNode. #32395 (@querielo)
    • Fix get member from array element. #32514 (@sunag)
    • Remove nodeObject() for Node classes. #32515 (@sunag)
  • Vector3
    • Clean up. #32363 (@MOHITKOURAV01)
  • WebGLRenderer
    • Support more EAC texture formats. #32308 (@castano)
    • Modernized shadow mapping. #32181, #32303, #32407, #32443 (@mrdoob)
    • Align transmission render target samples with canvas. #32444 (@mrdoob)
    • Remove SUPPORTS_VERTEX_TEXTURES. #32455 (@mrdoob)
    • Clean up setupRenderBufferStorage(). #32456 (@mrdoob)
    • Use Map for O(1) program lookup. #32463 (@mrdoob)
    • Move point light shadow logic from PointLightShadow. #32473 (@mrdoob)
    • Refactor tone mapping and shadow map functions. #32512 (@mrdoob)
    • Add outputBufferType and setEffects(). #32461 (@mrdoob)
  • WebGPURenderer
    • Support more EAC texture formats. #32308 (@castano)
    • Fix textured backgrounds with ortho cameras. #32313 (@Mugen87)
    • Improve StorageTexture3D support. #32150 (@RenaudRohlinger)
    • Optimize VSM shadow code. #32209 (@mrdoob)
    • Fix shadowing of error function. #32245 (@Methuselah96)
    • Improve cache bindings from node uniforms. #32244 (@sunag)
    • Set opaque blend mode for secondary MRT targets. #32265 (@sunag)
    • Add update ranges for bindings. #32248 (@sunag)
    • Buffer labeling adjustment. #32247 (@cmhhelgeson)
    • Relates MRT for RenderContext in obtaining a unique context. #32264 (@sunag)
    • Fix VSM shadow artifacts. #32327 (@mrdoob)
    • Fix point light shadows. #32365 (@mrdoob)
    • PCF shadow filtering with Vogel disk sampling and IGN. #32381, #32407 (@mrdoob)
    • Use correct cache for default cube textures. #32425 (@SE7EN2028)
    • Refine video texture warning. #32439 (@Mugen87)
    • Improve resource disposal. #32446 (@querielo)
    • Skip invalid frame of video textures. #32441 (@whatisor)
    • Improve Bind Group Layout cache system. #32451, #32249 (@cmhhelgeson, @Mugen87)
    • Consistent enable() and disable() usage. #32503 (@Mugen87)
    • Consistent bindFramebuffer() usage. #32504 (@Mugen87)
    • Rename getColorBufferType() to getOutputBufferType(). #32501 (@sunag)
    • Use outputType as default in getPreferredCanvasFormat(). 5ae9a2edc7698b96457064355bd4df505814f475 (@sunag)
    • Prevent translation of skybox. #32526 (@Mugen87, @SebastianTusk)
  • WGSLNodeBuilder
    • Improves code formatting. #32511 (@sunag)

Docs

  • Clean up. d70adae523c1b3c67defbe9fdf3a69c153cbd454, 9e94632cb90fc22f0b32f1461d625439b9db47e8, 72f91e3cf64eee7f392c8b15bddbc36bc56247d5 (@Mugen87)
  • Add missing @private annotation. #32165 (@Mugen87)
  • Fix external links. #32161 (@mrdoob)
  • Fix ShadowNode JSDoc. #32166 (@Mugen87)
  • Improved search with category matching. #32164 (@mrdoob)
  • Fix JSDoc of inspector. #32192 (@Mugen87)
  • Remove unused parameter from BatchedMesh.optimize(). #32186 (@querielo)
  • Improve ShaderMaterial.fog. #32224 (@Mugen87)
  • Fix return type in compileAsync(). #32205 (@querielo)
  • Fix options of PMREMGenerator. #32285 (@ycw)
  • Improve SkyMesh. #32289 (@jwheare)
  • Open panel on mobile when no page is selected. #32261 (@mrdoob)
  • Fix typo in MaterialLoader. #32316 (@michael-erskine)
  • Replace [name] in docstring. #32332 (@ycw)
  • Update default anisotropy value in Texture. #32346 (@thibka)
  • Fix restitution param desc in physics addons. #32341 (@SollyBunny)
  • Fix typo in DecalGeometry. #32366 (@rotu)
  • Improve Bloom radius description. #32450 (@Mugen87)
  • Fix Renderer WebGPU convention. #32457 (@sunag)
  • Fixed typo in BufferGeometry. #32477 (@Magnus1X)

Manual

  • Update OffscreenCanvas support details. #32184 (@aganders3)
  • Fix formatting in prerequisites.html. #32217 (@Mugen87)
  • Add guide about Post-Processing with WebGPURenderer. #32279 (@Mugen87)
  • Add guide about WebGPURenderer. #32260 (@Mugen87)

Examples

  • Add radial blur demo. #32297 (@Mugen87)
  • Fix chromatic aberration type usage of caustics example. #32169 (@sunag)
  • Improve BPCEM demo. #32172 (@Mugen87)
  • Fix thumbnail of backdrop demo. #32178 (@Mugen87)
  • Simplify render bundle demo. #32215 (@Mugen87)
  • Cleanup stats-gl. #32242 (@RenaudRohlinger)
  • Improve ray marching in volume rendering examples. #32235 (@mrdoob)
  • Move webgpu_struct_drawindirect to TSL. #32222 (@cmhhelgeson)
  • Add WebGPU Contact Shadows. #32262 (@querielo)
  • Renamed “external” tag to “community”. #32232 (@mrdoob)
  • Open panel on mobile when no example is selected. #32261 (@mrdoob)
  • Update credit link in webgl_animation_skinning_ik. #32259 (@abernier)
  • Add model selector to glTF loader examples. #32364, 1296afb199e2420f322bd5d45701fd686cfe2f38, #32406 (@mrdoob)
  • Made shadows soft in webgl_shadowmap_pointlights. 56838ce12c409fdf24992932839490d7ab58877f (@mrdoob)
  • Added webgpu_shadowmap_pointlight example. 3b0c9cd4760c0b75f3fa4ce1ac5f882e37f68fd3, 645e0898bdbf6992cbd24c016e6a539d68181873 (@mrdoob)
  • Migrate royal_esplanade examples to UltraHDRLoader. #32380 (@mrdoob)
  • Use real-world scale in stereo demo. #32403 (@Mugen87)
  • Fix WebGPU water simulation on mobile GPUs. #32411 (@mrdoob)
  • Update Compute Fluid to use IndirectStorageBuffer. #32176 (@cmhhelgeson)
  • Update webgl_loader_texture_ktx example with new formats. #32448 (@castano)
  • Improved RectAreaLight examples. #32493 (@mrdoob)
  • Unify import path for WebGPU related classes. #32494 (@Mugen87)
  • Fix MRT readback with WebGL backend. #32505 (@Mugen87)

Addons

  • AmmoPhysics

    • Support restitution. #32347 (@SollyBunny)
  • BloomNode

    • Implement disposal of materials to prevent memory leaks. #32452 (@querielo)
  • Controls

    • Fix stuck state when releasing mouse outside window. #32323 (@mrdoob)
  • CSM

    • Reuse origin vector. #32331 (@Mugen87)
  • Inspector

    • Fix Viewer aspect ratio. #32194 (@sunag)
    • Fix slider dimensions. #32177 (@Mugen87)
    • Improve UX. #32197, a6ca2537932e47510b2542990f6033d9f794454a (@sunag)
    • Add window/panel boundary constraints. #32208 (@sunag)
    • Mini-panel for parameters. #32257 (@sunag)
    • Fix value update of number and checkbox elements. #32355 (@Mugen87)
    • Fix cube depth texture error. #32412 (@sunag)
    • Update checkmark internal box size. 7ad089e773167ed7a7da33dc13ee7fd05280bc36 (@sunag)
    • Add warn if the inspected node outside of frame scope. #32458 (@sunag)
  • LDrawLoader

    • Align material, group behavior with other loaders. #32522 (@gkjohnson)
  • MapControls

    • Improve panning accuracy. #32324 (@mrdoob)
  • Octree

    • Add Box3 interface. #32343, 6e006b29964ff6facb832690d3e38918d8434b64 (@Mugen87, @mrdoob)
  • Physics

    • Add errors when trying to use getShape() for unsupported geometry types. #32372 (@SollyBunny)
  • PixelationPassNode

    • Fix zero normal processing. #32159 (@Mugen87)
  • SkyMesh

    • Add isSkyMesh flag and deprecate isSky. #32263 (@querielo)
  • SSRNode

    • Ensure boolean value for isPerspectiveCamera uniform. #32218 (@FarazzShaikh)
  • SVGLoader

    • Add stylesheet jsName vs svgName fix. #32119 (@jhlggit)
  • SVGRenderer

    • Add depth sorting for Sprites and SVGObjects. #32212 (@mrdoob)
    • Add near/far plane clipping support. #32210 (@mrdoob)
  • TRAANode

    • Improve motion factor and disocclusion. #32296 (@shotamatsuda)
    • Replace MSAA sample pattern with Halton sequence. #32319 (@shotamatsuda)
    • Reduce smearing. #32322 (@shotamatsuda)
  • TSL Transpiler

    • Support struct definitions and declarations. #32300 (@Ne0nWinds)
    • Fix Fn layout generation when generating a function with no input parameters. #32272 (@Ne0nWinds)
  • UltraHDRLoader

    • Fix incorrect alpha channel values. #32464 (@mrdoob)
    • Improve parsing performance. #32468, 4b110fe4c39799672f1d1de51fc013d5f2930989, d7f67fafff6eaa4871963b14baeff060f2f13102 (@mrdoob)
    • Remove debug console. #32513 (@sunag)
  • UnrealBloomPass

    • Fix alpha handling. #32517, #32521(@mrdoob, @gkjohnson)
  • VOXLoader

    • Added scene graph support. #32488 (@mrdoob)
    • Implemented greedy meshing. #32489 (@mrdoob)
    • Accept version 200 files. #32490 (@mrdoob)
    • Replace VOXMesh and VOXData3DTexture classes with functions. #32491 (@mrdoob)

Editor

  • Save and restore controls state. #32408 (@mrdoob)
  • Scale PointLightHelper based on camera distance. b7c9099db9d7e6a959d2bf46b2e5fb807e91dbcf (@mrdoob)
  • Cycle through overlapping objects on click. c745aee7c0b5297a986818235d2f2ffae029223c (@mrdoob)
  • Scale down touchscreen zoom speed #32454 (@TylerSelden)

Tests

  • Removed todo()s. #32483 (@mrdoob)
View original

Upgraded? How did it go?

Discussion