Three.js Quick Guide
This tutorial guides you through the process of integrating our API data with Three.js to enhance your 3D web experiences.
Prerequisites
Fetch data from our API
import axios from "axios";
// API Configuration
const API_KEY = "your_api_key_here";
const API_URL = "https://api.cityweft.com/v1/context";
const data = await axios.post(
API_URL,
{
polygon: [
[50.086731028776285, 14.401643218091237],
[50.086731028776285, 14.405974478768172],
[50.089008255862154, 14.405974478768172],
[50.089008255862154, 14.401643218091237],
[50.086731028776285, 14.401643218091237],
],
settings: {
defaultRoofType: "flat",
defaultLevels: 1,
defaultLevelHeight: 4,
topographyModel: false,
disableSurfaceProjection: false,
topographyReturnType: 'meshes'
},
},
{
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${API_KEY}`,
},
}
);Process the response

Rendering

Elevation Maps
Last updated