Skip to content

Update default texture anisotropy value from 0 to 1#32321

Closed
thibka wants to merge 1 commit into
mrdoob:devfrom
thibka:patch-3
Closed

Update default texture anisotropy value from 0 to 1#32321
thibka wants to merge 1 commit into
mrdoob:devfrom
thibka:patch-3

Conversation

@thibka

@thibka thibka commented Nov 21, 2025

Copy link
Copy Markdown
Contributor

Fix a small typo in the documentation. The default value for anisotropy is 1, not 0.

@mrdoob

mrdoob commented Nov 21, 2025

Copy link
Copy Markdown
Owner

The docs are now auto generated. You should fix this instead:

/**
* The number of samples taken along the axis through the pixel that has the
* highest density of texels. By default, this value is `1`. A higher value
* gives a less blurry result than a basic mipmap, at the cost of more
* texture samples being used.
*
* @type {number}
* @default 0
*/
this.anisotropy = anisotropy;

But... To be more correct, it should say the the default value is Texture.DEFAULT_ANISOTROPY 🤔

@Mugen87

Mugen87 commented Nov 21, 2025

Copy link
Copy Markdown
Collaborator

Indeed. Let's use Texture.DEFAULT_ANISOTROPY. The ctor parameter is already documented that way.

I believe when I initially wrote this JSDoc, I wasn't sure if using Texture.DEFAULT_ANISOTROPY with the @default tag produces a parsing error. But I've tested it now and turns out it works just fine.

@mrdoob mrdoob added this to the r182 milestone Nov 22, 2025
@thibka thibka closed this Nov 24, 2025
@thibka thibka deleted the patch-3 branch November 24, 2025 15:46
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.

3 participants