CesiumJS

3D & game engines

Place your Vuframe 3D models on the CesiumJS globe with the GLB export and Model.fromGltfAsync.

Vuframe® exports your 3D models as GLB, the binary form of glTF. CesiumJS loads GLB files as models on its 3D globe, so you can place your products at a real location, for example a machine on a site plan.

Add Vuframe content to CesiumJS ​

  1. Ask your Vuframe project manager for the GLB export of your 3D model.
  2. Host the GLB file on your web server or CDN, next to your app.
  3. Load the model at a position on the globe and add it to the scene:
js
const position = Cesium.Cartesian3.fromDegrees(11.58, 48.14, 0);
const model = await Cesium.Model.fromGltfAsync({
  url: "model.glb",
  modelMatrix: Cesium.Transforms.eastNorthUpToFixedFrame(position),
});
viewer.scene.primitives.add(model);

Good to know: the model has no geographic position of its own, so you set longitude, latitude and height in code. If you need no code, embed the Vuframe 3D viewer as an iframe and control it with the JavaScript API. More: 3D formats, glTF / GLB and the CesiumJS reference for Model.