question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Would it be possible to add an option to view a wireframe over a Mesh?

I tried adding this myself but simply put, my WebGL knowledge is crap at the moment.

I figured as much that this needs to get the following:

        glData.shader.uniforms.translationMatrix = mesh.worldTransform.toArray(true);

        glData.shader.uniforms.uColor = core.utils.premultiplyRgba(mesh.tintRgb, mesh.worldAlpha, glData.shader.uniforms.uColor, texture.baseTexture.premultipliedAlpha);

        var drawMode = mesh.drawMode === _Mesh2.default.DRAW_MODES.TRIANGLE_MESH ? gl.TRIANGLE_STRIP : gl.TRIANGLES;

        glData.vao.draw(drawMode, mesh.indices.length, 0);

		// or something of the sort - where mesh.wireframe
		if (mesh.wireframeColor !== null)
		{
			glData.vao.draw(gl.LINE_LOOP, mesh.indices.length, 0);
		}

But changing the color wasn’t apparent to me.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
cvissiecommented, Aug 21, 2017

Awesome thanks for this. Let me give this another go. I have made a lot of hacks with the first method but I wasn’t aware of PIXI.glCore which was needed to overload this method.

0reactions
lock[bot]commented, Jul 7, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wire-frame model - Wikipedia
A wire-frame model, also wireframe model, is a visual representation of a three-dimensional ... This article is about the 3D visualization. For the...
Read more >
6 Ways to Convert a Mesh to a Wireframe in Blender
How to Convert a Mesh to a Wireframe in Blender · 1. Use the Wireframe Tool · 2. Use the Wireframe Modifier ·...
Read more >
Wireframe Modifier — Blender Manual
The Wireframe modifier transforms a mesh into a wireframe by iterating over its faces, collecting all edges and turning those edges into four-sided...
Read more >
MeshStandardMaterial#wireframe – three.js docs
MeshStandardMaterial. A standard physically based material, using Metallic-Roughness workflow. Physically based rendering (PBR) has recently become the standard ...
Read more >
Display Wireframe on Static Meshes in Shaded Mode in UE5
How to display wireframe on Static Meshes inside your level in Shaded Mode-----------------------------------Full UE4/5 Quick Tip Playlist: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found