Hey everyone,
I'm trying to pass a gltf object directly to the function model.fromGltf() instead of loading it from a file as suggested in the tutorial.
When loading the model from a file everything works just fine, so my model seems to be valid. However when I try to pass the same gltf directly I get the following error from Cesium.js:401:
"Uncaught TypeError: Cannot read property 'lastIndexOf' of undefined"
here is a snippet of my code:
var gltf = {<some gltf code>}
var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Cartesian3.fromDegrees(-75.62898254394531, 40.02804946899414, 10.0))
var viewer = new Cesium.Viewer('cesiumContainer'),
scene = viewer.scene
scene.primitives.removeAll()
var model = scene.primitives.add(Cesium.Model.fromGltf({
gtlf: gltf,
modelMatrix : modelMatrix,
minimumPixelSize : 128,
scale: 20000.0
}))
Does anyone have a suggestion what I am doing wrong here? Or might there actually be a bug in Cesium?