cesium/Specs/test.cjs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
562 B
JavaScript
Raw Permalink Normal View History

2022-06-07 00:07:44 +08:00
"use strict";
const assert = require("node:assert");
const {
Cartographic,
createWorldTerrainAsync,
2022-06-07 00:07:44 +08:00
sampleTerrain,
} = require("cesium");
// NodeJS smoke screen test
async function test() {
const provider = await createWorldTerrainAsync();
2023-01-13 00:07:41 +08:00
const results = await sampleTerrain(provider, 11, [
Cartographic.fromDegrees(86.925145, 27.988257),
Cartographic.fromDegrees(87.0, 28.0),
]);
2022-06-07 00:07:44 +08:00
assert(results[0].height > 5000);
assert(results[0].height < 10000);
assert(results[1].height > 5000);
assert(results[1].height < 10000);
}
2024-01-23 03:34:39 +08:00
test();