Mallos de Riglos

// Grant CesiumJS access to your ion assets Cesium.Ion.defaultAccessToken = «eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmYmUzZWY5ZS0wMDYxLTRlYzAtYWI1ZS01ODJmZGI1MmMyMGMiLCJpZCI6MjU3NjAyLCJpYXQiOjE3MzI0NDg5MDh9.PDvPZtIX2Ctag22OKGKYnV_CT0CEsqGQPH61nZdQ5r4»; const viewer = new Cesium.Viewer(«cesiumContainer»); try { const resource = await Cesium.IonResource.fromAssetId(2861883); const entity = viewer.entities.add({ position: Cesium.Cartesian3.fromDegrees(0, 0, 100), model: { uri: resource, }, }); viewer.trackedEntity = entity; } catch (error) { console.log(error); }

Loading…

You must be logged in to view this content.