Trouble implementing 3D tiles in Cesium Sandcastle

I tried to implement the new feature “3D tiles” in Cesium’s Sandcastle on the Cesium Widget from the gallery (

var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
    url : '/path/to/3d/tileset'


The tileset used were downloaded from here.

Replaced the url by “C:\Users\abc\Downloads\mesh_booth\mesh_booth” where I extracted the tileset.

I added the above code to the JavaScript Code, but after running, I am getting the error “ReferenceError: viewer is not defined (on line 8)” .

Assistance required !


Did you create a Cesium.Viewer instance?

There is a complete 3D Tiles example here:


By the way I forgot to mention that it is great work that you are doing for 3D visualization, cheers !

– If possible just let me know how to load only the b3dm datasets
on cesium without the use of 3d tiles. First at least I want to view some buildings on my locally installed cesium.

Yes, I had created the Cesium.Viewer instance.

– I have now used a web server(node.js) and used the code from your “Introduction to 3D tiles” blog on cesium website.
– I downloaded the NewYork tileset and tried to use it.
– I am attaching a snapshot of the cesium sandcastle which shows the code and the errors together.


The 3D Tiles implementation is in the 3d-tiles branch, it is not released yet. If you want to experiment with it, make a Cesium build of that branch. Check out the Contributor’s Guide for details.



I have downloaded the 3d tiles and exteracted it. I have used the cities.html to show the sample files but until now I have not success. please help me to do


Build Cesium-3D-Tile before: You can see this action at