Skip to content

Conversation

WestLangley
Copy link
Collaborator

As suggested in #31916 (comment).

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.24
79.14
338.24
79.14
+0 B
+0 B
WebGPU 584.78
161.56
584.78
161.56
+0 B
+0 B
WebGPU Nodes 583.39
161.32
583.39
161.32
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 469.7
113.74
469.7
113.74
+0 B
+0 B
WebGPU 654.13
177.06
654.25
177.07
+116 B
+6 B
WebGPU Nodes 608.25
166.24
608.25
166.24
+0 B
+0 B

@Mugen87 Mugen87 merged commit ae1ecc9 into mrdoob:dev Sep 18, 2025
9 checks passed
@Mugen87 Mugen87 added this to the r181 milestone Sep 18, 2025
@WestLangley WestLangley deleted the dev-matcap_wireframe branch September 18, 2025 23:20
Comment on lines +175 to +183
/**
* Controls the thickness of the wireframe.
*
* Can only be used with {@link SVGRenderer}.
*
* @type {number}
* @default 1
*/
this.wireframeLinewidth = 1;
Copy link
Owner

Choose a reason for hiding this comment

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

Hmm, I wonder what we should do with this property...

We're carrying it around because SVGRenderer supports it, yet SVGRenderer doesn't support most of the materials that have this property.

Ideally, WebGLRenderer and WebGPURenderer should be able to support this property too, but that would mean integrating MeshLine2 in the renderer somehow and I suspect it could be pretty problematic (skinning, morphs, instancing, ...)

Copy link
Collaborator

@Mugen87 Mugen87 Sep 19, 2025

Choose a reason for hiding this comment

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

How about removing this property? If users require wide lines with SVGRenderer, they can switch to LineBasicMaterial.

Like mentioned in the other thread, the wireframe material property is more a debug property to me. Not having the ability to define wide wireframes seems acceptable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ideally, WebGLRenderer and WebGPURenderer should be able to support this property too ...

I think we can support wireframeLinewidth in any built-in material, we just haven't done it.

I suspect it could be pretty problematic (skinning, morphs, instancing, ...)

Supporting skinning, morphs, and instancing should not be a problem.

I'll provide a proof-of-concept.

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