-
-
Notifications
You must be signed in to change notification settings - Fork 36k
MeshMatcapMaterial: Support wireframe #31917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
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, ...)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
As suggested in #31916 (comment).