After adding the new shadowMap, what else do we need to do to implement the visual field?

It's my code to add shadowMap and what to do later?

var scene = viewer.scene;
var camera1 = new Cesium.Camera(scene);
camera1.position = Cesium.Cartesian3.fromDegrees(-74.01076015,40.7038482,400);
var p1 = Cesium.Cartesian3.fromDegrees(-74.01076015,40.7038482,0);
var dir = new Cesium.Cartesian3();
Cesium.Cartesian3.add(p1,Cesium.Cartesian3.multiplyByScalar(camera1.position,-1,new Cesium.Cartesian3()),dir);
camera1.direction = dir;
// camera1.up = Cesium.Cartesian3.clone(Cesium.Cartesian3.UNIT_Y);
camera1.frustum.fov = Cesium.Math.PI_OVER_THREE;
camera1.frustum.near = 1.0;
camera1.frustum.far = 20000.0;
var shadow_stc = new Cesium.ShadowMap({
    // fromLightSource:false
var CustomPrimotive = function(shadowMap){
    this.shadowMap = shadowMap;
CustomPrimotive.prototype.update = function(frameState){
scene.primitives.add(new CustomPrimotive(shadow_stc));

Is there a reason you need to construct your own ShadowMap like that instead of using viewer.shadowMap?

Does this shadows example help with what you need to do? If not, can you describe a bit more what you’re trying to do? A running example or a picture would help.