Add Pitch to DEFAULT_VIEW_RECTANGLE

I have the DEFAULT_VIEW_RECTANGLE set up and working as expected, however I would like to add a pitch to this view.

const rectangle = Cesium.Rectangle.fromDegrees(west, south, east, north);

Cesium.Camera.DEFAULT_VIEW_RECTANGLE = rectangle;
Cesium.Camera.DEFAULT_VIEW_FACTOR = 0;

``

I can use setView() to control the default view that loads in, however I also want the Home button to go back to this view. Using the pitch below I get the default camera angle I want however clicking the Home button defaults to the DEFAULT_VIEW_RECTANGLE and I can not figure out how to either incorporate a pitch into that OR how to use the setView() as the default home.

camera.setView({
destination: Cesium.Cartesian3.fromDegrees(-95, 15, 3500000),
orientation: {
heading: 0.0,
pitch: Cesium.Math.toRadians(-62.5),
roll: Cesium.Math.toRadians(0)
}

``

Ultimately open to doing this another way, just want to have a default pitch when the viewer loads, and retain that pitch when you click the Home button.

Thank you,

Chase

*Cesium 1.5.0 on Windows, using Chrome. *

I don’t see an easy way to override this in CesiumJS. I opened a GitHub issue inquiring about that here:

https://github.com/AnalyticalGraphicsInc/cesium/issues/7450

As I alluded there, my best guess is it might be easier to make your own button, and that way you can control exactly what the home view looks like. This is what the button does when clicked:

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Widgets/HomeButton/HomeButtonViewModel.js#L34-L36

And what the flyHome function does:

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/Camera.js#L1286-L1297

Thank you Omar, I will try and create a custom button.