Unable to run 3d model example of sandcastle with errors using webstorm

Unable to run 3d model example of sandcastle with errors using webstorm
"I am getting errors such as unresolvable type viewer,function and method"
i am using webstorm and node.js. Below is code
"var Cesium;
viewer = new Cesium.Viewer('cesiumContainer', { ------error unresolvable type viewr
    infoBox: false,
    selectionIndicator: false,
    shadows: true
});

viewer.entities.removeAll = function () {

};
function createModel(url, height) {
    viewer.entities.removeAll();

    var position = Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, height); ---- "error"
    var heading = Cesium.Math.toRadians(135);
    var pitch = 0;
    var roll = 0;
    var hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll);
    var orientation = Cesium.Transforms.headingPitchRollQuaternion(position, hpr);----------error

    var entity = viewer.entities.add({
        name : url,
        position : position,
        orientation : orientation,
        model : {
            uri : url,
            minimumPixelSize : 128,
            maximumScale : 20000
        }
    });
    viewer.trackedEntity = entity;
}

var options = [{
    text : 'Aircraft',
    onselect : function() {
        createModel('../../SampleData/models/CesiumAir/Cesium_Air.glb', 5000.0);
    }
}, {
    text : 'Ground vehicle',
    onselect : function() {
        createModel('../../SampleData/models/CesiumGround/Cesium_Ground.glb', 0);
    }
}, {
    text : 'Hot Air Balloon',
    onselect : function() {
        createModel('../../SampleData/models/CesiumBalloon/CesiumBalloon.glb', 1000.0);
    }
}, {
    text : 'Milk truck',
    onselect : function() {
        createModel('../../SampleData/models/CesiumMilkTruck/CesiumMilkTruck-kmc.glb', 0);
    }
}, {
    text : 'Skinned character',
    onselect : function() {
        createModel('../../SampleData/models/CesiumMan/Cesium_Man.glb', 0);
    }
}];

var Sandcastle;
Sandcastle.addToolbarMenu(options);

"""""""""""""

PLease help me anyone ,thank you.

Hey – not sure what you mean by running with webstorm. How exactly are you running your code? Have you looked at our Getting Started tutorial? It has a nice step-by-step guide for running a local server for Cesium.

  • Rachel