MeshMatcapMaterial: Support wireframe#31917
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
| /** | ||
| * Controls the thickness of the wireframe. | ||
| * | ||
| * Can only be used with {@link SVGRenderer}. | ||
| * | ||
| * @type {number} | ||
| * @default 1 | ||
| */ | ||
| this.wireframeLinewidth = 1; |
There was a problem hiding this comment.
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, ...)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
As suggested in #31916 (comment).