# How to view the 3D model in wire-frame mode?

**URL:** <https://community.cesium.com/t/how-to-view-the-3d-model-in-wire-frame-mode/3355>\
**Category:** CesiumJS\
**Created:** [November 23, 2015, 1:07pm UTC](https://community.cesium.com/t/how-to-view-the-3d-model-in-wire-frame-mode/3355 "2015-11-23T13:07:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Premkumar\_Jayaseela1](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@Premkumar\_Jayaseela1](https://community.cesium.com/u/Premkumar_Jayaseela1)\
**Post date:** [November 23, 2015, 1:07pm UTC](https://community.cesium.com/t/how-to-view-the-3d-model-in-wire-frame-mode/3355/1 "2015-11-23T13:07:21Z")

</div>

I’ve checked this [documentation](http://cesiumjs.org/Cesium/Build/Documentation/Model.html?classFilter=model) about the model. It says, using “debugWireframe” properties we can see the model in wire-frame mode.

I’ve tried that api in Sandcastle, but it still shown the complete model.

var viewer = new Cesium.Viewer(‘cesiumContainer’, {

```
infoBox : false,

selectionIndicator : false

```

});

function createModel(url, height) {

```
viewer.entities.removeAll();

var position = Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, height);

var heading = Cesium.Math.toRadians(135);

var pitch = 0;

var roll = 0;

var orientation = Cesium.Transforms.headingPitchRollQuaternion(position, heading, pitch, roll);

var entity = viewer.entities.add({

    name : url,

    position : position,

    orientation : orientation,

    model : {

        uri : url,

        minimumPixelSize : 128,

        debugWireframe: true

    }

});

viewer.trackedEntity = entity;

```

}

createModel(’…/…/SampleData/models/CesiumAir/Cesium\_Air.glb’, 5000.0);

``

Is there anything wrong with the code. Am I implemented in the wrong place?

Please advice.

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [November 23, 2015, 8:45pm UTC](https://community.cesium.com/t/how-to-view-the-3d-model-in-wire-frame-mode/3355/2 "2015-11-23T20:45:22Z")

</div>

Hello,

The debugWireframe option has not been piped through to the entity API, that is why this isn’t working.

If you want to view your model as a wireframe, you can do it like this:

//Create model matrix to position the model on the globe surface  
var origin = Cesium.Cartesian3.fromDegrees(-123.0, 44.0);  
var modelMatrix = Cesium.Transforms.headingPitchRollToFixedFrame(origin, heading, pitch, roll);  
//Add model to the scene  
var model = scene.primitives.add(Cesium.Model.fromGltf({  
url : url,  
modelMatrix : modelMatrix,  
debugWireframe: true  
}));

``

Hope this helps!

-Hannah

---

<div class="post-metadata">

**Author:** ![Premkumar\_Jayaseela1](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@Premkumar\_Jayaseela1](https://community.cesium.com/u/Premkumar_Jayaseela1)\
**Post date:** [November 24, 2015, 9:13am UTC](https://community.cesium.com/t/how-to-view-the-3d-model-in-wire-frame-mode/3355/3 "2015-11-24T09:13:30Z")

</div>

Thank you for the response Hannah!

I suppose to toggle the model wire-frame dynamically. I got that, the debugWireframe property inside primitives. I’ve implemented as below.

var pick = scene.pick(movement.position);  
pick.primitive.debugWireframe = true or false;

``
