# Cesium.ClassificationPrimitive is not a constructor

**URL:** <https://community.cesium.com/t/cesium-classificationprimitive-is-not-a-constructor/6833>\
**Category:** CesiumJS\
**Created:** [April 25, 2018, 12:16pm UTC](https://community.cesium.com/t/cesium-classificationprimitive-is-not-a-constructor/6833 "2018-04-25T12:16:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![swapnil.k00](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/swapnil.k00/32/2920_2.png) [@swapnil.k00](https://community.cesium.com/u/swapnil.k00)\
**Post date:** [April 25, 2018, 12:16pm UTC](https://community.cesium.com/t/cesium-classificationprimitive-is-not-a-constructor/6833/1 "2018-04-25T12:16:08Z")

</div>

I was trying to play around 3D tiles highlighting feature, I came across following example from Sandcastle.  
var center = new Cesium.Cartesian3(1216378.730451297, -4736275.917774027, 4081266.871000864);  
var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);  
var hprRotation = Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(2.619728786416368, 0.0, 0.0));  
var hpr = Cesium.Matrix4.fromRotationTranslation(hprRotation, new Cesium.Cartesian3(0.0, 0.0, -2.0));  
Cesium.Matrix4.multiply(modelMatrix, hpr, modelMatrix);

var buildingHighlight = scene.primitives.add(new Cesium.ClassificationPrimitive({  
&nbsp;&nbsp;&nbsp;&nbsp;geometryInstances : new Cesium.GeometryInstance({  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;geometry : Cesium.BoxGeometry.fromDimensions({  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX\_FORMAT,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dimensions : new Cesium.Cartesian3(8.0, 5.0, 8.0)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}),  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;modelMatrix : modelMatrix,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attributes : {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color : Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(1.0, 0.0, 0.0, 0.5)),  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show : new Cesium.ShowGeometryInstanceAttribute(true)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id : 'volume'  
&nbsp;&nbsp;&nbsp;&nbsp;}),  
&nbsp;&nbsp;&nbsp;&nbsp;classificationType : Cesium.ClassificationType.CESIUM\_3D\_TILE  
}));

I tried to use the same in my page, but I get first error for "Uncaught TypeError: Cannot read property 'CESIUM\_3D\_TILE' of undefined"

If I try to comment classificationType row, then I get "Uncaught TypeError: Cesium.ClassificationPrimitive is not a constructor" error. I see other Cesium features works fine, so Cesium is loaded properly.

---

<div class="post-metadata">

**Author:** ![sean\_lilley](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/sean_lilley/32/2083_2.png) [@sean\_lilley](https://community.cesium.com/u/sean_lilley)\
**Post date:** [April 25, 2018, 11:26pm UTC](https://community.cesium.com/t/cesium-classificationprimitive-is-not-a-constructor/6833/2 "2018-04-25T23:26:28Z")

</div>

What version of Cesium are you using? ClassificationType was added in Cesium 1.43 and ClassificationPrimitive was added in Cesium 1.36.

---

<div class="post-metadata">

**Author:** ![swapnil.k00](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/swapnil.k00/32/2920_2.png) [@swapnil.k00](https://community.cesium.com/u/swapnil.k00)\
**Post date:** [April 26, 2018, 5:29am UTC](https://community.cesium.com/t/cesium-classificationprimitive-is-not-a-constructor/6833/3 "2018-04-26T05:29:11Z")

</div>

I'm using Cesium 1.44 version.
