Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Extras to 3DTile and 3DTileset #6974

Merged
merged 16 commits into from
Aug 31, 2018
11 changes: 10 additions & 1 deletion Specs/Scene/Cesium3DTilesetSpec.js
Original file line number Diff line number Diff line change
@@ -361,7 +361,7 @@ defineSuite([
it('loads tileset with extras', function() {
return Cesium3DTilesTester.loadTileset(scene, tilesetUrl).then(function(tileset) {
expect(tileset.extras).toEqual({ 'name': 'Sample Tileset' });
expect(tileset.root.extras).not.toBeDefined();
expect(tileset.root.extras).toBeUndefined();

var length = tileset.root.children.length;
var taggedChildren = 0;
@@ -443,6 +443,15 @@ defineSuite([
}).toThrowDeveloperError();
});

it('throws when getting extras and tileset is not ready', function() {
var tileset = new Cesium3DTileset({
url : tilesetUrl
});
expect(function() {
return tileset.extras;
}).toThrowDeveloperError();
});

it('requests tile with invalid magic', function() {
var invalidMagicBuffer = Cesium3DTilesTester.generateBatchedTileBuffer({
magic : [120, 120, 120, 120]