This sample demonstrates how to load a web scene from a Portal for ArcGIS item into a custom application. The scene illustrates the shadows cast by mountains surrounding Queenstown, Otago, New Zealand, on the Winter Solstice (21, June 2014). Each line represents the edge of the shadows cast by the surrounding mountains at specific times of the day.
To load a web scene, you only need its item ID from the portal.
In the body tag of your custom app, add the <arcgis-scene component and specify the itemId of the web scene:
<body>
  <arcgis-scene item-id="3a9976baef9240ab8645ee25c7e9c096">
    <!-- insert other furniture components -->
  </arcgis-scene>
</body>If you want to work with the scene programmatically, retrieve a reference to the Scene component:
const viewElement = document.querySelector("arcgis-scene");
// Wait for the view to fully initialize
await viewElement.viewOnReady();To reference an item from an on-premises ArcGIS Enterprise portal, set the URL of the portal in esriConfig.portalUrl.
For more information on how the ArcGIS Maps SDK for JavaScript works with portal items, see ArcGIS Organization portals.