Hello ~
I have any questions, how to make a square object display grid lines?
You can achieve this with THREE.WireframeGeometry.
1 Like
mesh = new THREE.Mesh(geometry, material, line);
This statement is not correct since the constructor of THREE.Mesh
only takes two parameters.
Try it like so:
mesh = new THREE.Mesh(geometry, material);
mesh.add( line );
Thank you for your suggestion. The frame line was successfully displayed, but the main body color disappeared. I originally wanted the main color and white line frame.
Example:
Pleas use the exact code I have provided you. You should do:
mesh.add( line );
scene.add( mesh );
Right now, you are not adding the mesh to your scene.
1 Like