It is the same code, in the require and function at the beginning of your script it is needed to add "esri/basemap" (even if yourself have not added any basemap in your local scene), then after the variable creating a "new SceneView" you add SceneViewVariableName.basemapTerrain.opacity = 0 as said above.
... View more