# MeshLine not showing on the webgl space

**URL:** <https://discourse.threejs.org/t/meshline-not-showing-on-the-webgl-space/9493>\
**Category:** Questions\
**Tags:** meshlines\
**Created:** [September 6, 2019, 7:18pm UTC](https://discourse.threejs.org/t/meshline-not-showing-on-the-webgl-space/9493 "2019-09-06T19:18:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahul.pillai93](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@rahul.pillai93](https://discourse.threejs.org/u/rahul.pillai93)\
**Post date:** [September 6, 2019, 7:18pm UTC](https://discourse.threejs.org/t/meshline-not-showing-on-the-webgl-space/9493/1 "2019-09-06T19:18:46Z")

</div>

Hi. I am trying to use the meshline external package to create a rectangular shape. I have “required” the external MeshLine file from the link ([https://github.com/spite/THREE.MeshLine/blob/565dc97b36c742120936555c3b0eeb9653202e03/README.md](https://github.com/spite/THREE.MeshLine/blob/565dc97b36c742120936555c3b0eeb9653202e03/README.md)) already into my program and tried using the following code to draw a rectangle using meshLine . As of now I have no errors but nothing shows on my graphics window. I tried the same thing with the lines.gl feature and it works fine. Any suggestions on what I’m doing wrong?

```auto
var geometryMeshLine = new THREE.Geometry();
geometryMeshLine.vertices.push(new THREE.Vector3((A / 2) * -1, B / 2, 0));
geometryMeshLine.vertices.push(new THREE.Vector3(A / 2, B / 2, 0));
geometryMeshLine.vertices.push(new THREE.Vector3(A / 2, (B / 2) * -1, 0));
geometryMeshLine.vertices.push(new THREE.Vector3((A / 2) * -1, (B / 2) * -1, 0));

var line = new MeshLine();
line.setGeometry(geometryMeshLine);
var materialMeshLine = new MeshLineMaterial({
	lineWidth: 15,
	color: 0xff0000,
	useMap: false,
	opacity: 1,
	resolution: new THREE.Vector2(window.innerWidth, window.innerHeight),
	sizeAttenuation: false,
	near: camera.near,
	far: camera.far
});

var meshMeshLine = new THREE.Mesh(line.geometryMeshLine, materialMeshLine); 
meshMeshLine.position.x = this.spotShape.position.x;
meshMeshLine.position.y = this.spotShape.position.y;
meshMeshLine.position.z = this.spotShape.position.z;

this.scene.add(meshMeshLine);

this.updateGL();

```

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [September 7, 2019, 9:09am UTC](https://discourse.threejs.org/t/meshline-not-showing-on-the-webgl-space/9493/2 "2019-09-07T09:09:15Z")

</div>

> [@rahul.pillai93](#):
>
> var meshMeshLine = new THREE.Mesh(line.geometryMeshLine, materialMeshLine);

It should be:

```javascript
var meshMeshLine = new THREE.Mesh(line.geometry, materialMeshLine);

```

`MeshLine.geometry` represents the final geometry you want to pass in to `THREE.Mesh`.

Live demo: [https://jsfiddle.net/b809Loug/](https://jsfiddle.net/b809Loug/)
