Skip to content

Commit

Permalink
Add back PointCloud3DTileContent specs
Browse files Browse the repository at this point in the history
  • Loading branch information
ebogo1 committed Nov 1, 2021
1 parent 4dbf3d8 commit 6c55ad1
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Specs/Scene/PointCloud3DTileContentSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ describe(
"./Data/Cesium3DTiles/PointCloud/PointCloudDraco/tileset.json";
var pointCloudDracoPartialUrl =
"./Data/Cesium3DTiles/PointCloud/PointCloudDracoPartial/tileset.json";
var pointCloudDracoBatchedUrl =
"./Data/Cesium3DTiles/PointCloud/PointCloudDracoBatched/tileset.json";
var pointCloudWGS84Url =
"./Data/Cesium3DTiles/PointCloud/PointCloudWGS84/tileset.json";
var pointCloudBatchedUrl =
Expand Down Expand Up @@ -277,6 +279,23 @@ describe(
});
});

it("renders point cloud with draco encoded positions, normals, colors, and batch table properties", function () {
return Cesium3DTilesTester.loadTileset(scene, pointCloudDracoUrl).then(
function (tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
// Test that Draco-encoded batch table properties are functioning correctly
tileset.style = new Cesium3DTileStyle({
color: "vec4(Number(${secondaryColor}[0] < 1.0), 0.0, 0.0, 1.0)",
});
expect(scene).toRenderAndCall(function (rgba) {
// Produces a red color
expect(rgba[0]).toBeGreaterThan(rgba[1]);
expect(rgba[0]).toBeGreaterThan(rgba[2]);
});
}
);
});

it("renders point cloud with draco encoded positions and uncompressed normals and colors", function () {
return Cesium3DTilesTester.loadTileset(
scene,
Expand All @@ -286,6 +305,15 @@ describe(
});
});

it("renders point cloud with draco encoded positions, colors, and batch ids", function () {
return Cesium3DTilesTester.loadTileset(
scene,
pointCloudDracoBatchedUrl
).then(function (tileset) {
Cesium3DTilesTester.expectRender(scene, tileset);
});
});

it("error decoding a draco point cloud causes loading to fail", function () {
return pollToPromise(function () {
return DracoLoader._taskProcessorReady;
Expand Down

0 comments on commit 6c55ad1

Please sign in to comment.