Skip to content

Conversation

@mrdoob
Copy link
Owner

@mrdoob mrdoob commented Jan 14, 2026

Description

Reduces code duplication in material extension classes by centralizing the extension check pattern into a single helper function.

(Made with Claude Opus 4.5)

@mrdoob mrdoob added this to the r183 milestone Jan 14, 2026
@mrdoob mrdoob requested a review from donmccurdy January 14, 2026 09:54

}

return { materialDef, extension: materialDef.extensions[ extensionName ] };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this 'materialDef' property being returned is unused by the extension implementations, and could be removed. Possibly the helper function should be named getMaterialExtension or getMaterialExtensionData? Otherwise I do like the simplification!

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