diff --git a/.concierge/templates/pullRequestOpened.hbs b/.concierge/templates/pullRequestOpened.hbs index 8408c266f8ab..f5dbb8aa6364 100644 --- a/.concierge/templates/pullRequestOpened.hbs +++ b/.concierge/templates/pullRequestOpened.hbs @@ -12,6 +12,7 @@ Thanks for the pull request @{{ userName }}! {{#if errorCla}} * :grey_exclamation: There was an error checking the CLA! If this is your first contribution, please send in a [Contributor License Agreement](https://github.com/CesiumGS/cesium/blob/master/CONTRIBUTING.md#contributor-license-agreement-cla). * Maintainers, this was the error I ran into while attempting to process the CLA check. Please resolve it to continue CLA checking. + * You'll need to [manually check for a submitted CLA](https://github.com/CesiumGS/cesium/blob/master/Documentation/Contributors/CLAs/README.md) ``` {{ errorCla }} ``` @@ -19,6 +20,7 @@ Thanks for the pull request @{{ userName }}! {{#if askForCla}} * :x: Missing CLA. * Please send in a [Contributor License Agreement](https://github.com/CesiumGS/cesium/blob/master/CONTRIBUTING.md#contributor-license-agreement-cla) (CLA) and comment back here to let us know to check this! + * Maintainers, [here's how to check](https://github.com/CesiumGS/cesium/blob/master/Documentation/Contributors/CLAs/README.md) for a submitted CLA. {{else}} * :heavy_check_mark: Signed CLA found. {{/if}} diff --git a/.eslintignore b/.eslintignore index f6d729a51549..6f4e8d9c4532 100644 --- a/.eslintignore +++ b/.eslintignore @@ -12,3 +12,4 @@ Apps/Sandcastle/jsHintOptions.js Apps/Sandcastle/gallery/gallery-index.js Source/Core/buildModuleUrl.js Specs/spec-main.js +index.release.html \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index 9cdd09c0f44a..ce574a6c8ea1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,22 +1,13 @@ { - "extends": ["./Tools/eslint-config-cesium/browser.js", "prettier"], - "plugins": [ - "html" + "extends": [ + "./Tools/eslint-config-cesium/node.js", + "prettier" ], - "rules": { - "no-unused-vars": ["error", {"vars": "all", "args": "none"}] + "env": { + "node": true, + "es6": true }, - "overrides": [ - { - "files": [ - "index.cjs", - "server.cjs", - "gulpfile.js", - "Source/Workers/transferTypedArrayTest.js" - ], - "parserOptions": { - "sourceType": "script" - } - } - ] + "parserOptions": { + "ecmaVersion": 2019 + } } diff --git a/.gitignore b/.gitignore index 240b38f501bf..004aac89e86e 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ yarn.lock # WebStorm user-specific .idea/workspace.xml .idea/tasks.xml +.idea/shelf diff --git a/.npmignore b/.npmignore index b6218280c65f..1cb3f6eb5ce5 100644 --- a/.npmignore +++ b/.npmignore @@ -19,7 +19,7 @@ /Cesium-*.zip /Documentation /favicon.ico -/gulpfile.js +/gulpfile.cjs /index.html /index.release.html /launches diff --git a/.slackbot.yml b/.slackbot.yml index 3b5002c95827..8265ca44697d 100644 --- a/.slackbot.yml +++ b/.slackbot.yml @@ -1,12 +1,14 @@ # List of Slack usernames (not GitHub) for the Cesium Concierge Slackbot to send release reminders for. releaseSchedule: - mamato: 3/2/2020 - oshehata: 4/1/2020 - lilleyse: 5/1/2020 - ian: 6/1/2020 - sam.suhag: 7/1/2020 - sam.vargas: 8/3/2020 - kevin: 9/1/2020 - mamato: 10/1/2020 - oshehata: 11/2/2020 - lilleyse: 12/1/2020 + - gary, 1/4/2021 + - ian, 2/1/2021 + - kevin, 3/1/2021 + - sam.vargas, 4/1/2021 + - mamato, 5/3/2021 + - oshehata, 6/1/2021 + - bao, 7/1/2021 + - lilleyse, 8/2/2021 + - sam.suhag, 9/1/2021 + - peter, 10/1/2021 + - eli, 11/1/2021 + - erixen, 12/1/2021 diff --git a/Apps/.eslintrc.json b/Apps/.eslintrc.json new file mode 100644 index 000000000000..ae9a392652a3 --- /dev/null +++ b/Apps/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "../Source/.eslintrc.json" +} diff --git a/Apps/SampleData/models/CesiumDrone/CesiumDrone.glb b/Apps/SampleData/models/CesiumDrone/CesiumDrone.glb new file mode 100644 index 000000000000..22dbdc0b2337 Binary files /dev/null and b/Apps/SampleData/models/CesiumDrone/CesiumDrone.glb differ diff --git a/Apps/SampleData/models/GroundVehicle/GroundVehicle.glb b/Apps/SampleData/models/GroundVehicle/GroundVehicle.glb index bef189903265..dd7671587de1 100644 Binary files a/Apps/SampleData/models/GroundVehicle/GroundVehicle.glb and b/Apps/SampleData/models/GroundVehicle/GroundVehicle.glb differ diff --git a/Apps/Sandcastle/.eslintrc.json b/Apps/Sandcastle/.eslintrc.json index deade47938cb..9b032d1d2e7d 100644 --- a/Apps/Sandcastle/.eslintrc.json +++ b/Apps/Sandcastle/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": "../../.eslintrc.json", + "extends": "../.eslintrc.json", "env": { "amd": true }, diff --git a/Apps/Sandcastle/CesiumSandcastle.js b/Apps/Sandcastle/CesiumSandcastle.js index c3d282189683..5c4a3f2dfb0a 100644 --- a/Apps/Sandcastle/CesiumSandcastle.js +++ b/Apps/Sandcastle/CesiumSandcastle.js @@ -48,7 +48,6 @@ require({ "dojo/promise/all", "dojo/query", "dojo/when", - "dojo/Deferred", "dojo/request/script", "Sandcastle/LinkButton", "ThirdParty/clipboard.min", @@ -94,7 +93,6 @@ require({ all, query, when, - Deferred, dojoscript, LinkButton, ClipboardJS, @@ -853,51 +851,45 @@ require({ var parser = new DOMParser(); var doc = parser.parseFromString(demo.code, "text/html"); - return waitForDoc(doc, function () { - return doc.querySelector('script[id="cesium_sandcastle_script"]'); - }).then(function () { - var script = doc.querySelector( - 'script[id="cesium_sandcastle_script"]' + var script = doc.querySelector('script[id="cesium_sandcastle_script"]'); + if (!script) { + appendConsole( + "consoleError", + "Error reading source file: " + demo.name, + true ); - if (!script) { - appendConsole( - "consoleError", - "Error reading source file: " + demo.name, - true - ); - return; - } + return; + } - var scriptMatch = scriptCodeRegex.exec(script.textContent); - if (!scriptMatch) { - appendConsole( - "consoleError", - "Error reading source file: " + demo.name, - true - ); - return; - } + var scriptMatch = scriptCodeRegex.exec(script.textContent); + if (!scriptMatch) { + appendConsole( + "consoleError", + "Error reading source file: " + demo.name, + true + ); + return; + } - var scriptCode = scriptMatch[1]; - scriptCode = scriptCode.replace(/^ {8}/gm, ""); //Account for Prettier spacing + var scriptCode = scriptMatch[1]; + scriptCode = scriptCode.replace(/^ {8}/gm, ""); //Account for Prettier spacing - var htmlText = ""; - var childIndex = 0; - var childNode = doc.body.childNodes[childIndex]; - while ( - childIndex < doc.body.childNodes.length && - childNode !== script - ) { - htmlText += - childNode.nodeType === 1 - ? childNode.outerHTML - : childNode.nodeValue; - childNode = doc.body.childNodes[++childIndex]; - } - htmlText = htmlText.replace(/^\s+/, ""); + var htmlText = ""; + var childIndex = 0; + var childNode = doc.body.childNodes[childIndex]; + while ( + childIndex < doc.body.childNodes.length && + childNode !== script + ) { + htmlText += + childNode.nodeType === 1 + ? childNode.outerHTML + : childNode.nodeValue; + childNode = doc.body.childNodes[++childIndex]; + } + htmlText = htmlText.replace(/^\s+/, ""); - applyLoadedDemo(scriptCode, htmlText); - }); + applyLoadedDemo(scriptCode, htmlText); } }); } @@ -1232,82 +1224,57 @@ require({ }); } - // Work around Chrome 79 bug: https://github.com/CesiumGS/cesium/issues/8460 - function waitForDoc(doc, test) { - var deferred = new Deferred(); - if (test()) { - deferred.resolve(doc); - } else { - var counter = 1; - setTimeout(function () { - if (test() || counter++ > 10) { - deferred.resolve(doc); - } - }, 100 * counter); - } - return deferred.promise; - } - var newInLabel = "New in " + VERSION; function loadDemoFromFile(demo) { - return requestDemo(demo.name) - .then(function (value) { - // Store the file contents for later searching. - demo.code = value; + return requestDemo(demo.name).then(function (value) { + // Store the file contents for later searching. + demo.code = value; - var parser = new DOMParser(); - var doc = parser.parseFromString(value, "text/html"); - return waitForDoc(doc, function () { - return doc.body.getAttribute("data-sandcastle-bucket"); - }); - }) - .then(function (doc) { - var bucket = doc.body.getAttribute("data-sandcastle-bucket"); - demo.bucket = bucket ? bucket : "bucket-requirejs.html"; - - var descriptionMeta = doc.querySelector('meta[name="description"]'); - var description = - descriptionMeta && descriptionMeta.getAttribute("content"); - demo.description = description ? description : ""; - - var labelsMeta = doc.querySelector( - 'meta[name="cesium-sandcastle-labels"]' - ); - var labels = labelsMeta && labelsMeta.getAttribute("content"); - if (demo.isNew) { - demo.label = labels ? labels + "," + newInLabel : newInLabel; - } else { - demo.label = labels ? labels : ""; - } + var parser = new DOMParser(); + var doc = parser.parseFromString(value, "text/html"); - // Select the demo to load upon opening based on the query parameter. - if (defined(queryObject.src)) { - if (demo.name === queryObject.src.replace(".html", "")) { - loadFromGallery(demo).then(function () { - window.history.replaceState( - demo, - demo.name, - getPushStateUrl(demo) - ); - if (defined(queryObject.gist)) { - document.title = "Gist Import - Cesium Sandcastle"; - } else { - document.title = demo.name + " - Cesium Sandcastle"; - } - }); - } - } + var bucket = doc.body.getAttribute("data-sandcastle-bucket"); + demo.bucket = bucket ? bucket : "bucket-requirejs.html"; - // Create a tooltip containing the demo's description. - demoTooltips[demo.name] = new TooltipDialog({ - id: demo.name + "TooltipDialog", - style: "width: 200px; font-size: 12px;", - content: demo.description.replace(/\\n/g, "
"), - }); + var descriptionMeta = doc.querySelector('meta[name="description"]'); + var description = + descriptionMeta && descriptionMeta.getAttribute("content"); + demo.description = description ? description : ""; - addFileToTab(demo); - return demo; + var labelsMeta = doc.querySelector( + 'meta[name="cesium-sandcastle-labels"]' + ); + var labels = labelsMeta && labelsMeta.getAttribute("content"); + if (demo.isNew) { + demo.label = labels ? labels + "," + newInLabel : newInLabel; + } else { + demo.label = labels ? labels : ""; + } + + // Select the demo to load upon opening based on the query parameter. + if (defined(queryObject.src)) { + if (demo.name === queryObject.src.replace(".html", "")) { + loadFromGallery(demo).then(function () { + window.history.replaceState(demo, demo.name, getPushStateUrl(demo)); + if (defined(queryObject.gist)) { + document.title = "Gist Import - Cesium Sandcastle"; + } else { + document.title = demo.name + " - Cesium Sandcastle"; + } + }); + } + } + + // Create a tooltip containing the demo's description. + demoTooltips[demo.name] = new TooltipDialog({ + id: demo.name + "TooltipDialog", + style: "width: 200px; font-size: 12px;", + content: demo.description.replace(/\\n/g, "
"), }); + + addFileToTab(demo); + return demo; + }); } var loading = true; diff --git a/Apps/Sandcastle/gallery/3D Models.html b/Apps/Sandcastle/gallery/3D Models.html index 1db0cc2d8d10..3172c1023b00 100644 --- a/Apps/Sandcastle/gallery/3D Models.html +++ b/Apps/Sandcastle/gallery/3D Models.html @@ -79,6 +79,15 @@ ); }, }, + { + text: "Drone", + onselect: function () { + createModel( + "../../SampleData/models/CesiumDrone/CesiumDrone.glb", + 150.0 + ); + }, + }, { text: "Ground Vehicle", onselect: function () { diff --git a/Apps/Sandcastle/gallery/3D Tiles Clipping Planes.html b/Apps/Sandcastle/gallery/3D Tiles Clipping Planes.html index b364c68412eb..a542d9fd663e 100644 --- a/Apps/Sandcastle/gallery/3D Tiles Clipping Planes.html +++ b/Apps/Sandcastle/gallery/3D Tiles Clipping Planes.html @@ -71,7 +71,6 @@ var viewer = new Cesium.Viewer("cesiumContainer", { infoBox: false, selectionIndicator: false, - terrainProvider: Cesium.createWorldTerrain(), }); var scene = viewer.scene; diff --git a/Apps/Sandcastle/gallery/3D Tiles Feature Styling.html b/Apps/Sandcastle/gallery/3D Tiles Feature Styling.html index 7065ceb67727..38873972a130 100644 --- a/Apps/Sandcastle/gallery/3D Tiles Feature Styling.html +++ b/Apps/Sandcastle/gallery/3D Tiles Feature Styling.html @@ -2,14 +2,16 @@ - - + - - + + Cesium Demo +
-

Loading...

-
+
+

Loading...

+
+
+ + + + + + + +
Click on a building to select as the central location
+
+ + + + + +
+

Loading...

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Background Transparency + +
Band Transparency + +
Band Thickness + +
Band 1 Position + +
Band 2 Position + +
Band 3 Position + +
Gradient + +
+
+ + + diff --git a/Apps/Sandcastle/gallery/Elevation Band Material.jpg b/Apps/Sandcastle/gallery/Elevation Band Material.jpg new file mode 100644 index 000000000000..edb7a22edd5c Binary files /dev/null and b/Apps/Sandcastle/gallery/Elevation Band Material.jpg differ diff --git a/Apps/Sandcastle/gallery/Imagery Layers Manipulation.html b/Apps/Sandcastle/gallery/Imagery Layers Manipulation.html index 7c46b515a0c4..e696b2b94f36 100644 --- a/Apps/Sandcastle/gallery/Imagery Layers Manipulation.html +++ b/Apps/Sandcastle/gallery/Imagery Layers Manipulation.html @@ -195,7 +195,7 @@ "USGS Shaded Relief (via WMTS)", new Cesium.WebMapTileServiceImageryProvider({ url: - "http://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefOnly/MapServer/WMTS", + "https://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefOnly/MapServer/WMTS", layer: "USGSShadedReliefOnly", style: "default", format: "image/jpeg", diff --git a/Apps/Sandcastle/gallery/Terrain.html b/Apps/Sandcastle/gallery/Terrain.html index e927a609aedd..a69bf6ba09aa 100644 --- a/Apps/Sandcastle/gallery/Terrain.html +++ b/Apps/Sandcastle/gallery/Terrain.html @@ -59,6 +59,11 @@ credit: "Terrain data courtesy VT MÄK", }); + var arcGisProvider = new Cesium.ArcGISTiledElevationTerrainProvider({ + url: + "https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer", + }); + Sandcastle.addToolbarMenu( [ { @@ -103,6 +108,12 @@ viewer.terrainProvider = vrTheWorldProvider; }, }, + { + text: "ArcGISTerrainProvider", + onselect: function () { + viewer.terrainProvider = arcGisProvider; + }, + }, ], "terrainMenu" ); diff --git a/Apps/Sandcastle/gallery/development/3D Models.html b/Apps/Sandcastle/gallery/development/3D Models.html index 78634120d338..0861202f535d 100644 --- a/Apps/Sandcastle/gallery/development/3D Models.html +++ b/Apps/Sandcastle/gallery/development/3D Models.html @@ -262,6 +262,22 @@ ); }, }, + { + text: "Drone", + onselect: function () { + var height = 150.0; + var heading = 0.0; + var pitch = Cesium.Math.toRadians(10.0); + var roll = Cesium.Math.toRadians(-20.0); + createModel( + "../../SampleData/models/CesiumDrone/CesiumDrone.glb", + height, + heading, + pitch, + roll + ); + }, + }, { text: "Ground Vehicle", onselect: function () { diff --git a/Apps/TimelineDemo/.eslintrc.json b/Apps/TimelineDemo/.eslintrc.json index 50014f5ec8f2..50d7d84f480e 100644 --- a/Apps/TimelineDemo/.eslintrc.json +++ b/Apps/TimelineDemo/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": "../../.eslintrc.json", + "extends": "../.eslintrc.json", "env": { "amd": true }, diff --git a/CHANGES.md b/CHANGES.md index fcfa67f43159..97d18b1e1a46 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,84 @@ # Change Log +### 1.80 - 2021-04-01 + +##### Additions :tada: + +- Added `Cesium3DTileset.pickPrimitive` for rendering primitives instead of the tileset during the pick pass. + +### 1.79.1 - 2021-03-01 + +##### Fixes :wrench: + +- Fixed a regression in 1.79 that broke terrain exaggeration. [#9397](https://github.com/CesiumGS/cesium/pull/9397) + +### 1.79 - 2021-03-01 + +##### Breaking Changes :mega: + +- Removed `Cesium3DTileset.url`, which was deprecated in CesiumJS 1.78. Use `Cesium3DTileset.resource.url` to retrieve the url value. +- Removed `EasingFunction.QUADRACTIC_IN`, which was deprecated in CesiumJS 1.77. Use `EasingFunction.QUADRATIC_IN`. +- Removed `EasingFunction.QUADRACTIC_OUT`, which was deprecated in CesiumJS 1.77. Use `EasingFunction.QUADRATIC_OUT`. +- Removed `EasingFunction.QUADRACTIC_IN_OUT`, which was deprecated in CesiumJS 1.77. Use `EasingFunction.QUADRATIC_IN_OUT`. +- Changed `TaskProcessor.maximumActiveTasks` constructor option to be infinity by default. [#9313](https://github.com/CesiumGS/cesium/pull/9313) + +##### Fixes :wrench: + +- Fixed an issue that prevented use of the full CesiumJS zip release package in a Node.js application. +- Fixed an issue where certain inputs to EllipsoidGeodesic would result in a surfaceDistance of NaN. [#9316](https://github.com/CesiumGS/cesium/pull/9316) +- Fixed `sampleTerrain` and `sampleTerrainMostDetailed` not working for `ArcGISTiledElevationTerrainProvider`. [#9286](https://github.com/CesiumGS/cesium/pull/9286) +- Consistent with the spec, CZML `polylineVolume` now expects its shape positions to specified using the `cartesian2` property. Use of the `cartesian` is also supported for backward-compatibility. [#9384](https://github.com/CesiumGS/cesium/pull/9384) +- Removed an unnecessary matrix copy each time a `Cesium3DTileset` is updated. [#9366](https://github.com/CesiumGS/cesium/pull/9366) + +### 1.78 - 2021-02-01 + +##### Additions :tada: + +- Added `BillboardCollection.show`, `EntityCluster.show`, `LabelCollection.show`, `PointPrimitiveCollection.show`, and `PolylineCollection.show` for a convenient way to control show of the entire collection [#9307](https://github.com/CesiumGS/cesium/pull/9307) +- `TaskProcessor` now accepts an absolute URL in addition to a worker name as it's first parameter. This makes it possible to use custom web workers with Cesium's task processing system without copying them to Cesium's Workers directory. [#9338](https://github.com/CesiumGS/cesium/pull/9338) +- Added `Cartesian2.cross` which computes the magnitude of the cross product of two vectors whose Z values are implicitly 0. [#9305](https://github.com/CesiumGS/cesium/pull/9305) +- Added `Math.previousPowerOfTwo`. [#9310](https://github.com/CesiumGS/cesium/pull/9310) + +##### Fixes :wrench: + +- Fixed an issue with `Math.mod` introducing a small amount of floating point error even when the input did not need to be altered. [#9354](https://github.com/CesiumGS/cesium/pull/9354) + +##### Deprecated :hourglass_flowing_sand: + +- `Cesium3DTileset.url` has been deprecated and will be removed in Cesium 1.79. Instead, use `Cesium3DTileset.resource.url` to retrieve the url value. + +### 1.77 - 2021-01-04 + +##### Additions :tada: + +- Added `ElevationBand` material, which maps colors and gradients to exact elevations. [#9132](https://github.com/CesiumGS/cesium/pull/9132) + +##### Fixes :wrench: + +- Fixed an issue where changing a model or tileset's `color`, `backFaceCulling`, or `silhouetteSize` would trigger an error. [#9271](https://github.com/CesiumGS/cesium/pull/9271) + +##### Deprecated :hourglass_flowing_sand: + +- `EasingFunction.QUADRACTIC_IN` was deprecated and will be removed in Cesium 1.79. It has been replaced with `EasingFunction.QUADRATIC_IN`. [#9220](https://github.com/CesiumGS/cesium/issues/9220) +- `EasingFunction.QUADRACTIC_OUT` was deprecated and will be removed in Cesium 1.79. It has been replaced with `EasingFunction.QUADRATIC_OUT`. [#9220](https://github.com/CesiumGS/cesium/issues/9220) +- `EasingFunction.QUADRACTIC_IN_OUT` was deprecated and will be removed in Cesium 1.79. It has been replaced with `EasingFunction.QUADRATIC_IN_OUT`. [#9220](https://github.com/CesiumGS/cesium/issues/9220) + +### 1.76 - 2020-12-01 + +##### Fixes :wrench: + +- Fixed an issue where tileset styles would be reapplied every frame when a tileset has a style and `tileset.preloadWhenHidden` is true and `tileset.show` is false. Also fixed a related issue where styles would be reapplied if the style being set is the same as the active style. [#9223](https://github.com/CesiumGS/cesium/pull/9223) +- Fixed JSDoc and TypeScript type definitions for `EllipsoidTangentPlane.fromPoints` which didn't list a return type. [#9227](https://github.com/CesiumGS/cesium/pull/9227) +- Updated DOMPurify from 1.0.8 to 2.2.2. [#9240](https://github.com/CesiumGS/cesium/issues/9240) + +### 1.75 - 2020-11-02 + +##### Fixes :wrench: + +- Fixed an issue in the PBR material where models with the `KHR_materials_unlit` extension had the normal attribute disabled. [#9173](https://github.com/CesiumGS/cesium/pull/9173). +- Fixed JSDoc and TypeScript type definitions for `writeTextToCanvas` which listed incorrect return type. [#9196](https://github.com/CesiumGS/cesium/pull/9196) +- Fixed JSDoc and TypeScript type definitions for `Viewer.globe` constructor option to allow disabling the globe on startup. [#9063](https://github.com/CesiumGS/cesium/pull/9063) + ### 1.74 - 2020-10-01 ##### Additions :tada: @@ -12,13 +91,15 @@ - Fixed an issue where Plane doesn't rotate correctly around the main local axis. [#8268](https://github.com/CesiumGS/cesium/issues/8268) - Fixed clipping planes with non-uniform scale. [#9135](https://github.com/CesiumGS/cesium/pull/9135) - Fixed an issue where ground primitives would get clipped at certain camera angles. [#9114](https://github.com/CesiumGS/cesium/issues/9114) +- Fixed a bug that could cause half of the globe to disappear when setting the `terrainProvider. [#9161](https://github.com/CesiumGS/cesium/pull/9161) +- Fixed a crash when loading Cesium OSM buildings with shadows enabled. [#9172](https://github.com/CesiumGS/cesium/pull/9172) ### 1.73 - 2020-09-01 ##### Breaking Changes :mega: -- Removed `MapboxApi`, which was deprecated in v1.72. Pass your access token directly to the `MapboxImageryProvider` or `MapboxStyleImageryProvider` constructors. -- Removed `BingMapsApi`, which was deprecated in v1.72. Pass your access key directly to the `BingMapsImageryProvider` or `BingMapsGeocoderService` constructors. +- Removed `MapboxApi`, which was deprecated in CesiumJS 1.72. Pass your access token directly to the `MapboxImageryProvider` or `MapboxStyleImageryProvider` constructors. +- Removed `BingMapsApi`, which was deprecated in CesiumJS 1.72. Pass your access key directly to the `BingMapsImageryProvider` or `BingMapsGeocoderService` constructors. ##### Additions :tada: @@ -1107,7 +1188,7 @@ _This is an npm-only release to fix a publishing issue_. ##### Highlights :sparkler: -- Added experimental support for [3D Tiles Vector and Geometry data](https://github.com/CesiumGS/3d-tiles/tree/3d-tiles-next/TileFormats/VectorData). ([#4665](https://github.com/CesiumGS/cesium/pull/4665)) +- Added experimental support for [3D Tiles Vector and Geometry data](https://github.com/CesiumGS/3d-tiles/tree/vctr/TileFormats/VectorData). ([#4665](https://github.com/CesiumGS/cesium/pull/4665)) - Added optional mode to reduce CPU usage. See [Improving Performance with Explicit Rendering](https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/). ([#6115](https://github.com/CesiumGS/cesium/pull/6115)) - Added experimental `CesiumIon` utility class for working with the Cesium ion beta API. [#6136](https://github.com/CesiumGS/cesium/pull/6136) - Major refactor of URL handling. All classes that take a url parameter, can now take a Resource or a String. This includes all imagery providers, all terrain providers, `Cesium3DTileset`, `KMLDataSource`, `CZMLDataSource`, `GeoJsonDataSource`, `Model`, and `Billboard`. @@ -1123,7 +1204,7 @@ _This is an npm-only release to fix a publishing issue_. ##### Additions :tada: -- Added experimental support for [3D Tiles Vector and Geometry data](https://github.com/CesiumGS/3d-tiles/tree/3d-tiles-next/TileFormats/VectorData) ([#4665](https://github.com/CesiumGS/cesium/pull/4665)). The new and modified Cesium APIs are: +- Added experimental support for [3D Tiles Vector and Geometry data](https://github.com/CesiumGS/3d-tiles/tree/vctr/TileFormats/VectorData) ([#4665](https://github.com/CesiumGS/cesium/pull/4665)). The new and modified Cesium APIs are: - `Cesium3DTileStyle` has expanded to include styling point features. See the [styling specification](https://github.com/CesiumGS/3d-tiles/tree/vector-tiles/Styling#vector-data) for details. - `Cesium3DTileFeature` can modify `color` and `show` properties for polygon, polyline, and geometry features. - `Cesium3DTilePointFeature` can modify the styling options for a point feature. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index bfcbdacf4c0a..b4657dec66fd 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,5 +1,5 @@ # Code of Conduct -One of Cesium's strengths is our community. Our contributors and users are pushing the 3D geospatial field to amazing new levels. We rely on an open, friendly, inclusive environment to facilitate this. As such, we follow the [Contributor Covenant](http://contributor-covenant.org/)'s [Code of Conduct](http://contributor-covenant.org/version/1/4/code-of-conduct.md) to ensure a harassment-free experience in the Cesium community. Any unacceptable behavior can be confidentially sent to the core team at hello@cesium.com. +One of Cesium's strengths is our community. Our contributors and users are pushing the 3D geospatial field to amazing new levels. We rely on an open, friendly, inclusive environment to facilitate this. As such, we follow the [Contributor Covenant](https://www.contributor-covenant.org/)'s [Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/) to ensure a harassment-free experience in the Cesium community. Any unacceptable behavior can be confidentially sent to the core team at hello@cesium.com. This applies to the main Cesium repo, forum, twitter, and all channels, including all repos in the [CesiumGS](https://github.com/CesiumGS) GitHub organization. diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 6fe594eb9ade..b66f45ce29dd 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -149,6 +149,8 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu - [Eli Bogomolny](https://github.com/ebogo1) - [Erixen Cruz](https://github.com/ErixenCruz) - [Dzung Nguyen](https://github.com/dzungpng) + - [Nithin Pranesh](https://github.com/nithinp7) + - [Alexander Gallegos](https://github.com/argallegos) - [Northrop Grumman](http://www.northropgrumman.com) - [Joseph Stein](https://github.com/nahgrin) - [EOX IT Services GmbH](https://eox.at) @@ -278,3 +280,8 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu - [Gusain Vipul](https://github.com/vipulgusain) - [Sam Bakkach](https://github.com/sambakk) - [Zoran Kokeza](https://github.com/zoran995) +- [Benjamin Abb](https://github.com/benjaminabb) +- [Victor Turansky](https://github.com/turansky) +- [Will Jadkowski](https://github.com/willjad) +- [Mac Clayton](https://github.com/mclayton7) +- [Ben Murphy](https://github.com/littlemurph) diff --git a/Documentation/Contributors/BuildGuide/README.md b/Documentation/Contributors/BuildGuide/README.md index 77fa5b7038d4..926ba94f5218 100644 --- a/Documentation/Contributors/BuildGuide/README.md +++ b/Documentation/Contributors/BuildGuide/README.md @@ -138,7 +138,7 @@ Additional set up is required for deployment if you do not have commit access to ### Configure a Different S3 Bucket -It is possible to configure your `travis.yml` and `gulpfile.js` to deploy to a different S3 Bucket ([an Amazon Webservices storage unit](http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html)). If you are using the cesium-dev bucket and have valid credentials, skip to [Configure S3 Credentials](#configure-s3-credentials) +It is possible to configure your `travis.yml` and `gulpfile.cjs` to deploy to a different S3 Bucket ([an Amazon Webservices storage unit](http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html)). If you are using the cesium-dev bucket and have valid credentials, skip to [Configure S3 Credentials](#configure-s3-credentials) - In `travis.yml`, edit the following line: @@ -147,7 +147,7 @@ It is possible to configure your `travis.yml` and `gulpfile.js` to deploy to a d ``` - Edit `cesium-dev` to be the name of the S3 bucket you would like to deploy to -- In `gulpfile.js`, edit the following line: +- In `gulpfile.cjs`, edit the following line: ``` var travisDeployUrl = "http://cesium-dev.s3-website-us-east-1.amazonaws.com/cesium/"; diff --git a/Documentation/Contributors/CLAs/README.md b/Documentation/Contributors/CLAs/README.md new file mode 100644 index 000000000000..8541464b7014 --- /dev/null +++ b/Documentation/Contributors/CLAs/README.md @@ -0,0 +1,7 @@ +# Contributor License Agreements (CLA) + +Before we can review a pull request, we require a signed Contributor License Agreement. See [Contributing Guide](https://github.com/CesiumGS/cesium/blob/master/CONTRIBUTING.md#contributor-license-agreement-cla). + +CLAs are submitted electronically using a Google form. This folder contains PDF versions of the Google form for both the individual CLA and the corporate CLA. + +Maintainers can access the submitted CLA's [in this Google Drive folder](https://drive.google.com/drive/u/0/folders/1bLc_vxV5KvXVhO1E4Aqyi4dLjrL1jZPp). diff --git a/Documentation/Contributors/CodingGuide/README.md b/Documentation/Contributors/CodingGuide/README.md index 6e3f77a4a573..b1cb8f57b5a9 100644 --- a/Documentation/Contributors/CodingGuide/README.md +++ b/Documentation/Contributors/CodingGuide/README.md @@ -1000,7 +1000,7 @@ varying vec3 v_positionEC; v_positionEC = (czm_modelViewRelativeToEye * p).xyz; ``` -- When [GPU RTE](http://blogs.agi.com/insight3d/index.php/2008/09/03/precisions-precisions/) is used, `High` and `Low` suffixes define the high and low bits, respectively, e.g., +- When [GPU RTE](https://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm) is used, `High` and `Low` suffixes define the high and low bits, respectively, e.g., ```glsl attribute vec3 position3DHigh; diff --git a/LICENSE.md b/LICENSE.md index 0c99e6fa6fa4..ad2025faf76b 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -723,7 +723,7 @@ https://github.com/michaldrobot/ShaderFastLibs > The MIT License (MIT) > -> Copyright (c) <2014> +> Copyright (c) 2014 Michal Drobot > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -747,7 +747,7 @@ https://github.com/google/draco > License for the specific language governing permissions and limitations under > the License. -### DOMPUrify +### DOMPurify https://github.com/cure53/DOMPurify @@ -795,6 +795,28 @@ http://github.com/Esri/lerc/ > > http://github.com/Esri/lerc/ +### GraphemeSplitter + +https://github.com/orling/grapheme-splitter + +> The MIT License (MIT) +> +> Copyright (c) 2015 Orlin Georgiev +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +### bitmap-sdf + +https://github.com/dy/bitmap-sdf + +> (c) 2017 Dima Yv. MIT License +> +> Development supported by plot.ly. + # Tests The CesiumJS tests use the following third-party libraries and data. @@ -888,14 +910,6 @@ http://www.jshint.com/ > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. JSHint was forked from the 2010-12-16 edition of JSLint. -### bitmap-sdf - -https://github.com/dy/bitmap-sdf - -> (c) 2017 Dima Yv. MIT License -> -> Development supported by plot.ly. - ### Public domain data from Natural Earth Free vector and raster map data @ naturalearthdata.com @@ -972,17 +986,3 @@ https://github.com/logos ### Font Awesome Icon Font Awesome by Dave Gandy - http://fontawesome.io - -### GraphemeSplitter - -https://github.com/orling/grapheme-splitter - -> The MIT License (MIT) -> -> Copyright (c) 2015 Orlin Georgiev -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 6c6b57ecaeeb..99351f44c9e3 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@

-[![Build Status](https://travis-ci.org/CesiumGS/cesium.svg?branch=master)](https://travis-ci.org/CesiumGS/cesium)  +[![Build Status](https://travis-ci.org/CesiumGS/cesium.svg?branch=master)](https://travis-ci.org/CesiumGS/cesium) +[![npm](https://img.shields.io/npm/v/cesium)](https://www.npmjs.com/package/cesium) [![Docs](https://img.shields.io/badge/docs-online-orange.svg)](https://cesium.com/docs/) CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin. It uses WebGL for hardware-accelerated graphics, and is cross-platform, cross-browser, and tuned for dynamic-data visualization. diff --git a/Source/.eslintrc.json b/Source/.eslintrc.json new file mode 100644 index 000000000000..ae1f7412470b --- /dev/null +++ b/Source/.eslintrc.json @@ -0,0 +1,17 @@ +{ + "root": true, + "extends": [ + "../Tools/eslint-config-cesium/browser.js", + "prettier", + "plugin:es/restrict-to-es5" + ], + "plugins": [ + "html", + "es" + ], + "rules": { + "no-unused-vars": ["error", {"vars": "all", "args": "none"}], + "es/no-modules": "off", + "es/no-typed-arrays": "off" + } +} diff --git a/Source/Core/ArcGISTiledElevationTerrainProvider.js b/Source/Core/ArcGISTiledElevationTerrainProvider.js index 1a95dbeb81ed..84123c2729d0 100644 --- a/Source/Core/ArcGISTiledElevationTerrainProvider.js +++ b/Source/Core/ArcGISTiledElevationTerrainProvider.js @@ -304,7 +304,14 @@ Object.defineProperties(ArcGISTiledElevationTerrainProvider.prototype, { */ availability: { get: function () { - return undefined; + //>>includeStart('debug', pragmas.debug) + if (!this._ready) { + throw new DeveloperError( + "availability must not be called before the terrain provider is ready." + ); + } + //>>includeEnd('debug'); + return this._tilesAvailable; }, }, }); @@ -650,6 +657,7 @@ function requestAvailability(that, level, x, y) { // Mark whole area as having availability loaded that._tilesAvailablityLoaded.addAvailableTileRange( + level, xOffset, yOffset, xOffset + dim, diff --git a/Source/Core/BoundingRectangle.js b/Source/Core/BoundingRectangle.js index 46c92b767f26..f1d94f1ac326 100644 --- a/Source/Core/BoundingRectangle.js +++ b/Source/Core/BoundingRectangle.js @@ -294,7 +294,7 @@ BoundingRectangle.expand = function (rectangle, point, result) { * * @param {BoundingRectangle} left A rectangle to check for intersection. * @param {BoundingRectangle} right The other rectangle to check for intersection. - * @returns {Intersect} Intersect.INTESECTING if the rectangles intersect, Intersect.OUTSIDE otherwise. + * @returns {Intersect} Intersect.INTERSECTING if the rectangles intersect, Intersect.OUTSIDE otherwise. */ BoundingRectangle.intersect = function (left, right) { //>>includeStart('debug', pragmas.debug); @@ -354,7 +354,7 @@ BoundingRectangle.prototype.clone = function (result) { * Determines if this rectangle intersects with another. * * @param {BoundingRectangle} right A rectangle to check for intersection. - * @returns {Intersect} Intersect.INTESECTING if the rectangles intersect, Intersect.OUTSIDE otherwise. + * @returns {Intersect} Intersect.INTERSECTING if the rectangles intersect, Intersect.OUTSIDE otherwise. */ BoundingRectangle.prototype.intersect = function (right) { return BoundingRectangle.intersect(this, right); diff --git a/Source/Core/Cartesian2.js b/Source/Core/Cartesian2.js index 64a5ca0422bf..986b109eb4f4 100644 --- a/Source/Core/Cartesian2.js +++ b/Source/Core/Cartesian2.js @@ -406,6 +406,22 @@ Cartesian2.dot = function (left, right) { return left.x * right.x + left.y * right.y; }; +/** + * Computes the magnitude of the cross product that would result from implicitly setting the Z coordinate of the input vectors to 0 + * + * @param {Cartesian2} left The first Cartesian. + * @param {Cartesian2} right The second Cartesian. + * @returns {Number} The cross product. + */ +Cartesian2.cross = function (left, right) { + //>>includeStart('debug', pragmas.debug); + Check.typeOf.object("left", left); + Check.typeOf.object("right", right); + //>>includeEnd('debug'); + + return left.x * right.y - left.y * right.x; +}; + /** * Computes the componentwise product of two Cartesians. * diff --git a/Source/Core/Cartesian4.js b/Source/Core/Cartesian4.js index 3309b0749536..1c639db14a30 100644 --- a/Source/Core/Cartesian4.js +++ b/Source/Core/Cartesian4.js @@ -869,21 +869,18 @@ Cartesian4.prototype.toString = function () { return "(" + this.x + ", " + this.y + ", " + this.z + ", " + this.w + ")"; }; -var scratchFloatArray = new Float32Array(1); -var SHIFT_LEFT_8 = 256.0; -var SHIFT_LEFT_16 = 65536.0; -var SHIFT_LEFT_24 = 16777216.0; +// scratchU8Array and scratchF32Array are views into the same buffer +var scratchF32Array = new Float32Array(1); +var scratchU8Array = new Uint8Array(scratchF32Array.buffer); -var SHIFT_RIGHT_8 = 1.0 / SHIFT_LEFT_8; -var SHIFT_RIGHT_16 = 1.0 / SHIFT_LEFT_16; -var SHIFT_RIGHT_24 = 1.0 / SHIFT_LEFT_24; - -var BIAS = 38.0; +var testU32 = new Uint32Array([0x11223344]); +var testU8 = new Uint8Array(testU32.buffer); +var littleEndian = testU8[0] === 0x44; /** * Packs an arbitrary floating point value to 4 values representable using uint8. * - * @param {Number} value A floating point number + * @param {Number} value A floating point number. * @param {Cartesian4} [result] The Cartesian4 that will contain the packed float. * @returns {Cartesian4} A Cartesian4 representing the float packed to values in x, y, z, and w. */ @@ -896,34 +893,21 @@ Cartesian4.packFloat = function (value, result) { result = new Cartesian4(); } - // Force the value to 32 bit precision - scratchFloatArray[0] = value; - value = scratchFloatArray[0]; - - if (value === 0.0) { - return Cartesian4.clone(Cartesian4.ZERO, result); - } - - var sign = value < 0.0 ? 1.0 : 0.0; - var exponent; + // scratchU8Array and scratchF32Array are views into the same buffer + scratchF32Array[0] = value; - if (!isFinite(value)) { - value = 0.1; - exponent = BIAS; + if (littleEndian) { + result.x = scratchU8Array[0]; + result.y = scratchU8Array[1]; + result.z = scratchU8Array[2]; + result.w = scratchU8Array[3]; } else { - value = Math.abs(value); - exponent = Math.floor(CesiumMath.logBase(value, 10)) + 1.0; - value = value / Math.pow(10.0, exponent); + // convert from big-endian to little-endian + result.x = scratchU8Array[3]; + result.y = scratchU8Array[2]; + result.z = scratchU8Array[1]; + result.w = scratchU8Array[0]; } - - var temp = value * SHIFT_LEFT_8; - result.x = Math.floor(temp); - temp = (temp - result.x) * SHIFT_LEFT_8; - result.y = Math.floor(temp); - temp = (temp - result.y) * SHIFT_LEFT_8; - result.z = Math.floor(temp); - result.w = (exponent + BIAS) * 2.0 + sign; - return result; }; @@ -939,22 +923,19 @@ Cartesian4.unpackFloat = function (packedFloat) { Check.typeOf.object("packedFloat", packedFloat); //>>includeEnd('debug'); - var temp = packedFloat.w / 2.0; - var exponent = Math.floor(temp); - var sign = (temp - exponent) * 2.0; - exponent = exponent - BIAS; - - sign = sign * 2.0 - 1.0; - sign = -sign; - - if (exponent >= BIAS) { - return sign < 0.0 ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY; + // scratchU8Array and scratchF32Array are views into the same buffer + if (littleEndian) { + scratchU8Array[0] = packedFloat.x; + scratchU8Array[1] = packedFloat.y; + scratchU8Array[2] = packedFloat.z; + scratchU8Array[3] = packedFloat.w; + } else { + // convert from little-endian to big-endian + scratchU8Array[0] = packedFloat.w; + scratchU8Array[1] = packedFloat.z; + scratchU8Array[2] = packedFloat.y; + scratchU8Array[3] = packedFloat.x; } - - var unpacked = sign * packedFloat.x * SHIFT_RIGHT_8; - unpacked += sign * packedFloat.y * SHIFT_RIGHT_16; - unpacked += sign * packedFloat.z * SHIFT_RIGHT_24; - - return unpacked * Math.pow(10.0, exponent); + return scratchF32Array[0]; }; export default Cartesian4; diff --git a/Source/Core/CesiumTerrainProvider.js b/Source/Core/CesiumTerrainProvider.js index d4c9b9da8322..201bd9eb8c40 100644 --- a/Source/Core/CesiumTerrainProvider.js +++ b/Source/Core/CesiumTerrainProvider.js @@ -9,7 +9,7 @@ import DeveloperError from "./DeveloperError.js"; import Event from "./Event.js"; import GeographicTilingScheme from "./GeographicTilingScheme.js"; import WebMercatorTilingScheme from "./WebMercatorTilingScheme.js"; -import getStringFromTypedArray from "./getStringFromTypedArray.js"; +import getJsonFromTypedArray from "./getJsonFromTypedArray.js"; import HeightmapTerrainData from "./HeightmapTerrainData.js"; import IndexDatatype from "./IndexDatatype.js"; import OrientedBoundingBox from "./OrientedBoundingBox.js"; @@ -34,7 +34,6 @@ function LayerInformation(layer) { this.availabilityLevels = layer.availabilityLevels; this.availabilityTilesLoaded = layer.availabilityTilesLoaded; this.littleEndianExtensionSize = layer.littleEndianExtensionSize; - this.availabilityTilesLoaded = layer.availabilityTilesLoaded; this.availabilityPromiseCache = {}; } @@ -711,12 +710,11 @@ function createQuantizedMeshTerrainData(provider, buffer, level, x, y, layer) { ) { var stringLength = view.getUint32(pos, true); if (stringLength > 0) { - var jsonString = getStringFromTypedArray( + var metadata = getJsonFromTypedArray( new Uint8Array(buffer), pos + Uint32Array.BYTES_PER_ELEMENT, stringLength ); - var metadata = JSON.parse(jsonString); var availableTiles = metadata.available; if (defined(availableTiles)) { for (var offset = 0; offset < availableTiles.length; ++offset) { diff --git a/Source/Core/EasingFunction.js b/Source/Core/EasingFunction.js index c38aeddabad7..4521fda30d61 100644 --- a/Source/Core/EasingFunction.js +++ b/Source/Core/EasingFunction.js @@ -22,21 +22,21 @@ var EasingFunction = { * @type {EasingFunction.Callback} * @constant */ - QUADRACTIC_IN: Tween.Easing.Quadratic.In, + QUADRATIC_IN: Tween.Easing.Quadratic.In, /** * Quadratic out. * * @type {EasingFunction.Callback} * @constant */ - QUADRACTIC_OUT: Tween.Easing.Quadratic.Out, + QUADRATIC_OUT: Tween.Easing.Quadratic.Out, /** * Quadratic in then out. * * @type {EasingFunction.Callback} * @constant */ - QUADRACTIC_IN_OUT: Tween.Easing.Quadratic.InOut, + QUADRATIC_IN_OUT: Tween.Easing.Quadratic.InOut, /** * Cubic in. @@ -253,4 +253,5 @@ var EasingFunction = { * return time * (2.0 - time); * } */ + export default Object.freeze(EasingFunction); diff --git a/Source/Core/Ellipsoid.js b/Source/Core/Ellipsoid.js index 2b565cbef675..b3ad7ba36b18 100644 --- a/Source/Core/Ellipsoid.js +++ b/Source/Core/Ellipsoid.js @@ -359,7 +359,7 @@ Ellipsoid.prototype.geodeticSurfaceNormalCartographic = function ( * * @param {Cartesian3} cartesian The Cartesian position for which to to determine the surface normal. * @param {Cartesian3} [result] The object onto which to store the result. - * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided. + * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided, or undefined if a normal cannot be found. */ Ellipsoid.prototype.geodeticSurfaceNormal = function (cartesian, result) { if ( diff --git a/Source/Core/EllipsoidGeodesic.js b/Source/Core/EllipsoidGeodesic.js index 29272cf19e99..bc4720b93212 100644 --- a/Source/Core/EllipsoidGeodesic.js +++ b/Source/Core/EllipsoidGeodesic.js @@ -171,7 +171,7 @@ function vincentyInverseFormula( cosineTwiceSigmaMidpoint = cosineSigma - (2.0 * ss) / cosineSquaredAlpha; - if (isNaN(cosineTwiceSigmaMidpoint)) { + if (!isFinite(cosineTwiceSigmaMidpoint)) { cosineTwiceSigmaMidpoint = 0.0; } diff --git a/Source/Core/EllipsoidTangentPlane.js b/Source/Core/EllipsoidTangentPlane.js index 254e2891e27a..f0393ba95470 100644 --- a/Source/Core/EllipsoidTangentPlane.js +++ b/Source/Core/EllipsoidTangentPlane.js @@ -137,6 +137,7 @@ var tmp = new AxisAlignedBoundingBox(); * * @param {Cartesian3[]} cartesians The list of positions surrounding the center point. * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use. + * @returns {EllipsoidTangentPlane} The new instance of EllipsoidTangentPlane. */ EllipsoidTangentPlane.fromPoints = function (cartesians, ellipsoid) { //>>includeStart('debug', pragmas.debug); diff --git a/Source/Core/EncodedCartesian3.js b/Source/Core/EncodedCartesian3.js index ca0af127a89d..07b2d0561a7d 100644 --- a/Source/Core/EncodedCartesian3.js +++ b/Source/Core/EncodedCartesian3.js @@ -84,7 +84,7 @@ var scratchEncode = { * Encodes a {@link Cartesian3} with 64-bit floating-point components as two {@link Cartesian3} * values that, when converted to 32-bit floating-point and added, approximate the original input. *

- * The fixed-point encoding follows {@link http://blogs.agi.com/insight3d/index.php/2008/09/03/precisions-precisions/|Precisions, Precisions}. + * The fixed-point encoding follows {@link https://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}. *

* * @param {Cartesian3} cartesian The cartesian to encode. diff --git a/Source/Core/GoogleEarthEnterpriseMetadata.js b/Source/Core/GoogleEarthEnterpriseMetadata.js index da939555ae1c..feff17a4497f 100644 --- a/Source/Core/GoogleEarthEnterpriseMetadata.js +++ b/Source/Core/GoogleEarthEnterpriseMetadata.js @@ -291,10 +291,7 @@ GoogleEarthEnterpriseMetadata.prototype.isValid = function (quadKey) { return valid; }; -var taskProcessor = new TaskProcessor( - "decodeGoogleEarthEnterprisePacket", - Number.POSITIVE_INFINITY -); +var taskProcessor = new TaskProcessor("decodeGoogleEarthEnterprisePacket"); /** * Retrieves a Google Earth Enterprise quadtree packet. diff --git a/Source/Core/GoogleEarthEnterpriseTerrainData.js b/Source/Core/GoogleEarthEnterpriseTerrainData.js index f8137464e24f..c743ebf09e63 100644 --- a/Source/Core/GoogleEarthEnterpriseTerrainData.js +++ b/Source/Core/GoogleEarthEnterpriseTerrainData.js @@ -12,6 +12,7 @@ import OrientedBoundingBox from "./OrientedBoundingBox.js"; import QuantizedMeshTerrainData from "./QuantizedMeshTerrainData.js"; import Rectangle from "./Rectangle.js"; import TaskProcessor from "./TaskProcessor.js"; +import TerrainData from "./TerrainData.js"; import TerrainEncoding from "./TerrainEncoding.js"; import TerrainMesh from "./TerrainMesh.js"; @@ -116,8 +117,11 @@ Object.defineProperties(GoogleEarthEnterpriseTerrainData.prototype, { }, }); -var taskProcessor = new TaskProcessor( - "createVerticesFromGoogleEarthEnterpriseBuffer" +var createMeshTaskName = "createVerticesFromGoogleEarthEnterpriseBuffer"; +var createMeshTaskProcessorNoThrottle = new TaskProcessor(createMeshTaskName); +var createMeshTaskProcessorThrottle = new TaskProcessor( + createMeshTaskName, + TerrainData.maximumAsynchronousTasks ); var nativeRectangleScratch = new Rectangle(); @@ -128,33 +132,37 @@ var rectangleScratch = new Rectangle(); * * @private * - * @param {TilingScheme} tilingScheme The tiling scheme to which this tile belongs. - * @param {Number} x The X coordinate of the tile for which to create the terrain data. - * @param {Number} y The Y coordinate of the tile for which to create the terrain data. - * @param {Number} level The level of the tile for which to create the terrain data. - * @param {Number} [exaggeration=1.0] The scale used to exaggerate the terrain. + * @param {Object} options Object with the following properties: + * @param {TilingScheme} options.tilingScheme The tiling scheme to which this tile belongs. + * @param {Number} options.x The X coordinate of the tile for which to create the terrain data. + * @param {Number} options.y The Y coordinate of the tile for which to create the terrain data. + * @param {Number} options.level The level of the tile for which to create the terrain data. + * @param {Number} [options.exaggeration=1.0] The scale used to exaggerate the terrain. + * @param {Boolean} [options.throttle=true] If true, indicates that this operation will need to be retried if too many asynchronous mesh creations are already in progress. * @returns {Promise.|undefined} A promise for the terrain mesh, or undefined if too many * asynchronous mesh creations are already in progress and the operation should * be retried later. */ -GoogleEarthEnterpriseTerrainData.prototype.createMesh = function ( - tilingScheme, - x, - y, - level, - exaggeration -) { +GoogleEarthEnterpriseTerrainData.prototype.createMesh = function (options) { + options = defaultValue(options, defaultValue.EMPTY_OBJECT); + //>>includeStart('debug', pragmas.debug); - Check.typeOf.object("tilingScheme", tilingScheme); - Check.typeOf.number("x", x); - Check.typeOf.number("y", y); - Check.typeOf.number("level", level); + Check.typeOf.object("options.tilingScheme", options.tilingScheme); + Check.typeOf.number("options.x", options.x); + Check.typeOf.number("options.y", options.y); + Check.typeOf.number("options.level", options.level); //>>includeEnd('debug'); + var tilingScheme = options.tilingScheme; + var x = options.x; + var y = options.y; + var level = options.level; + var exaggeration = defaultValue(options.exaggeration, 1.0); + var throttle = defaultValue(options.throttle, true); + var ellipsoid = tilingScheme.ellipsoid; tilingScheme.tileXYToNativeRectangle(x, y, level, nativeRectangleScratch); tilingScheme.tileXYToRectangle(x, y, level, rectangleScratch); - exaggeration = defaultValue(exaggeration, 1.0); // Compute the center of the tile for RTC rendering. var center = ellipsoid.cartographicToCartesian( @@ -165,7 +173,11 @@ GoogleEarthEnterpriseTerrainData.prototype.createMesh = function ( var thisLevelMaxError = levelZeroMaxError / (1 << level); this._skirtHeight = Math.min(thisLevelMaxError * 8.0, 1000.0); - var verticesPromise = taskProcessor.scheduleTask({ + var createMeshTaskProcessor = throttle + ? createMeshTaskProcessorThrottle + : createMeshTaskProcessorNoThrottle; + + var verticesPromise = createMeshTaskProcessor.scheduleTask({ buffer: this._buffer, nativeRectangle: nativeRectangleScratch, rectangle: rectangleScratch, @@ -249,7 +261,10 @@ GoogleEarthEnterpriseTerrainData.prototype.interpolateHeight = function ( return interpolateMeshHeight(this, u, v); }; -var upsampleTaskProcessor = new TaskProcessor("upsampleQuantizedTerrainMesh"); +var upsampleTaskProcessor = new TaskProcessor( + "upsampleQuantizedTerrainMesh", + TerrainData.maximumAsynchronousTasks +); /** * Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the diff --git a/Source/Core/GoogleEarthEnterpriseTerrainProvider.js b/Source/Core/GoogleEarthEnterpriseTerrainProvider.js index d69cbfec5fdd..9d3e14079199 100644 --- a/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +++ b/Source/Core/GoogleEarthEnterpriseTerrainProvider.js @@ -314,10 +314,7 @@ Object.defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype, { }, }); -var taskProcessor = new TaskProcessor( - "decodeGoogleEarthEnterprisePacket", - Number.POSITIVE_INFINITY -); +var taskProcessor = new TaskProcessor("decodeGoogleEarthEnterprisePacket"); // If the tile has its own terrain, then you can just use its child bitmask. If it was requested using it's parent // then you need to check all of its children to see if they have terrain. diff --git a/Source/Core/HeightmapTerrainData.js b/Source/Core/HeightmapTerrainData.js index 949ce5c1b6d7..ec4f4e6df771 100644 --- a/Source/Core/HeightmapTerrainData.js +++ b/Source/Core/HeightmapTerrainData.js @@ -1,6 +1,7 @@ import when from "../ThirdParty/when.js"; import BoundingSphere from "./BoundingSphere.js"; import Cartesian3 from "./Cartesian3.js"; +import Check from "./Check.js"; import defaultValue from "./defaultValue.js"; import defined from "./defined.js"; import DeveloperError from "./DeveloperError.js"; @@ -11,6 +12,7 @@ import CesiumMath from "./Math.js"; import OrientedBoundingBox from "./OrientedBoundingBox.js"; import Rectangle from "./Rectangle.js"; import TaskProcessor from "./TaskProcessor.js"; +import TerrainData from "./TerrainData.js"; import TerrainEncoding from "./TerrainEncoding.js"; import TerrainMesh from "./TerrainMesh.js"; import TerrainProvider from "./TerrainProvider.js"; @@ -182,48 +184,49 @@ Object.defineProperties(HeightmapTerrainData.prototype, { }, }); -var taskProcessor = new TaskProcessor("createVerticesFromHeightmap"); +var createMeshTaskName = "createVerticesFromHeightmap"; +var createMeshTaskProcessorNoThrottle = new TaskProcessor(createMeshTaskName); +var createMeshTaskProcessorThrottle = new TaskProcessor( + createMeshTaskName, + TerrainData.maximumAsynchronousTasks +); /** * Creates a {@link TerrainMesh} from this terrain data. * * @private * - * @param {TilingScheme} tilingScheme The tiling scheme to which this tile belongs. - * @param {Number} x The X coordinate of the tile for which to create the terrain data. - * @param {Number} y The Y coordinate of the tile for which to create the terrain data. - * @param {Number} level The level of the tile for which to create the terrain data. - * @param {Number} [exaggeration=1.0] The scale used to exaggerate the terrain. + * @param {Object} options Object with the following properties: + * @param {TilingScheme} options.tilingScheme The tiling scheme to which this tile belongs. + * @param {Number} options.x The X coordinate of the tile for which to create the terrain data. + * @param {Number} options.y The Y coordinate of the tile for which to create the terrain data. + * @param {Number} options.level The level of the tile for which to create the terrain data. + * @param {Number} [options.exaggeration=1.0] The scale used to exaggerate the terrain. + * @param {Boolean} [options.throttle=true] If true, indicates that this operation will need to be retried if too many asynchronous mesh creations are already in progress. * @returns {Promise.|undefined} A promise for the terrain mesh, or undefined if too many * asynchronous mesh creations are already in progress and the operation should * be retried later. */ -HeightmapTerrainData.prototype.createMesh = function ( - tilingScheme, - x, - y, - level, - exaggeration -) { +HeightmapTerrainData.prototype.createMesh = function (options) { + options = defaultValue(options, defaultValue.EMPTY_OBJECT); + //>>includeStart('debug', pragmas.debug); - if (!defined(tilingScheme)) { - throw new DeveloperError("tilingScheme is required."); - } - if (!defined(x)) { - throw new DeveloperError("x is required."); - } - if (!defined(y)) { - throw new DeveloperError("y is required."); - } - if (!defined(level)) { - throw new DeveloperError("level is required."); - } + Check.typeOf.object("options.tilingScheme", options.tilingScheme); + Check.typeOf.number("options.x", options.x); + Check.typeOf.number("options.y", options.y); + Check.typeOf.number("options.level", options.level); //>>includeEnd('debug'); + var tilingScheme = options.tilingScheme; + var x = options.x; + var y = options.y; + var level = options.level; + var exaggeration = defaultValue(options.exaggeration, 1.0); + var throttle = defaultValue(options.throttle, true); + var ellipsoid = tilingScheme.ellipsoid; var nativeRectangle = tilingScheme.tileXYToNativeRectangle(x, y, level); var rectangle = tilingScheme.tileXYToRectangle(x, y, level); - exaggeration = defaultValue(exaggeration, 1.0); // Compute the center of the tile for RTC rendering. var center = ellipsoid.cartographicToCartesian(Rectangle.center(rectangle)); @@ -238,7 +241,11 @@ HeightmapTerrainData.prototype.createMesh = function ( var thisLevelMaxError = levelZeroMaxError / (1 << level); this._skirtHeight = Math.min(thisLevelMaxError * 4.0, 1000.0); - var verticesPromise = taskProcessor.scheduleTask({ + var createMeshTaskProcessor = throttle + ? createMeshTaskProcessorThrottle + : createMeshTaskProcessorNoThrottle; + + var verticesPromise = createMeshTaskProcessor.scheduleTask({ heightmap: this._buffer, structure: structure, includeWebMercatorT: true, @@ -305,34 +312,32 @@ HeightmapTerrainData.prototype.createMesh = function ( }; /** + * @param {Object} options Object with the following properties: + * @param {TilingScheme} options.tilingScheme The tiling scheme to which this tile belongs. + * @param {Number} options.x The X coordinate of the tile for which to create the terrain data. + * @param {Number} options.y The Y coordinate of the tile for which to create the terrain data. + * @param {Number} options.level The level of the tile for which to create the terrain data. + * @param {Number} [options.exaggeration=1.0] The scale used to exaggerate the terrain. + * * @private */ -HeightmapTerrainData.prototype._createMeshSync = function ( - tilingScheme, - x, - y, - level, - exaggeration -) { +HeightmapTerrainData.prototype._createMeshSync = function (options) { //>>includeStart('debug', pragmas.debug); - if (!defined(tilingScheme)) { - throw new DeveloperError("tilingScheme is required."); - } - if (!defined(x)) { - throw new DeveloperError("x is required."); - } - if (!defined(y)) { - throw new DeveloperError("y is required."); - } - if (!defined(level)) { - throw new DeveloperError("level is required."); - } + Check.typeOf.object("options.tilingScheme", options.tilingScheme); + Check.typeOf.number("options.x", options.x); + Check.typeOf.number("options.y", options.y); + Check.typeOf.number("options.level", options.level); //>>includeEnd('debug'); + var tilingScheme = options.tilingScheme; + var x = options.x; + var y = options.y; + var level = options.level; + var exaggeration = defaultValue(options.exaggeration, 1.0); + var ellipsoid = tilingScheme.ellipsoid; var nativeRectangle = tilingScheme.tileXYToNativeRectangle(x, y, level); var rectangle = tilingScheme.tileXYToRectangle(x, y, level); - exaggeration = defaultValue(exaggeration, 1.0); // Compute the center of the tile for RTC rendering. var center = ellipsoid.cartographicToCartesian(Rectangle.center(rectangle)); @@ -429,8 +434,18 @@ HeightmapTerrainData.prototype.interpolateHeight = function ( var heightOffset = structure.heightOffset; var heightScale = structure.heightScale; + var isMeshCreated = defined(this._mesh); + var isLERCEncoding = this._encoding === HeightmapEncoding.LERC; + var isInterpolationImpossible = !isMeshCreated && isLERCEncoding; + if (isInterpolationImpossible) { + // We can't interpolate using the buffer because it's LERC encoded + // so please call createMesh() first and interpolate using the mesh; + // as mesh creation will decode the LERC buffer + return undefined; + } + var heightSample; - if (defined(this._mesh)) { + if (isMeshCreated) { var buffer = this._mesh.vertices; var encoding = this._mesh.encoding; var exaggeration = this._mesh.exaggeration; diff --git a/Source/Core/Ion.js b/Source/Core/Ion.js index a933202087cc..34996a27e4cb 100644 --- a/Source/Core/Ion.js +++ b/Source/Core/Ion.js @@ -4,7 +4,7 @@ import Resource from "./Resource.js"; var defaultTokenCredit; var defaultAccessToken = - "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJlMmMyYTQyMi1lZGQxLTQyOWMtYjUwMi0yODQ2MTQxMGNmY2EiLCJpZCI6MjU5LCJpYXQiOjE1OTg5MzY5NDJ9.0FgFKa__M3-3mGCAh_8Zr7bdG9UHbDcjXG6leLb3HVA"; + "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI4NTVhMjg4My1iNGI2LTRhNzgtOTQ0My1mYjA4MTNjMTJiYjQiLCJpZCI6MjU5LCJpYXQiOjE2MTQ1ODE4MDB9.FeIKU_q_xmSAPeRgrOYaJAWmHFGIvy6i-p_Zk9mweEw"; /** * Default settings for accessing the Cesium ion API. * diff --git a/Source/Core/IonResource.js b/Source/Core/IonResource.js index 8a5512775a34..9751230a3a21 100644 --- a/Source/Core/IonResource.js +++ b/Source/Core/IonResource.js @@ -227,11 +227,16 @@ function retryCallback(that, error) { var ionRoot = defaultValue(that._ionRoot, that); var endpointResource = ionRoot._ionEndpointResource; + // Image is not available in worker threads, so this avoids + // a ReferenceError + var imageDefined = typeof Image !== "undefined"; + // We only want to retry in the case of invalid credentials (401) or image // requests(since Image failures can not provide a status code) if ( !defined(error) || - (error.statusCode !== 401 && !(error.target instanceof Image)) + (error.statusCode !== 401 && + !(imageDefined && error.target instanceof Image)) ) { return when.resolve(false); } diff --git a/Source/Core/MapProjection.js b/Source/Core/MapProjection.js index e4391504595f..f630e69575d8 100644 --- a/Source/Core/MapProjection.js +++ b/Source/Core/MapProjection.js @@ -6,6 +6,7 @@ import DeveloperError from "./DeveloperError.js"; * * @alias MapProjection * @constructor + * @abstract * * @see GeographicProjection * @see WebMercatorProjection diff --git a/Source/Core/Math.js b/Source/Core/Math.js index cf8bc84ef8c7..74070982d142 100644 --- a/Source/Core/Math.js +++ b/Source/Core/Math.js @@ -205,6 +205,7 @@ CesiumMath.FOUR_GIGABYTES = 4 * 1024 * 1024 * 1024; * @param {Number} value The value to return the sign of. * @returns {Number} The sign of value. */ +// eslint-disable-next-line es/no-math-sign CesiumMath.sign = defaultValue(Math.sign, function sign(value) { value = +value; // coerce to number if (value === 0 || value !== value) { @@ -291,6 +292,7 @@ CesiumMath.normalize = function (value, rangeMinimum, rangeMaximum) { * @param {Number} value The number whose hyperbolic sine is to be returned. * @returns {Number} The hyperbolic sine of value. */ +// eslint-disable-next-line es/no-math-sinh CesiumMath.sinh = defaultValue(Math.sinh, function sinh(value) { return (Math.exp(value) - Math.exp(-value)) / 2.0; }); @@ -315,6 +317,7 @@ CesiumMath.sinh = defaultValue(Math.sinh, function sinh(value) { * @param {Number} value The number whose hyperbolic cosine is to be returned. * @returns {Number} The hyperbolic cosine of value. */ +// eslint-disable-next-line es/no-math-cosh CesiumMath.cosh = defaultValue(Math.cosh, function cosh(value) { return (Math.exp(value) + Math.exp(-value)) / 2.0; }); @@ -525,6 +528,11 @@ CesiumMath.negativePiToPi = function (angle) { throw new DeveloperError("angle is required."); } //>>includeEnd('debug'); + if (angle >= -CesiumMath.PI && angle <= CesiumMath.PI) { + // Early exit if the input is already inside the range. This avoids + // unnecessary math which could introduce floating point error. + return angle; + } return CesiumMath.zeroToTwoPi(angle + CesiumMath.PI) - CesiumMath.PI; }; @@ -540,6 +548,11 @@ CesiumMath.zeroToTwoPi = function (angle) { throw new DeveloperError("angle is required."); } //>>includeEnd('debug'); + if (angle >= 0 && angle <= CesiumMath.TWO_PI) { + // Early exit if the input is already inside the range. This avoids + // unnecessary math which could introduce floating point error. + return angle; + } var mod = CesiumMath.mod(angle, CesiumMath.TWO_PI); if ( Math.abs(mod) < CesiumMath.EPSILON14 && @@ -565,7 +578,16 @@ CesiumMath.mod = function (m, n) { if (!defined(n)) { throw new DeveloperError("n is required."); } + if (n === 0.0) { + throw new DeveloperError("divisor cannot be 0."); + } //>>includeEnd('debug'); + if (CesiumMath.sign(m) === CesiumMath.sign(n) && Math.abs(m) < Math.abs(n)) { + // Early exit if the input does not need to be modded. This avoids + // unnecessary math which could introduce floating point error. + return m; + } + return ((m % n) + n) % n; }; @@ -631,7 +653,7 @@ CesiumMath.lessThan = function (left, right, absoluteEpsilon) { throw new DeveloperError("second is required."); } if (!defined(absoluteEpsilon)) { - throw new DeveloperError("relativeEpsilon is required."); + throw new DeveloperError("absoluteEpsilon is required."); } //>>includeEnd('debug'); return left - right < -absoluteEpsilon; @@ -656,7 +678,7 @@ CesiumMath.lessThanOrEquals = function (left, right, absoluteEpsilon) { throw new DeveloperError("second is required."); } if (!defined(absoluteEpsilon)) { - throw new DeveloperError("relativeEpsilon is required."); + throw new DeveloperError("absoluteEpsilon is required."); } //>>includeEnd('debug'); return left - right < absoluteEpsilon; @@ -682,7 +704,7 @@ CesiumMath.greaterThan = function (left, right, absoluteEpsilon) { throw new DeveloperError("second is required."); } if (!defined(absoluteEpsilon)) { - throw new DeveloperError("relativeEpsilon is required."); + throw new DeveloperError("absoluteEpsilon is required."); } //>>includeEnd('debug'); return left - right > absoluteEpsilon; @@ -707,7 +729,7 @@ CesiumMath.greaterThanOrEquals = function (left, right, absoluteEpsilon) { throw new DeveloperError("second is required."); } if (!defined(absoluteEpsilon)) { - throw new DeveloperError("relativeEpsilon is required."); + throw new DeveloperError("absoluteEpsilon is required."); } //>>includeEnd('debug'); return left - right > -absoluteEpsilon; @@ -785,12 +807,13 @@ CesiumMath.incrementWrap = function (n, maximumValue, minimumValue) { }; /** - * Determines if a positive integer is a power of two. + * Determines if a non-negative integer is a power of two. + * The maximum allowed input is (2^32)-1 due to 32-bit bitwise operator limitation in Javascript. * - * @param {Number} n The positive integer to test. + * @param {Number} n The integer to test in the range [0, (2^32)-1]. * @returns {Boolean} true if the number if a power of two; otherwise, false. * - * @exception {DeveloperError} A number greater than or equal to 0 is required. + * @exception {DeveloperError} A number between 0 and (2^32)-1 is required. * * @example * var t = Cesium.Math.isPowerOfTwo(16); // true @@ -798,10 +821,8 @@ CesiumMath.incrementWrap = function (n, maximumValue, minimumValue) { */ CesiumMath.isPowerOfTwo = function (n) { //>>includeStart('debug', pragmas.debug); - if (typeof n !== "number" || n < 0) { - throw new DeveloperError( - "A number greater than or equal to 0 is required." - ); + if (typeof n !== "number" || n < 0 || n > 4294967295) { + throw new DeveloperError("A number between 0 and (2^32)-1 is required."); } //>>includeEnd('debug'); @@ -809,12 +830,13 @@ CesiumMath.isPowerOfTwo = function (n) { }; /** - * Computes the next power-of-two integer greater than or equal to the provided positive integer. + * Computes the next power-of-two integer greater than or equal to the provided non-negative integer. + * The maximum allowed input is 2^31 due to 32-bit bitwise operator limitation in Javascript. * - * @param {Number} n The positive integer to test. + * @param {Number} n The integer to test in the range [0, 2^31]. * @returns {Number} The next power-of-two integer. * - * @exception {DeveloperError} A number greater than or equal to 0 is required. + * @exception {DeveloperError} A number between 0 and 2^31 is required. * * @example * var n = Cesium.Math.nextPowerOfTwo(29); // 32 @@ -822,10 +844,8 @@ CesiumMath.isPowerOfTwo = function (n) { */ CesiumMath.nextPowerOfTwo = function (n) { //>>includeStart('debug', pragmas.debug); - if (typeof n !== "number" || n < 0) { - throw new DeveloperError( - "A number greater than or equal to 0 is required." - ); + if (typeof n !== "number" || n < 0 || n > 2147483648) { + throw new DeveloperError("A number between 0 and 2^31 is required."); } //>>includeEnd('debug'); @@ -841,6 +861,39 @@ CesiumMath.nextPowerOfTwo = function (n) { return n; }; +/** + * Computes the previous power-of-two integer less than or equal to the provided non-negative integer. + * The maximum allowed input is (2^32)-1 due to 32-bit bitwise operator limitation in Javascript. + * + * @param {Number} n The integer to test in the range [0, (2^32)-1]. + * @returns {Number} The previous power-of-two integer. + * + * @exception {DeveloperError} A number between 0 and (2^32)-1 is required. + * + * @example + * var n = Cesium.Math.previousPowerOfTwo(29); // 16 + * var m = Cesium.Math.previousPowerOfTwo(32); // 32 + */ +CesiumMath.previousPowerOfTwo = function (n) { + //>>includeStart('debug', pragmas.debug); + if (typeof n !== "number" || n < 0 || n > 4294967295) { + throw new DeveloperError("A number between 0 and (2^32)-1 is required."); + } + //>>includeEnd('debug'); + + n |= n >> 1; + n |= n >> 2; + n |= n >> 4; + n |= n >> 8; + n |= n >> 16; + n |= n >> 32; + + // The previous bitwise operations implicitly convert to signed 32-bit. Use `>>>` to convert to unsigned + n = (n >>> 0) - (n >>> 1); + + return n; +}; + /** * Constraint a value to lie between two values. * @@ -986,6 +1039,7 @@ CesiumMath.logBase = function (number, base) { * @param {Number} [number] The number. * @returns {Number} The result. */ +// eslint-disable-next-line es/no-math-cbrt CesiumMath.cbrt = defaultValue(Math.cbrt, function cbrt(number) { var result = Math.pow(Math.abs(number), 1.0 / 3.0); return number < 0.0 ? -result : result; @@ -998,6 +1052,7 @@ CesiumMath.cbrt = defaultValue(Math.cbrt, function cbrt(number) { * @param {Number} number The number. * @returns {Number} The result. */ +// eslint-disable-next-line es/no-math-log2 CesiumMath.log2 = defaultValue(Math.log2, function log2(number) { return Math.log(number) * Math.LOG2E; }); diff --git a/Source/Core/PolylineVolumeGeometry.js b/Source/Core/PolylineVolumeGeometry.js index c5c8d3e5f335..3fc156167293 100644 --- a/Source/Core/PolylineVolumeGeometry.js +++ b/Source/Core/PolylineVolumeGeometry.js @@ -176,7 +176,7 @@ function computeAttributes( * @constructor * * @param {Object} options Object with the following properties: - * @param {Cartesian3[]} options.polylinePositions An array of {@link Cartesain3} positions that define the center of the polyline volume. + * @param {Cartesian3[]} options.polylinePositions An array of {@link Cartesian3} positions that define the center of the polyline volume. * @param {Cartesian2[]} options.shapePositions An array of {@link Cartesian2} positions that define the shape to be extruded along the polyline * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference. * @param {Number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer. diff --git a/Source/Core/QuantizedMeshTerrainData.js b/Source/Core/QuantizedMeshTerrainData.js index 8bd031b9174b..ebf65f8cfa14 100644 --- a/Source/Core/QuantizedMeshTerrainData.js +++ b/Source/Core/QuantizedMeshTerrainData.js @@ -2,6 +2,7 @@ import when from "../ThirdParty/when.js"; import BoundingSphere from "./BoundingSphere.js"; import Cartesian2 from "./Cartesian2.js"; import Cartesian3 from "./Cartesian3.js"; +import Check from "./Check.js"; import defaultValue from "./defaultValue.js"; import defined from "./defined.js"; import DeveloperError from "./DeveloperError.js"; @@ -10,6 +11,7 @@ import Intersections2D from "./Intersections2D.js"; import CesiumMath from "./Math.js"; import OrientedBoundingBox from "./OrientedBoundingBox.js"; import TaskProcessor from "./TaskProcessor.js"; +import TerrainData from "./TerrainData.js"; import TerrainEncoding from "./TerrainEncoding.js"; import TerrainMesh from "./TerrainMesh.js"; @@ -262,8 +264,11 @@ function sortIndicesIfNecessary(indices, sortFunction, vertexCount) { return indices; } -var createMeshTaskProcessor = new TaskProcessor( - "createVerticesFromQuantizedTerrainMesh" +var createMeshTaskName = "createVerticesFromQuantizedTerrainMesh"; +var createMeshTaskProcessorNoThrottle = new TaskProcessor(createMeshTaskName); +var createMeshTaskProcessorThrottle = new TaskProcessor( + createMeshTaskName, + TerrainData.maximumAsynchronousTasks ); /** @@ -271,40 +276,40 @@ var createMeshTaskProcessor = new TaskProcessor( * * @private * - * @param {TilingScheme} tilingScheme The tiling scheme to which this tile belongs. - * @param {Number} x The X coordinate of the tile for which to create the terrain data. - * @param {Number} y The Y coordinate of the tile for which to create the terrain data. - * @param {Number} level The level of the tile for which to create the terrain data. - * @param {Number} [exaggeration=1.0] The scale used to exaggerate the terrain. + * @param {Object} options Object with the following properties: + * @param {TilingScheme} options.tilingScheme The tiling scheme to which this tile belongs. + * @param {Number} options.x The X coordinate of the tile for which to create the terrain data. + * @param {Number} options.y The Y coordinate of the tile for which to create the terrain data. + * @param {Number} options.level The level of the tile for which to create the terrain data. + * @param {Number} [options.exaggeration=1.0] The scale used to exaggerate the terrain. + * @param {Boolean} [options.throttle=true] If true, indicates that this operation will need to be retried if too many asynchronous mesh creations are already in progress. * @returns {Promise.|undefined} A promise for the terrain mesh, or undefined if too many * asynchronous mesh creations are already in progress and the operation should * be retried later. */ -QuantizedMeshTerrainData.prototype.createMesh = function ( - tilingScheme, - x, - y, - level, - exaggeration -) { +QuantizedMeshTerrainData.prototype.createMesh = function (options) { + options = defaultValue(options, defaultValue.EMPTY_OBJECT); + //>>includeStart('debug', pragmas.debug); - if (!defined(tilingScheme)) { - throw new DeveloperError("tilingScheme is required."); - } - if (!defined(x)) { - throw new DeveloperError("x is required."); - } - if (!defined(y)) { - throw new DeveloperError("y is required."); - } - if (!defined(level)) { - throw new DeveloperError("level is required."); - } + Check.typeOf.object("options.tilingScheme", options.tilingScheme); + Check.typeOf.number("options.x", options.x); + Check.typeOf.number("options.y", options.y); + Check.typeOf.number("options.level", options.level); //>>includeEnd('debug'); + var tilingScheme = options.tilingScheme; + var x = options.x; + var y = options.y; + var level = options.level; + var exaggeration = defaultValue(options.exaggeration, 1.0); + var throttle = defaultValue(options.throttle, true); + var ellipsoid = tilingScheme.ellipsoid; var rectangle = tilingScheme.tileXYToRectangle(x, y, level); - exaggeration = defaultValue(exaggeration, 1.0); + + var createMeshTaskProcessor = throttle + ? createMeshTaskProcessorThrottle + : createMeshTaskProcessorNoThrottle; var verticesPromise = createMeshTaskProcessor.scheduleTask({ minimumHeight: this._minimumHeight, @@ -405,7 +410,10 @@ QuantizedMeshTerrainData.prototype.createMesh = function ( }); }; -var upsampleTaskProcessor = new TaskProcessor("upsampleQuantizedTerrainMesh"); +var upsampleTaskProcessor = new TaskProcessor( + "upsampleQuantizedTerrainMesh", + TerrainData.maximumAsynchronousTasks +); /** * Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the diff --git a/Source/Core/TaskProcessor.js b/Source/Core/TaskProcessor.js index 140474748767..41f1f390b580 100644 --- a/Source/Core/TaskProcessor.js +++ b/Source/Core/TaskProcessor.js @@ -1,3 +1,4 @@ +import Uri from "../ThirdParty/Uri.js"; import when from "../ThirdParty/when.js"; import buildModuleUrl from "./buildModuleUrl.js"; import defaultValue from "./defaultValue.js"; @@ -142,7 +143,7 @@ function createWorker(processor) { }, baseUrl: buildModuleUrl.getCesiumBaseUrl().url, }, - workerModule: TaskProcessor._workerModulePrefix + processor._workerName, + workerModule: processor._workerPath, }; worker.postMessage(bootstrapMessage); @@ -165,7 +166,7 @@ function getWebAssemblyLoaderConfig(processor, wasmOptions) { if (!defined(wasmOptions.fallbackModulePath)) { throw new RuntimeError( "This browser does not support Web Assembly, and no backup module was provided for " + - processor._workerName + processor._workerPath ); } @@ -193,15 +194,19 @@ function getWebAssemblyLoaderConfig(processor, wasmOptions) { * @alias TaskProcessor * @constructor * - * @param {String} workerName The name of the worker. This is expected to be a script - * in the Workers folder. - * @param {Number} [maximumActiveTasks=5] The maximum number of active tasks. Once exceeded, + * @param {String} workerPath The Url to the worker. This can either be an absolute path or relative to the Cesium Workers folder. + * @param {Number} [maximumActiveTasks=Number.POSITIVE_INFINITY] The maximum number of active tasks. Once exceeded, * scheduleTask will not queue any more tasks, allowing * work to be rescheduled in future frames. */ -function TaskProcessor(workerName, maximumActiveTasks) { - this._workerName = workerName; - this._maximumActiveTasks = defaultValue(maximumActiveTasks, 5); +function TaskProcessor(workerPath, maximumActiveTasks) { + this._workerPath = new Uri(workerPath).isAbsolute() + ? workerPath + : TaskProcessor._workerModulePrefix + workerPath; + this._maximumActiveTasks = defaultValue( + maximumActiveTasks, + Number.POSITIVE_INFINITY + ); this._activeTasks = 0; this._deferreds = {}; this._nextID = 0; @@ -222,7 +227,7 @@ var emptyTransferableObjectArray = []; * if there are too many active tasks, * * @example - * var taskProcessor = new Cesium.TaskProcessor('myWorkerName'); + * var taskProcessor = new Cesium.TaskProcessor('myWorkerPath'); * var promise = taskProcessor.scheduleTask({ * someParameter : true, * another : 'hello' diff --git a/Source/Core/TerrainData.js b/Source/Core/TerrainData.js index a76e95e998f4..9376ead48370 100644 --- a/Source/Core/TerrainData.js +++ b/Source/Core/TerrainData.js @@ -71,10 +71,13 @@ TerrainData.prototype.isChildAvailable = DeveloperError.throwInstantiationError; * * @private * - * @param {TilingScheme} tilingScheme The tiling scheme to which this tile belongs. - * @param {Number} x The X coordinate of the tile for which to create the terrain data. - * @param {Number} y The Y coordinate of the tile for which to create the terrain data. - * @param {Number} level The level of the tile for which to create the terrain data. + * @param {Object} options Object with the following properties: + * @param {TilingScheme} options.tilingScheme The tiling scheme to which this tile belongs. + * @param {Number} options.x The X coordinate of the tile for which to create the terrain data. + * @param {Number} options.y The Y coordinate of the tile for which to create the terrain data. + * @param {Number} options.level The level of the tile for which to create the terrain data. + * @param {Number} [options.exaggeration=1.0] The scale used to exaggerate the terrain. + * @param {Boolean} [options.throttle=true] If true, indicates that this operation will need to be retried if too many asynchronous mesh creations are already in progress. * @returns {Promise.|undefined} A promise for the terrain mesh, or undefined if too many * asynchronous mesh creations are already in progress and the operation should * be retried later. @@ -109,4 +112,13 @@ TerrainData.prototype.upsample = DeveloperError.throwInstantiationError; */ TerrainData.prototype.wasCreatedByUpsampling = DeveloperError.throwInstantiationError; + +/** + * The maximum number of asynchronous tasks used for terrain processing. + * + * @type {Number} + * @private + */ +TerrainData.maximumAsynchronousTasks = 5; + export default TerrainData; diff --git a/Source/Core/getJsonFromTypedArray.js b/Source/Core/getJsonFromTypedArray.js new file mode 100644 index 000000000000..02db059e05d4 --- /dev/null +++ b/Source/Core/getJsonFromTypedArray.js @@ -0,0 +1,21 @@ +import getStringFromTypedArray from "./getStringFromTypedArray.js"; + +/** + * Parses JSON from a Uint8Array. + * + * @function + * + * @param {Uint8Array} uint8Array The Uint8Array to read from. + * @param {Number} [byteOffset=0] The byte offset to start reading from. + * @param {Number} [byteLength] The byte length to read. If byteLength is omitted the remainder of the buffer is read. + * @returns {Object} An object containing the parsed JSON. + * + * @private + */ +function getJsonFromTypedArray(uint8Array, byteOffset, byteLength) { + return JSON.parse( + getStringFromTypedArray(uint8Array, byteOffset, byteLength) + ); +} + +export default getJsonFromTypedArray; diff --git a/Source/Core/getStringFromTypedArray.js b/Source/Core/getStringFromTypedArray.js index b2d8cb855882..bb2448e90717 100644 --- a/Source/Core/getStringFromTypedArray.js +++ b/Source/Core/getStringFromTypedArray.js @@ -4,6 +4,15 @@ import DeveloperError from "./DeveloperError.js"; import RuntimeError from "./RuntimeError.js"; /** + * Reads a string from a Uint8Array. + * + * @function + * + * @param {Uint8Array} uint8Array The Uint8Array to read from. + * @param {Number} [byteOffset=0] The byte offset to start reading from. + * @param {Number} [byteLength] The byte length to read. If byteLength is omitted the remainder of the buffer is read. + * @returns {String} The string. + * * @private */ function getStringFromTypedArray(uint8Array, byteOffset, byteLength) { diff --git a/Source/Core/loadCRN.js b/Source/Core/loadCRN.js index c7676364cc13..c1583f3a7a67 100644 --- a/Source/Core/loadCRN.js +++ b/Source/Core/loadCRN.js @@ -5,10 +5,7 @@ import DeveloperError from "./DeveloperError.js"; import Resource from "./Resource.js"; import TaskProcessor from "./TaskProcessor.js"; -var transcodeTaskProcessor = new TaskProcessor( - "transcodeCRNToDXT", - Number.POSITIVE_INFINITY -); +var transcodeTaskProcessor = new TaskProcessor("transcodeCRNToDXT"); /** * Asynchronously loads and parses the given URL to a CRN file or parses the raw binary data of a CRN file. diff --git a/Source/Core/sampleTerrain.js b/Source/Core/sampleTerrain.js index 93f2f6f3407c..0d1220ee8bd5 100644 --- a/Source/Core/sampleTerrain.js +++ b/Source/Core/sampleTerrain.js @@ -99,6 +99,33 @@ function doSampling(terrainProvider, level, positions) { }); } +/** + * Calls {@link TerrainData#interpolateHeight} on a given {@link TerrainData} for a given {@link Cartographic} and + * will assign the height property if the return value is not undefined. + * + * If the return value is false; it's suggesting that you should call {@link TerrainData#createMesh} first. + * @param {Cartographic} position The position to interpolate for and assign the height value to + * @param {TerrainData} terrainData + * @param {Rectangle} rectangle + * @returns {Boolean} If the height was actually interpolated and assigned + * @private + */ +function interpolateAndAssignHeight(position, terrainData, rectangle) { + var height = terrainData.interpolateHeight( + rectangle, + position.longitude, + position.latitude + ); + if (height === undefined) { + // if height comes back as undefined, it may implicitly mean the terrain data + // requires us to call TerrainData.createMesh() first (ArcGIS requires this in particular) + // so we'll return false and do that next! + return false; + } + position.height = height; + return true; +} + function createInterpolateFunction(tileRequest) { var tilePositions = tileRequest.positions; var rectangle = tileRequest.tilingScheme.tileXYToRectangle( @@ -107,14 +134,50 @@ function createInterpolateFunction(tileRequest) { tileRequest.level ); return function (terrainData) { + var isMeshRequired = false; for (var i = 0; i < tilePositions.length; ++i) { var position = tilePositions[i]; - position.height = terrainData.interpolateHeight( - rectangle, - position.longitude, - position.latitude + var isHeightAssigned = interpolateAndAssignHeight( + position, + terrainData, + rectangle ); + // we've found a position which returned undefined - hinting to us + // that we probably need to create a mesh for this terrain data. + // so break out of this loop and create the mesh - then we'll interpolate all the heights again + if (!isHeightAssigned) { + isMeshRequired = true; + break; + } } + + if (!isMeshRequired) { + // all position heights were interpolated - we don't need the mesh + return when.resolve(); + } + + // create the mesh - and interpolate all the positions again + return terrainData + .createMesh({ + tilingScheme: tileRequest.tilingScheme, + x: tileRequest.x, + y: tileRequest.y, + level: tileRequest.level, + // interpolateHeight will divide away the exaggeration - so passing in 1 is fine; it doesn't really matter + exaggeration: 1, + // don't throttle this mesh creation because we've asked to sample these points; + // so sample them! We don't care how many tiles that is! + throttle: false, + }) + .then(function () { + // mesh has been created - so go through every position (maybe again) + // and re-interpolate the heights - presumably using the mesh this time + for (var i = 0; i < tilePositions.length; ++i) { + var position = tilePositions[i]; + // if it doesn't work this time - that's fine, we tried. + interpolateAndAssignHeight(position, terrainData, rectangle); + } + }); }; } diff --git a/Source/Core/writeTextToCanvas.js b/Source/Core/writeTextToCanvas.js index 6c1a8544d1c8..e827b07fdf30 100644 --- a/Source/Core/writeTextToCanvas.js +++ b/Source/Core/writeTextToCanvas.js @@ -21,7 +21,7 @@ var imageSmoothingEnabledName; * @param {Number} [options.strokeWidth=1] The stroke width. * @param {Color} [options.backgroundColor=Color.TRANSPARENT] The background color of the canvas. * @param {Number} [options.padding=0] The pixel size of the padding to add around the text. - * @returns {HTMLCanvasElement} A new canvas with the given text drawn into it. The dimensions object + * @returns {HTMLCanvasElement|undefined} A new canvas with the given text drawn into it. The dimensions object * from measureText will also be added to the returned canvas. If text is * blank, returns undefined. * @function writeTextToCanvas diff --git a/Source/DataSources/CzmlDataSource.js b/Source/DataSources/CzmlDataSource.js index 1a6e324dd9fe..17361a2dd977 100644 --- a/Source/DataSources/CzmlDataSource.js +++ b/Source/DataSources/CzmlDataSource.js @@ -1184,7 +1184,10 @@ function processShapePacketData( CompositeProperty ); } else { - if (defined(packetData.cartesian)) { + if (defined(packetData.cartesian2)) { + packetData.array = Cartesian2.unpackArray(packetData.cartesian2); + } else if (defined(packetData.cartesian)) { + // for backwards compatibility, also accept `cartesian` packetData.array = Cartesian2.unpackArray(packetData.cartesian); } diff --git a/Source/DataSources/EllipseGraphics.js b/Source/DataSources/EllipseGraphics.js index fe34d15cce85..0cec489d9a0b 100644 --- a/Source/DataSources/EllipseGraphics.js +++ b/Source/DataSources/EllipseGraphics.js @@ -160,7 +160,7 @@ Object.defineProperties(EllipseGraphics.prototype, { extrudedHeightReference: createPropertyDescriptor("extrudedHeightReference"), /** - * Gets or sets the numeric property specifying the rotation of the ellipse clockwise from north. + * Gets or sets the numeric property specifying the rotation of the ellipse counter-clockwise from north. * @memberof EllipseGraphics.prototype * @type {Property|undefined} * @default 0 diff --git a/Source/DataSources/EntityCluster.js b/Source/DataSources/EntityCluster.js index 2779deb12142..efb5e32e7e8b 100644 --- a/Source/DataSources/EntityCluster.js +++ b/Source/DataSources/EntityCluster.js @@ -25,6 +25,7 @@ import kdbush from "../ThirdParty/kdbush.js"; * @param {Boolean} [options.clusterBillboards=true] Whether or not to cluster the billboards of an entity. * @param {Boolean} [options.clusterLabels=true] Whether or not to cluster the labels of an entity. * @param {Boolean} [options.clusterPoints=true] Whether or not to cluster the points of an entity. + * @param {Boolean} [options.show=true] Determines if the entities in the cluster will be shown. * * @alias EntityCluster * @constructor @@ -65,6 +66,14 @@ function EntityCluster(options) { this._removeEventListener = undefined; this._clusterEvent = new Event(); + + /** + * Determines if entities in this collection will be shown. + * + * @type {Boolean} + * @default true + */ + this.show = defaultValue(options.show, true); } function getX(point) { @@ -844,6 +853,10 @@ function updateEnable(entityCluster) { * @private */ EntityCluster.prototype.update = function (frameState) { + if (!this.show) { + return; + } + // If clustering is enabled before the label collection is updated, // the glyphs haven't been created so the screen space bounding boxes // are incorrect. diff --git a/Source/Renderer/ComputeCommand.js b/Source/Renderer/ComputeCommand.js index 8f9422c28c40..abb9c71a9a5f 100644 --- a/Source/Renderer/ComputeCommand.js +++ b/Source/Renderer/ComputeCommand.js @@ -69,6 +69,14 @@ function ComputeCommand(options) { */ this.postExecute = options.postExecute; + /** + * Function that is called when the command is canceled + * + * @type {Function} + * @default undefined + */ + this.canceled = options.canceled; + /** * Whether the renderer resources will persist beyond this call. If not, they * will be destroyed after completion. diff --git a/Source/Renderer/ShaderSource.js b/Source/Renderer/ShaderSource.js index 9ed28326e831..c1a098baa57a 100644 --- a/Source/Renderer/ShaderSource.js +++ b/Source/Renderer/ShaderSource.js @@ -270,6 +270,11 @@ function combineShader(shaderSource, isFragmentShader, context) { result += "#define OES_texture_float_linear\n\n"; } + // Define a constant for the OES_texture_float extension since WebGL does not. + if (context.floatingPointTexture) { + result += "#define OES_texture_float\n\n"; + } + // append built-ins if (shaderSource.includeBuiltIns) { result += getBuiltinsAndAutomaticUniforms(combinedSources); diff --git a/Source/Scene/Batched3DModel3DTileContent.js b/Source/Scene/Batched3DModel3DTileContent.js index 102e51b0e69c..488c0190713f 100644 --- a/Source/Scene/Batched3DModel3DTileContent.js +++ b/Source/Scene/Batched3DModel3DTileContent.js @@ -6,7 +6,7 @@ import defined from "../Core/defined.js"; import deprecationWarning from "../Core/deprecationWarning.js"; import destroyObject from "../Core/destroyObject.js"; import DeveloperError from "../Core/DeveloperError.js"; -import getStringFromTypedArray from "../Core/getStringFromTypedArray.js"; +import getJsonFromTypedArray from "../Core/getJsonFromTypedArray.js"; import Matrix4 from "../Core/Matrix4.js"; import RequestType from "../Core/RequestType.js"; import RuntimeError from "../Core/RuntimeError.js"; @@ -296,12 +296,11 @@ function initialize(content, arrayBuffer, byteOffset) { BATCH_LENGTH: defaultValue(batchLength, 0), }; } else { - var featureTableString = getStringFromTypedArray( + featureTableJson = getJsonFromTypedArray( uint8Array, byteOffset, featureTableJsonByteLength ); - featureTableJson = JSON.parse(featureTableString); byteOffset += featureTableJsonByteLength; } @@ -328,12 +327,11 @@ function initialize(content, arrayBuffer, byteOffset) { // // We could also make another request for it, but that would make the property set/get // API async, and would double the number of numbers in some cases. - var batchTableString = getStringFromTypedArray( + batchTableJson = getJsonFromTypedArray( uint8Array, byteOffset, batchTableJsonByteLength ); - batchTableJson = JSON.parse(batchTableString); byteOffset += batchTableJsonByteLength; if (batchTableBinaryByteLength > 0) { diff --git a/Source/Scene/BillboardCollection.js b/Source/Scene/BillboardCollection.js index 939ab16ec6c6..df56f02fd07b 100644 --- a/Source/Scene/BillboardCollection.js +++ b/Source/Scene/BillboardCollection.js @@ -111,6 +111,7 @@ var attributeLocationsInstanced = { * @param {BlendOption} [options.blendOption=BlendOption.OPAQUE_AND_TRANSLUCENT] The billboard blending option. The default * is used for rendering both opaque and translucent billboards. However, if either all of the billboards are completely opaque or all are completely translucent, * setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve performance by up to 2x. + * @param {Boolean} [options.show=true] Determines if the billboards in the collection will be shown. * * @performance For best performance, prefer a few collections, each with many billboards, to * many collections with only a few billboards each. Organize collections so that billboards @@ -200,6 +201,14 @@ function BillboardCollection(options) { this._colorCommands = []; + /** + * Determines if billboards in this collection will be shown. + * + * @type {Boolean} + * @default true + */ + this.show = defaultValue(options.show, true); + /** * The 4x4 transformation matrix that transforms each billboard in this collection from model to world coordinates. * When this is the identity matrix, the billboards are drawn in world coordinates, i.e., Earth's WGS84 coordinates. @@ -1809,6 +1818,11 @@ var scratchWriterArray = []; */ BillboardCollection.prototype.update = function (frameState) { removeBillboards(this); + + if (!this.show) { + return; + } + var billboards = this._billboards; var billboardsLength = billboards.length; diff --git a/Source/Scene/Cesium3DTileStyleEngine.js b/Source/Scene/Cesium3DTileStyleEngine.js index a2af20e55390..54d001ce78ea 100644 --- a/Source/Scene/Cesium3DTileStyleEngine.js +++ b/Source/Scene/Cesium3DTileStyleEngine.js @@ -15,6 +15,9 @@ Object.defineProperties(Cesium3DTileStyleEngine.prototype, { return this._style; }, set: function (value) { + if (value === this._style) { + return; + } this._style = value; this._styleDirty = true; }, @@ -25,7 +28,11 @@ Cesium3DTileStyleEngine.prototype.makeDirty = function () { this._styleDirty = true; }; -Cesium3DTileStyleEngine.prototype.applyStyle = function (tileset, passOptions) { +Cesium3DTileStyleEngine.prototype.resetDirty = function () { + this._styleDirty = false; +}; + +Cesium3DTileStyleEngine.prototype.applyStyle = function (tileset) { if (!tileset.ready) { return; } @@ -36,11 +43,6 @@ Cesium3DTileStyleEngine.prototype.applyStyle = function (tileset, passOptions) { var styleDirty = this._styleDirty; - if (passOptions.isRender) { - // Don't reset until the render pass - this._styleDirty = false; - } - if (styleDirty) { // Increase "time", so the style is applied to all visible tiles ++this._lastStyleTime; diff --git a/Source/Scene/Cesium3DTileset.js b/Source/Scene/Cesium3DTileset.js index b03ca969c1fd..243c50b30fde 100644 --- a/Source/Scene/Cesium3DTileset.js +++ b/Source/Scene/Cesium3DTileset.js @@ -91,6 +91,7 @@ import TileOrientedBoundingBox from "./TileOrientedBoundingBox.js"; * @param {String} [options.specularEnvironmentMaps] A URL to a KTX file that contains a cube map of the specular lighting and the convoluted specular mipmaps. * @param {Boolean} [options.backFaceCulling=true] Whether to cull back-facing geometry. When true, back face culling is determined by the glTF material's doubleSided property; when false, back face culling is disabled. * @param {String} [options.debugHeatmapTilePropertyName] The tile variable to colorize as a heatmap. All rendered tiles will be colorized relative to each other's specified variable value. + * @param {Object} [options.pickPrimitive] The primitive to be rendered during the pick pass instead of the tileset. * @param {Boolean} [options.debugFreezeFrame=false] For debugging only. Determines if only the tiles from last frame should be used for rendering. * @param {Boolean} [options.debugColorizeTiles=false] For debugging only. When true, assigns a random color to each tile. * @param {Boolean} [options.debugWireframe=false] For debugging only. When true, render's each tile's content as a wireframe. @@ -144,6 +145,7 @@ function Cesium3DTileset(options) { this._url = undefined; this._basePath = undefined; this._root = undefined; + this._resource = undefined; this._asset = undefined; // Metadata for the entire tileset this._properties = undefined; // Metadata for per-model/point/etc properties this._geometricError = undefined; // Geometric error when the tree is not rendered at all @@ -760,6 +762,13 @@ function Cesium3DTileset(options) { */ this.backFaceCulling = defaultValue(options.backFaceCulling, true); + /** + * The primitive to be rendered during the pick pass instead of the tileset. + * + * @type {Object} + */ + this.pickPrimitive = options.pickPrimitive; + /** * This property is for debugging only; it is not optimized for production use. *

@@ -903,6 +912,7 @@ function Cesium3DTileset(options) { .then(function (url) { var basePath; resource = Resource.createIfNeeded(url); + that._resource = resource; // ion resources have a credits property we can use for additional attribution. that._credits = resource.credits; @@ -1164,16 +1174,16 @@ Object.defineProperties(Cesium3DTileset.prototype, { }, /** - * The url to a tileset JSON file. + * The resource used to fetch the tileset JSON file * * @memberof Cesium3DTileset.prototype * - * @type {String} + * @type {Resource} * @readonly */ - url: { + resource: { get: function () { - return this._url; + return this._resource; }, }, @@ -1697,6 +1707,7 @@ Cesium3DTileset.prototype.loadTileset = function ( if (defined(tilesetVersion)) { // Append the tileset version to the resource this._basePath += "?v=" + tilesetVersion; + resource = resource.clone(); resource.setQueryParameters({ v: tilesetVersion }); } @@ -1892,6 +1903,7 @@ Cesium3DTileset.prototype.postPassesUpdate = function (frameState) { cancelOutOfViewRequests(this, frameState); raiseLoadProgressEvent(this, frameState); this._cache.unloadTiles(this, unloadTile); + this._styleEngine.resetDirty(); }; /** @@ -2173,7 +2185,7 @@ function updateTileDebugLabels(tileset, frameState) { } function updateTiles(tileset, frameState, passOptions) { - tileset._styleEngine.applyStyle(tileset, passOptions); + tileset._styleEngine.applyStyle(tileset); var isRender = passOptions.isRender; var statistics = tileset._statistics; @@ -2423,10 +2435,12 @@ function detectModelMatrixChanged(tileset, frameState) { tileset.modelMatrix, tileset._previousModelMatrix ); - tileset._previousModelMatrix = Matrix4.clone( - tileset.modelMatrix, - tileset._previousModelMatrix - ); + if (tileset._modelMatrixChanged) { + tileset._previousModelMatrix = Matrix4.clone( + tileset.modelMatrix, + tileset._previousModelMatrix + ); + } } } @@ -2538,13 +2552,17 @@ Cesium3DTileset.prototype.updateForPass = function ( var passStatistics = this._statisticsPerPass[pass]; if (this.show || ignoreCommands) { - this._pass = pass; - tilesetPassState.ready = update( - this, - frameState, - passStatistics, - passOptions - ); + if (frameState.passes.pick && defined(this.pickPrimitive)) { + this.pickPrimitive.update(frameState); + } else { + this._pass = pass; + tilesetPassState.ready = update( + this, + frameState, + passStatistics, + passOptions + ); + } } if (ignoreCommands) { diff --git a/Source/Scene/Geometry3DTileContent.js b/Source/Scene/Geometry3DTileContent.js index 1c9e749e4cf0..974b32c5d80e 100644 --- a/Source/Scene/Geometry3DTileContent.js +++ b/Source/Scene/Geometry3DTileContent.js @@ -3,7 +3,7 @@ import defaultValue from "../Core/defaultValue.js"; import defined from "../Core/defined.js"; import destroyObject from "../Core/destroyObject.js"; import DeveloperError from "../Core/DeveloperError.js"; -import getStringFromTypedArray from "../Core/getStringFromTypedArray.js"; +import getJsonFromTypedArray from "../Core/getJsonFromTypedArray.js"; import Matrix4 from "../Core/Matrix4.js"; import RuntimeError from "../Core/RuntimeError.js"; import when from "../ThirdParty/when.js"; @@ -290,12 +290,11 @@ function initialize(content, arrayBuffer, byteOffset) { var batchTableBinaryByteLength = view.getUint32(byteOffset, true); byteOffset += sizeOfUint32; - var featureTableString = getStringFromTypedArray( + var featureTableJson = getJsonFromTypedArray( uint8Array, byteOffset, featureTableJSONByteLength ); - var featureTableJson = JSON.parse(featureTableString); byteOffset += featureTableJSONByteLength; var featureTableBinary = new Uint8Array( @@ -313,12 +312,11 @@ function initialize(content, arrayBuffer, byteOffset) { // // We could also make another request for it, but that would make the property set/get // API async, and would double the number of numbers in some cases. - var batchTableString = getStringFromTypedArray( + batchTableJson = getJsonFromTypedArray( uint8Array, byteOffset, batchTableJSONByteLength ); - batchTableJson = JSON.parse(batchTableString); byteOffset += batchTableJSONByteLength; if (batchTableBinaryByteLength > 0) { diff --git a/Source/Scene/GlobeSurfaceTile.js b/Source/Scene/GlobeSurfaceTile.js index 1034d7706bc9..a014c659680c 100644 --- a/Source/Scene/GlobeSurfaceTile.js +++ b/Source/Scene/GlobeSurfaceTile.js @@ -627,17 +627,28 @@ function requestTileGeometry(surfaceTile, terrainProvider, x, y, level) { doRequest(); } +var scratchCreateMeshOptions = { + tilingScheme: undefined, + x: 0, + y: 0, + level: 0, + exaggeration: 1.0, + throttle: true, +}; + function transform(surfaceTile, frameState, terrainProvider, x, y, level) { var tilingScheme = terrainProvider.tilingScheme; + var createMeshOptions = scratchCreateMeshOptions; + createMeshOptions.tilingScheme = tilingScheme; + createMeshOptions.x = x; + createMeshOptions.y = y; + createMeshOptions.level = level; + createMeshOptions.exaggeration = frameState.terrainExaggeration; + createMeshOptions.throttle = true; + var terrainData = surfaceTile.terrainData; - var meshPromise = terrainData.createMesh( - tilingScheme, - x, - y, - level, - frameState.terrainExaggeration - ); + var meshPromise = terrainData.createMesh(createMeshOptions); if (!defined(meshPromise)) { // Postponed. diff --git a/Source/Scene/GridImageryProvider.js b/Source/Scene/GridImageryProvider.js index 1e780c0e6e15..934a657a6435 100644 --- a/Source/Scene/GridImageryProvider.js +++ b/Source/Scene/GridImageryProvider.js @@ -14,18 +14,18 @@ var defaultBackgroundColor = new Color(0.0, 0.5, 0.0, 0.2); * * Initialization options for the GridImageryProvider constructor * - * @param {TilingScheme} [tilingScheme=new GeographicTilingScheme()] The tiling scheme for which to draw tiles. - * @param {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified, + * @property {TilingScheme} [tilingScheme=new GeographicTilingScheme()] The tiling scheme for which to draw tiles. + * @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified, * this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither * parameter is specified, the WGS84 ellipsoid is used. - * @param {Number} [cells=8] The number of grids cells. - * @param {Color} [color=Color(1.0, 1.0, 1.0, 0.4)] The color to draw grid lines. - * @param {Color} [glowColor=Color(0.0, 1.0, 0.0, 0.05)] The color to draw glow for grid lines. - * @param {Number} [glowWidth=6] The width of lines used for rendering the line glow effect. - * @param {Color} [backgroundColor=Color(0.0, 0.5, 0.0, 0.2)] Background fill color. - * @param {Number} [tileWidth=256] The width of the tile for level-of-detail selection purposes. - * @param {Number} [tileHeight=256] The height of the tile for level-of-detail selection purposes. - * @param {Number} [canvasSize=256] The size of the canvas used for rendering. + * @property {Number} [cells=8] The number of grids cells. + * @property {Color} [color=Color(1.0, 1.0, 1.0, 0.4)] The color to draw grid lines. + * @property {Color} [glowColor=Color(0.0, 1.0, 0.0, 0.05)] The color to draw glow for grid lines. + * @property {Number} [glowWidth=6] The width of lines used for rendering the line glow effect. + * @property {Color} [backgroundColor=Color(0.0, 0.5, 0.0, 0.2)] Background fill color. + * @property {Number} [tileWidth=256] The width of the tile for level-of-detail selection purposes. + * @property {Number} [tileHeight=256] The height of the tile for level-of-detail selection purposes. + * @property {Number} [canvasSize=256] The size of the canvas used for rendering. */ /** diff --git a/Source/Scene/ImageryLayer.js b/Source/Scene/ImageryLayer.js index 4cd1cb84b750..eb082de5309a 100644 --- a/Source/Scene/ImageryLayer.js +++ b/Source/Scene/ImageryLayer.js @@ -1235,6 +1235,10 @@ ImageryLayer.prototype._reprojectTexture = function ( imagery.state = ImageryState.READY; imagery.releaseReference(); }, + canceled: function () { + imagery.state = ImageryState.TEXTURE_LOADED; + imagery.releaseReference(); + }, }); this._reprojectComputeCommands.push(computeCommand); } else { @@ -1268,6 +1272,11 @@ ImageryLayer.prototype.queueReprojectionCommands = function (frameState) { * @private */ ImageryLayer.prototype.cancelReprojections = function () { + this._reprojectComputeCommands.forEach(function (command) { + if (defined(command.canceled)) { + command.canceled(); + } + }); this._reprojectComputeCommands.length = 0; }; diff --git a/Source/Scene/ImageryProvider.js b/Source/Scene/ImageryProvider.js index 77c53f6975a9..297ce3044137 100644 --- a/Source/Scene/ImageryProvider.js +++ b/Source/Scene/ImageryProvider.js @@ -11,6 +11,7 @@ import Resource from "../Core/Resource.js"; * * @alias ImageryProvider * @constructor + * @abstract * * @see ArcGisMapServerImageryProvider * @see BingMapsImageryProvider diff --git a/Source/Scene/Instanced3DModel3DTileContent.js b/Source/Scene/Instanced3DModel3DTileContent.js index 747e3aff4ff2..8cab629cb609 100644 --- a/Source/Scene/Instanced3DModel3DTileContent.js +++ b/Source/Scene/Instanced3DModel3DTileContent.js @@ -8,6 +8,7 @@ import deprecationWarning from "../Core/deprecationWarning.js"; import destroyObject from "../Core/destroyObject.js"; import DeveloperError from "../Core/DeveloperError.js"; import Ellipsoid from "../Core/Ellipsoid.js"; +import getJsonFromTypedArray from "../Core/getJsonFromTypedArray.js"; import getStringFromTypedArray from "../Core/getStringFromTypedArray.js"; import Matrix3 from "../Core/Matrix3.js"; import Matrix4 from "../Core/Matrix4.js"; @@ -203,12 +204,11 @@ function initialize(content, arrayBuffer, byteOffset) { } byteOffset += sizeOfUint32; - var featureTableString = getStringFromTypedArray( + var featureTableJson = getJsonFromTypedArray( uint8Array, byteOffset, featureTableJsonByteLength ); - var featureTableJson = JSON.parse(featureTableString); byteOffset += featureTableJsonByteLength; var featureTableBinary = new Uint8Array( @@ -234,12 +234,11 @@ function initialize(content, arrayBuffer, byteOffset) { var batchTableJson; var batchTableBinary; if (batchTableJsonByteLength > 0) { - var batchTableString = getStringFromTypedArray( + batchTableJson = getJsonFromTypedArray( uint8Array, byteOffset, batchTableJsonByteLength ); - batchTableJson = JSON.parse(batchTableString); byteOffset += batchTableJsonByteLength; if (batchTableBinaryByteLength > 0) { diff --git a/Source/Scene/Label.js b/Source/Scene/Label.js index f05082add20d..05d69ec01f97 100644 --- a/Source/Scene/Label.js +++ b/Source/Scene/Label.js @@ -58,7 +58,7 @@ function parseFont(label) { div.style.font = label._font; document.body.appendChild(div); - var lineHeight = Number.parseFloat(getCSSValue(div, "line-height")); + var lineHeight = parseFloat(getCSSValue(div, "line-height")); if (isNaN(lineHeight)) { // line-height isn't a number, i.e. 'normal'; apply default line-spacing lineHeight = undefined; diff --git a/Source/Scene/LabelCollection.js b/Source/Scene/LabelCollection.js index ec907af14348..7ee4b2e77a8a 100644 --- a/Source/Scene/LabelCollection.js +++ b/Source/Scene/LabelCollection.js @@ -576,6 +576,7 @@ function destroyLabel(labelCollection, label) { * @param {BlendOption} [options.blendOption=BlendOption.OPAQUE_AND_TRANSLUCENT] The label blending option. The default * is used for rendering both opaque and translucent labels. However, if either all of the labels are completely opaque or all are completely translucent, * setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve performance by up to 2x. + * @param {Boolean} [options.show=true] Determines if the labels in the collection will be shown. * * @performance For best performance, prefer a few collections, each with many labels, to * many collections with only a few labels each. Avoid having collections where some @@ -631,6 +632,14 @@ function LabelCollection(options) { this._highlightColor = Color.clone(Color.WHITE); // Only used by Vector3DTilePoints + /** + * Determines if labels in this collection will be shown. + * + * @type {Boolean} + * @default true + */ + this.show = defaultValue(options.show, true); + /** * The 4x4 transformation matrix that transforms each label in this collection from model to world coordinates. * When this is the identity matrix, the labels are drawn in world coordinates, i.e., Earth's WGS84 coordinates. @@ -887,6 +896,10 @@ LabelCollection.prototype.get = function (index) { * */ LabelCollection.prototype.update = function (frameState) { + if (!this.show) { + return; + } + var billboardCollection = this._billboardCollection; var backgroundBillboardCollection = this._backgroundBillboardCollection; diff --git a/Source/Scene/Material.js b/Source/Scene/Material.js index 4b882b71ce40..fbc00dd38dfa 100644 --- a/Source/Scene/Material.js +++ b/Source/Scene/Material.js @@ -19,6 +19,7 @@ import AspectRampMaterial from "../Shaders/Materials/AspectRampMaterial.js"; import BumpMapMaterial from "../Shaders/Materials/BumpMapMaterial.js"; import CheckerboardMaterial from "../Shaders/Materials/CheckerboardMaterial.js"; import DotMaterial from "../Shaders/Materials/DotMaterial.js"; +import ElevationBandMaterial from "../Shaders/Materials/ElevationBandMaterial.js"; import ElevationContourMaterial from "../Shaders/Materials/ElevationContourMaterial.js"; import ElevationRampMaterial from "../Shaders/Materials/ElevationRampMaterial.js"; import FadeMaterial from "../Shaders/Materials/FadeMaterial.js"; @@ -216,6 +217,11 @@ import when from "../ThirdParty/when.js"; *

    *
  • image: color ramp image to use for color the terrain by aspect.
  • *
+ *
  • ElevationBand
  • + *
      + *
    • heights: image of heights sorted from lowest to highest.
    • + *
    • colors: image of colors at the corresponding heights.
    • + *
    * * * @@ -1691,4 +1697,23 @@ Material._materialCache.addMaterial(Material.AspectRampMaterialType, { }, translucent: false, }); + +/** + * Gets the name of the elevation band material. + * @type {String} + * @readonly + */ +Material.ElevationBandType = "ElevationBand"; +Material._materialCache.addMaterial(Material.ElevationBandType, { + fabric: { + type: Material.ElevationBandType, + uniforms: { + heights: Material.DefaultImageId, + colors: Material.DefaultImageId, + }, + source: ElevationBandMaterial, + }, + translucent: true, +}); + export default Material; diff --git a/Source/Scene/Model.js b/Source/Scene/Model.js index 2ac7e08e7872..acefd1ad1518 100644 --- a/Source/Scene/Model.js +++ b/Source/Scene/Model.js @@ -16,6 +16,7 @@ import DeveloperError from "../Core/DeveloperError.js"; import DistanceDisplayCondition from "../Core/DistanceDisplayCondition.js"; import FeatureDetection from "../Core/FeatureDetection.js"; import getAbsoluteUri from "../Core/getAbsoluteUri.js"; +import getJsonFromTypedArray from "../Core/getJsonFromTypedArray.js"; import getMagic from "../Core/getMagic.js"; import getStringFromTypedArray from "../Core/getStringFromTypedArray.js"; import IndexDatatype from "../Core/IndexDatatype.js"; @@ -1480,8 +1481,8 @@ Model.fromGltf = function (options) { cachedGltf.makeReady(parsedGltf); } else { // Load text (JSON) glTF - var json = getStringFromTypedArray(array); - cachedGltf.makeReady(JSON.parse(json)); + var json = getJsonFromTypedArray(array); + cachedGltf.makeReady(json); } var resourceCredits = model._resourceCredits; @@ -3003,12 +3004,10 @@ function getAttributeLocations(model, primitive) { var attributes = technique.attributes; var program = model._rendererResources.programs[technique.program]; - var programVertexAttributes = program.vertexAttributes; var programAttributeLocations = program._attributeLocations; - // Note: WebGL shader compiler may have optimized and removed some attributes from programVertexAttributes - for (location in programVertexAttributes) { - if (programVertexAttributes.hasOwnProperty(location)) { + for (location in programAttributeLocations) { + if (programAttributeLocations.hasOwnProperty(location)) { var attribute = attributes[location]; if (defined(attribute)) { index = programAttributeLocations[location]; @@ -3017,11 +3016,7 @@ function getAttributeLocations(model, primitive) { } } - // Always add pre-created attributes. - // Some pre-created attributes, like per-instance pickIds, may be compiled out of the draw program - // but should be included in the list of attribute locations for the pick program. - // This is safe to do since programVertexAttributes and programAttributeLocations are equivalent except - // that programVertexAttributes optimizes out unused attributes. + // Add pre-created attributes. var precreatedAttributes = model._precreatedAttributes; if (defined(precreatedAttributes)) { for (location in precreatedAttributes) { @@ -4513,7 +4508,10 @@ function updateColor(model, frameState, forceDerive) { if (alpha > 0.0 && alpha < 1.0) { var nodeCommands = model._nodeCommands; var length = nodeCommands.length; - if (!defined(nodeCommands[0].translucentCommand) || forceDerive) { + if ( + length > 0 && + (!defined(nodeCommands[0].translucentCommand) || forceDerive) + ) { for (var i = 0; i < length; ++i) { var nodeCommand = nodeCommands[i]; var command = nodeCommand.command; @@ -4549,7 +4547,10 @@ function updateBackFaceCulling(model, frameState, forceDerive) { if (!backFaceCulling) { var nodeCommands = model._nodeCommands; var length = nodeCommands.length; - if (!defined(nodeCommands[0].disableCullingCommand) || forceDerive) { + if ( + length > 0 && + (!defined(nodeCommands[0].disableCullingCommand) || forceDerive) + ) { for (var i = 0; i < length; ++i) { var nodeCommand = nodeCommands[i]; var command = nodeCommand.command; @@ -4819,12 +4820,13 @@ function updateSilhouette(model, frameState, force) { var nodeCommands = model._nodeCommands; var dirty = - alphaDirty(model.color.alpha, model._colorPreviousAlpha) || - alphaDirty( - model.silhouetteColor.alpha, - model._silhouetteColorPreviousAlpha - ) || - !defined(nodeCommands[0].silhouetteModelCommand); + nodeCommands.length > 0 && + (alphaDirty(model.color.alpha, model._colorPreviousAlpha) || + alphaDirty( + model.silhouetteColor.alpha, + model._silhouetteColorPreviousAlpha + ) || + !defined(nodeCommands[0].silhouetteModelCommand)); model._colorPreviousAlpha = model.color.alpha; model._silhouetteColorPreviousAlpha = model.silhouetteColor.alpha; diff --git a/Source/Scene/PointCloud.js b/Source/Scene/PointCloud.js index bb291c67538f..4c0dce4d9107 100644 --- a/Source/Scene/PointCloud.js +++ b/Source/Scene/PointCloud.js @@ -10,7 +10,7 @@ import ComponentDatatype from "../Core/ComponentDatatype.js"; import defaultValue from "../Core/defaultValue.js"; import defined from "../Core/defined.js"; import destroyObject from "../Core/destroyObject.js"; -import getStringFromTypedArray from "../Core/getStringFromTypedArray.js"; +import getJsonFromTypedArray from "../Core/getJsonFromTypedArray.js"; import CesiumMath from "../Core/Math.js"; import Matrix4 from "../Core/Matrix4.js"; import oneTimeWarning from "../Core/oneTimeWarning.js"; @@ -235,12 +235,11 @@ function initialize(pointCloud, options) { var batchTableBinaryByteLength = view.getUint32(byteOffset, true); byteOffset += sizeOfUint32; - var featureTableString = getStringFromTypedArray( + var featureTableJson = getJsonFromTypedArray( uint8Array, byteOffset, featureTableJsonByteLength ); - var featureTableJson = JSON.parse(featureTableString); byteOffset += featureTableJsonByteLength; var featureTableBinary = new Uint8Array( @@ -255,12 +254,11 @@ function initialize(pointCloud, options) { var batchTableBinary; if (batchTableJsonByteLength > 0) { // Has a batch table JSON - var batchTableString = getStringFromTypedArray( + batchTableJson = getJsonFromTypedArray( uint8Array, byteOffset, batchTableJsonByteLength ); - batchTableJson = JSON.parse(batchTableString); byteOffset += batchTableJsonByteLength; if (batchTableBinaryByteLength > 0) { diff --git a/Source/Scene/PointPrimitiveCollection.js b/Source/Scene/PointPrimitiveCollection.js index 2efd0b2c076b..db3154483ca6 100644 --- a/Source/Scene/PointPrimitiveCollection.js +++ b/Source/Scene/PointPrimitiveCollection.js @@ -63,6 +63,7 @@ var attributeLocations = { * @param {BlendOption} [options.blendOption=BlendOption.OPAQUE_AND_TRANSLUCENT] The point blending option. The default * is used for rendering both opaque and translucent points. However, if either all of the points are completely opaque or all are completely translucent, * setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve performance by up to 2x. + * @param {Boolean} [options.show=true] Determines if the primitives in the collection will be shown. * * @performance For best performance, prefer a few collections, each with many points, to * many collections with only a few points each. Organize collections so that points @@ -126,6 +127,14 @@ function PointPrimitiveCollection(options) { this._colorCommands = []; + /** + * Determines if primitives in this collection will be shown. + * + * @type {Boolean} + * @default true + */ + this.show = defaultValue(options.show, true); + /** * The 4x4 transformation matrix that transforms each point in this collection from model to world coordinates. * When this is the identity matrix, the pointPrimitives are drawn in world coordinates, i.e., Earth's WGS84 coordinates. @@ -839,6 +848,10 @@ var scratchWriterArray = []; PointPrimitiveCollection.prototype.update = function (frameState) { removePointPrimitives(this); + if (!this.show) { + return; + } + this._maxTotalPointSize = ContextLimits.maximumAliasedPointSize; updateMode(this, frameState); diff --git a/Source/Scene/PolylineCollection.js b/Source/Scene/PolylineCollection.js index 9803389fcc32..6f6061e0e81a 100644 --- a/Source/Scene/PolylineCollection.js +++ b/Source/Scene/PolylineCollection.js @@ -80,6 +80,7 @@ var attributeLocations = { * @param {Object} [options] Object with the following properties: * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms each polyline from model to world coordinates. * @param {Boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if this primitive's commands' bounding spheres are shown. + * @param {Boolean} [options.show=true] Determines if the polylines in the collection will be shown. * * @performance For best performance, prefer a few collections, each with many polylines, to * many collections with only a few polylines each. Organize collections so that polylines @@ -116,6 +117,14 @@ var attributeLocations = { function PolylineCollection(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); + /** + * Determines if polylines in this collection will be shown. + * + * @type {Boolean} + * @default true + */ + this.show = defaultValue(options.show, true); + /** * The 4x4 transformation matrix that transforms each polyline in this collection from model to world coordinates. * When this is the identity matrix, the polylines are drawn in world coordinates, i.e., Earth's WGS84 coordinates. @@ -414,7 +423,7 @@ var scratchNearFarCartesian2 = new Cartesian2(); PolylineCollection.prototype.update = function (frameState) { removePolylines(this); - if (this._polylines.length === 0) { + if (this._polylines.length === 0 || !this.show) { return; } diff --git a/Source/Scene/Primitive.js b/Source/Scene/Primitive.js index 465362ea8836..909ab72da3ec 100644 --- a/Source/Scene/Primitive.js +++ b/Source/Scene/Primitive.js @@ -1202,10 +1202,7 @@ var numberOfCreationWorkers = Math.max( 1 ); var createGeometryTaskProcessors; -var combineGeometryTaskProcessor = new TaskProcessor( - "combineGeometry", - Number.POSITIVE_INFINITY -); +var combineGeometryTaskProcessor = new TaskProcessor("combineGeometry"); function loadAsynchronous(primitive, frameState) { var instances; @@ -1244,10 +1241,7 @@ function loadAsynchronous(primitive, frameState) { if (!defined(createGeometryTaskProcessors)) { createGeometryTaskProcessors = new Array(numberOfCreationWorkers); for (i = 0; i < numberOfCreationWorkers; i++) { - createGeometryTaskProcessors[i] = new TaskProcessor( - "createGeometry", - Number.POSITIVE_INFINITY - ); + createGeometryTaskProcessors[i] = new TaskProcessor("createGeometry"); } } diff --git a/Source/Scene/ShadowMap.js b/Source/Scene/ShadowMap.js index 458f61835938..7a6138faf62a 100644 --- a/Source/Scene/ShadowMap.js +++ b/Source/Scene/ShadowMap.js @@ -1518,10 +1518,8 @@ function updateCameras(shadowMap, frameState) { frameState.shadowState.nearPlane, shadowMap.maximumDistance ); - far = Math.min( - frameState.shadowState.farPlane, - shadowMap.maximumDistance + 1.0 - ); + far = Math.min(frameState.shadowState.farPlane, shadowMap.maximumDistance); + far = Math.max(far, near + 1.0); } else { near = camera.frustum.near; far = shadowMap.maximumDistance; diff --git a/Source/Scene/TerrainFillMesh.js b/Source/Scene/TerrainFillMesh.js index 5b1ed66a82e1..ea95bcde43bd 100644 --- a/Source/Scene/TerrainFillMesh.js +++ b/Source/Scene/TerrainFillMesh.js @@ -807,6 +807,13 @@ var neVertexScratch = new HeightAndNormal(); var heightmapBuffer = typeof Uint8Array !== "undefined" ? new Uint8Array(9 * 9) : undefined; +var scratchCreateMeshSyncOptions = { + tilingScheme: undefined, + x: 0, + y: 0, + level: 0, + exaggeration: 1.0, +}; function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) { GlobeSurfaceTile.initialize( tile, @@ -973,13 +980,14 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) { heightOffset: maximumHeight, }, }); - fill.mesh = terrainData._createMeshSync( - tile.tilingScheme, - tile.x, - tile.y, - tile.level, - 1.0 - ); + + var createMeshSyncOptions = scratchCreateMeshSyncOptions; + createMeshSyncOptions.tilingScheme = tile.tilingScheme; + createMeshSyncOptions.x = tile.x; + createMeshSyncOptions.y = tile.y; + createMeshSyncOptions.level = tile.level; + + fill.mesh = terrainData._createMeshSync(createMeshSyncOptions); } else { var encoding = new TerrainEncoding( undefined, diff --git a/Source/Scene/Tileset3DTileContent.js b/Source/Scene/Tileset3DTileContent.js index effe5681b3d2..87ef76745467 100644 --- a/Source/Scene/Tileset3DTileContent.js +++ b/Source/Scene/Tileset3DTileContent.js @@ -1,6 +1,6 @@ import defaultValue from "../Core/defaultValue.js"; import destroyObject from "../Core/destroyObject.js"; -import getStringFromTypedArray from "../Core/getStringFromTypedArray.js"; +import getJsonFromTypedArray from "../Core/getJsonFromTypedArray.js"; import RuntimeError from "../Core/RuntimeError.js"; import when from "../ThirdParty/when.js"; @@ -111,11 +111,10 @@ Object.defineProperties(Tileset3DTileContent.prototype, { function initialize(content, arrayBuffer, byteOffset) { byteOffset = defaultValue(byteOffset, 0); var uint8Array = new Uint8Array(arrayBuffer); - var jsonString = getStringFromTypedArray(uint8Array, byteOffset); var tilesetJson; try { - tilesetJson = JSON.parse(jsonString); + tilesetJson = getJsonFromTypedArray(uint8Array, byteOffset); } catch (error) { content._readyPromise.reject(new RuntimeError("Invalid tile content.")); return; diff --git a/Source/Scene/Vector3DTileContent.js b/Source/Scene/Vector3DTileContent.js index 5936a7791024..cffa793b4e9f 100644 --- a/Source/Scene/Vector3DTileContent.js +++ b/Source/Scene/Vector3DTileContent.js @@ -4,7 +4,7 @@ import defined from "../Core/defined.js"; import destroyObject from "../Core/destroyObject.js"; import DeveloperError from "../Core/DeveloperError.js"; import Ellipsoid from "../Core/Ellipsoid.js"; -import getStringFromTypedArray from "../Core/getStringFromTypedArray.js"; +import getJsonFromTypedArray from "../Core/getJsonFromTypedArray.js"; import ComponentDatatype from "../Core/ComponentDatatype.js"; import CesiumMath from "../Core/Math.js"; import Matrix4 from "../Core/Matrix4.js"; @@ -19,7 +19,7 @@ import Vector3DTilePolylines from "./Vector3DTilePolylines.js"; /** * Represents the contents of a - * {@link https://github.com/CesiumGS/3d-tiles/tree/3d-tiles-next/TileFormats/VectorData|Vector} + * {@link https://github.com/CesiumGS/3d-tiles/tree/vctr/TileFormats/VectorData|Vector} * tile in a {@link https://github.com/CesiumGS/3d-tiles/tree/master/specification|3D Tiles} tileset. *

    * Implements the {@link Cesium3DTileContent} interface. @@ -297,12 +297,11 @@ function initialize(content, arrayBuffer, byteOffset) { var pointsPositionByteLength = view.getUint32(byteOffset, true); byteOffset += sizeOfUint32; - var featureTableString = getStringFromTypedArray( + var featureTableJson = getJsonFromTypedArray( uint8Array, byteOffset, featureTableJSONByteLength ); - var featureTableJson = JSON.parse(featureTableString); byteOffset += featureTableJSONByteLength; var featureTableBinary = new Uint8Array( @@ -320,12 +319,11 @@ function initialize(content, arrayBuffer, byteOffset) { // // We could also make another request for it, but that would make the property set/get // API async, and would double the number of numbers in some cases. - var batchTableString = getStringFromTypedArray( + batchTableJson = getJsonFromTypedArray( uint8Array, byteOffset, batchTableJSONByteLength ); - batchTableJson = JSON.parse(batchTableString); byteOffset += batchTableJSONByteLength; if (batchTableBinaryByteLength > 0) { diff --git a/Source/Scene/Vector3DTileGeometry.js b/Source/Scene/Vector3DTileGeometry.js index 63e8ca8b74b3..dedaef7aa996 100644 --- a/Source/Scene/Vector3DTileGeometry.js +++ b/Source/Scene/Vector3DTileGeometry.js @@ -210,7 +210,8 @@ function unpackBuffer(geometries, packedBuffer) { } var createVerticesTaskProcessor = new TaskProcessor( - "createVectorTileGeometries" + "createVectorTileGeometries", + 5 ); var scratchColor = new Color(); diff --git a/Source/Scene/Vector3DTilePoints.js b/Source/Scene/Vector3DTilePoints.js index b6cd9346dc90..d4d12de11cd7 100644 --- a/Source/Scene/Vector3DTilePoints.js +++ b/Source/Scene/Vector3DTilePoints.js @@ -122,7 +122,10 @@ function packBuffer(points, ellipsoid) { return packedBuffer; } -var createVerticesTaskProcessor = new TaskProcessor("createVectorTilePoints"); +var createVerticesTaskProcessor = new TaskProcessor( + "createVectorTilePoints", + 5 +); var scratchPosition = new Cartesian3(); function createPoints(points, ellipsoid) { diff --git a/Source/Scene/Vector3DTilePolygons.js b/Source/Scene/Vector3DTilePolygons.js index afe4f440b18e..bdbcf35eec49 100644 --- a/Source/Scene/Vector3DTilePolygons.js +++ b/Source/Scene/Vector3DTilePolygons.js @@ -215,7 +215,10 @@ function unpackBuffer(polygons, packedBuffer) { } } -var createVerticesTaskProcessor = new TaskProcessor("createVectorTilePolygons"); +var createVerticesTaskProcessor = new TaskProcessor( + "createVectorTilePolygons", + 5 +); var scratchColor = new Color(); function createPrimitive(polygons) { diff --git a/Source/Scene/Vector3DTilePolylines.js b/Source/Scene/Vector3DTilePolylines.js index d9672ddd222b..3473c5ba2c8d 100644 --- a/Source/Scene/Vector3DTilePolylines.js +++ b/Source/Scene/Vector3DTilePolylines.js @@ -161,7 +161,8 @@ function packBuffer(polylines) { } var createVerticesTaskProcessor = new TaskProcessor( - "createVectorTilePolylines" + "createVectorTilePolylines", + 5 ); var attributeLocations = { previousPosition: 0, @@ -221,21 +222,27 @@ function createVertexArray(polylines, context) { return; } - when(verticesPromise, function (result) { - polylines._currentPositions = new Float32Array(result.currentPositions); - polylines._previousPositions = new Float32Array(result.previousPositions); - polylines._nextPositions = new Float32Array(result.nextPositions); - polylines._expandAndWidth = new Float32Array(result.expandAndWidth); - polylines._vertexBatchIds = new Uint16Array(result.batchIds); - - var indexDatatype = result.indexDatatype; - polylines._indices = - indexDatatype === IndexDatatype.UNSIGNED_SHORT - ? new Uint16Array(result.indices) - : new Uint32Array(result.indices); - - polylines._ready = true; - }); + when(verticesPromise) + .then(function (result) { + polylines._currentPositions = new Float32Array(result.currentPositions); + polylines._previousPositions = new Float32Array( + result.previousPositions + ); + polylines._nextPositions = new Float32Array(result.nextPositions); + polylines._expandAndWidth = new Float32Array(result.expandAndWidth); + polylines._vertexBatchIds = new Uint16Array(result.batchIds); + + var indexDatatype = result.indexDatatype; + polylines._indices = + indexDatatype === IndexDatatype.UNSIGNED_SHORT + ? new Uint16Array(result.indices) + : new Uint32Array(result.indices); + + polylines._ready = true; + }) + .otherwise(function (error) { + polylines._readyPromise.reject(error); + }); } if (polylines._ready && !defined(polylines._va)) { diff --git a/Source/Scene/createElevationBandMaterial.js b/Source/Scene/createElevationBandMaterial.js new file mode 100644 index 000000000000..0760aa55ac1a --- /dev/null +++ b/Source/Scene/createElevationBandMaterial.js @@ -0,0 +1,585 @@ +import Cartesian4 from "../Core/Cartesian4.js"; +import CesiumMath from "../Core/Math.js"; +import Check from "../Core/Check.js"; +import Color from "../Core/Color.js"; +import defaultValue from "../Core/defaultValue.js"; +import defined from "../Core/defined.js"; +import DeveloperError from "../Core/DeveloperError.js"; +import mergeSort from "../Core/mergeSort.js"; +import PixelFormat from "../Core/PixelFormat.js"; +import PixelDatatype from "../Renderer/PixelDatatype.js"; +import Sampler from "../Renderer/Sampler.js"; +import Texture from "../Renderer/Texture.js"; +import TextureMagnificationFilter from "../Renderer/TextureMagnificationFilter.js"; +import TextureMinificationFilter from "../Renderer/TextureMinificationFilter.js"; +import TextureWrap from "../Renderer/TextureWrap.js"; +import Material from "./Material.js"; + +var scratchColor = new Color(); +var scratchColorAbove = new Color(); +var scratchColorBelow = new Color(); +var scratchColorBlend = new Color(); +var scratchPackedFloat = new Cartesian4(); +var scratchColorBytes = new Uint8Array(4); + +function lerpEntryColor(height, entryBefore, entryAfter, result) { + var lerpFactor = + entryBefore.height === entryAfter.height + ? 0.0 + : (height - entryBefore.height) / + (entryAfter.height - entryBefore.height); + return Color.lerp(entryBefore.color, entryAfter.color, lerpFactor, result); +} + +function createNewEntry(height, color) { + return { + height: height, + color: Color.clone(color), + }; +} + +function removeDuplicates(entries) { + // This function expects entries to be sorted from lowest to highest. + + // Remove entries that have the same height as before and after. + entries = entries.filter(function (entry, index, array) { + var hasPrev = index > 0; + var hasNext = index < array.length - 1; + + var sameHeightAsPrev = hasPrev + ? entry.height === array[index - 1].height + : true; + var sameHeightAsNext = hasNext + ? entry.height === array[index + 1].height + : true; + + var keep = !sameHeightAsPrev || !sameHeightAsNext; + return keep; + }); + + // Remove entries that have the same color as before and after. + entries = entries.filter(function (entry, index, array) { + var hasPrev = index > 0; + var hasNext = index < array.length - 1; + + var sameColorAsPrev = hasPrev + ? Color.equals(entry.color, array[index - 1].color) + : false; + var sameColorAsNext = hasNext + ? Color.equals(entry.color, array[index + 1].color) + : false; + + var keep = !sameColorAsPrev || !sameColorAsNext; + return keep; + }); + + // Also remove entries that have the same height AND color as the entry before. + entries = entries.filter(function (entry, index, array) { + var hasPrev = index > 0; + + var sameColorAsPrev = hasPrev + ? Color.equals(entry.color, array[index - 1].color) + : false; + + var sameHeightAsPrev = hasPrev + ? entry.height === array[index - 1].height + : true; + + var keep = !sameColorAsPrev || !sameHeightAsPrev; + return keep; + }); + + return entries; +} + +function preprocess(layers) { + var i, j; + + var layeredEntries = []; + + var layersLength = layers.length; + for (i = 0; i < layersLength; i++) { + var layer = layers[i]; + var entriesOrig = layer.entries; + var entriesLength = entriesOrig.length; + + //>>includeStart('debug', pragmas.debug); + if (!Array.isArray(entriesOrig) || entriesLength === 0) { + throw new DeveloperError("entries must be an array with size > 0."); + } + //>>includeEnd('debug'); + + var entries = []; + + for (j = 0; j < entriesLength; j++) { + var entryOrig = entriesOrig[j]; + + //>>includeStart('debug', pragmas.debug); + if (!defined(entryOrig.height)) { + throw new DeveloperError("entry requires a height."); + } + if (!defined(entryOrig.color)) { + throw new DeveloperError("entry requires a color."); + } + //>>includeEnd('debug'); + + var height = CesiumMath.clamp( + entryOrig.height, + createElevationBandMaterial._minimumHeight, + createElevationBandMaterial._maximumHeight + ); + + // premultiplied alpha + var color = Color.clone(entryOrig.color, scratchColor); + color.red *= color.alpha; + color.green *= color.alpha; + color.blue *= color.alpha; + + entries.push(createNewEntry(height, color)); + } + + var sortedAscending = true; + var sortedDescending = true; + for (j = 0; j < entriesLength - 1; j++) { + var currEntry = entries[j + 0]; + var nextEntry = entries[j + 1]; + + sortedAscending = sortedAscending && currEntry.height <= nextEntry.height; + sortedDescending = + sortedDescending && currEntry.height >= nextEntry.height; + } + + // When the array is fully descending, reverse it. + if (sortedDescending) { + entries = entries.reverse(); + } else if (!sortedAscending) { + // Stable sort from lowest to greatest height. + mergeSort(entries, function (a, b) { + return CesiumMath.sign(a.height - b.height); + }); + } + + var extendDownwards = defaultValue(layer.extendDownwards, false); + var extendUpwards = defaultValue(layer.extendUpwards, false); + + // Interpret a single entry to extend all the way up and down. + if (entries.length === 1 && !extendDownwards && !extendUpwards) { + extendDownwards = true; + extendUpwards = true; + } + + if (extendDownwards) { + entries.splice( + 0, + 0, + createNewEntry( + createElevationBandMaterial._minimumHeight, + entries[0].color + ) + ); + } + if (extendUpwards) { + entries.splice( + entries.length, + 0, + createNewEntry( + createElevationBandMaterial._maximumHeight, + entries[entries.length - 1].color + ) + ); + } + + entries = removeDuplicates(entries); + + layeredEntries.push(entries); + } + + return layeredEntries; +} + +function createLayeredEntries(layers) { + // clean up the input data and check for errors + var layeredEntries = preprocess(layers); + + var entriesAccumNext = []; + var entriesAccumCurr = []; + var i; + + function addEntry(height, color) { + entriesAccumNext.push(createNewEntry(height, color)); + } + function addBlendEntry(height, a, b) { + var result = Color.multiplyByScalar(b, 1.0 - a.alpha, scratchColorBlend); + result = Color.add(result, a, result); + addEntry(height, result); + } + + // alpha blend new layers on top of old ones + var layerLength = layeredEntries.length; + for (i = 0; i < layerLength; i++) { + var entries = layeredEntries[i]; + var idx = 0; + var accumIdx = 0; + + // swap the arrays + entriesAccumCurr = entriesAccumNext; + entriesAccumNext = []; + + var entriesLength = entries.length; + var entriesAccumLength = entriesAccumCurr.length; + while (idx < entriesLength || accumIdx < entriesAccumLength) { + var entry = idx < entriesLength ? entries[idx] : undefined; + var prevEntry = idx > 0 ? entries[idx - 1] : undefined; + var nextEntry = idx < entriesLength - 1 ? entries[idx + 1] : undefined; + + var entryAccum = + accumIdx < entriesAccumLength ? entriesAccumCurr[accumIdx] : undefined; + var prevEntryAccum = + accumIdx > 0 ? entriesAccumCurr[accumIdx - 1] : undefined; + var nextEntryAccum = + accumIdx < entriesAccumLength - 1 + ? entriesAccumCurr[accumIdx + 1] + : undefined; + + if ( + defined(entry) && + defined(entryAccum) && + entry.height === entryAccum.height + ) { + // New entry directly on top of accum entry + var isSplitAccum = + defined(nextEntryAccum) && + entryAccum.height === nextEntryAccum.height; + var isStartAccum = !defined(prevEntryAccum); + var isEndAccum = !defined(nextEntryAccum); + + var isSplit = defined(nextEntry) && entry.height === nextEntry.height; + var isStart = !defined(prevEntry); + var isEnd = !defined(nextEntry); + + if (isSplitAccum) { + if (isSplit) { + addBlendEntry(entry.height, entry.color, entryAccum.color); + addBlendEntry(entry.height, nextEntry.color, nextEntryAccum.color); + } else if (isStart) { + addEntry(entry.height, entryAccum.color); + addBlendEntry(entry.height, entry.color, nextEntryAccum.color); + } else if (isEnd) { + addBlendEntry(entry.height, entry.color, entryAccum.color); + addEntry(entry.height, nextEntryAccum.color); + } else { + addBlendEntry(entry.height, entry.color, entryAccum.color); + addBlendEntry(entry.height, entry.color, nextEntryAccum.color); + } + } else if (isStartAccum) { + if (isSplit) { + addEntry(entry.height, entry.color); + addBlendEntry(entry.height, nextEntry.color, entryAccum.color); + } else if (isEnd) { + addEntry(entry.height, entry.color); + addEntry(entry.height, entryAccum.color); + } else if (isStart) { + addBlendEntry(entry.height, entry.color, entryAccum.color); + } else { + addEntry(entry.height, entry.color); + addBlendEntry(entry.height, entry.color, entryAccum.color); + } + } else if (isEndAccum) { + if (isSplit) { + addBlendEntry(entry.height, entry.color, entryAccum.color); + addEntry(entry.height, nextEntry.color); + } else if (isStart) { + addEntry(entry.height, entryAccum.color); + addEntry(entry.height, entry.color); + } else if (isEnd) { + addBlendEntry(entry.height, entry.color, entryAccum.color); + } else { + addBlendEntry(entry.height, entry.color, entryAccum.color); + addEntry(entry.height, entry.color); + } + } else { + // eslint-disable-next-line no-lonely-if + if (isSplit) { + addBlendEntry(entry.height, entry.color, entryAccum.color); + addBlendEntry(entry.height, nextEntry.color, entryAccum.color); + } else if (isStart) { + addEntry(entry.height, entryAccum.color); + addBlendEntry(entry.height, entry.color, entryAccum.color); + } else if (isEnd) { + addBlendEntry(entry.height, entry.color, entryAccum.color); + addEntry(entry.height, entryAccum.color); + } else { + addBlendEntry(entry.height, entry.color, entryAccum.color); + } + } + idx += isSplit ? 2 : 1; + accumIdx += isSplitAccum ? 2 : 1; + } else if ( + defined(entry) && + defined(entryAccum) && + defined(prevEntryAccum) && + entry.height < entryAccum.height + ) { + // New entry between two accum entries + var colorBelow = lerpEntryColor( + entry.height, + prevEntryAccum, + entryAccum, + scratchColorBelow + ); + + if (!defined(prevEntry)) { + addEntry(entry.height, colorBelow); + addBlendEntry(entry.height, entry.color, colorBelow); + } else if (!defined(nextEntry)) { + addBlendEntry(entry.height, entry.color, colorBelow); + addEntry(entry.height, colorBelow); + } else { + addBlendEntry(entry.height, entry.color, colorBelow); + } + idx++; + } else if ( + defined(entryAccum) && + defined(entry) && + defined(prevEntry) && + entryAccum.height < entry.height + ) { + // Accum entry between two new entries + var colorAbove = lerpEntryColor( + entryAccum.height, + prevEntry, + entry, + scratchColorAbove + ); + + if (!defined(prevEntryAccum)) { + addEntry(entryAccum.height, colorAbove); + addBlendEntry(entryAccum.height, colorAbove, entryAccum.color); + } else if (!defined(nextEntryAccum)) { + addBlendEntry(entryAccum.height, colorAbove, entryAccum.color); + addEntry(entryAccum.height, colorAbove); + } else { + addBlendEntry(entryAccum.height, colorAbove, entryAccum.color); + } + accumIdx++; + } else if ( + defined(entry) && + (!defined(entryAccum) || entry.height < entryAccum.height) + ) { + // New entry completely before or completely after accum entries + if ( + defined(entryAccum) && + !defined(prevEntryAccum) && + !defined(nextEntry) + ) { + // Insert blank gap between last entry and first accum entry + addEntry(entry.height, entry.color); + addEntry(entry.height, createElevationBandMaterial._emptyColor); + addEntry(entryAccum.height, createElevationBandMaterial._emptyColor); + } else if ( + !defined(entryAccum) && + defined(prevEntryAccum) && + !defined(prevEntry) + ) { + // Insert blank gap between last accum entry and first entry + addEntry( + prevEntryAccum.height, + createElevationBandMaterial._emptyColor + ); + addEntry(entry.height, createElevationBandMaterial._emptyColor); + addEntry(entry.height, entry.color); + } else { + addEntry(entry.height, entry.color); + } + idx++; + } else if ( + defined(entryAccum) && + (!defined(entry) || entryAccum.height < entry.height) + ) { + // Accum entry completely before or completely after new entries + addEntry(entryAccum.height, entryAccum.color); + accumIdx++; + } + } + } + + // one final cleanup pass in case duplicate colors show up in the final result + var allEntries = removeDuplicates(entriesAccumNext); + return allEntries; +} + +/** + * @typedef createElevationBandMaterialEntry + * + * @property {Number} height The height. + * @property {Color} color The color at this height. + */ +/** + * @typedef createElevationBandMaterialBand + * + * @property {createElevationBandMaterialEntry[]} entries A list of elevation entries. They will automatically be sorted from lowest to highest. If there is only one entry and extendsDownards and extendUpwards are both false, they will both be set to true. + * @property {Boolean} [extendDownwards=false] If true, the band's minimum elevation color will extend infinitely downwards. + * @property {Boolean} [extendUpwards=false] If true, the band's maximum elevation color will extend infinitely upwards. + */ + +/** + * Creates a {@link Material} that combines multiple layers of color/gradient bands and maps them to terrain heights. + * + * The shader does a binary search over all the heights to find out which colors are above and below a given height, and + * interpolates between them for the final color. This material supports hundreds of entries relatively cheaply. + * + * @function createElevationBandMaterial + * + * @param {Object} options Object with the following properties: + * @param {Scene} options.scene The scene where the visualization is taking place. + * @param {createElevationBandMaterialBand[]} options.layers A list of bands ordered from lowest to highest precedence. + * @returns {Material} A new {@link Material} instance. + * + * @demo {@link https://sandcastle.cesium.com/index.html?src=Elevation%20Band%20Material.html|Cesium Sandcastle Elevation Band Demo} + * + * @example + * scene.globe.material = Cesium.createElevationBandMaterial({ + * scene : scene, + * layers : [{ + * entries : [{ + * height : 4200.0, + * color : new Cesium.Color(0.0, 0.0, 0.0, 1.0) + * }, { + * height : 8848.0, + * color : new Cesium.Color(1.0, 1.0, 1.0, 1.0) + * }], + * extendDownwards : true, + * extendUpwards : true, + * }, { + * entries : [{ + * height : 7000.0, + * color : new Cesium.Color(1.0, 0.0, 0.0, 0.5) + * }, { + * height : 7100.0, + * color : new Cesium.Color(1.0, 0.0, 0.0, 0.5) + * }] + * }] + * }); + */ +function createElevationBandMaterial(options) { + options = defaultValue(options, defaultValue.EMPTY_OBJECT); + var scene = options.scene; + var layers = options.layers; + + //>>includeStart('debug', pragmas.debug); + Check.typeOf.object("options.scene", scene); + Check.defined("options.layers", layers); + Check.typeOf.number.greaterThan("options.layers.length", layers.length, 0); + //>>includeEnd('debug'); + + var entries = createLayeredEntries(layers); + var entriesLength = entries.length; + var i; + + var heightTexBuffer; + var heightTexDatatype; + var heightTexFormat; + + var isPackedHeight = !createElevationBandMaterial._useFloatTexture( + scene.context + ); + if (isPackedHeight) { + heightTexDatatype = PixelDatatype.UNSIGNED_BYTE; + heightTexFormat = PixelFormat.RGBA; + heightTexBuffer = new Uint8Array(entriesLength * 4); + for (i = 0; i < entriesLength; i++) { + Cartesian4.packFloat(entries[i].height, scratchPackedFloat); + Cartesian4.pack(scratchPackedFloat, heightTexBuffer, i * 4); + } + } else { + heightTexDatatype = PixelDatatype.FLOAT; + heightTexFormat = PixelFormat.LUMINANCE; + heightTexBuffer = new Float32Array(entriesLength); + for (i = 0; i < entriesLength; i++) { + heightTexBuffer[i] = entries[i].height; + } + } + + var heightsTex = Texture.create({ + context: scene.context, + pixelFormat: heightTexFormat, + pixelDatatype: heightTexDatatype, + source: { + arrayBufferView: heightTexBuffer, + width: entriesLength, + height: 1, + }, + sampler: new Sampler({ + wrapS: TextureWrap.CLAMP_TO_EDGE, + wrapT: TextureWrap.CLAMP_TO_EDGE, + minificationFilter: TextureMinificationFilter.NEAREST, + magnificationFilter: TextureMagnificationFilter.NEAREST, + }), + }); + + var colorsArray = new Uint8Array(entriesLength * 4); + for (i = 0; i < entriesLength; i++) { + var color = entries[i].color; + color.toBytes(scratchColorBytes); + colorsArray[i * 4 + 0] = scratchColorBytes[0]; + colorsArray[i * 4 + 1] = scratchColorBytes[1]; + colorsArray[i * 4 + 2] = scratchColorBytes[2]; + colorsArray[i * 4 + 3] = scratchColorBytes[3]; + } + + var colorsTex = Texture.create({ + context: scene.context, + pixelFormat: PixelFormat.RGBA, + pixelDatatype: PixelDatatype.UNSIGNED_BYTE, + source: { + arrayBufferView: colorsArray, + width: entriesLength, + height: 1, + }, + sampler: new Sampler({ + wrapS: TextureWrap.CLAMP_TO_EDGE, + wrapT: TextureWrap.CLAMP_TO_EDGE, + minificationFilter: TextureMinificationFilter.LINEAR, + magnificationFilter: TextureMagnificationFilter.LINEAR, + }), + }); + + var material = Material.fromType("ElevationBand", { + heights: heightsTex, + colors: colorsTex, + }); + return material; +} + +/** + * Function for checking if the context will allow floating point textures for heights. + * + * @param {Context} context The {@link Context}. + * @returns {Boolean} true if floating point textures can be used for heights. + * @private + */ +createElevationBandMaterial._useFloatTexture = function (context) { + return context.floatingPointTexture; +}; + +/** + * This is the height that gets stored in the texture when using extendUpwards. + * There's nothing special about it, it's just a really big number. + * @private + */ +createElevationBandMaterial._maximumHeight = +5906376425472; + +/** + * This is the height that gets stored in the texture when using extendDownwards. + * There's nothing special about it, it's just a really big number. + * @private + */ +createElevationBandMaterial._minimumHeight = -5906376425472; + +/** + * Color used to create empty space in the color texture + * @private + */ +createElevationBandMaterial._emptyColor = new Color(0.0, 0.0, 0.0, 0.0); + +export default createElevationBandMaterial; diff --git a/Source/Scene/processPbrMaterials.js b/Source/Scene/processPbrMaterials.js index edf6f39875c6..a255b502fe25 100644 --- a/Source/Scene/processPbrMaterials.js +++ b/Source/Scene/processPbrMaterials.js @@ -289,8 +289,6 @@ function generateTechnique( defined(material.extensions.KHR_materials_unlit) ) { isUnlit = true; - hasNormals = false; - hasTangents = false; } if (hasNormals) { @@ -480,15 +478,16 @@ function generateTechnique( semantic: "NORMAL", }; vertexShader += "attribute vec3 a_normal;\n"; - vertexShader += "varying vec3 v_normal;\n"; - if (hasSkinning) { - vertexShaderMain += - " v_normal = u_normalMatrix * mat3(skinMatrix) * weightedNormal;\n"; - } else { - vertexShaderMain += " v_normal = u_normalMatrix * weightedNormal;\n"; + if (!isUnlit) { + vertexShader += "varying vec3 v_normal;\n"; + if (hasSkinning) { + vertexShaderMain += + " v_normal = u_normalMatrix * mat3(skinMatrix) * weightedNormal;\n"; + } else { + vertexShaderMain += " v_normal = u_normalMatrix * weightedNormal;\n"; + } + fragmentShader += "varying vec3 v_normal;\n"; } - - fragmentShader += "varying vec3 v_normal;\n"; fragmentShader += "varying vec3 v_positionEC;\n"; } @@ -638,7 +637,7 @@ function generateTechnique( vertexShader += "}\n"; // Fragment shader lighting - if (hasNormals) { + if (hasNormals && !isUnlit) { fragmentShader += "const float M_PI = 3.141592653589793;\n"; fragmentShader += @@ -737,7 +736,7 @@ function generateTechnique( fragmentShader += fragmentShaderMain; // Add normal mapping to fragment shader - if (hasNormals) { + if (hasNormals && !isUnlit) { fragmentShader += " vec3 ng = normalize(v_normal);\n"; fragmentShader += " vec3 positionWC = vec3(czm_inverseView * vec4(v_positionEC, 1.0));\n"; @@ -814,7 +813,7 @@ function generateTechnique( fragmentShader += " vec3 baseColor = baseColorWithAlpha.rgb;\n"; - if (hasNormals) { + if (hasNormals && !isUnlit) { if (useSpecGloss) { if (defined(generatedMaterialValues.u_specularGlossinessTexture)) { fragmentShader += diff --git a/Source/Shaders/Builtin/Functions/unpackFloat.glsl b/Source/Shaders/Builtin/Functions/unpackFloat.glsl index f13ce3c451a4..8cbcf4e51235 100644 --- a/Source/Shaders/Builtin/Functions/unpackFloat.glsl +++ b/Source/Shaders/Builtin/Functions/unpackFloat.glsl @@ -1,11 +1,5 @@ -#define SHIFT_RIGHT_8 0.00390625 //1.0 / 256.0 -#define SHIFT_RIGHT_16 0.00001525878 //1.0 / 65536.0 -#define SHIFT_RIGHT_24 5.960464477539063e-8//1.0 / 16777216.0 - -#define BIAS 38.0 - /** - * Unpacks a vec4 value containing values expressable as uint8 to an arbitrary float. + * Unpack an IEEE 754 single-precision float that is packed as a little-endian unsigned normalized vec4. * * @name czm_unpackFloat * @glslFunction @@ -14,17 +8,17 @@ * * @returns {float} The floating-point depth in arbitrary range. */ - float czm_unpackFloat(vec4 packedFloat) +float czm_unpackFloat(vec4 packedFloat) { - packedFloat *= 255.0; - float temp = packedFloat.w / 2.0; - float exponent = floor(temp); - float sign = (temp - exponent) * 2.0; - exponent = exponent - float(BIAS); - sign = sign * 2.0 - 1.0; - sign = -sign; - float unpacked = sign * packedFloat.x * float(SHIFT_RIGHT_8); - unpacked += sign * packedFloat.y * float(SHIFT_RIGHT_16); - unpacked += sign * packedFloat.z * float(SHIFT_RIGHT_24); - return unpacked * pow(10.0, exponent); + // Convert to [0.0, 255.0] and round to integer + packedFloat = floor(packedFloat * 255.0 + 0.5); + float sign = 1.0 - step(128.0, packedFloat[3]) * 2.0; + float exponent = 2.0 * mod(packedFloat[3], 128.0) + step(128.0, packedFloat[2]) - 127.0; + if (exponent == -127.0) + { + return 0.0; + } + float mantissa = mod(packedFloat[2], 128.0) * 65536.0 + packedFloat[1] * 256.0 + packedFloat[0] + float(0x800000); + float result = sign * exp2(exponent - 23.0) * mantissa; + return result; } diff --git a/Source/Shaders/Materials/ElevationBandMaterial.glsl b/Source/Shaders/Materials/ElevationBandMaterial.glsl new file mode 100644 index 000000000000..1e4a4ef53b3f --- /dev/null +++ b/Source/Shaders/Materials/ElevationBandMaterial.glsl @@ -0,0 +1,74 @@ +uniform sampler2D heights; +uniform sampler2D colors; + +// This material expects heights to be sorted from lowest to highest. + +float getHeight(int idx, float invTexSize) +{ + vec2 uv = vec2((float(idx) + 0.5) * invTexSize, 0.5); +#ifdef OES_texture_float + return texture2D(heights, uv).x; +#else + return czm_unpackFloat(texture2D(heights, uv)); +#endif +} + +czm_material czm_getMaterial(czm_materialInput materialInput) +{ + czm_material material = czm_getDefaultMaterial(materialInput); + + float height = materialInput.height; + float invTexSize = 1.0 / float(heightsDimensions.x); + + float minHeight = getHeight(0, invTexSize); + float maxHeight = getHeight(heightsDimensions.x - 1, invTexSize); + + // early-out when outside the height range + if (height < minHeight || height > maxHeight) { + material.diffuse = vec3(0.0); + material.alpha = 0.0; + return material; + } + + // Binary search to find heights above and below. + int idxBelow = 0; + int idxAbove = heightsDimensions.x; + float heightBelow = minHeight; + float heightAbove = maxHeight; + + // while loop not allowed, so use for loop with max iterations. + // maxIterations of 16 supports a texture size up to 65536 (2^16). + const int maxIterations = 16; + for (int i = 0; i < maxIterations; i++) { + if (idxBelow >= idxAbove - 1) { + break; + } + + int idxMid = (idxBelow + idxAbove) / 2; + float heightTex = getHeight(idxMid, invTexSize); + + if (height > heightTex) { + idxBelow = idxMid; + heightBelow = heightTex; + } else { + idxAbove = idxMid; + heightAbove = heightTex; + } + } + + float lerper = heightBelow == heightAbove ? 1.0 : (height - heightBelow) / (heightAbove - heightBelow); + vec2 colorUv = vec2(invTexSize * (float(idxBelow) + 0.5 + lerper), 0.5); + vec4 color = texture2D(colors, colorUv); + + // undo preumultiplied alpha + if (color.a > 0.0) + { + color.rgb /= color.a; + } + + color.rgb = czm_gammaCorrect(color.rgb); + + material.diffuse = color.rgb; + material.alpha = color.a; + return material; +} diff --git a/Source/ThirdParty/GltfPipeline/parseGlb.js b/Source/ThirdParty/GltfPipeline/parseGlb.js index 937bf6ec283f..011efca02b38 100644 --- a/Source/ThirdParty/GltfPipeline/parseGlb.js +++ b/Source/ThirdParty/GltfPipeline/parseGlb.js @@ -2,8 +2,8 @@ import addPipelineExtras from './addPipelineExtras.js' import removeExtensionsUsed from './removeExtensionsUsed.js' import defaultValue from '../../Core/defaultValue.js' import defined from '../../Core/defined.js' +import getJsonFromTypedArray from '../../Core/getJsonFromTypedArray.js' import getMagic from '../../Core/getMagic.js' -import getStringFromTypedArray from '../../Core/getStringFromTypedArray.js' import RuntimeError from '../../Core/RuntimeError.js' var sizeOfUint32 = 4; @@ -60,8 +60,7 @@ import RuntimeError from '../../Core/RuntimeError.js' var jsonStart = 20; var binaryStart = jsonStart + contentLength; - var contentString = getStringFromTypedArray(glb, jsonStart, contentLength); - var gltf = JSON.parse(contentString); + var gltf = getJsonFromTypedArray(glb, jsonStart, contentLength); addPipelineExtras(gltf); var binaryBuffer = glb.subarray(binaryStart, length); @@ -93,8 +92,7 @@ import RuntimeError from '../../Core/RuntimeError.js' byteOffset += chunkLength; // Load JSON chunk if (chunkType === 0x4E4F534A) { - var jsonString = getStringFromTypedArray(chunkBuffer); - gltf = JSON.parse(jsonString); + gltf = getJsonFromTypedArray(chunkBuffer); addPipelineExtras(gltf); } // Load Binary chunk diff --git a/Source/ThirdParty/purify.js b/Source/ThirdParty/purify.js index 895787636304..b031c49dff0c 100644 --- a/Source/ThirdParty/purify.js +++ b/Source/ThirdParty/purify.js @@ -1,62 +1,197 @@ -var html = ['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']; +/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.0.8/LICENSE */ -// SVG -var svg = ['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'audio', 'canvas', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'video', 'view', 'vkern']; +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var hasOwnProperty = Object.hasOwnProperty, + setPrototypeOf = Object.setPrototypeOf, + isFrozen = Object.isFrozen; +var freeze = Object.freeze, + seal = Object.seal, + create = Object.create; // eslint-disable-line import/no-mutable-exports + +var _ref = typeof Reflect !== 'undefined' && Reflect, + apply = _ref.apply, + construct = _ref.construct; + +if (!apply) { + apply = function apply(fun, thisValue, args) { + return fun.apply(thisValue, args); + }; +} + +if (!freeze) { + freeze = function freeze(x) { + return x; + }; +} -var svgFilters = ['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']; +if (!seal) { + seal = function seal(x) { + return x; + }; +} -var mathMl = ['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmuliscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mpspace', 'msqrt', 'mystyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']; +if (!construct) { + construct = function construct(Func, args) { + return new (Function.prototype.bind.apply(Func, [null].concat(_toConsumableArray(args))))(); + }; +} -var text = ['#text']; +var arrayForEach = unapply(Array.prototype.forEach); +var arrayPop = unapply(Array.prototype.pop); +var arrayPush = unapply(Array.prototype.push); -var html$1 = ['accept', 'action', 'align', 'alt', 'autocomplete', 'background', 'bgcolor', 'border', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'coords', 'crossorigin', 'datetime', 'default', 'dir', 'disabled', 'download', 'enctype', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'integrity', 'ismap', 'label', 'lang', 'list', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'multiple', 'name', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns']; +var stringToLowerCase = unapply(String.prototype.toLowerCase); +var stringMatch = unapply(String.prototype.match); +var stringReplace = unapply(String.prototype.replace); +var stringIndexOf = unapply(String.prototype.indexOf); +var stringTrim = unapply(String.prototype.trim); + +var regExpTest = unapply(RegExp.prototype.test); + +var typeErrorCreate = unconstruct(TypeError); + +function unapply(func) { + return function (thisArg) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } -var svg$1 = ['accent-height', 'accumulate', 'additivive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'tabindex', 'targetx', 'targety', 'transform', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']; + return apply(func, thisArg, args); + }; +} -var mathMl$1 = ['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']; +function unconstruct(func) { + return function () { + for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } -var xml = ['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']; + return construct(func, args); + }; +} /* Add properties to a lookup table */ function addToSet(set, array) { + if (setPrototypeOf) { + // Make 'in' and truthy checks like Boolean(set.constructor) + // independent of any properties defined on Object.prototype. + // Prevent prototype setters from intercepting set as a this value. + setPrototypeOf(set, null); + } + var l = array.length; while (l--) { - if (typeof array[l] === 'string') { - array[l] = array[l].toLowerCase(); + var element = array[l]; + if (typeof element === 'string') { + var lcElement = stringToLowerCase(element); + if (lcElement !== element) { + // Config presets (e.g. tags.js, attrs.js) are immutable. + if (!isFrozen(array)) { + array[l] = lcElement; + } + + element = lcElement; + } } - set[array[l]] = true; + + set[element] = true; } + return set; } /* Shallow clone an object */ function clone(object) { - var newObject = {}; + var newObject = create(null); + var property = void 0; for (property in object) { - if (Object.prototype.hasOwnProperty.call(object, property)) { + if (apply(hasOwnProperty, object, [property])) { newObject[property] = object[property]; } } + return newObject; } -var MUSTACHE_EXPR = /\{\{[\s\S]*|[\s\S]*\}\}/gm; // Specify template detection regex for SAFE_FOR_TEMPLATES mode -var ERB_EXPR = /<%[\s\S]*|[\s\S]*%>/gm; -var DATA_ATTR = /^data-[\-\w.\u00B7-\uFFFF]/; // eslint-disable-line no-useless-escape -var ARIA_ATTR = /^aria-[\-\w]+$/; // eslint-disable-line no-useless-escape -var IS_ALLOWED_URI = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i; // eslint-disable-line no-useless-escape -var IS_SCRIPT_OR_DATA = /^(?:\w+script|data):/i; -var ATTR_WHITESPACE = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g; // eslint-disable-line no-control-regex +var html = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); + +// SVG +var svg = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'audio', 'canvas', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'video', 'view', 'vkern']); + +var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); + +var mathMl = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']); + +var text = freeze(['#text']); + +var html$1 = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns']); + +var svg$1 = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']); + +var mathMl$1 = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']); + +var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']); + +// eslint-disable-next-line unicorn/better-regex +var MUSTACHE_EXPR = seal(/\{\{[\s\S]*|[\s\S]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode +var ERB_EXPR = seal(/<%[\s\S]*|[\s\S]*%>/gm); +var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape +var ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape +var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape +); +var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i); +var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex +); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } +function _toConsumableArray$1(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } var getGlobal = function getGlobal() { return typeof window === 'undefined' ? null : window; }; +/** + * Creates a no-op policy for internal use only. + * Don't export this function outside this module! + * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory. + * @param {Document} document The document object (to determine policy name suffix) + * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types + * are not supported). + */ +var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) { + if ((typeof trustedTypes === 'undefined' ? 'undefined' : _typeof(trustedTypes)) !== 'object' || typeof trustedTypes.createPolicy !== 'function') { + return null; + } + + // Allow the callers to control the unique policy name + // by adding a data-tt-policy-suffix to the script element with the DOMPurify. + // Policy creation with duplicate names throws in Trusted Types. + var suffix = null; + var ATTR_NAME = 'data-tt-policy-suffix'; + if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) { + suffix = document.currentScript.getAttribute(ATTR_NAME); + } + + var policyName = 'dompurify' + (suffix ? '#' + suffix : ''); + + try { + return trustedTypes.createPolicy(policyName, { + createHTML: function createHTML(html$$1) { + return html$$1; + } + }); + } catch (_) { + // Policy creation failed (most likely another DOMPurify script has + // already run). Skip creating the policy, as this will only cause errors + // if TT are enforced. + console.warn('TrustedTypes policy ' + policyName + ' could not be created.'); + return null; + } +}; + function createDOMPurify() { var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal(); @@ -68,7 +203,7 @@ function createDOMPurify() { * Version label, exposed for easier checks * if DOMPurify is up to date or not */ - DOMPurify.version = '1.0.8'; + DOMPurify.version = '2.2.2'; /** * Array of elements that DOMPurify removed during sanitation. @@ -85,8 +220,6 @@ function createDOMPurify() { } var originalDocument = window.document; - var useDOMParser = false; // See comment below - var removeTitle = false; // See comment below var document = window.document; var DocumentFragment = window.DocumentFragment, @@ -97,7 +230,8 @@ function createDOMPurify() { NamedNodeMap = _window$NamedNodeMap === undefined ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap, Text = window.Text, Comment = window.Comment, - DOMParser = window.DOMParser; + DOMParser = window.DOMParser, + trustedTypes = window.trustedTypes; // As per issue #47, the web-components registry is inherited by a // new document created via createHTMLDocument. As per the spec @@ -113,6 +247,9 @@ function createDOMPurify() { } } + var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument); + var emptyHTML = trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML('') : ''; + var _document = document, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, @@ -121,12 +258,17 @@ function createDOMPurify() { var importNode = originalDocument.importNode; + var documentMode = {}; + try { + documentMode = clone(document).documentMode ? document.documentMode : {}; + } catch (_) {} + var hooks = {}; /** * Expose whether this browser supports running the full DOMPurify. */ - DOMPurify.isSupported = implementation && typeof implementation.createHTMLDocument !== 'undefined' && document.documentMode !== 9; + DOMPurify.isSupported = implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9; var MUSTACHE_EXPR$$1 = MUSTACHE_EXPR, ERB_EXPR$$1 = ERB_EXPR, @@ -135,6 +277,7 @@ function createDOMPurify() { IS_SCRIPT_OR_DATA$$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$$1 = ATTR_WHITESPACE; var IS_ALLOWED_URI$$1 = IS_ALLOWED_URI; + /** * We consider the elements and attributes below to be safe. Ideally * don't add any new ones but feel free to remove unwanted ones. @@ -143,11 +286,11 @@ function createDOMPurify() { /* allowed element names */ var ALLOWED_TAGS = null; - var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(svgFilters), _toConsumableArray(mathMl), _toConsumableArray(text))); + var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(html), _toConsumableArray$1(svg), _toConsumableArray$1(svgFilters), _toConsumableArray$1(mathMl), _toConsumableArray$1(text))); /* Allowed attribute names */ var ALLOWED_ATTR = null; - var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(mathMl$1), _toConsumableArray(xml))); + var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray$1(html$1), _toConsumableArray$1(svg$1), _toConsumableArray$1(mathMl$1), _toConsumableArray$1(xml))); /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */ var FORBID_TAGS = null; @@ -164,9 +307,6 @@ function createDOMPurify() { /* Decide if unknown protocols are okay */ var ALLOW_UNKNOWN_PROTOCOLS = false; - /* Output should be safe for jQuery's $() factory? */ - var SAFE_FOR_JQUERY = false; - /* Output should be safe for common template engines. * This means, DOMPurify removes data attributes, mustaches and ERB */ @@ -182,19 +322,30 @@ function createDOMPurify() { * document.body. By default, browsers might move them to document.head */ var FORCE_BODY = false; - /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html string. + /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html + * string (or a TrustedHTML object if Trusted Types are supported). * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead */ var RETURN_DOM = false; - /* Decide if a DOM `DocumentFragment` should be returned, instead of a html string */ + /* Decide if a DOM `DocumentFragment` should be returned, instead of a html + * string (or a TrustedHTML object if Trusted Types are supported) */ var RETURN_DOM_FRAGMENT = false; /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM * `Node` is imported into the current `Document`. If this flag is not enabled the * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by - * DOMPurify. */ - var RETURN_DOM_IMPORT = false; + * DOMPurify. + * + * This defaults to `true` starting DOMPurify 2.2.0. Note that setting it to `false` + * might cause XSS from attacks hidden in closed shadowroots in case the browser + * supports Declarative Shadow: DOM https://web.dev/declarative-shadow-dom/ + */ + var RETURN_DOM_IMPORT = true; + + /* Try to return a Trusted Type object instead of a string, return a string in + * case Trusted Types are not supported */ + var RETURN_TRUSTED_TYPE = false; /* Output should be free from DOM clobbering attacks? */ var SANITIZE_DOM = true; @@ -210,13 +361,15 @@ function createDOMPurify() { var USE_PROFILES = {}; /* Tags to ignore content of when KEEP_CONTENT is true */ - var FORBID_CONTENTS = addToSet({}, ['audio', 'head', 'math', 'script', 'style', 'template', 'svg', 'video']); + var FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']); /* Tags that are safe for data: URIs */ - var DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image']); + var DATA_URI_TAGS = null; + var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']); /* Attributes safe for values like "javascript:" */ - var URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'summary', 'title', 'value', 'style', 'xmlns']); + var URI_SAFE_ATTRIBUTES = null; + var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'summary', 'title', 'value', 'style', 'xmlns']); /* Keep a reference to config to pass to hooks */ var CONFIG = null; @@ -233,32 +386,40 @@ function createDOMPurify() { */ // eslint-disable-next-line complexity var _parseConfig = function _parseConfig(cfg) { + if (CONFIG && CONFIG === cfg) { + return; + } + /* Shield configuration object from tampering */ - if ((typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') { + if (!cfg || (typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') { cfg = {}; } + + /* Shield configuration object from prototype pollution */ + cfg = clone(cfg); + /* Set configuration parameters */ ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS; ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR; + URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR) : DEFAULT_URI_SAFE_ATTRIBUTES; + DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS) : DEFAULT_DATA_URI_TAGS; FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {}; FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {}; USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false; ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false - SAFE_FOR_JQUERY = cfg.SAFE_FOR_JQUERY || false; // Default false SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false RETURN_DOM = cfg.RETURN_DOM || false; // Default false RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false - RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT || false; // Default false + RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT !== false; // Default true + RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false FORCE_BODY = cfg.FORCE_BODY || false; // Default false SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true IN_PLACE = cfg.IN_PLACE || false; // Default false - IS_ALLOWED_URI$$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$$1; - if (SAFE_FOR_TEMPLATES) { ALLOW_DATA_ATTR = false; } @@ -269,22 +430,25 @@ function createDOMPurify() { /* Parse profile info */ if (USE_PROFILES) { - ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(text))); + ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(text))); ALLOWED_ATTR = []; if (USE_PROFILES.html === true) { addToSet(ALLOWED_TAGS, html); addToSet(ALLOWED_ATTR, html$1); } + if (USE_PROFILES.svg === true) { addToSet(ALLOWED_TAGS, svg); addToSet(ALLOWED_ATTR, svg$1); addToSet(ALLOWED_ATTR, xml); } + if (USE_PROFILES.svgFilters === true) { addToSet(ALLOWED_TAGS, svgFilters); addToSet(ALLOWED_ATTR, svg$1); addToSet(ALLOWED_ATTR, xml); } + if (USE_PROFILES.mathMl === true) { addToSet(ALLOWED_TAGS, mathMl); addToSet(ALLOWED_ATTR, mathMl$1); @@ -297,14 +461,18 @@ function createDOMPurify() { if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) { ALLOWED_TAGS = clone(ALLOWED_TAGS); } + addToSet(ALLOWED_TAGS, cfg.ADD_TAGS); } + if (cfg.ADD_ATTR) { if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) { ALLOWED_ATTR = clone(ALLOWED_ATTR); } + addToSet(ALLOWED_ATTR, cfg.ADD_ATTR); } + if (cfg.ADD_URI_SAFE_ATTR) { addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR); } @@ -319,15 +487,16 @@ function createDOMPurify() { addToSet(ALLOWED_TAGS, ['html', 'head', 'body']); } - /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286 */ + /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */ if (ALLOWED_TAGS.table) { addToSet(ALLOWED_TAGS, ['tbody']); + delete FORBID_TAGS.tbody; } // Prevent further manipulation of configuration. // Not available in IE8, Safari 5, etc. - if (Object && 'freeze' in Object) { - Object.freeze(cfg); + if (freeze) { + freeze(cfg); } CONFIG = cfg; @@ -339,11 +508,11 @@ function createDOMPurify() { * @param {Node} node a DOM node */ var _forceRemove = function _forceRemove(node) { - DOMPurify.removed.push({ element: node }); + arrayPush(DOMPurify.removed, { element: node }); try { node.parentNode.removeChild(node); - } catch (err) { - node.outerHTML = ''; + } catch (_) { + node.outerHTML = emptyHTML; } }; @@ -355,16 +524,17 @@ function createDOMPurify() { */ var _removeAttribute = function _removeAttribute(name, node) { try { - DOMPurify.removed.push({ + arrayPush(DOMPurify.removed, { attribute: node.getAttributeNode(name), from: node }); - } catch (err) { - DOMPurify.removed.push({ + } catch (_) { + arrayPush(DOMPurify.removed, { attribute: null, from: node }); } + node.removeAttribute(name); }; @@ -383,37 +553,27 @@ function createDOMPurify() { dirty = '' + dirty; } else { /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */ - var matches = dirty.match(/^[\s]+/); + var matches = stringMatch(dirty, /^[\r\n\t ]+/); leadingWhitespace = matches && matches[0]; - if (leadingWhitespace) { - dirty = dirty.slice(leadingWhitespace.length); - } } - /* Use DOMParser to workaround Firefox bug (see comment below) */ - if (useDOMParser) { - try { - doc = new DOMParser().parseFromString(dirty, 'text/html'); - } catch (err) {} - } - - /* Remove title to fix an mXSS bug in older MS Edge */ - if (removeTitle) { - addToSet(FORBID_TAGS, ['title']); - } + var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty; + /* Use the DOMParser API by default, fallback later if needs be */ + try { + doc = new DOMParser().parseFromString(dirtyPayload, 'text/html'); + } catch (_) {} - /* Otherwise use createHTMLDocument, because DOMParser is unsafe in - Safari (see comment below) */ + /* Use createHTMLDocument in case DOMParser is not available */ if (!doc || !doc.documentElement) { doc = implementation.createHTMLDocument(''); var _doc = doc, body = _doc.body; body.parentNode.removeChild(body.parentNode.firstElementChild); - body.outerHTML = dirty; + body.outerHTML = dirtyPayload; } - if (leadingWhitespace) { + if (dirty && leadingWhitespace) { doc.body.insertBefore(document.createTextNode(leadingWhitespace), doc.body.childNodes[0] || null); } @@ -421,34 +581,6 @@ function createDOMPurify() { return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0]; }; - // Firefox uses a different parser for innerHTML rather than - // DOMParser (see https://bugzilla.mozilla.org/show_bug.cgi?id=1205631) - // which means that you *must* use DOMParser, otherwise the output may - // not be safe if used in a document.write context later. - // - // So we feature detect the Firefox bug and use the DOMParser if necessary. - // - // MS Edge, in older versions, is affected by an mXSS behavior. The second - // check tests for the behavior and fixes it if necessary. - if (DOMPurify.isSupported) { - (function () { - try { - var doc = _initDocument('

    '); - if (doc.querySelector('svg img')) { - useDOMParser = true; - } - } catch (err) {} - })(); - (function () { - try { - var doc = _initDocument('</title><img>'); - if (doc.querySelector('title').textContent.match(/<\/title/)) { - removeTitle = true; - } - } catch (err) {} - })(); - } - /** * _createIterator * @@ -471,9 +603,11 @@ function createDOMPurify() { if (elm instanceof Text || elm instanceof Comment) { return false; } - if (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function') { + + if (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string') { return true; } + return false; }; @@ -483,8 +617,8 @@ function createDOMPurify() { * @param {Node} obj object to check whether it's a DOM node * @return {Boolean} true is object is a DOM node */ - var _isNode = function _isNode(obj) { - return (typeof Node === 'undefined' ? 'undefined' : _typeof(Node)) === 'object' ? obj instanceof Node : obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && typeof obj.nodeType === 'number' && typeof obj.nodeName === 'string'; + var _isNode = function _isNode(object) { + return (typeof Node === 'undefined' ? 'undefined' : _typeof(Node)) === 'object' ? object instanceof Node : object && (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'; }; /** @@ -500,7 +634,7 @@ function createDOMPurify() { return; } - hooks[entryPoint].forEach(function (hook) { + arrayForEach(hooks[entryPoint], function (hook) { hook.call(DOMPurify, currentNode, data, CONFIG); }); }; @@ -527,8 +661,14 @@ function createDOMPurify() { return true; } + /* Check if tagname contains Unicode */ + if (stringMatch(currentNode.nodeName, /[\u0080-\uFFFF]/)) { + _forceRemove(currentNode); + return true; + } + /* Now let's check the element's type and name */ - var tagName = currentNode.nodeName.toLowerCase(); + var tagName = stringToLowerCase(currentNode.nodeName); /* Execute a hook if present */ _executeHook('uponSanitizeElement', currentNode, { @@ -536,36 +676,46 @@ function createDOMPurify() { allowedTags: ALLOWED_TAGS }); + /* Take care of an mXSS pattern using p, br inside svg, math */ + if ((tagName === 'svg' || tagName === 'math') && currentNode.querySelectorAll('p, br, form, table').length !== 0) { + _forceRemove(currentNode); + return true; + } + + /* Detect mXSS attempts abusing namespace confusion */ + if (!_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[!/\w]/g, currentNode.innerHTML) && regExpTest(/<[!/\w]/g, currentNode.textContent)) { + _forceRemove(currentNode); + return true; + } + /* Remove element if anything forbids its presence */ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) { - /* Keep content except for black-listed elements */ + /* Keep content except for bad-listed elements */ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName] && typeof currentNode.insertAdjacentHTML === 'function') { try { - currentNode.insertAdjacentHTML('AfterEnd', currentNode.innerHTML); - } catch (err) {} + var htmlToInsert = currentNode.innerHTML; + currentNode.insertAdjacentHTML('AfterEnd', trustedTypesPolicy ? trustedTypesPolicy.createHTML(htmlToInsert) : htmlToInsert); + } catch (_) {} } + _forceRemove(currentNode); return true; } - /* Convert markup to cover jQuery behavior */ - if (SAFE_FOR_JQUERY && !currentNode.firstElementChild && (!currentNode.content || !currentNode.content.firstElementChild) && /</g.test(currentNode.textContent)) { - DOMPurify.removed.push({ element: currentNode.cloneNode() }); - if (currentNode.innerHTML) { - currentNode.innerHTML = currentNode.innerHTML.replace(/</g, '<'); - } else { - currentNode.innerHTML = currentNode.textContent.replace(/</g, '<'); - } + /* Remove in case a noscript/noembed XSS is suspected */ + if ((tagName === 'noscript' || tagName === 'noembed') && regExpTest(/<\/no(script|embed)/i, currentNode.innerHTML)) { + _forceRemove(currentNode); + return true; } /* Sanitize element content to be template-safe */ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) { /* Get the element's text content */ content = currentNode.textContent; - content = content.replace(MUSTACHE_EXPR$$1, ' '); - content = content.replace(ERB_EXPR$$1, ' '); + content = stringReplace(content, MUSTACHE_EXPR$$1, ' '); + content = stringReplace(content, ERB_EXPR$$1, ' '); if (currentNode.textContent !== content) { - DOMPurify.removed.push({ element: currentNode.cloneNode() }); + arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() }); currentNode.textContent = content; } } @@ -584,54 +734,25 @@ function createDOMPurify() { * @param {string} value Attribute value. * @return {Boolean} Returns true if `value` is valid, otherwise false. */ + // eslint-disable-next-line complexity var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) { /* Make sure attribute cannot clobber */ if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) { return false; } - /* Sanitize attribute content to be template-safe */ - if (SAFE_FOR_TEMPLATES) { - value = value.replace(MUSTACHE_EXPR$$1, ' '); - value = value.replace(ERB_EXPR$$1, ' '); - } - /* Allow valid data-* attributes: At least one character after "-" (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes) XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804) We don't need to check the value; it's always URI safe. */ - if (ALLOW_DATA_ATTR && DATA_ATTR$$1.test(lcName)) { - // This attribute is safe - } else if (ALLOW_ARIA_ATTR && ARIA_ATTR$$1.test(lcName)) { - // This attribute is safe - /* Otherwise, check the name is permitted */ - } else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) { + if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$$1, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) { return false; /* Check value is safe. First, is attr inert? If so, is safe */ - } else if (URI_SAFE_ATTRIBUTES[lcName]) { - // This attribute is safe - /* Check no script, data or unknown possibly unsafe URI - unless we know URI values are safe for that attribute */ - } else if (IS_ALLOWED_URI$$1.test(value.replace(ATTR_WHITESPACE$$1, ''))) { - // This attribute is safe - /* Keep image data URIs alive if src/xlink:href is allowed */ - /* Further prevent gadget XSS for dynamically built script tags */ - } else if ((lcName === 'src' || lcName === 'xlink:href') && lcTag !== 'script' && value.indexOf('data:') === 0 && DATA_URI_TAGS[lcTag]) { - // This attribute is safe - /* Allow unknown protocols: This provides support for links that - are handled by protocol handlers which may be unknown ahead of - time, e.g. fb:, spotify: */ - } else if (ALLOW_UNKNOWN_PROTOCOLS && !IS_SCRIPT_OR_DATA$$1.test(value.replace(ATTR_WHITESPACE$$1, ''))) { - // This attribute is safe - /* Check for binary attributes */ - // eslint-disable-next-line no-negated-condition - } else if (!value) { - // Binary attributes are safe at this point - /* Anything else, presume unsafe, do not add it back */ - } else { + } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ; else if (!value) ; else { return false; } + return true; }; @@ -643,14 +764,12 @@ function createDOMPurify() { * @protect removeAttribute * @protect setAttribute * - * @param {Node} node to sanitize + * @param {Node} currentNode to sanitize */ - // eslint-disable-next-line complexity var _sanitizeAttributes = function _sanitizeAttributes(currentNode) { var attr = void 0; var value = void 0; var lcName = void 0; - var idAttr = void 0; var l = void 0; /* Execute a hook if present */ _executeHook('beforeSanitizeAttributes', currentNode, null); @@ -678,48 +797,41 @@ function createDOMPurify() { name = _attr.name, namespaceURI = _attr.namespaceURI; - value = attr.value.trim(); - lcName = name.toLowerCase(); + value = stringTrim(attr.value); + lcName = stringToLowerCase(name); /* Execute a hook if present */ hookEvent.attrName = lcName; hookEvent.attrValue = value; hookEvent.keepAttr = true; + hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set _executeHook('uponSanitizeAttribute', currentNode, hookEvent); value = hookEvent.attrValue; - - /* Remove attribute */ - // Safari (iOS + Mac), last tested v8.0.5, crashes if you try to - // remove a "name" attribute from an <img> tag that has an "id" - // attribute at the time. - if (lcName === 'name' && currentNode.nodeName === 'IMG' && attributes.id) { - idAttr = attributes.id; - attributes = Array.prototype.slice.apply(attributes); - _removeAttribute('id', currentNode); - _removeAttribute(name, currentNode); - if (attributes.indexOf(idAttr) > l) { - currentNode.setAttribute('id', idAttr.value); - } - } else if ( - // This works around a bug in Safari, where input[type=file] - // cannot be dynamically set after type has been removed - currentNode.nodeName === 'INPUT' && lcName === 'type' && value === 'file' && (ALLOWED_ATTR[lcName] || !FORBID_ATTR[lcName])) { + /* Did the hooks approve of the attribute? */ + if (hookEvent.forceKeepAttr) { continue; - } else { - // This avoids a crash in Safari v9.0 with double-ids. - // The trick is to first set the id to be empty and then to - // remove the attribute - if (name === 'id') { - currentNode.setAttribute(name, ''); - } - _removeAttribute(name, currentNode); } + /* Remove attribute */ + _removeAttribute(name, currentNode); + /* Did the hooks approve of the attribute? */ if (!hookEvent.keepAttr) { continue; } + /* Work around a security issue in jQuery 3.0 */ + if (regExpTest(/\/>/i, value)) { + _removeAttribute(name, currentNode); + continue; + } + + /* Sanitize attribute content to be template-safe */ + if (SAFE_FOR_TEMPLATES) { + value = stringReplace(value, MUSTACHE_EXPR$$1, ' '); + value = stringReplace(value, ERB_EXPR$$1, ' '); + } + /* Is `value` valid for this attribute? */ var lcTag = currentNode.nodeName.toLowerCase(); if (!_isValidAttribute(lcTag, lcName, value)) { @@ -734,8 +846,9 @@ function createDOMPurify() { /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */ currentNode.setAttribute(name, value); } - DOMPurify.removed.pop(); - } catch (err) {} + + arrayPop(DOMPurify.removed); + } catch (_) {} } /* Execute a hook if present */ @@ -801,11 +914,11 @@ function createDOMPurify() { if (typeof dirty !== 'string' && !_isNode(dirty)) { // eslint-disable-next-line no-negated-condition if (typeof dirty.toString !== 'function') { - throw new TypeError('toString is not a function'); + throw typeErrorCreate('toString is not a function'); } else { dirty = dirty.toString(); if (typeof dirty !== 'string') { - throw new TypeError('dirty is not a string, aborting'); + throw typeErrorCreate('dirty is not a string, aborting'); } } } @@ -816,10 +929,12 @@ function createDOMPurify() { if (typeof dirty === 'string') { return window.toStaticHTML(dirty); } + if (_isNode(dirty)) { return window.toStaticHTML(dirty.outerHTML); } } + return dirty; } @@ -831,23 +946,31 @@ function createDOMPurify() { /* Clean up removed elements */ DOMPurify.removed = []; - if (IN_PLACE) { - /* No special handling necessary for in-place sanitization */ - } else if (dirty instanceof Node) { + /* Check if dirty is correctly typed for IN_PLACE */ + if (typeof dirty === 'string') { + IN_PLACE = false; + } + + if (IN_PLACE) ; else if (dirty instanceof Node) { /* If dirty is a DOM element, append to an empty document to avoid elements being stripped by the parser */ - body = _initDocument('<!-->'); + body = _initDocument('<!---->'); importedNode = body.ownerDocument.importNode(dirty, true); if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') { /* Node is already a body, use as is */ body = importedNode; + } else if (importedNode.nodeName === 'HTML') { + body = importedNode; } else { + // eslint-disable-next-line unicorn/prefer-node-append body.appendChild(importedNode); } } else { /* Exit directly if we have nothing to do */ - if (!RETURN_DOM && !WHOLE_DOCUMENT && dirty.indexOf('<') === -1) { - return dirty; + if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && + // eslint-disable-next-line unicorn/prefer-includes + dirty.indexOf('<') === -1) { + return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty; } /* Initialize the document to work on */ @@ -855,7 +978,7 @@ function createDOMPurify() { /* Check we have a DOM node from the data */ if (!body) { - return RETURN_DOM ? null : ''; + return RETURN_DOM ? null : emptyHTML; } } @@ -890,6 +1013,8 @@ function createDOMPurify() { oldNode = currentNode; } + oldNode = null; + /* If we sanitized `dirty` in-place, return it. */ if (IN_PLACE) { return dirty; @@ -901,6 +1026,7 @@ function createDOMPurify() { returnNode = createDocumentFragment.call(body.ownerDocument); while (body.firstChild) { + // eslint-disable-next-line unicorn/prefer-node-append returnNode.appendChild(body.firstChild); } } else { @@ -908,18 +1034,28 @@ function createDOMPurify() { } if (RETURN_DOM_IMPORT) { - /* AdoptNode() is not used because internal state is not reset - (e.g. the past names map of a HTMLFormElement), this is safe - in theory but we would rather not risk another attack vector. - The state that is cloned by importNode() is explicitly defined - by the specs. */ + /* + AdoptNode() is not used because internal state is not reset + (e.g. the past names map of a HTMLFormElement), this is safe + in theory but we would rather not risk another attack vector. + The state that is cloned by importNode() is explicitly defined + by the specs. + */ returnNode = importNode.call(originalDocument, returnNode, true); } return returnNode; } - return WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML; + var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML; + + /* Sanitize final string template-safe */ + if (SAFE_FOR_TEMPLATES) { + serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$$1, ' '); + serializedHTML = stringReplace(serializedHTML, ERB_EXPR$$1, ' '); + } + + return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML; }; /** @@ -958,8 +1094,9 @@ function createDOMPurify() { if (!CONFIG) { _parseConfig({}); } - var lcTag = tag.toLowerCase(); - var lcName = attr.toLowerCase(); + + var lcTag = stringToLowerCase(tag); + var lcName = stringToLowerCase(attr); return _isValidAttribute(lcTag, lcName, value); }; @@ -974,8 +1111,9 @@ function createDOMPurify() { if (typeof hookFunction !== 'function') { return; } + hooks[entryPoint] = hooks[entryPoint] || []; - hooks[entryPoint].push(hookFunction); + arrayPush(hooks[entryPoint], hookFunction); }; /** @@ -987,7 +1125,7 @@ function createDOMPurify() { */ DOMPurify.removeHook = function (entryPoint) { if (hooks[entryPoint]) { - hooks[entryPoint].pop(); + arrayPop(hooks[entryPoint]); } }; @@ -1018,3 +1156,4 @@ function createDOMPurify() { var purify = createDOMPurify(); export default purify; +//# sourceMappingURL=purify.es.js.map diff --git a/Source/Widgets/Viewer/Viewer.css b/Source/Widgets/Viewer/Viewer.css index 88e47b696e68..53f3a6a1ecbe 100644 --- a/Source/Widgets/Viewer/Viewer.css +++ b/Source/Widgets/Viewer/Viewer.css @@ -20,7 +20,6 @@ position: absolute; bottom: 0; left: 0; - right: 0; padding-right: 5px; } diff --git a/Source/Widgets/Viewer/Viewer.js b/Source/Widgets/Viewer/Viewer.js index af8abeb3ed9a..bb69cd7d1320 100644 --- a/Source/Widgets/Viewer/Viewer.js +++ b/Source/Widgets/Viewer/Viewer.js @@ -313,7 +313,7 @@ function enableVRUI(viewer, enabled) { * @property {Object} [contextOptions] Context and WebGL creation properties corresponding to <code>options</code> passed to {@link Scene}. * @property {SceneMode} [sceneMode=SceneMode.SCENE3D] The initial scene mode. * @property {MapProjection} [mapProjection=new GeographicProjection()] The map projection to use in 2D and Columbus View modes. - * @property {Globe} [globe=new Globe(mapProjection.ellipsoid)] The globe to use in the scene. If set to <code>false</code>, no globe will be added. + * @property {Globe|false} [globe=new Globe(mapProjection.ellipsoid)] The globe to use in the scene. If set to <code>false</code>, no globe will be added. * @property {Boolean} [orderIndependentTranslucency=true] If true and the configuration supports it, use order independent translucency. * @property {Element|String} [creditContainer] The DOM element or ID that will contain the {@link CreditDisplay}. If not specified, the credits are added to the bottom of the widget itself. * @property {Element|String} [creditViewport] The DOM element or ID that will contain the credit pop up created by the {@link CreditDisplay}. If not specified, it will appear over the widget itself. diff --git a/Source/Workers/transferTypedArrayTest.js b/Source/Workers/transferTypedArrayTest.js index de311ff2aeb9..7440918fb3fa 100644 --- a/Source/Workers/transferTypedArrayTest.js +++ b/Source/Workers/transferTypedArrayTest.js @@ -5,7 +5,6 @@ if (typeof self === "undefined") { } self.onmessage = function (event) { - "use strict"; var array = event.data.array; var postMessage = self.webkitPostMessage || self.postMessage; diff --git a/Specs/.eslintrc.json b/Specs/.eslintrc.json index b1a827ceac51..3304a2d8b662 100644 --- a/Specs/.eslintrc.json +++ b/Specs/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": "../.eslintrc.json", + "extends": "../Source/.eslintrc.json", "env": { "jasmine": true }, diff --git a/Specs/Core/ApproximateTerrainHeightsSpec.js b/Specs/Core/ApproximateTerrainHeightsSpec.js index 64713c547204..3f405677eb0b 100644 --- a/Specs/Core/ApproximateTerrainHeightsSpec.js +++ b/Specs/Core/ApproximateTerrainHeightsSpec.js @@ -25,11 +25,11 @@ describe("Core/ApproximateTerrainHeights", function () { ); expect(result.minimumTerrainHeight).toEqualEpsilon( -476.12571188755, - CesiumMath.EPSILON10 + CesiumMath.EPSILON8 ); expect(result.maximumTerrainHeight).toEqualEpsilon( -28.53, - CesiumMath.EPSILON10 + CesiumMath.EPSILON8 ); }); @@ -60,11 +60,11 @@ describe("Core/ApproximateTerrainHeights", function () { -5403772.559109628, 1154581.5821590829 ), - CesiumMath.EPSILON10 + CesiumMath.EPSILON8 ); expect(result.radius).toEqualEpsilon( 77884.16321007285, - CesiumMath.EPSILON10 + CesiumMath.EPSILON8 ); }); diff --git a/Specs/Core/Cartesian2Spec.js b/Specs/Core/Cartesian2Spec.js index 591d66f99f5d..305748e49161 100644 --- a/Specs/Core/Cartesian2Spec.js +++ b/Specs/Core/Cartesian2Spec.js @@ -402,6 +402,14 @@ describe("Core/Cartesian2", function () { expect(result).toEqual(expectedResult); }); + it("cross", function () { + var left = new Cartesian2(0.0, 1.0); + var right = new Cartesian2(1.0, 0.0); + var expectedResult = -1.0; + var result = Cartesian2.cross(left, right); + expect(result).toEqual(expectedResult); + }); + it("add works with a result parameter", function () { var left = new Cartesian2(2.0, 3.0); var right = new Cartesian2(4.0, 5.0); diff --git a/Specs/Core/Cartesian4Spec.js b/Specs/Core/Cartesian4Spec.js index 813007d128e0..aeeac8f507ad 100644 --- a/Specs/Core/Cartesian4Spec.js +++ b/Specs/Core/Cartesian4Spec.js @@ -1084,20 +1084,53 @@ describe("Core/Cartesian4", function () { }); it("packs and unpacks floating point values for representation as uint8 4-vectors", function () { - var float = 123.456; - var packedFloat = Cartesian4.packFloat(float); - expect(0 <= packedFloat.x && packedFloat.x <= 255).toBe(true); - expect(0 <= packedFloat.y && packedFloat.y <= 255).toBe(true); - expect(0 <= packedFloat.z && packedFloat.z <= 255).toBe(true); - expect(0 <= packedFloat.w && packedFloat.w <= 255).toBe(true); - - var unpackedFloat = Cartesian4.unpackFloat(packedFloat); - expect( - CesiumMath.equalsEpsilon(float, unpackedFloat, CesiumMath.EPSILON7) - ).toBe(true); - - var packedZero = Cartesian4.packFloat(0); - expect(packedZero).toEqual(Cartesian4.ZERO); + function testFloat(float) { + var packedFloat = Cartesian4.packFloat(float); + expect(0 <= packedFloat.x && packedFloat.x <= 255).toBe(true); + expect(0 <= packedFloat.y && packedFloat.y <= 255).toBe(true); + expect(0 <= packedFloat.z && packedFloat.z <= 255).toBe(true); + expect(0 <= packedFloat.w && packedFloat.w <= 255).toBe(true); + + var unpackedFloat = Cartesian4.unpackFloat(packedFloat); + expect(unpackedFloat).toEqual(float); + } + + function testFloatNaN(float) { + expect(float).toBeNaN(); + var packedFloat = Cartesian4.packFloat(float); + var unpackedFloat = Cartesian4.unpackFloat(packedFloat); + expect(unpackedFloat).toBeNaN(); + } + + function testFloatOutOfRange(float) { + var packedFloat = Cartesian4.packFloat(float); + var unpackedFloat = Cartesian4.unpackFloat(packedFloat); + expect(unpackedFloat).toEqual(CesiumMath.sign(float) * Infinity); + } + + testFloat(0.0); + testFloat(-1.0); + testFloat(+1.0); + testFloat(123.5); + testFloat(16777216); + + testFloat(+Infinity); // 64-bit infinity -> 32-bit infinity + testFloat(-Infinity); // 64-bit infinity -> 32-bit infinity + testFloatNaN(NaN); // 64-bit NaN -> 32bit NaN + + testFloatOutOfRange(+Number.MAX_VALUE); + testFloatOutOfRange(-Number.MAX_VALUE); + + var f32 = new Float32Array(1); + + f32[0] = +Infinity; + testFloat(f32[0]); // 32-bit infinity + + f32[0] = -Infinity; + testFloat(f32[0]); // 32-bit infinity + + f32[0] = NaN; + testFloatNaN(f32[0]); // 32-bit NaN }); createPackableSpecs(Cartesian4, new Cartesian4(1, 2, 3, 4), [1, 2, 3, 4]); diff --git a/Specs/Core/EllipsoidGeodesicSpec.js b/Specs/Core/EllipsoidGeodesicSpec.js index 125b19f21fca..7fbdfc89ac8c 100644 --- a/Specs/Core/EllipsoidGeodesicSpec.js +++ b/Specs/Core/EllipsoidGeodesicSpec.js @@ -121,6 +121,19 @@ describe("Core/EllipsoidGeodesic", function () { ); }); + it("computes distance very close to equator", function () { + // See https://github.com/CesiumGS/cesium/issues/9248 + + var ellipsoid = new Ellipsoid(6, 6, 3); + + var start = new Cartographic(-CesiumMath.EPSILON10, CesiumMath.EPSILON10); + + var end = new Cartographic(+CesiumMath.EPSILON10, CesiumMath.EPSILON10); + + var geodesic = new EllipsoidGeodesic(start, end, ellipsoid); + expect(geodesic.surfaceDistance).not.toBeNaN(); + }); + it("computes distance at meridian", function () { var ellipsoid = new Ellipsoid(6, 6, 6); var fifteenDegrees = Math.PI / 12; diff --git a/Specs/Core/GoogleEarthEnterpriseTerrainDataSpec.js b/Specs/Core/GoogleEarthEnterpriseTerrainDataSpec.js index d74dfd3de467..814267b5a0a7 100644 --- a/Specs/Core/GoogleEarthEnterpriseTerrainDataSpec.js +++ b/Specs/Core/GoogleEarthEnterpriseTerrainDataSpec.js @@ -146,7 +146,14 @@ describe("Core/GoogleEarthEnterpriseTerrainData", function () { tilingScheme.tileXYToRectangle(1, 1, 1), ]; - return when(data.createMesh(tilingScheme, 0, 0, 0, 1)) + return when( + data.createMesh({ + tilingScheme: tilingScheme, + x: 0, + y: 0, + level: 0, + }) + ) .then(function () { var swPromise = data.upsample(tilingScheme, 0, 0, 0, 0, 0, 1); var sePromise = data.upsample(tilingScheme, 0, 0, 0, 1, 0, 1); @@ -247,25 +254,45 @@ describe("Core/GoogleEarthEnterpriseTerrainData", function () { it("requires tilingScheme", function () { expect(function () { - data.createMesh(undefined, 0, 0, 0); + data.createMesh({ + tilingScheme: undefined, + x: 0, + y: 0, + level: 0, + }); }).toThrowDeveloperError(); }); it("requires x", function () { expect(function () { - data.createMesh(tilingScheme, undefined, 0, 0); + data.createMesh({ + tilingScheme: tilingScheme, + x: undefined, + y: 0, + level: 0, + }); }).toThrowDeveloperError(); }); it("requires y", function () { expect(function () { - data.createMesh(tilingScheme, 0, undefined, 0); + data.createMesh({ + tilingScheme: tilingScheme, + x: 0, + y: undefined, + level: 0, + }); }).toThrowDeveloperError(); }); it("requires level", function () { expect(function () { - data.createMesh(tilingScheme, 0, 0, undefined); + data.createMesh({ + tilingScheme: tilingScheme, + x: 0, + y: 0, + level: undefined, + }); }).toThrowDeveloperError(); }); @@ -273,59 +300,74 @@ describe("Core/GoogleEarthEnterpriseTerrainData", function () { var rectangle = tilingScheme.tileXYToRectangle(0, 0, 0); var wgs84 = Ellipsoid.WGS84; - return data.createMesh(tilingScheme, 0, 0, 0).then(function (mesh) { - expect(mesh).toBeInstanceOf(TerrainMesh); - expect(mesh.vertices.length).toBe(17 * mesh.encoding.getStride()); // 9 regular + 8 skirt vertices - expect(mesh.indices.length).toBe(4 * 6 * 3); // 2 regular + 4 skirt triangles per quad - expect(mesh.minimumHeight).toBe(0); - expect(mesh.maximumHeight).toBeCloseTo(20, 5); - - var encoding = mesh.encoding; - var cartesian = new Cartesian3(); - var cartographic = new Cartographic(); - var count = mesh.vertices.length / mesh.encoding.getStride(); - for (var i = 0; i < count; ++i) { - var height = encoding.decodeHeight(mesh.vertices, i); - if (i < 9) { - // Original vertices - expect(height).toBeBetween(0, 20); - - // Only test on original positions as the skirts angle outward - encoding.decodePosition(mesh.vertices, i, cartesian); - wgs84.cartesianToCartographic(cartesian, cartographic); - cartographic.longitude = CesiumMath.convertLongitudeRange( - cartographic.longitude - ); - expect(Rectangle.contains(rectangle, cartographic)).toBe(true); - } else { - // Skirts - expect(height).toBeBetween(-1000, -980); + return data + .createMesh({ + tilingScheme: tilingScheme, + x: 0, + y: 0, + level: 0, + }) + .then(function (mesh) { + expect(mesh).toBeInstanceOf(TerrainMesh); + expect(mesh.vertices.length).toBe(17 * mesh.encoding.getStride()); // 9 regular + 8 skirt vertices + expect(mesh.indices.length).toBe(4 * 6 * 3); // 2 regular + 4 skirt triangles per quad + expect(mesh.minimumHeight).toBe(0); + expect(mesh.maximumHeight).toBeCloseTo(20, 5); + + var encoding = mesh.encoding; + var cartesian = new Cartesian3(); + var cartographic = new Cartographic(); + var count = mesh.vertices.length / mesh.encoding.getStride(); + for (var i = 0; i < count; ++i) { + var height = encoding.decodeHeight(mesh.vertices, i); + if (i < 9) { + // Original vertices + expect(height).toBeBetween(0, 20); + + // Only test on original positions as the skirts angle outward + encoding.decodePosition(mesh.vertices, i, cartesian); + wgs84.cartesianToCartographic(cartesian, cartographic); + cartographic.longitude = CesiumMath.convertLongitudeRange( + cartographic.longitude + ); + expect(Rectangle.contains(rectangle, cartographic)).toBe(true); + } else { + // Skirts + expect(height).toBeBetween(-1000, -980); + } } - } - }); + }); }); it("exaggerates mesh", function () { - return data.createMesh(tilingScheme, 0, 0, 0, 2).then(function (mesh) { - expect(mesh).toBeInstanceOf(TerrainMesh); - expect(mesh.vertices.length).toBe(17 * mesh.encoding.getStride()); // 9 regular + 8 skirt vertices - expect(mesh.indices.length).toBe(4 * 6 * 3); // 2 regular + 4 skirt triangles per quad - expect(mesh.minimumHeight).toBe(0); - expect(mesh.maximumHeight).toBeCloseTo(40, 5); - - var encoding = mesh.encoding; - var count = mesh.vertices.length / mesh.encoding.getStride(); - for (var i = 0; i < count; ++i) { - var height = encoding.decodeHeight(mesh.vertices, i); - if (i < 9) { - // Original vertices - expect(height).toBeBetween(0, 40); - } else { - // Skirts - expect(height).toBeBetween(-1000, -960); + return data + .createMesh({ + tilingScheme: tilingScheme, + x: 0, + y: 0, + level: 0, + exaggeration: 2, + }) + .then(function (mesh) { + expect(mesh).toBeInstanceOf(TerrainMesh); + expect(mesh.vertices.length).toBe(17 * mesh.encoding.getStride()); // 9 regular + 8 skirt vertices + expect(mesh.indices.length).toBe(4 * 6 * 3); // 2 regular + 4 skirt triangles per quad + expect(mesh.minimumHeight).toBe(0); + expect(mesh.maximumHeight).toBeCloseTo(40, 5); + + var encoding = mesh.encoding; + var count = mesh.vertices.length / mesh.encoding.getStride(); + for (var i = 0; i < count; ++i) { + var height = encoding.decodeHeight(mesh.vertices, i); + if (i < 9) { + // Original vertices + expect(height).toBeBetween(0, 40); + } else { + // Skirts + expect(height).toBeBetween(-1000, -960); + } } - } - }); + }); }); }); diff --git a/Specs/Core/HeightmapTerrainDataSpec.js b/Specs/Core/HeightmapTerrainDataSpec.js index 7581407fe40d..8c17248a5064 100644 --- a/Specs/Core/HeightmapTerrainDataSpec.js +++ b/Specs/Core/HeightmapTerrainDataSpec.js @@ -1,7 +1,9 @@ +import { defined } from "../../Source/Cesium.js"; import { GeographicTilingScheme } from "../../Source/Cesium.js"; import { HeightmapEncoding } from "../../Source/Cesium.js"; import { HeightmapTerrainData } from "../../Source/Cesium.js"; import { TerrainData } from "../../Source/Cesium.js"; +import { when } from "../../Source/Cesium.js"; describe("Core/HeightmapTerrainData", function () { it("conforms to TerrainData interface", function () { @@ -68,38 +70,99 @@ describe("Core/HeightmapTerrainData", function () { var data; var tilingScheme; - beforeEach(function () { - tilingScheme = new GeographicTilingScheme(); - data = new HeightmapTerrainData({ + function createSampleTerrainData() { + return new HeightmapTerrainData({ buffer: new Float32Array(25), width: 5, height: 5, }); + } + + beforeEach(function () { + tilingScheme = new GeographicTilingScheme(); + data = createSampleTerrainData(); }); it("requires tilingScheme", function () { expect(function () { - data.createMesh(undefined, 0, 0, 0); + data.createMesh({ tilingScheme: undefined, x: 0, y: 0, level: 0 }); }).toThrowDeveloperError(); }); it("requires x", function () { expect(function () { - data.createMesh(tilingScheme, undefined, 0, 0); + data.createMesh({ + tilingScheme: tilingScheme, + x: undefined, + y: 0, + level: 0, + }); }).toThrowDeveloperError(); }); it("requires y", function () { expect(function () { - data.createMesh(tilingScheme, 0, undefined, 0); + data.createMesh({ + tilingScheme: tilingScheme, + x: 0, + y: undefined, + level: 0, + }); }).toThrowDeveloperError(); }); it("requires level", function () { expect(function () { - data.createMesh(tilingScheme, 0, 0, undefined); + data.createMesh({ + tilingScheme: tilingScheme, + x: 0, + y: 0, + level: undefined, + }); }).toThrowDeveloperError(); }); + + it("enables throttling for asynchronous tasks", function () { + var options = { + tilingScheme: tilingScheme, + x: 0, + y: 0, + level: 0, + throttle: true, + }; + var taskCount = TerrainData.maximumAsynchronousTasks + 1; + var promises = new Array(); + for (var i = 0; i < taskCount; i++) { + var tempData = createSampleTerrainData(); + var promise = tempData.createMesh(options); + if (defined(promise)) { + promises.push(promise); + } + } + expect(promises.length).toBe(TerrainData.maximumAsynchronousTasks); + return when.all(promises); + }); + + it("disables throttling for asynchronous tasks", function () { + var options = { + tilingScheme: tilingScheme, + x: 0, + y: 0, + level: 0, + throttle: false, + }; + var taskCount = TerrainData.maximumAsynchronousTasks + 1; + var promises = new Array(); + for (var i = 0; i < taskCount; i++) { + var tempData = createSampleTerrainData(); + var promise = tempData.createMesh(options); + if (defined(promise)) { + promises.push(promise); + } + } + expect(promises.length).toBe(taskCount); + return when.all(promises); + }); }); describe("upsample", function () { @@ -188,7 +251,7 @@ describe("Core/HeightmapTerrainData", function () { }); return data - .createMesh(tilingScheme, 0, 0, 0, 1) + .createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 }) .then(function () { return data.upsample(tilingScheme, 0, 0, 0, 0, 0, 1); }) @@ -278,7 +341,7 @@ describe("Core/HeightmapTerrainData", function () { }); return data - .createMesh(tilingScheme, 0, 0, 0, 1) + .createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 }) .then(function () { return data.upsample(tilingScheme, 0, 0, 0, 0, 0, 1); }) @@ -401,7 +464,7 @@ describe("Core/HeightmapTerrainData", function () { }); return data - .createMesh(tilingScheme, 0, 0, 0, 1) + .createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 }) .then(function () { return data.upsample(tilingScheme, 0, 0, 0, 0, 0, 1); }) @@ -487,7 +550,7 @@ describe("Core/HeightmapTerrainData", function () { }); return data - .createMesh(tilingScheme, 0, 0, 0, 1) + .createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 }) .then(function () { return data.upsample(tilingScheme, 0, 0, 0, 1, 0, 1); }) @@ -577,7 +640,7 @@ describe("Core/HeightmapTerrainData", function () { }); return data - .createMesh(tilingScheme, 0, 0, 0, 1) + .createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 }) .then(function () { return data.upsample(tilingScheme, 0, 0, 0, 1, 0, 1); }) @@ -669,7 +732,7 @@ describe("Core/HeightmapTerrainData", function () { }); return data - .createMesh(tilingScheme, 0, 0, 0, 1) + .createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 }) .then(function () { return data.upsample(tilingScheme, 0, 0, 0, 0, 0, 1); }) diff --git a/Specs/Core/MathSpec.js b/Specs/Core/MathSpec.js index d065817d3afd..f725d58bac90 100644 --- a/Specs/Core/MathSpec.js +++ b/Specs/Core/MathSpec.js @@ -207,51 +207,33 @@ describe("Core/Math", function () { }).toThrowDeveloperError(); }); - it("negativePiToPi positive", function () { - expect(CesiumMath.negativePiToPi((Math.PI / 2) * Math.PI)).toEqualEpsilon( - (Math.PI / 2) * Math.PI - CesiumMath.TWO_PI, - CesiumMath.EPSILON16 - ); - expect(CesiumMath.negativePiToPi(Math.PI / 0.5)).toEqualEpsilon( - 0.0, - CesiumMath.EPSILON16 - ); - expect( - CesiumMath.negativePiToPi(Math.PI + CesiumMath.EPSILON10) - ).toEqualEpsilon(-Math.PI, CesiumMath.EPSILON9); - expect(CesiumMath.negativePiToPi(Math.PI)).toEqualEpsilon( - Math.PI, - CesiumMath.EPSILON9 - ); - }); - - it("negativePiToPi negative", function () { - expect(CesiumMath.negativePiToPi(-Math.PI / 0.5)).toEqualEpsilon( - 0.0, - CesiumMath.EPSILON16 + it("negativePiToPi", function () { + expect(CesiumMath.negativePiToPi(0.0)).toEqual(0.0); + expect(CesiumMath.negativePiToPi(+Math.PI)).toEqual(+Math.PI); + expect(CesiumMath.negativePiToPi(-Math.PI)).toEqual(-Math.PI); + expect(CesiumMath.negativePiToPi(+Math.PI - 1.0)).toEqual(+Math.PI - 1.0); + expect(CesiumMath.negativePiToPi(-Math.PI + 1.0)).toEqual(-Math.PI + 1.0); + expect(CesiumMath.negativePiToPi(+Math.PI - 0.1)).toEqual(+Math.PI - 0.1); + expect(CesiumMath.negativePiToPi(-Math.PI + 0.1)).toEqual(-Math.PI + 0.1); + expect(CesiumMath.negativePiToPi(+Math.PI + 0.1)).toEqualEpsilon( + -Math.PI + 0.1, + CesiumMath.EPSILON15 ); - expect(CesiumMath.negativePiToPi(-(Math.PI / 2) * Math.PI)).toEqualEpsilon( - -(Math.PI / 2) * Math.PI + CesiumMath.TWO_PI, - CesiumMath.EPSILON16 + expect(CesiumMath.negativePiToPi(-Math.PI - 0.1)).toEqualEpsilon( + +Math.PI - 0.1, + CesiumMath.EPSILON15 ); - expect( - CesiumMath.negativePiToPi(-(Math.PI + CesiumMath.EPSILON10)) - ).toEqualEpsilon(Math.PI, CesiumMath.EPSILON9); - expect(CesiumMath.negativePiToPi(-Math.PI)).toEqualEpsilon( - -Math.PI, - CesiumMath.EPSILON9 - ); - }); - it("negativePiToPi should not change", function () { - expect(CesiumMath.negativePiToPi(Math.PI - 1)).toEqualEpsilon( - Math.PI - 1, - CesiumMath.EPSILON16 - ); - expect(CesiumMath.negativePiToPi(-Math.PI + 1)).toEqualEpsilon( - -Math.PI + 1, - CesiumMath.EPSILON16 - ); + expect(CesiumMath.negativePiToPi(+2.0 * Math.PI)).toEqual(0.0); + expect(CesiumMath.negativePiToPi(-2.0 * Math.PI)).toEqual(0.0); + expect(CesiumMath.negativePiToPi(+3.0 * Math.PI)).toEqual(Math.PI); + expect(CesiumMath.negativePiToPi(-3.0 * Math.PI)).toEqual(Math.PI); + expect(CesiumMath.negativePiToPi(+4.0 * Math.PI)).toEqual(0.0); + expect(CesiumMath.negativePiToPi(-4.0 * Math.PI)).toEqual(0.0); + expect(CesiumMath.negativePiToPi(+5.0 * Math.PI)).toEqual(Math.PI); + expect(CesiumMath.negativePiToPi(-5.0 * Math.PI)).toEqual(Math.PI); + expect(CesiumMath.negativePiToPi(+6.0 * Math.PI)).toEqual(0.0); + expect(CesiumMath.negativePiToPi(-6.0 * Math.PI)).toEqual(0.0); }); it("negativePiToPi throws for undefined", function () { @@ -261,34 +243,35 @@ describe("Core/Math", function () { }); it("zeroToTwoPi", function () { - expect(CesiumMath.zeroToTwoPi(0.0)).toEqualEpsilon( - 0.0, - CesiumMath.EPSILON14 - ); - expect(CesiumMath.zeroToTwoPi(Math.PI)).toEqualEpsilon( - Math.PI, - CesiumMath.EPSILON14 - ); - expect(CesiumMath.zeroToTwoPi(CesiumMath.TWO_PI)).toEqualEpsilon( - CesiumMath.TWO_PI, - CesiumMath.EPSILON14 - ); - expect(CesiumMath.zeroToTwoPi(3.0 * Math.PI)).toEqualEpsilon( - Math.PI, - CesiumMath.EPSILON14 + expect(CesiumMath.zeroToTwoPi(0.0)).toEqual(0.0); + expect(CesiumMath.zeroToTwoPi(+Math.PI)).toEqual(+Math.PI); + expect(CesiumMath.zeroToTwoPi(-Math.PI)).toEqual(+Math.PI); + expect(CesiumMath.zeroToTwoPi(+Math.PI - 1.0)).toEqual(+Math.PI - 1.0); + expect(CesiumMath.zeroToTwoPi(-Math.PI + 1.0)).toEqualEpsilon( + +Math.PI + 1.0, + CesiumMath.EPSILON15 ); - expect(CesiumMath.zeroToTwoPi(2.0 * CesiumMath.TWO_PI)).toEqualEpsilon( - CesiumMath.TWO_PI, - CesiumMath.EPSILON14 + expect(CesiumMath.zeroToTwoPi(+Math.PI - 0.1)).toEqual(+Math.PI - 0.1); + expect(CesiumMath.zeroToTwoPi(-Math.PI + 0.1)).toEqualEpsilon( + +Math.PI + 0.1, + CesiumMath.EPSILON15 ); - expect(CesiumMath.zeroToTwoPi(-Math.PI)).toEqualEpsilon( - Math.PI, - CesiumMath.EPSILON14 - ); - expect(CesiumMath.zeroToTwoPi(-CesiumMath.TWO_PI)).toEqualEpsilon( - CesiumMath.TWO_PI, - CesiumMath.EPSILON14 + expect(CesiumMath.zeroToTwoPi(+Math.PI + 0.1)).toEqual(+Math.PI + 0.1); + expect(CesiumMath.zeroToTwoPi(-Math.PI - 0.1)).toEqualEpsilon( + +Math.PI - 0.1, + CesiumMath.EPSILON15 ); + + expect(CesiumMath.zeroToTwoPi(+2.0 * Math.PI)).toEqual(2.0 * Math.PI); + expect(CesiumMath.zeroToTwoPi(-2.0 * Math.PI)).toEqual(2.0 * Math.PI); + expect(CesiumMath.zeroToTwoPi(+3.0 * Math.PI)).toEqual(Math.PI); + expect(CesiumMath.zeroToTwoPi(-3.0 * Math.PI)).toEqual(Math.PI); + expect(CesiumMath.zeroToTwoPi(+4.0 * Math.PI)).toEqual(2.0 * Math.PI); + expect(CesiumMath.zeroToTwoPi(-4.0 * Math.PI)).toEqual(2.0 * Math.PI); + expect(CesiumMath.zeroToTwoPi(+5.0 * Math.PI)).toEqual(Math.PI); + expect(CesiumMath.zeroToTwoPi(-5.0 * Math.PI)).toEqual(Math.PI); + expect(CesiumMath.zeroToTwoPi(+6.0 * Math.PI)).toEqual(2.0 * Math.PI); + expect(CesiumMath.zeroToTwoPi(-6.0 * Math.PI)).toEqual(2.0 * Math.PI); }); it("zeroToTwoPi throws for undefined", function () { @@ -297,6 +280,44 @@ describe("Core/Math", function () { }).toThrowDeveloperError(); }); + it("mod", function () { + expect(CesiumMath.mod(0.0, 1.0)).toEqual(0.0); + expect(CesiumMath.mod(0.1, 1.0)).toEqual(0.1); + expect(CesiumMath.mod(0.5, 1.0)).toEqual(0.5); + expect(CesiumMath.mod(1.0, 1.0)).toEqual(0.0); + expect(CesiumMath.mod(1.1, 1.0)).toEqualEpsilon(0.1, CesiumMath.EPSILON15); + + expect(CesiumMath.mod(-0.0, 1.0)).toEqual(0.0); + expect(CesiumMath.mod(-0.1, 1.0)).toEqual(0.9); + expect(CesiumMath.mod(-0.5, 1.0)).toEqual(0.5); + expect(CesiumMath.mod(-1.0, 1.0)).toEqual(0.0); + expect(CesiumMath.mod(-1.1, 1.0)).toEqualEpsilon(0.9, CesiumMath.EPSILON15); + + expect(CesiumMath.mod(0.0, -1.0)).toEqual(-0.0); + expect(CesiumMath.mod(0.1, -1.0)).toEqual(-0.9); + expect(CesiumMath.mod(0.5, -1.0)).toEqual(-0.5); + expect(CesiumMath.mod(1.0, -1.0)).toEqual(-0.0); + expect(CesiumMath.mod(1.1, -1.0)).toEqualEpsilon( + -0.9, + CesiumMath.EPSILON15 + ); + + expect(CesiumMath.mod(-0.0, -1.0)).toEqual(-0.0); + expect(CesiumMath.mod(-0.1, -1.0)).toEqual(-0.1); + expect(CesiumMath.mod(-0.5, -1.0)).toEqual(-0.5); + expect(CesiumMath.mod(-1.0, -1.0)).toEqual(-0.0); + expect(CesiumMath.mod(-1.1, -1.0)).toEqualEpsilon( + -0.1, + CesiumMath.EPSILON15 + ); + }); + + it("mod throws for divisor of 0", function () { + expect(function () { + CesiumMath.mod(1.0, 0.0); + }).toThrowDeveloperError(); + }); + it("equalsEpsilon", function () { expect(CesiumMath.equalsEpsilon(1.0, 1.0, 0.0)).toEqual(true); expect(CesiumMath.equalsEpsilon(1.0, 1.0, 1.0)).toEqual(true); @@ -514,14 +535,11 @@ describe("Core/Math", function () { }); it("isPowerOfTwo finds powers of two", function () { - expect(CesiumMath.isPowerOfTwo(1)).toEqual(true); - expect(CesiumMath.isPowerOfTwo(2)).toEqual(true); - expect(CesiumMath.isPowerOfTwo(4)).toEqual(true); - expect(CesiumMath.isPowerOfTwo(8)).toEqual(true); - expect(CesiumMath.isPowerOfTwo(16)).toEqual(true); - expect(CesiumMath.isPowerOfTwo(256)).toEqual(true); - expect(CesiumMath.isPowerOfTwo(1024)).toEqual(true); - expect(CesiumMath.isPowerOfTwo(16 * 1024)).toEqual(true); + // Test all power of twos from 1 to 2^31 + for (var i = 0; i < 32; i++) { + var powerOfTwo = (1 << i) >>> 0; // `>>>` converts to unsigned + expect(CesiumMath.isPowerOfTwo(powerOfTwo)).toEqual(true); + } }); it("isPowerOfTwo does not find powers of two", function () { @@ -529,13 +547,33 @@ describe("Core/Math", function () { expect(CesiumMath.isPowerOfTwo(3)).toEqual(false); expect(CesiumMath.isPowerOfTwo(5)).toEqual(false); expect(CesiumMath.isPowerOfTwo(12)).toEqual(false); + expect(CesiumMath.isPowerOfTwo(4294967295)).toEqual(false); // (2^32)-1 }); it("nextPowerOfTwo finds next power of two", function () { expect(CesiumMath.nextPowerOfTwo(0)).toEqual(0); + expect(CesiumMath.nextPowerOfTwo(1)).toEqual(1); + expect(CesiumMath.nextPowerOfTwo(2)).toEqual(2); + expect(CesiumMath.nextPowerOfTwo(3)).toEqual(4); expect(CesiumMath.nextPowerOfTwo(257)).toEqual(512); expect(CesiumMath.nextPowerOfTwo(512)).toEqual(512); expect(CesiumMath.nextPowerOfTwo(1023)).toEqual(1024); + expect(CesiumMath.nextPowerOfTwo(1073741825)).toEqual(2147483648); // (2^30)+1 -> 2^31 + expect(CesiumMath.nextPowerOfTwo(2147483647)).toEqual(2147483648); // (2^31)-1 -> 2^31 + expect(CesiumMath.nextPowerOfTwo(2147483648)).toEqual(2147483648); // 2^31 -> 2^31 + }); + + it("previousPowerOfTwo finds previous power of two", function () { + expect(CesiumMath.previousPowerOfTwo(0)).toEqual(0); + expect(CesiumMath.previousPowerOfTwo(1)).toEqual(1); + expect(CesiumMath.previousPowerOfTwo(2)).toEqual(2); + expect(CesiumMath.previousPowerOfTwo(3)).toEqual(2); + expect(CesiumMath.previousPowerOfTwo(257)).toEqual(256); + expect(CesiumMath.previousPowerOfTwo(512)).toEqual(512); + expect(CesiumMath.previousPowerOfTwo(1023)).toEqual(512); + expect(CesiumMath.previousPowerOfTwo(2147483648)).toEqual(2147483648); // 2^31 -> 2^31 + expect(CesiumMath.previousPowerOfTwo(2147483649)).toEqual(2147483648); // (2^31)+1 -> 2^31 + expect(CesiumMath.previousPowerOfTwo(4294967295)).toEqual(2147483648); // (2^32)-1 -> 2^31 }); it("factorial throws for non-numbers", function () { @@ -577,6 +615,12 @@ describe("Core/Math", function () { }).toThrowDeveloperError(); }); + it("isPowerOfTwo throws for numbers that exceed maximum 32-bit unsigned int", function () { + expect(function () { + return CesiumMath.isPowerOfTwo(4294967296); // 2^32 + }).toThrowDeveloperError(); + }); + it("isPowerOfTwo throws for undefined", function () { expect(function () { CesiumMath.isPowerOfTwo(); @@ -595,12 +639,42 @@ describe("Core/Math", function () { }).toThrowDeveloperError(); }); + it("nextPowerOfTwo throws for results that would exceed maximum 32-bit unsigned int", function () { + expect(function () { + return CesiumMath.nextPowerOfTwo(2147483649); // (2^31)+1 + }).toThrowDeveloperError(); + }); + it("nextPowerOfTwo throws for undefined", function () { expect(function () { CesiumMath.nextPowerOfTwo(); }).toThrowDeveloperError(); }); + it("previousPowerOfTwo throws for non-numbers", function () { + expect(function () { + CesiumMath.previousPowerOfTwo({}); + }).toThrowDeveloperError(); + }); + + it("previousPowerOfTwo throws for negative numbers", function () { + expect(function () { + CesiumMath.previousPowerOfTwo(-1); + }).toThrowDeveloperError(); + }); + + it("previousPowerOfTwo throws for results that would exceed maximum 32-bit unsigned int", function () { + expect(function () { + return CesiumMath.previousPowerOfTwo(4294967296); // 2^32 + }).toThrowDeveloperError(); + }); + + it("previousPowerOfTwo throws for undefined", function () { + expect(function () { + CesiumMath.previousPowerOfTwo(); + }).toThrowDeveloperError(); + }); + it("clamp throws for undefined", function () { expect(function () { CesiumMath.clamp(); diff --git a/Specs/Core/PolylinePipelineSpec.js b/Specs/Core/PolylinePipelineSpec.js index 1bb7634aa285..184920cb5ec4 100644 --- a/Specs/Core/PolylinePipelineSpec.js +++ b/Specs/Core/PolylinePipelineSpec.js @@ -182,7 +182,7 @@ describe("Core/PolylinePipeline", function () { var newPositions = PolylinePipeline.generateRhumbArc({ positions: Cartesian3.fromDegreesArray([0, 0, 10, 0, 10, 5]), }); - for (let i = 0; i < newPositions.length; i++) { + for (var i = 0; i < newPositions.length; i++) { expect(newPositions[i]).toBeDefined(); } }); diff --git a/Specs/Core/QuantizedMeshTerrainDataSpec.js b/Specs/Core/QuantizedMeshTerrainDataSpec.js index 32a59822174a..41282a13885d 100644 --- a/Specs/Core/QuantizedMeshTerrainDataSpec.js +++ b/Specs/Core/QuantizedMeshTerrainDataSpec.js @@ -1,5 +1,6 @@ import { BoundingSphere } from "../../Source/Cesium.js"; import { Cartesian3 } from "../../Source/Cesium.js"; +import { defined } from "../../Source/Cesium.js"; import { GeographicTilingScheme } from "../../Source/Cesium.js"; import { Math as CesiumMath } from "../../Source/Cesium.js"; import { QuantizedMeshTerrainData } from "../../Source/Cesium.js"; @@ -100,7 +101,9 @@ describe("Core/QuantizedMeshTerrainData", function () { var tilingScheme = new GeographicTilingScheme(); - return when(data.createMesh(tilingScheme, 0, 0, 0, 1)) + return when( + data.createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 }) + ) .then(function () { var swPromise = data.upsample(tilingScheme, 0, 0, 0, 0, 0, 1); var sePromise = data.upsample(tilingScheme, 0, 0, 0, 1, 0, 1); @@ -194,7 +197,9 @@ describe("Core/QuantizedMeshTerrainData", function () { var tilingScheme = new GeographicTilingScheme(); - return when(data.createMesh(tilingScheme, 0, 0, 0, 1)) + return when( + data.createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 }) + ) .then(function () { var swPromise = data.upsample(tilingScheme, 0, 0, 0, 0, 0, 1); var sePromise = data.upsample(tilingScheme, 0, 0, 0, 1, 0, 1); @@ -261,7 +266,9 @@ describe("Core/QuantizedMeshTerrainData", function () { }); var tilingScheme = new GeographicTilingScheme(); - return when(data.createMesh(tilingScheme, 0, 0, 0, 1)) + return when( + data.createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 }) + ) .then(function () { return data.upsample(tilingScheme, 0, 0, 0, 0, 0, 1); }) @@ -370,7 +377,9 @@ describe("Core/QuantizedMeshTerrainData", function () { }); var tilingScheme = new GeographicTilingScheme(); - return when(data.createMesh(tilingScheme, 0, 0, 0, 1)) + return when( + data.createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 }) + ) .then(function () { var nwPromise = data.upsample(tilingScheme, 0, 0, 0, 0, 0, 1); var nePromise = data.upsample(tilingScheme, 0, 0, 0, 1, 0, 1); @@ -443,9 +452,8 @@ describe("Core/QuantizedMeshTerrainData", function () { var data; var tilingScheme; - beforeEach(function () { - tilingScheme = new GeographicTilingScheme(); - data = new QuantizedMeshTerrainData({ + function createSampleTerrainData() { + return new QuantizedMeshTerrainData({ minimumHeight: 0.0, maximumHeight: 4.0, quantizedVertices: new Uint16Array([ @@ -479,54 +487,83 @@ describe("Core/QuantizedMeshTerrainData", function () { northSkirtHeight: 1.0, childTileMask: 15, }); + } + beforeEach(function () { + tilingScheme = new GeographicTilingScheme(); + data = createSampleTerrainData(); }); it("requires tilingScheme", function () { expect(function () { - data.createMesh(undefined, 0, 0, 0); + data.createMesh({ tilingScheme: undefined, x: 0, y: 0, level: 0 }); }).toThrowDeveloperError(); }); it("requires x", function () { expect(function () { - data.createMesh(tilingScheme, undefined, 0, 0); + data.createMesh({ + tilingScheme: tilingScheme, + x: undefined, + y: 0, + level: 0, + }); }).toThrowDeveloperError(); }); it("requires y", function () { expect(function () { - data.createMesh(tilingScheme, 0, undefined, 0); + data.createMesh({ + tilingScheme: tilingScheme, + x: 0, + y: undefined, + level: 0, + }); }).toThrowDeveloperError(); }); it("requires level", function () { expect(function () { - data.createMesh(tilingScheme, 0, 0, undefined); + data.createMesh({ + tilingScheme: tilingScheme, + x: 0, + y: 0, + level: undefined, + }); }).toThrowDeveloperError(); }); it("creates specified vertices plus skirt vertices", function () { - return data.createMesh(tilingScheme, 0, 0, 0).then(function (mesh) { - expect(mesh).toBeInstanceOf(TerrainMesh); - expect(mesh.vertices.length).toBe(12 * mesh.encoding.getStride()); // 4 regular vertices, 8 skirt vertices. - expect(mesh.indices.length).toBe(10 * 3); // 2 regular triangles, 8 skirt triangles. - expect(mesh.minimumHeight).toBe(data._minimumHeight); - expect(mesh.maximumHeight).toBe(data._maximumHeight); - expect(mesh.boundingSphere3D).toEqual(data._boundingSphere); - }); + return data + .createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 }) + .then(function (mesh) { + expect(mesh).toBeInstanceOf(TerrainMesh); + expect(mesh.vertices.length).toBe(12 * mesh.encoding.getStride()); // 4 regular vertices, 8 skirt vertices. + expect(mesh.indices.length).toBe(10 * 3); // 2 regular triangles, 8 skirt triangles. + expect(mesh.minimumHeight).toBe(data._minimumHeight); + expect(mesh.maximumHeight).toBe(data._maximumHeight); + expect(mesh.boundingSphere3D).toEqual(data._boundingSphere); + }); }); it("exaggerates mesh", function () { - return data.createMesh(tilingScheme, 0, 0, 0, 2).then(function (mesh) { - expect(mesh).toBeInstanceOf(TerrainMesh); - expect(mesh.vertices.length).toBe(12 * mesh.encoding.getStride()); // 4 regular vertices, 8 skirt vertices. - expect(mesh.indices.length).toBe(10 * 3); // 2 regular triangles, 8 skirt triangles. - expect(mesh.minimumHeight).toBe(data._minimumHeight); - expect(mesh.maximumHeight).toBeGreaterThan(data._maximumHeight); - expect(mesh.boundingSphere3D.radius).toBeGreaterThan( - data._boundingSphere.radius - ); - }); + return data + .createMesh({ + tilingScheme: tilingScheme, + x: 0, + y: 0, + level: 0, + exaggeration: 2, + }) + .then(function (mesh) { + expect(mesh).toBeInstanceOf(TerrainMesh); + expect(mesh.vertices.length).toBe(12 * mesh.encoding.getStride()); // 4 regular vertices, 8 skirt vertices. + expect(mesh.indices.length).toBe(10 * 3); // 2 regular triangles, 8 skirt triangles. + expect(mesh.minimumHeight).toBe(data._minimumHeight); + expect(mesh.maximumHeight).toBeGreaterThan(data._maximumHeight); + expect(mesh.boundingSphere3D.radius).toBeGreaterThan( + data._boundingSphere.radius + ); + }); }); it("requires 32bit indices for large meshes", function () { @@ -560,10 +597,54 @@ describe("Core/QuantizedMeshTerrainData", function () { childTileMask: 15, }); - return data.createMesh(tilingScheme, 0, 0, 0).then(function (mesh) { - expect(mesh).toBeInstanceOf(TerrainMesh); - expect(mesh.indices.BYTES_PER_ELEMENT).toBe(4); - }); + return data + .createMesh({ tilingScheme: tilingScheme, x: 0, y: 0, level: 0 }) + .then(function (mesh) { + expect(mesh).toBeInstanceOf(TerrainMesh); + expect(mesh.indices.BYTES_PER_ELEMENT).toBe(4); + }); + }); + + it("enables throttling for asynchronous tasks", function () { + var options = { + tilingScheme: tilingScheme, + x: 0, + y: 0, + level: 0, + throttle: true, + }; + var taskCount = TerrainData.maximumAsynchronousTasks + 1; + var promises = new Array(); + for (var i = 0; i < taskCount; i++) { + var tempData = createSampleTerrainData(); + var promise = tempData.createMesh(options); + if (defined(promise)) { + promises.push(promise); + } + } + expect(promises.length).toBe(TerrainData.maximumAsynchronousTasks); + return when.all(promises); + }); + + it("disables throttling for asynchronous tasks", function () { + var options = { + tilingScheme: tilingScheme, + x: 0, + y: 0, + level: 0, + throttle: false, + }; + var taskCount = TerrainData.maximumAsynchronousTasks + 1; + var promises = new Array(); + for (var i = 0; i < taskCount; i++) { + var tempData = createSampleTerrainData(); + var promise = tempData.createMesh(options); + if (defined(promise)) { + promises.push(promise); + } + } + expect(promises.length).toBe(taskCount); + return when.all(promises); }); }); diff --git a/Specs/Core/TaskProcessorSpec.js b/Specs/Core/TaskProcessorSpec.js index 8980450b5201..3ce9389319c6 100644 --- a/Specs/Core/TaskProcessorSpec.js +++ b/Specs/Core/TaskProcessorSpec.js @@ -6,20 +6,14 @@ import { when } from "../../Source/Cesium.js"; describe("Core/TaskProcessor", function () { var taskProcessor; - beforeEach(function () { - TaskProcessor._workerModulePrefix = absolutize("../Specs/TestWorkers/"); - }); - afterEach(function () { - TaskProcessor._workerModulePrefix = - TaskProcessor._defaultWorkerModulePrefix; - if (taskProcessor && !taskProcessor.isDestroyed()) { taskProcessor = taskProcessor.destroy(); } }); - it("works with a simple worker", function () { + it("works with a simple worker defined as relative to TaskProcessor._workerModulePrefix", function () { + TaskProcessor._workerModulePrefix = absolutize("../Specs/TestWorkers/"); taskProcessor = new TaskProcessor("returnParameters.js"); var parameters = { @@ -29,13 +23,21 @@ describe("Core/TaskProcessor", function () { }, }; - return taskProcessor.scheduleTask(parameters).then(function (result) { - expect(result).toEqual(parameters); - }); + return taskProcessor + .scheduleTask(parameters) + .then(function (result) { + expect(result).toEqual(parameters); + }) + .always(function () { + TaskProcessor._workerModulePrefix = + TaskProcessor._defaultWorkerModulePrefix; + }); }); it("can be destroyed", function () { - taskProcessor = new TaskProcessor("returnParameters.js"); + taskProcessor = new TaskProcessor( + absolutize("../Specs/TestWorkers/returnParameters.js") + ); expect(taskProcessor.isDestroyed()).toEqual(false); @@ -45,7 +47,9 @@ describe("Core/TaskProcessor", function () { }); it("can transfer array buffer", function () { - taskProcessor = new TaskProcessor("returnByteLength.js"); + taskProcessor = new TaskProcessor( + absolutize("../Specs/TestWorkers/returnByteLength.js") + ); var byteLength = 100; var parameters = new ArrayBuffer(byteLength); @@ -69,7 +73,9 @@ describe("Core/TaskProcessor", function () { }); it("can transfer array buffer back from worker", function () { - taskProcessor = new TaskProcessor("transferArrayBuffer.js"); + taskProcessor = new TaskProcessor( + absolutize("../Specs/TestWorkers/transferArrayBuffer.js") + ); var byteLength = 100; var parameters = { @@ -83,7 +89,9 @@ describe("Core/TaskProcessor", function () { }); it("rejects promise if worker throws", function () { - taskProcessor = new TaskProcessor("throwError.js"); + taskProcessor = new TaskProcessor( + absolutize("../Specs/TestWorkers/throwError.js") + ); var message = "foo"; var parameters = { @@ -101,7 +109,9 @@ describe("Core/TaskProcessor", function () { }); it("rejects promise if worker returns a non-clonable result", function () { - taskProcessor = new TaskProcessor("returnNonCloneable.js"); + taskProcessor = new TaskProcessor( + absolutize("../Specs/TestWorkers/returnNonCloneable.js") + ); var message = "foo"; var parameters = { @@ -119,7 +129,9 @@ describe("Core/TaskProcessor", function () { }); it("successful task raises the taskCompletedEvent", function () { - taskProcessor = new TaskProcessor("returnParameters.js"); + taskProcessor = new TaskProcessor( + absolutize("../Specs/TestWorkers/returnParameters.js") + ); var parameters = { prop: "blah", @@ -145,7 +157,9 @@ describe("Core/TaskProcessor", function () { }); it("unsuccessful task raises the taskCompletedEvent with error", function () { - taskProcessor = new TaskProcessor("returnNonCloneable.js"); + taskProcessor = new TaskProcessor( + absolutize("../Specs/TestWorkers/returnNonCloneable.js") + ); var message = "foo"; var parameters = { @@ -175,7 +189,9 @@ describe("Core/TaskProcessor", function () { it("can load and compile web assembly module", function () { var binaryUrl = absolutize("../Specs/TestWorkers/TestWasm/testWasm.wasm"); - taskProcessor = new TaskProcessor("returnWasmConfig.js", 5); + taskProcessor = new TaskProcessor( + absolutize("../Specs/TestWorkers/returnWasmConfig.js", 5) + ); var promise = taskProcessor.initWebAssemblyModule({ modulePath: "TestWasm/testWasmWrapper", wasmBinaryFile: binaryUrl, @@ -193,7 +209,9 @@ describe("Core/TaskProcessor", function () { it("uses a backup module if web assembly is not supported", function () { var binaryUrl = absolutize("../Specs/TestWorkers/TestWasm/testWasm.wasm"); - taskProcessor = new TaskProcessor("returnWasmConfig.js", 5); + taskProcessor = new TaskProcessor( + absolutize("../Specs/TestWorkers/returnWasmConfig.js", 5) + ); spyOn(FeatureDetection, "supportsWebAssembly").and.returnValue(false); @@ -212,7 +230,9 @@ describe("Core/TaskProcessor", function () { it("throws runtime error if web assembly is not supported and no backup is provided", function () { var binaryUrl = absolutize("../Specs/TestWorkers/TestWasm/testWasm.wasm"); - taskProcessor = new TaskProcessor("returnWasmConfig.js", 5); + taskProcessor = new TaskProcessor( + absolutize("../Specs/TestWorkers/returnWasmConfig.js", 5) + ); spyOn(FeatureDetection, "supportsWebAssembly").and.returnValue(false); diff --git a/Specs/Core/getJsonFromTypedArraySpec.js b/Specs/Core/getJsonFromTypedArraySpec.js new file mode 100644 index 000000000000..02257e193fcc --- /dev/null +++ b/Specs/Core/getJsonFromTypedArraySpec.js @@ -0,0 +1,45 @@ +import { getJsonFromTypedArray } from "../../Source/Cesium.js"; + +describe("Core/getJsonFromTypedArray", function () { + it("converts a typed array to string", function () { + if (TextEncoder === undefined) { + return; + } + + var json = { + a: [0, 1, 2], + b: "b", + c: { + d: true, + }, + }; + + var string = JSON.stringify(json); + var encoder = new TextEncoder(); + var typedArray = encoder.encode(string); + var result = getJsonFromTypedArray(typedArray); + + expect(result).toEqual(json); + }); + + it("converts a sub-region of a typed array to json", function () { + if (TextEncoder === undefined) { + return; + } + + var json = { + a: [0, 1, 2], + b: "b", + c: { + d: true, + }, + }; + + var string = JSON.stringify(json); + var encoder = new TextEncoder(); + var typedArray = encoder.encode(string); + var result = getJsonFromTypedArray(typedArray, 25, 10); + + expect(result).toEqual(json.c); + }); +}); diff --git a/Specs/Core/sampleTerrainSpec.js b/Specs/Core/sampleTerrainSpec.js index 7d0c47681381..b57e2c5568f7 100644 --- a/Specs/Core/sampleTerrainSpec.js +++ b/Specs/Core/sampleTerrainSpec.js @@ -1,6 +1,10 @@ +import { ArcGISTiledElevationTerrainProvider } from "../../Source/Cesium.js"; import { Cartographic } from "../../Source/Cesium.js"; import { CesiumTerrainProvider } from "../../Source/Cesium.js"; import { createWorldTerrain } from "../../Source/Cesium.js"; +import { defined } from "../../Source/Cesium.js"; +import { RequestScheduler } from "../../Source/Cesium.js"; +import { Resource } from "../../Source/Cesium.js"; import { sampleTerrain } from "../../Source/Cesium.js"; describe("Core/sampleTerrain", function () { @@ -99,4 +103,192 @@ describe("Core/sampleTerrain", function () { expect(positions[0].height).toBeDefined(); }); }); + + describe("with terrain providers", function () { + beforeEach(function () { + RequestScheduler.clearForSpecs(); + }); + + afterEach(function () { + Resource._Implementations.loadWithXhr = + Resource._DefaultImplementations.loadWithXhr; + }); + + function spyOnTerrainDataCreateMesh(terrainProvider) { + // do some sneaky spying so we can check how many times createMesh is called + var originalRequestTileGeometry = terrainProvider.requestTileGeometry; + spyOn(terrainProvider, "requestTileGeometry").and.callFake(function ( + x, + y, + level, + request + ) { + // Call the original function! + return originalRequestTileGeometry + .call(terrainProvider, x, y, level, request) + .then(function (tile) { + spyOn(tile, "createMesh").and.callThrough(); + // return the original tile - after we've spied on the createMesh method + return tile; + }); + }); + } + + function expectTileAndMeshCounts( + terrainProvider, + numberOfTilesRequested, + wasFirstTileMeshCreated + ) { + // assert how many tiles were requested + expect(terrainProvider.requestTileGeometry.calls.count()).toEqual( + numberOfTilesRequested + ); + + // get the first tile that was requested + return ( + terrainProvider.requestTileGeometry.calls + .first() + // the return value was the promise of the tile, so wait for that + .returnValue.then(function (terrainData) { + // assert if the mesh was created or not for this tile + expect(terrainData.createMesh.calls.count()).toEqual( + wasFirstTileMeshCreated ? 1 : 0 + ); + }) + ); + } + + function endsWith(value, suffix) { + return value.indexOf(suffix, value.length - suffix.length) >= 0; + } + + function patchXHRLoad(proxySpec) { + Resource._Implementations.loadWithXhr = function ( + url, + responseType, + method, + data, + headers, + deferred, + overrideMimeType + ) { + // find a key (source path) path in the spec which matches (ends with) the requested url + var availablePaths = Object.keys(proxySpec); + var proxiedUrl; + + for (var i = 0; i < availablePaths.length; i++) { + var srcPath = availablePaths[i]; + if (endsWith(url, srcPath)) { + proxiedUrl = proxySpec[availablePaths[i]]; + break; + } + } + + // it's a whitelist - meaning you have to proxy every request explicitly + if (!defined(proxiedUrl)) { + throw new Error( + "Unexpected XHR load to url: " + + url + + "; spec includes: " + + availablePaths.join(", ") + ); + } + + // make a real request to the proxied path for the matching source path + return Resource._DefaultImplementations.loadWithXhr( + proxiedUrl, + responseType, + method, + data, + headers, + deferred, + overrideMimeType + ); + }; + } + + it("should work for Cesium World Terrain", function () { + patchXHRLoad({ + "/layer.json": "Data/CesiumTerrainTileJson/9_759_335/layer.json", + "/9/759/335.terrain?v=1.2.0": + "Data/CesiumTerrainTileJson/9_759_335/9_759_335.terrain", + }); + var terrainProvider = new CesiumTerrainProvider({ + url: "made/up/url", + }); + + spyOnTerrainDataCreateMesh(terrainProvider); + + var positionA = Cartographic.fromDegrees( + 86.93666235421982, + 27.97989963555095 + ); + var positionB = Cartographic.fromDegrees( + 86.9366623542198, + 27.9798996355509 + ); + var positionC = Cartographic.fromDegrees( + 86.936662354213, + 27.979899635557 + ); + + var level = 9; + + return sampleTerrain(terrainProvider, level, [ + positionA, + positionB, + positionC, + ]).then(function () { + expect(positionA.height).toBeCloseTo(7780, 0); + expect(positionB.height).toBeCloseTo(7780, 0); + expect(positionC.height).toBeCloseTo(7780, 0); + // 1 tile was requested (all positions were close enough on the same tile) + // and the mesh was not created because we're using CWT - which doesn't need the mesh for interpolation + return expectTileAndMeshCounts(terrainProvider, 1, false); + }); + }); + + it("should work for ArcGIS terrain", function () { + patchXHRLoad({ + "/?f=pjson": "Data/ArcGIS/9_214_379/root.json", + "/tilemap/10/384/640/128/128": + "Data/ArcGIS/9_214_379/tilemap_10_384_640_128_128.json", + "/tile/9/214/379": "Data/ArcGIS/9_214_379/tile_9_214_379.tile", + }); + + var terrainProvider = new ArcGISTiledElevationTerrainProvider({ + url: "made/up/url", + }); + + spyOnTerrainDataCreateMesh(terrainProvider); + + var positionA = Cartographic.fromDegrees( + 86.93666235421982, + 27.97989963555095 + ); + var positionB = Cartographic.fromDegrees( + 86.9366623542198, + 27.9798996355509 + ); + var positionC = Cartographic.fromDegrees( + 86.936662354213, + 27.979899635557 + ); + + var level = 9; + return sampleTerrain(terrainProvider, level, [ + positionA, + positionB, + positionC, + ]).then(function () { + // 3 very similar positions + expect(positionA.height).toBeCloseTo(7681, 0); + expect(positionB.height).toBeCloseTo(7681, 0); + expect(positionC.height).toBeCloseTo(7681, 0); + // 1 tile was requested (all positions were close enough on the same tile) + // and the mesh was created once because we're using an ArcGIS tile + return expectTileAndMeshCounts(terrainProvider, 1, true); + }); + }); + }); }); diff --git a/Specs/Data/ArcGIS/9_214_379/root.json b/Specs/Data/ArcGIS/9_214_379/root.json new file mode 100644 index 000000000000..6bdad201d370 --- /dev/null +++ b/Specs/Data/ArcGIS/9_214_379/root.json @@ -0,0 +1,281 @@ +{ + "currentVersion": 10.6, + "serviceDescription": "<p>Terrain 3D provides global elevation for your work in 3D. You can use this layer to visualize your maps and layers in 3D. Ground heights are based on multiple sources. Heights are orthometric (sea level = 0), and water bodies that are above sea level have approximated nominal water heights. This layer includes data from multiple sources ranging from 1000m - 3m, including USGS NED (1/9,1/3,1,2 arc second) covering North America, SRTM (3 arc second) covering 60 degrees north and 56 degrees south and USGS GMTED (7.5, 15 and 30 arc second) covering global land and other GIS community contributors. For more information on this service, including the terms of use, visit us <a href='http://goto.arcgisonline.com/elevation3d/WorldTerrain3D/Terrain3D'>online<\/a>.<\/p>", + "name": "WorldElevation3D/Terrain3D", + "description": "<p>Terrain 3D provides global elevation for your work in 3D. You can use this layer to visualize your maps and layers in 3D. Ground heights are based on multiple sources. Heights are orthometric (sea level = 0), and water bodies that are above sea level have approximated nominal water heights. This layer includes data from multiple sources ranging from 1000m - 3m, including USGS NED (1/9,1/3,1,2 arc second) covering North America, SRTM (3 arc second) covering 60 degrees north and 56 degrees south and USGS GMTED (7.5, 15 and 30 arc second) covering global land and other GIS community contributors. For more information on this service, including the terms of use, visit us <a href='http://goto.arcgisonline.com/elevation3d/WorldTerrain3D/Terrain3D'>online<\/a>.<\/p>", + "extent": { + "xmin": -2.0037507842788246E7, + "ymin": -2.0037508659999996E7, + "xmax": 2.0037507842788246E7, + "ymax": 2.0037508340000004E7, + "spatialReference": { + "wkid": 102100, + "latestWkid": 3857 + } + }, + "initialExtent": { + "xmin": -2.0037507842788246E7, + "ymin": -2.0037508659999996E7, + "xmax": 2.0037507842788246E7, + "ymax": 2.0037508340000004E7, + "spatialReference": { + "wkid": 102100, + "latestWkid": 3857 + } + }, + "fullExtent": { + "xmin": -2.0037507842788246E7, + "ymin": -2.0037508659999996E7, + "xmax": 2.0037507842788246E7, + "ymax": 2.0037508340000004E7, + "spatialReference": { + "wkid": 102100, + "latestWkid": 3857 + } + }, + "pixelSizeX": 2.9999999016027736, + "pixelSizeY": 3, + "bandCount": 1, + "pixelType": "F32", + "minPixelSize": 0, + "maxPixelSize": 0, + "copyrightText": "Source: USGS, NGA, NASA, CGIAR, GEBCO,N Robinson,NCEAS,NLS,OS,NMA,Geodatastyrelsen and the GIS User Community", + "serviceDataType": "esriImageServiceDataTypeElevation", + "minValues": [ + -450 + ], + "maxValues": [ + 8700 + ], + "meanValues": [ + 400 + ], + "stdvValues": [ + 870 + ], + "objectIdField": "OBJECTID", + "fields": [ + { + "name": "OBJECTID", + "type": "esriFieldTypeOID", + "alias": "OBJECTID", + "domain": null + }, + { + "name": "Shape", + "type": "esriFieldTypeGeometry", + "alias": "Shape", + "domain": null + }, + { + "name": "Name", + "type": "esriFieldTypeString", + "alias": "Name", + "domain": null, + "length": 50 + }, + { + "name": "Category", + "type": "esriFieldTypeInteger", + "alias": "Category", + "domain": { + "type": "codedValue", + "name": "MosaicCatalogItemCategoryDomain", + "description": "Catalog item categories.", + "codedValues": [ + { + "name": "Unknown", + "code": 0 + }, + { + "name": "Primary", + "code": 1 + }, + { + "name": "Overview", + "code": 2 + }, + { + "name": "Unprocessed Overview", + "code": 3 + }, + { + "name": "Partial Overview", + "code": 4 + }, + { + "name": "Uploaded", + "code": 253 + }, + { + "name": "Incomplete", + "code": 254 + }, + { + "name": "Custom", + "code": 255 + } + ], + "mergePolicy": "esriMPTDefaultValue", + "splitPolicy": "esriSPTDefaultValue" + } + } + ], + "capabilities": "Image,Tilemap,Mensuration", + "defaultMosaicMethod": "None", + "allowedMosaicMethods": "None", + "mosaicOperator": "First", + "maxDownloadSizeLimit": 2048, + "defaultCompressionQuality": 75, + "defaultResamplingMethod": "Bilinear", + "maxImageHeight": 4000, + "maxImageWidth": 4000, + "maxRecordCount": 2000, + "maxDownloadImageCount": 0, + "maxMosaicImageCount": 50, + "singleFusedMapCache": true, + "tileInfo": { + "rows": 256, + "cols": 256, + "dpi": 96, + "format": "LERC", + "compressionQuality": 0, + "lercError": 0.1, + "origin": { + "x": -2.0037508342787E7, + "y": 2.0037508342787E7 + }, + "spatialReference": { + "wkid": 102100, + "latestWkid": 3857 + }, + "lods": [ + { + "level": 0, + "resolution": 156543.03392800014, + "scale": 5.91657527591555E8 + }, + { + "level": 1, + "resolution": 78271.51696399994, + "scale": 2.95828763795777E8 + }, + { + "level": 2, + "resolution": 39135.75848200009, + "scale": 1.47914381897889E8 + }, + { + "level": 3, + "resolution": 19567.87924099992, + "scale": 7.3957190948944E7 + }, + { + "level": 4, + "resolution": 9783.93962049996, + "scale": 3.6978595474472E7 + }, + { + "level": 5, + "resolution": 4891.96981024998, + "scale": 1.8489297737236E7 + }, + { + "level": 6, + "resolution": 2445.98490512499, + "scale": 9244648.868618 + }, + { + "level": 7, + "resolution": 1222.992452562495, + "scale": 4622324.434309 + }, + { + "level": 8, + "resolution": 611.4962262813797, + "scale": 2311162.217155 + }, + { + "level": 9, + "resolution": 305.74811314055756, + "scale": 1155581.108577 + }, + { + "level": 10, + "resolution": 152.87405657041106, + "scale": 577790.554289 + }, + { + "level": 11, + "resolution": 76.43702828507324, + "scale": 288895.277144 + }, + { + "level": 12, + "resolution": 38.21851414253662, + "scale": 144447.638572 + }, + { + "level": 13, + "resolution": 19.10925707126831, + "scale": 72223.819286 + }, + { + "level": 14, + "resolution": 9.554628535634155, + "scale": 36111.909643 + }, + { + "level": 15, + "resolution": 4.77731426794937, + "scale": 18055.954822 + }, + { + "level": 16, + "resolution": 2.388657133974685, + "scale": 9027.977411 + } + ] + }, + "cacheType": "Elevation", + "allowRasterFunction": false, + "rasterFunctionInfos": [ + { + "name": "None", + "description": "", + "help": "" + } + ], + "rasterTypeInfos": [ + { + "name": "Raster Dataset", + "description": "Supports all ArcGIS Raster Datasets", + "help": "" + } + ], + "mensurationCapabilities": "Basic", + "hasHistograms": false, + "hasColormap": false, + "hasRasterAttributeTable": false, + "minScale": 0, + "maxScale": 0, + "exportTilesAllowed": false, + "hasMultidimensions": false, + "supportsStatistics": true, + "supportsAdvancedQueries": true, + "editFieldsInfo": null, + "ownershipBasedAccessControlForRasters": null, + "allowComputeTiePoints": false, + "useStandardizedQueries": true, + "advancedQueryCapabilities": { + "useStandardizedQueries": true, + "supportsStatistics": true, + "supportsOrderBy": true, + "supportsDistinct": true, + "supportsPagination": true + }, + "spatialReference": { + "wkid": 102100, + "latestWkid": 3857 + } +} diff --git a/Specs/Data/ArcGIS/9_214_379/tile_9_214_379.tile b/Specs/Data/ArcGIS/9_214_379/tile_9_214_379.tile new file mode 100644 index 000000000000..02a116148960 Binary files /dev/null and b/Specs/Data/ArcGIS/9_214_379/tile_9_214_379.tile differ diff --git a/Specs/Data/ArcGIS/9_214_379/tilemap_10_384_640_128_128.json b/Specs/Data/ArcGIS/9_214_379/tilemap_10_384_640_128_128.json new file mode 100644 index 000000000000..ccd968a0e58c --- /dev/null +++ b/Specs/Data/ArcGIS/9_214_379/tilemap_10_384_640_128_128.json @@ -0,0 +1,9 @@ +{ + "valid": true, + "location": { + "left": 640, + "top": 384, + "width": 128, + "height": 128 + } +} diff --git a/Specs/Data/CZML/ValidationDocument.czml b/Specs/Data/CZML/ValidationDocument.czml index cf88170afea0..2688bbd0c317 100644 --- a/Specs/Data/CZML/ValidationDocument.czml +++ b/Specs/Data/CZML/ValidationDocument.czml @@ -539,6 +539,46 @@ "classificationType":"TERRAIN", "zIndex":17658 }, + "polylineVolume":{ + "show":true, + "positions":{ + "cartesian":[ + 62250,34803,52359, + 59852,58857,24549 + ] + }, + "shape":{ + "cartesian2":[ + 45301,43952, + 34475,28294 + ] + }, + "cornerType":"BEVELED", + "granularity":12007, + "fill":true, + "material":{ + "solidColor":{ + "color":{ + "rgba":[ + 232,0,34,154 + ] + } + } + }, + "outline":true, + "outlineColor":{ + "rgba":[ + 179,137,151,42 + ] + }, + "outlineWidth":23162, + "shadows":"CAST_ONLY", + "distanceDisplayCondition":{ + "distanceDisplayCondition":[ + 49375,57097 + ] + } + }, "rectangle":{ "show":true, "coordinates":{ @@ -3399,6 +3439,233 @@ } } }, + { + "id":"constant_polylineVolume_positions_cartographicRadians", + "polylineVolume":{ + "positions":{ + "cartographicRadians":[ + 0.0883087457516627,0.924587529983249,8130, + 0.613491452287313,1.45657735287148,19697 + ] + } + } + }, + { + "id":"constant_polylineVolume_positions_cartographicDegrees", + "polylineVolume":{ + "positions":{ + "cartographicDegrees":[ + 7,43,57136, + 44,37,65346 + ] + } + } + }, + { + "id":"constant_polylineVolume_material_solidColor_color", + "polylineVolume":{ + "material":{ + "solidColor":{ + "color":{ + "rgbaf":[ + 0.8666666666666667,0.12941176470588237,0.13333333333333333,0.6431372549019608 + ] + } + } + } + } + }, + { + "id":"material_polylineVolume_material_image", + "polylineVolume":{ + "material":{ + "image":{ + "image":"http://example.com/25029", + "repeat":{ + "cartesian2":[ + 16806,36161 + ] + }, + "color":{ + "rgba":[ + 29,171,22,0 + ] + }, + "transparent":true + } + } + } + }, + { + "id":"material_polylineVolume_material_grid", + "polylineVolume":{ + "material":{ + "grid":{ + "color":{ + "rgba":[ + 180,62,202,240 + ] + }, + "cellAlpha":58563, + "lineCount":{ + "cartesian2":[ + 13158,59443 + ] + }, + "lineThickness":{ + "cartesian2":[ + 11642,8493 + ] + }, + "lineOffset":{ + "cartesian2":[ + 2361,14345 + ] + } + } + } + } + }, + { + "id":"material_polylineVolume_material_stripe", + "polylineVolume":{ + "material":{ + "stripe":{ + "orientation":"VERTICAL", + "evenColor":{ + "rgba":[ + 100,38,210,254 + ] + }, + "oddColor":{ + "rgba":[ + 27,12,194,159 + ] + }, + "offset":38819, + "repeat":1822 + } + } + } + }, + { + "id":"material_polylineVolume_material_checkerboard", + "polylineVolume":{ + "material":{ + "checkerboard":{ + "evenColor":{ + "rgba":[ + 146,199,90,246 + ] + }, + "oddColor":{ + "rgba":[ + 74,232,2,60 + ] + }, + "repeat":{ + "cartesian2":[ + 13666,60213 + ] + } + } + } + } + }, + { + "id":"constant_polylineVolume_material_image_color", + "polylineVolume":{ + "material":{ + "image":{ + "color":{ + "rgbaf":[ + 0.44313725490196076,0.15294117647058825,0.4627450980392157,0.7019607843137254 + ] + } + } + } + } + }, + { + "id":"constant_polylineVolume_material_grid_color", + "polylineVolume":{ + "material":{ + "grid":{ + "color":{ + "rgbaf":[ + 0.3568627450980392,0.7568627450980392,0.9686274509803922,0.10980392156862745 + ] + } + } + } + } + }, + { + "id":"constant_polylineVolume_material_stripe_evenColor", + "polylineVolume":{ + "material":{ + "stripe":{ + "evenColor":{ + "rgbaf":[ + 0.09019607843137255,0.4235294117647059,0.5764705882352941,0.26666666666666666 + ] + } + } + } + } + }, + { + "id":"constant_polylineVolume_material_stripe_oddColor", + "polylineVolume":{ + "material":{ + "stripe":{ + "oddColor":{ + "rgbaf":[ + 0.6823529411764706,0.9294117647058824,0.33725490196078434,0.9333333333333333 + ] + } + } + } + } + }, + { + "id":"constant_polylineVolume_material_checkerboard_evenColor", + "polylineVolume":{ + "material":{ + "checkerboard":{ + "evenColor":{ + "rgbaf":[ + 0.8549019607843137,0.6274509803921569,0.33725490196078434,0.24313725490196078 + ] + } + } + } + } + }, + { + "id":"constant_polylineVolume_material_checkerboard_oddColor", + "polylineVolume":{ + "material":{ + "checkerboard":{ + "oddColor":{ + "rgbaf":[ + 0.8431372549019608,0.03529411764705882,0.5058823529411764,0.8901960784313725 + ] + } + } + } + } + }, + { + "id":"constant_polylineVolume_outlineColor_rgbaf", + "polylineVolume":{ + "outlineColor":{ + "rgbaf":[ + 0.5490196078431373,0.40784313725490196,0.4666666666666667,0.4235294117647059 + ] + } + } + }, { "id":"constant_rectangle_coordinates_wsenDegrees", "rectangle":{ @@ -7956,6 +8223,48 @@ "reference":"Constant#polyline.zIndex" } }, + "polylineVolume":{ + "show":{ + "reference":"Constant#polylineVolume.show" + }, + "positions":{ + "references":[ + "ConstantPosition1#position", + "ConstantPosition2#position" + ] + }, + "cornerType":{ + "reference":"Constant#polylineVolume.cornerType" + }, + "granularity":{ + "reference":"Constant#polylineVolume.granularity" + }, + "fill":{ + "reference":"Constant#polylineVolume.fill" + }, + "material":{ + "solidColor":{ + "color":{ + "reference":"Constant#polylineVolume.material.color" + } + } + }, + "outline":{ + "reference":"Constant#polylineVolume.outline" + }, + "outlineColor":{ + "reference":"Constant#polylineVolume.outlineColor" + }, + "outlineWidth":{ + "reference":"Constant#polylineVolume.outlineWidth" + }, + "shadows":{ + "reference":"Constant#polylineVolume.shadows" + }, + "distanceDisplayCondition":{ + "reference":"Constant#polylineVolume.distanceDisplayCondition" + } + }, "rectangle":{ "show":{ "reference":"Constant#rectangle.show" @@ -9393,84 +9702,171 @@ } }, { - "id":"reference_rectangle_material_image", - "rectangle":{ + "id":"reference_polylineVolume_material_image", + "polylineVolume":{ "material":{ "image":{ "image":{ - "reference":"material_rectangle_material_image#rectangle.material.image" + "reference":"material_polylineVolume_material_image#polylineVolume.material.image" }, "repeat":{ - "reference":"material_rectangle_material_image#rectangle.material.repeat" + "reference":"material_polylineVolume_material_image#polylineVolume.material.repeat" }, "color":{ - "reference":"material_rectangle_material_image#rectangle.material.color" + "reference":"material_polylineVolume_material_image#polylineVolume.material.color" }, "transparent":{ - "reference":"material_rectangle_material_image#rectangle.material.transparent" + "reference":"material_polylineVolume_material_image#polylineVolume.material.transparent" } } } } }, { - "id":"reference_rectangle_material_grid", - "rectangle":{ + "id":"reference_polylineVolume_material_grid", + "polylineVolume":{ "material":{ "grid":{ "color":{ - "reference":"material_rectangle_material_grid#rectangle.material.color" + "reference":"material_polylineVolume_material_grid#polylineVolume.material.color" }, "cellAlpha":{ - "reference":"material_rectangle_material_grid#rectangle.material.cellAlpha" + "reference":"material_polylineVolume_material_grid#polylineVolume.material.cellAlpha" }, "lineCount":{ - "reference":"material_rectangle_material_grid#rectangle.material.lineCount" + "reference":"material_polylineVolume_material_grid#polylineVolume.material.lineCount" }, "lineThickness":{ - "reference":"material_rectangle_material_grid#rectangle.material.lineThickness" + "reference":"material_polylineVolume_material_grid#polylineVolume.material.lineThickness" }, "lineOffset":{ - "reference":"material_rectangle_material_grid#rectangle.material.lineOffset" + "reference":"material_polylineVolume_material_grid#polylineVolume.material.lineOffset" } } } } }, { - "id":"reference_rectangle_material_stripe", - "rectangle":{ + "id":"reference_polylineVolume_material_stripe", + "polylineVolume":{ "material":{ "stripe":{ "orientation":{ - "reference":"material_rectangle_material_stripe#rectangle.material.orientation" + "reference":"material_polylineVolume_material_stripe#polylineVolume.material.orientation" }, "evenColor":{ - "reference":"material_rectangle_material_stripe#rectangle.material.evenColor" + "reference":"material_polylineVolume_material_stripe#polylineVolume.material.evenColor" }, "oddColor":{ - "reference":"material_rectangle_material_stripe#rectangle.material.oddColor" + "reference":"material_polylineVolume_material_stripe#polylineVolume.material.oddColor" }, "offset":{ - "reference":"material_rectangle_material_stripe#rectangle.material.offset" + "reference":"material_polylineVolume_material_stripe#polylineVolume.material.offset" }, "repeat":{ - "reference":"material_rectangle_material_stripe#rectangle.material.repeat" + "reference":"material_polylineVolume_material_stripe#polylineVolume.material.repeat" } } } } }, { - "id":"reference_rectangle_material_checkerboard", - "rectangle":{ + "id":"reference_polylineVolume_material_checkerboard", + "polylineVolume":{ "material":{ "checkerboard":{ "evenColor":{ - "reference":"material_rectangle_material_checkerboard#rectangle.material.evenColor" + "reference":"material_polylineVolume_material_checkerboard#polylineVolume.material.evenColor" }, "oddColor":{ - "reference":"material_rectangle_material_checkerboard#rectangle.material.oddColor" + "reference":"material_polylineVolume_material_checkerboard#polylineVolume.material.oddColor" + }, + "repeat":{ + "reference":"material_polylineVolume_material_checkerboard#polylineVolume.material.repeat" + } + } + } + } + }, + { + "id":"reference_rectangle_material_image", + "rectangle":{ + "material":{ + "image":{ + "image":{ + "reference":"material_rectangle_material_image#rectangle.material.image" + }, + "repeat":{ + "reference":"material_rectangle_material_image#rectangle.material.repeat" + }, + "color":{ + "reference":"material_rectangle_material_image#rectangle.material.color" + }, + "transparent":{ + "reference":"material_rectangle_material_image#rectangle.material.transparent" + } + } + } + } + }, + { + "id":"reference_rectangle_material_grid", + "rectangle":{ + "material":{ + "grid":{ + "color":{ + "reference":"material_rectangle_material_grid#rectangle.material.color" + }, + "cellAlpha":{ + "reference":"material_rectangle_material_grid#rectangle.material.cellAlpha" + }, + "lineCount":{ + "reference":"material_rectangle_material_grid#rectangle.material.lineCount" + }, + "lineThickness":{ + "reference":"material_rectangle_material_grid#rectangle.material.lineThickness" + }, + "lineOffset":{ + "reference":"material_rectangle_material_grid#rectangle.material.lineOffset" + } + } + } + } + }, + { + "id":"reference_rectangle_material_stripe", + "rectangle":{ + "material":{ + "stripe":{ + "orientation":{ + "reference":"material_rectangle_material_stripe#rectangle.material.orientation" + }, + "evenColor":{ + "reference":"material_rectangle_material_stripe#rectangle.material.evenColor" + }, + "oddColor":{ + "reference":"material_rectangle_material_stripe#rectangle.material.oddColor" + }, + "offset":{ + "reference":"material_rectangle_material_stripe#rectangle.material.offset" + }, + "repeat":{ + "reference":"material_rectangle_material_stripe#rectangle.material.repeat" + } + } + } + } + }, + { + "id":"reference_rectangle_material_checkerboard", + "rectangle":{ + "material":{ + "checkerboard":{ + "evenColor":{ + "reference":"material_rectangle_material_checkerboard#rectangle.material.evenColor" + }, + "oddColor":{ + "reference":"material_rectangle_material_checkerboard#rectangle.material.oddColor" }, "repeat":{ "reference":"material_rectangle_material_checkerboard#rectangle.material.repeat" @@ -11850,6 +12246,47 @@ ] } }, + "polylineVolume":{ + "granularity":{ + "epoch":"2016-06-17T12:00:00Z", + "number":[ + 0,9144, + 3600,5282 + ] + }, + "material":{ + "solidColor":{ + "color":{ + "epoch":"2016-06-17T12:00:00Z", + "rgba":[ + 0,3,0,198,193, + 3600,210,44,29,16 + ] + } + } + }, + "outlineColor":{ + "epoch":"2016-06-17T12:00:00Z", + "rgba":[ + 0,248,163,212,115, + 3600,22,27,199,98 + ] + }, + "outlineWidth":{ + "epoch":"2016-06-17T12:00:00Z", + "number":[ + 0,17507, + 3600,55396 + ] + }, + "distanceDisplayCondition":{ + "epoch":"2016-06-17T12:00:00Z", + "distanceDisplayCondition":[ + 0,20986,34897, + 3600,14877,46650 + ] + } + }, "rectangle":{ "coordinates":{ "epoch":"2016-06-17T12:00:00Z", @@ -15424,6 +15861,264 @@ } } }, + { + "id":"sampled_polylineVolume_material_solidColor_color", + "polylineVolume":{ + "material":{ + "solidColor":{ + "color":{ + "epoch":"2016-06-17T12:00:00Z", + "rgbaf":[ + 0,0.023529411764705882,0.8784313725490196,0.054901960784313725,0.7607843137254902, + 3600,0.40784313725490196,0.788235294117647,0.5803921568627451,0.7019607843137254 + ] + } + } + } + } + }, + { + "id":"sampled_polylineVolume_material_image", + "polylineVolume":{ + "material":{ + "image":{ + "repeat":{ + "epoch":"2016-06-17T12:00:00Z", + "cartesian2":[ + 0,54883,39382, + 3600,42188,27300 + ] + }, + "color":{ + "epoch":"2016-06-17T12:00:00Z", + "rgba":[ + 0,145,236,4,141, + 3600,126,69,220,191 + ] + } + } + } + } + }, + { + "id":"sampled_polylineVolume_material_grid", + "polylineVolume":{ + "material":{ + "grid":{ + "color":{ + "epoch":"2016-06-17T12:00:00Z", + "rgba":[ + 0,98,87,231,46, + 3600,222,91,113,105 + ] + }, + "cellAlpha":{ + "epoch":"2016-06-17T12:00:00Z", + "number":[ + 0,32451, + 3600,49677 + ] + }, + "lineCount":{ + "epoch":"2016-06-17T12:00:00Z", + "cartesian2":[ + 0,14089,52279, + 3600,59996,36842 + ] + }, + "lineThickness":{ + "epoch":"2016-06-17T12:00:00Z", + "cartesian2":[ + 0,49037,8639, + 3600,59785,47337 + ] + }, + "lineOffset":{ + "epoch":"2016-06-17T12:00:00Z", + "cartesian2":[ + 0,40768,50335, + 3600,6098,48919 + ] + } + } + } + } + }, + { + "id":"sampled_polylineVolume_material_stripe", + "polylineVolume":{ + "material":{ + "stripe":{ + "evenColor":{ + "epoch":"2016-06-17T12:00:00Z", + "rgba":[ + 0,206,34,152,54, + 3600,182,38,96,39 + ] + }, + "oddColor":{ + "epoch":"2016-06-17T12:00:00Z", + "rgba":[ + 0,84,117,45,107, + 3600,79,76,73,177 + ] + }, + "offset":{ + "epoch":"2016-06-17T12:00:00Z", + "number":[ + 0,18479, + 3600,19855 + ] + }, + "repeat":{ + "epoch":"2016-06-17T12:00:00Z", + "number":[ + 0,36294, + 3600,34071 + ] + } + } + } + } + }, + { + "id":"sampled_polylineVolume_material_checkerboard", + "polylineVolume":{ + "material":{ + "checkerboard":{ + "evenColor":{ + "epoch":"2016-06-17T12:00:00Z", + "rgba":[ + 0,185,168,171,241, + 3600,111,194,153,164 + ] + }, + "oddColor":{ + "epoch":"2016-06-17T12:00:00Z", + "rgba":[ + 0,84,96,248,117, + 3600,129,55,81,196 + ] + }, + "repeat":{ + "epoch":"2016-06-17T12:00:00Z", + "cartesian2":[ + 0,45209,63152, + 3600,42552,3238 + ] + } + } + } + } + }, + { + "id":"sampled_polylineVolume_material_image_color", + "polylineVolume":{ + "material":{ + "image":{ + "color":{ + "epoch":"2016-06-17T12:00:00Z", + "rgbaf":[ + 0,0.5215686274509804,0.7450980392156863,0.5372549019607843,0.22745098039215686, + 3600,0.792156862745098,0.19215686274509805,0.5647058823529412,0.07058823529411765 + ] + } + } + } + } + }, + { + "id":"sampled_polylineVolume_material_grid_color", + "polylineVolume":{ + "material":{ + "grid":{ + "color":{ + "epoch":"2016-06-17T12:00:00Z", + "rgbaf":[ + 0,0.27450980392156865,0.5450980392156862,0.20392156862745098,0.6509803921568628, + 3600,0.3843137254901961,0.3843137254901961,0.6705882352941176,0.3607843137254902 + ] + } + } + } + } + }, + { + "id":"sampled_polylineVolume_material_stripe_evenColor", + "polylineVolume":{ + "material":{ + "stripe":{ + "evenColor":{ + "epoch":"2016-06-17T12:00:00Z", + "rgbaf":[ + 0,0.058823529411764705,0.3411764705882353,0.8392156862745098,0.8235294117647058, + 3600,0.8392156862745098,0.24705882352941178,0.5686274509803921,0.9058823529411765 + ] + } + } + } + } + }, + { + "id":"sampled_polylineVolume_material_stripe_oddColor", + "polylineVolume":{ + "material":{ + "stripe":{ + "oddColor":{ + "epoch":"2016-06-17T12:00:00Z", + "rgbaf":[ + 0,0.8509803921568627,0.30980392156862746,0.8235294117647058,0.12156862745098039, + 3600,0.9764705882352941,0.5647058823529412,0.7764705882352941,0.6078431372549019 + ] + } + } + } + } + }, + { + "id":"sampled_polylineVolume_material_checkerboard_evenColor", + "polylineVolume":{ + "material":{ + "checkerboard":{ + "evenColor":{ + "epoch":"2016-06-17T12:00:00Z", + "rgbaf":[ + 0,0.396078431372549,0.7176470588235294,0.9764705882352941,0.5647058823529412, + 3600,0.38823529411764707,0.5686274509803921,0.023529411764705882,0.807843137254902 + ] + } + } + } + } + }, + { + "id":"sampled_polylineVolume_material_checkerboard_oddColor", + "polylineVolume":{ + "material":{ + "checkerboard":{ + "oddColor":{ + "epoch":"2016-06-17T12:00:00Z", + "rgbaf":[ + 0,0.06666666666666667,0.796078431372549,0.5764705882352941,0.1803921568627451, + 3600,0.5764705882352941,0.5215686274509804,0.6235294117647059,0.3843137254901961 + ] + } + } + } + } + }, + { + "id":"sampled_polylineVolume_outlineColor_rgbaf", + "polylineVolume":{ + "outlineColor":{ + "epoch":"2016-06-17T12:00:00Z", + "rgbaf":[ + 0,0.4549019607843137,0.6745098039215687,0.3686274509803922,0.8509803921568627, + 3600,0.23921568627450981,0.5254901960784314,0.13333333333333333,0.9490196078431372 + ] + } + } + }, { "id":"sampled_rectangle_coordinates_wsenDegrees", "rectangle":{ diff --git a/Specs/Data/CesiumTerrainTileJson/9_759_335/9_759_335.terrain b/Specs/Data/CesiumTerrainTileJson/9_759_335/9_759_335.terrain new file mode 100644 index 000000000000..1f04a9526a0e Binary files /dev/null and b/Specs/Data/CesiumTerrainTileJson/9_759_335/9_759_335.terrain differ diff --git a/Specs/Data/CesiumTerrainTileJson/9_759_335/layer.json b/Specs/Data/CesiumTerrainTileJson/9_759_335/layer.json new file mode 100644 index 000000000000..d7ef5e1ea1d6 --- /dev/null +++ b/Specs/Data/CesiumTerrainTileJson/9_759_335/layer.json @@ -0,0 +1,28 @@ +{ + "attribution": "", + "bounds": [ + -180, + -90, + 180, + 90 + ], + "bvhlevels": 6, + "description": "", + "extensions": [ + "bvh", + "watermask", + "metadata", + "octvertexnormals" + ], + "format": "quantized-mesh-1.0", + "maxzoom": 19, + "metadataAvailability": 10, + "minzoom": 0, + "name": "", + "projection": "EPSG:4326", + "scheme": "tms", + "tiles": [ + "{z}/{x}/{y}.terrain?v={version}" + ], + "version": "1.2.0" +} diff --git a/Specs/DataSources/CzmlDataSourceSpec.js b/Specs/DataSources/CzmlDataSourceSpec.js index 38d28ba06020..da7e93db7e53 100644 --- a/Specs/DataSources/CzmlDataSourceSpec.js +++ b/Specs/DataSources/CzmlDataSourceSpec.js @@ -518,78 +518,72 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet), { sourceUri: sourceUri, }).then(function (dataSource) { var entity = dataSource.entities.values[0]; expect(entity.billboard).toBeDefined(); - expect( - entity.billboard.image.getValue(Iso8601.MINIMUM_VALUE).url - ).toEqual(sourceUri + packet.billboard.image); - expect(entity.billboard.rotation.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.billboard.image.getValue(time).url).toEqual( + sourceUri + packet.billboard.image + ); + expect(entity.billboard.rotation.getValue(time)).toEqual( packet.billboard.rotation ); - expect(entity.billboard.scale.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.billboard.scale.getValue(time)).toEqual( packet.billboard.scale ); - expect( - entity.billboard.heightReference.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(HeightReference[packet.billboard.heightReference]); - expect( - entity.billboard.horizontalOrigin.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(HorizontalOrigin[packet.billboard.horizontalOrigin]); - expect( - entity.billboard.verticalOrigin.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(VerticalOrigin[packet.billboard.verticalOrigin]); - expect(entity.billboard.color.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.billboard.heightReference.getValue(time)).toEqual( + HeightReference[packet.billboard.heightReference] + ); + expect(entity.billboard.horizontalOrigin.getValue(time)).toEqual( + HorizontalOrigin[packet.billboard.horizontalOrigin] + ); + expect(entity.billboard.verticalOrigin.getValue(time)).toEqual( + VerticalOrigin[packet.billboard.verticalOrigin] + ); + expect(entity.billboard.color.getValue(time)).toEqual( Color.unpack(packet.billboard.color.rgbaf) ); - expect( - entity.billboard.eyeOffset.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(Cartesian3.unpack(packet.billboard.eyeOffset.cartesian)); - expect( - entity.billboard.pixelOffset.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(Cartesian2.unpack(packet.billboard.pixelOffset.cartesian2)); - expect( - entity.billboard.alignedAxis.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(Cartesian3.unpack(packet.billboard.alignedAxis.unitCartesian)); - expect(entity.billboard.show.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.billboard.eyeOffset.getValue(time)).toEqual( + Cartesian3.unpack(packet.billboard.eyeOffset.cartesian) + ); + expect(entity.billboard.pixelOffset.getValue(time)).toEqual( + Cartesian2.unpack(packet.billboard.pixelOffset.cartesian2) + ); + expect(entity.billboard.alignedAxis.getValue(time)).toEqual( + Cartesian3.unpack(packet.billboard.alignedAxis.unitCartesian) + ); + expect(entity.billboard.show.getValue(time)).toEqual( packet.billboard.show ); - expect( - entity.billboard.sizeInMeters.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.billboard.sizeInMeters); - expect(entity.billboard.width.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.billboard.sizeInMeters.getValue(time)).toEqual( + packet.billboard.sizeInMeters + ); + expect(entity.billboard.width.getValue(time)).toEqual( packet.billboard.width ); - expect(entity.billboard.height.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.billboard.height.getValue(time)).toEqual( packet.billboard.height ); - expect( - entity.billboard.scaleByDistance.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual( + expect(entity.billboard.scaleByDistance.getValue(time)).toEqual( NearFarScalar.unpack(packet.billboard.scaleByDistance.nearFarScalar) ); - expect( - entity.billboard.translucencyByDistance.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual( + expect(entity.billboard.translucencyByDistance.getValue(time)).toEqual( NearFarScalar.unpack( packet.billboard.translucencyByDistance.nearFarScalar ) ); expect( - entity.billboard.pixelOffsetScaleByDistance.getValue( - Iso8601.MINIMUM_VALUE - ) + entity.billboard.pixelOffsetScaleByDistance.getValue(time) ).toEqual( NearFarScalar.unpack( packet.billboard.pixelOffsetScaleByDistance.nearFarScalar ) ); - expect( - entity.billboard.imageSubRegion.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual( + expect(entity.billboard.imageSubRegion.getValue(time)).toEqual( BoundingRectangle.unpack( packet.billboard.imageSubRegion.boundingRectangle ) @@ -609,15 +603,17 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; expect(entity.billboard).toBeDefined(); - expect( - entity.billboard.alignedAxis.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(Cartesian3.unpack(packet.billboard.alignedAxis.cartesian)); + expect(entity.billboard.alignedAxis.getValue(time)).toEqual( + Cartesian3.unpack(packet.billboard.alignedAxis.cartesian) + ); }); }); @@ -1664,39 +1660,41 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; expect(entity.ellipse).toBeDefined(); - expect( - entity.ellipse.semiMajorAxis.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.ellipse.semiMajorAxis); - expect( - entity.ellipse.semiMinorAxis.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.ellipse.semiMinorAxis); - expect(entity.ellipse.rotation.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.ellipse.semiMajorAxis.getValue(time)).toEqual( + packet.ellipse.semiMajorAxis + ); + expect(entity.ellipse.semiMinorAxis.getValue(time)).toEqual( + packet.ellipse.semiMinorAxis + ); + expect(entity.ellipse.rotation.getValue(time)).toEqual( packet.ellipse.rotation ); - expect(entity.ellipse.outline.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.ellipse.outline.getValue(time)).toEqual( packet.ellipse.outline ); - expect( - entity.ellipse.outlineColor.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(Color.unpack(packet.ellipse.outlineColor.rgbaf)); - expect( - entity.ellipse.outlineWidth.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.ellipse.outlineWidth); - expect(entity.ellipse.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.ellipse.outlineColor.getValue(time)).toEqual( + Color.unpack(packet.ellipse.outlineColor.rgbaf) + ); + expect(entity.ellipse.outlineWidth.getValue(time)).toEqual( + packet.ellipse.outlineWidth + ); + expect(entity.ellipse.shadows.getValue(time)).toEqual( ShadowMode[packet.ellipse.shadows] ); - expect(entity.ellipse.zIndex.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.ellipse.zIndex.getValue(time)).toEqual( packet.ellipse.zIndex ); - expect( - entity.ellipse.classificationType.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(ClassificationType[packet.ellipse.classificationType]); + expect(entity.ellipse.classificationType.getValue(time)).toEqual( + ClassificationType[packet.ellipse.classificationType] + ); }); }); @@ -1772,40 +1770,42 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; expect(entity.ellipsoid).toBeDefined(); - expect(entity.ellipsoid.radii.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.ellipsoid.radii.getValue(time)).toEqual( Cartesian3.unpack(packet.ellipsoid.radii.cartesian) ); - expect(entity.ellipsoid.show.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.ellipsoid.show.getValue(time)).toEqual( packet.ellipsoid.show ); - expect( - entity.ellipsoid.material.getValue(Iso8601.MINIMUM_VALUE).color - ).toEqual(Color.unpack(packet.ellipsoid.material.solidColor.color.rgbaf)); - expect(entity.ellipsoid.outline.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.ellipsoid.material.getValue(time).color).toEqual( + Color.unpack(packet.ellipsoid.material.solidColor.color.rgbaf) + ); + expect(entity.ellipsoid.outline.getValue(time)).toEqual( packet.ellipsoid.outline ); - expect( - entity.ellipsoid.outlineColor.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(Color.unpack(packet.ellipsoid.outlineColor.rgbaf)); - expect( - entity.ellipsoid.outlineWidth.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.ellipsoid.outlineWidth); - expect( - entity.ellipsoid.stackPartitions.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.ellipsoid.stackPartitions); - expect( - entity.ellipsoid.slicePartitions.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.ellipsoid.slicePartitions); - expect( - entity.ellipsoid.subdivisions.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.ellipsoid.subdivisions); - expect(entity.ellipsoid.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.ellipsoid.outlineColor.getValue(time)).toEqual( + Color.unpack(packet.ellipsoid.outlineColor.rgbaf) + ); + expect(entity.ellipsoid.outlineWidth.getValue(time)).toEqual( + packet.ellipsoid.outlineWidth + ); + expect(entity.ellipsoid.stackPartitions.getValue(time)).toEqual( + packet.ellipsoid.stackPartitions + ); + expect(entity.ellipsoid.slicePartitions.getValue(time)).toEqual( + packet.ellipsoid.slicePartitions + ); + expect(entity.ellipsoid.subdivisions.getValue(time)).toEqual( + packet.ellipsoid.subdivisions + ); + expect(entity.ellipsoid.shadows.getValue(time)).toEqual( ShadowMode[packet.ellipsoid.shadows] ); }); @@ -1893,56 +1893,46 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; expect(entity.label).toBeDefined(); - expect(entity.label.text.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.label.text - ); - expect(entity.label.font.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.label.font - ); - expect(entity.label.style.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.label.text.getValue(time)).toEqual(packet.label.text); + expect(entity.label.font.getValue(time)).toEqual(packet.label.font); + expect(entity.label.style.getValue(time)).toEqual( LabelStyle[packet.label.style] ); - expect(entity.label.fillColor.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.label.fillColor.getValue(time)).toEqual( Color.unpack(packet.label.fillColor.rgbaf) ); - expect(entity.label.outlineColor.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.label.outlineColor.getValue(time)).toEqual( Color.unpack(packet.label.outlineColor.rgbaf) ); - expect(entity.label.outlineWidth.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.label.outlineWidth.getValue(time)).toEqual( packet.label.outlineWidth ); - expect( - entity.label.horizontalOrigin.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(HorizontalOrigin[packet.label.horizontalOrigin]); - expect( - entity.label.verticalOrigin.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(VerticalOrigin[packet.label.verticalOrigin]); - expect(entity.label.eyeOffset.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - Cartesian3.unpack(packet.label.eyeOffset.cartesian) + expect(entity.label.horizontalOrigin.getValue(time)).toEqual( + HorizontalOrigin[packet.label.horizontalOrigin] ); - expect(entity.label.pixelOffset.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - Cartesian2.unpack(packet.label.pixelOffset.cartesian2) + expect(entity.label.verticalOrigin.getValue(time)).toEqual( + VerticalOrigin[packet.label.verticalOrigin] ); - expect(entity.label.scale.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.label.scale + expect(entity.label.eyeOffset.getValue(time)).toEqual( + Cartesian3.unpack(packet.label.eyeOffset.cartesian) ); - expect(entity.label.show.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.label.show + expect(entity.label.pixelOffset.getValue(time)).toEqual( + Cartesian2.unpack(packet.label.pixelOffset.cartesian2) ); - expect( - entity.label.translucencyByDistance.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual( + expect(entity.label.scale.getValue(time)).toEqual(packet.label.scale); + expect(entity.label.show.getValue(time)).toEqual(packet.label.show); + expect(entity.label.translucencyByDistance.getValue(time)).toEqual( NearFarScalar.unpack(packet.label.translucencyByDistance.nearFarScalar) ); - expect( - entity.label.pixelOffsetScaleByDistance.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual( + expect(entity.label.pixelOffsetScaleByDistance.getValue(time)).toEqual( NearFarScalar.unpack( packet.label.pixelOffsetScaleByDistance.nearFarScalar ) @@ -2072,11 +2062,13 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; - expect(entity.position.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.position.getValue(time)).toEqual( Cartesian3.unpack(packet.position.cartesian) ); }); @@ -2089,11 +2081,13 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; - expect(entity.orientation.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.orientation.getValue(time)).toEqual( Quaternion.unpack(packet.orientation.unitQuaternion) ); }); @@ -2109,13 +2103,13 @@ describe("DataSources/CzmlDataSource", function () { var expected = Quaternion.unpack(packet.orientation.unitQuaternion); Quaternion.normalize(expected, expected); + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; - expect(entity.orientation.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - expected - ); + expect(entity.orientation.getValue(time)).toEqual(expected); }); }); @@ -2206,11 +2200,13 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; - expect(entity.polyline.positions.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.polyline.positions.getValue(time)).toEqual( Cartesian3.unpackArray(packet.polyline.positions.cartesian) ); }); @@ -2225,11 +2221,13 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; - expect(entity.polyline.positions.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.polyline.positions.getValue(time)).toEqual( Cartesian3.fromRadiansArrayHeights( packet.polyline.positions.cartographicRadians ) @@ -2246,11 +2244,13 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; - expect(entity.polyline.positions.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.polyline.positions.getValue(time)).toEqual( Cartesian3.fromDegreesArrayHeights( packet.polyline.positions.cartographicDegrees ) @@ -2265,11 +2265,13 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; - expect(entity.viewFrom.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.viewFrom.getValue(time)).toEqual( Cartesian3.unpack(packet.viewFrom.cartesian) ); }); @@ -2280,13 +2282,13 @@ describe("DataSources/CzmlDataSource", function () { description: "this is a description", }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; - expect(entity.description.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.description - ); + expect(entity.description.getValue(time)).toEqual(packet.description); }); }); @@ -2312,22 +2314,24 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; - expect( - entity.properties.constant_name.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.properties.constant_name); - expect( - entity.properties.constant_height.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.properties.constant_height); - expect( - entity.properties.constant_object.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(testObject); - expect( - entity.properties.constant_array.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(testArray); + expect(entity.properties.constant_name.getValue(time)).toEqual( + packet.properties.constant_name + ); + expect(entity.properties.constant_height.getValue(time)).toEqual( + packet.properties.constant_height + ); + expect(entity.properties.constant_object.getValue(time)).toEqual( + testObject + ); + expect(entity.properties.constant_array.getValue(time)).toEqual( + testArray + ); }); }); @@ -2356,22 +2360,24 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; - expect( - entity.properties.constant_name.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.properties.constant_name.string); - expect( - entity.properties.constant_height.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.properties.constant_height.number); - expect( - entity.properties.constant_object.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(testObject); - expect( - entity.properties.constant_array.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(testArray); + expect(entity.properties.constant_name.getValue(time)).toEqual( + packet.properties.constant_name.string + ); + expect(entity.properties.constant_height.getValue(time)).toEqual( + packet.properties.constant_height.number + ); + expect(entity.properties.constant_object.getValue(time)).toEqual( + testObject + ); + expect(entity.properties.constant_array.getValue(time)).toEqual( + testArray + ); }); }); @@ -3936,20 +3942,20 @@ describe("DataSources/CzmlDataSource", function () { dataSource2.entities, ]); + var time = Iso8601.MINIMUM_VALUE; + // Initially we use all the properties from dataSource1. var entity = composite.values[0]; - expect( - entity.properties.constant_name.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet1.properties.constant_name); - expect( - entity.properties.constant_height.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet1.properties.constant_height); - expect( - entity.properties.constant_object.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(testObject1); - expect( - entity.properties.constant_array.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(testArray1); + expect(entity.properties.constant_name.getValue(time)).toEqual( + packet1.properties.constant_name + ); + expect(entity.properties.constant_height.getValue(time)).toEqual( + packet1.properties.constant_height + ); + expect(entity.properties.constant_object.getValue(time)).toEqual( + testObject1 + ); + expect(entity.properties.constant_array.getValue(time)).toEqual(testArray1); // Load a new packet into dataSource2 and it should take precedence in the composite. var packet2 = { @@ -3962,18 +3968,16 @@ describe("DataSources/CzmlDataSource", function () { dataSource2.load(makeDocument(packet2)); entity = composite.values[0]; - expect( - entity.properties.constant_name.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet2.properties.constant_name); - expect( - entity.properties.constant_height.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet1.properties.constant_height); - expect( - entity.properties.constant_object.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(testObject1); - expect( - entity.properties.constant_array.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(testArray1); + expect(entity.properties.constant_name.getValue(time)).toEqual( + packet2.properties.constant_name + ); + expect(entity.properties.constant_height.getValue(time)).toEqual( + packet1.properties.constant_height + ); + expect(entity.properties.constant_object.getValue(time)).toEqual( + testObject1 + ); + expect(entity.properties.constant_array.getValue(time)).toEqual(testArray1); // Changed values should be mirrored in the composite, too. var testObject3 = { @@ -3996,18 +4000,16 @@ describe("DataSources/CzmlDataSource", function () { dataSource2.process(packet3); entity = composite.values[0]; - expect( - entity.properties.constant_name.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet2.properties.constant_name); - expect( - entity.properties.constant_height.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet3.properties.constant_height); - expect( - entity.properties.constant_object.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(testObject3); - expect( - entity.properties.constant_array.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(testArray3); + expect(entity.properties.constant_name.getValue(time)).toEqual( + packet2.properties.constant_name + ); + expect(entity.properties.constant_height.getValue(time)).toEqual( + packet3.properties.constant_height + ); + expect(entity.properties.constant_object.getValue(time)).toEqual( + testObject3 + ); + expect(entity.properties.constant_array.getValue(time)).toEqual(testArray3); }); it("can load and modify availability from a single interval", function () { @@ -4108,38 +4110,32 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; expect(entity.path).toBeDefined(); - expect( - entity.path.material.color.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(Color.unpack(packet.path.material.polylineOutline.color.rgbaf)); - expect( - entity.path.material.outlineColor.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual( + expect(entity.path.material.color.getValue(time)).toEqual( + Color.unpack(packet.path.material.polylineOutline.color.rgbaf) + ); + expect(entity.path.material.outlineColor.getValue(time)).toEqual( Color.unpack(packet.path.material.polylineOutline.outlineColor.rgbaf) ); - expect( - entity.path.material.outlineWidth.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.path.material.polylineOutline.outlineWidth); - expect(entity.path.width.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.path.width + expect(entity.path.material.outlineWidth.getValue(time)).toEqual( + packet.path.material.polylineOutline.outlineWidth ); - expect(entity.path.resolution.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.path.width.getValue(time)).toEqual(packet.path.width); + expect(entity.path.resolution.getValue(time)).toEqual( packet.path.resolution ); - expect(entity.path.leadTime.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.path.leadTime - ); - expect(entity.path.trailTime.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.path.leadTime.getValue(time)).toEqual(packet.path.leadTime); + expect(entity.path.trailTime.getValue(time)).toEqual( packet.path.trailTime ); - expect(entity.path.show.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.path.show - ); + expect(entity.path.show.getValue(time)).toEqual(packet.path.show); }); }); @@ -4228,40 +4224,36 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; expect(entity.point).toBeDefined(); - expect(entity.point.color.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.point.color.getValue(time)).toEqual( Color.unpack(packet.point.color.rgbaf) ); - expect(entity.point.pixelSize.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.point.pixelSize.getValue(time)).toEqual( packet.point.pixelSize ); - expect(entity.point.outlineColor.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.point.outlineColor.getValue(time)).toEqual( Color.unpack(packet.point.outlineColor.rgbaf) ); - expect(entity.point.outlineWidth.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.point.outlineWidth.getValue(time)).toEqual( packet.point.outlineWidth ); - expect(entity.point.show.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.point.show - ); - expect( - entity.point.scaleByDistance.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual( + expect(entity.point.show.getValue(time)).toEqual(packet.point.show); + expect(entity.point.scaleByDistance.getValue(time)).toEqual( NearFarScalar.unpack(packet.point.scaleByDistance.nearFarScalar) ); - expect( - entity.point.translucencyByDistance.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual( + expect(entity.point.translucencyByDistance.getValue(time)).toEqual( NearFarScalar.unpack(packet.point.translucencyByDistance.nearFarScalar) ); - expect( - entity.point.heightReference.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(HeightReference[packet.point.heightReference]); + expect(entity.point.heightReference.getValue(time)).toEqual( + HeightReference[packet.point.heightReference] + ); }); }); @@ -4342,54 +4334,54 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; expect(entity.polygon).toBeDefined(); - expect( - entity.polygon.material.getValue(Iso8601.MINIMUM_VALUE).color - ).toEqual(Color.unpack(packet.polygon.material.solidColor.color.rgbaf)); - expect(entity.polygon.show.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.polygon.show + expect(entity.polygon.material.getValue(time).color).toEqual( + Color.unpack(packet.polygon.material.solidColor.color.rgbaf) ); - expect(entity.polygon.height.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.polygon.show.getValue(time)).toEqual(packet.polygon.show); + expect(entity.polygon.height.getValue(time)).toEqual( packet.polygon.height ); - expect( - entity.polygon.extrudedHeight.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.polygon.extrudedHeight); - expect( - entity.polygon.granularity.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.polygon.granularity); - expect(entity.polygon.stRotation.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.polygon.extrudedHeight.getValue(time)).toEqual( + packet.polygon.extrudedHeight + ); + expect(entity.polygon.granularity.getValue(time)).toEqual( + packet.polygon.granularity + ); + expect(entity.polygon.stRotation.getValue(time)).toEqual( packet.polygon.stRotation ); - expect(entity.polygon.outline.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.polygon.outline.getValue(time)).toEqual( packet.polygon.outline ); - expect( - entity.polygon.outlineColor.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(Color.unpack(packet.polygon.outlineColor.rgbaf)); - expect( - entity.polygon.outlineWidth.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.polygon.outlineWidth); - expect(entity.polygon.closeTop.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.polygon.outlineColor.getValue(time)).toEqual( + Color.unpack(packet.polygon.outlineColor.rgbaf) + ); + expect(entity.polygon.outlineWidth.getValue(time)).toEqual( + packet.polygon.outlineWidth + ); + expect(entity.polygon.closeTop.getValue(time)).toEqual( packet.polygon.closeTop ); - expect( - entity.polygon.closeBottom.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.polygon.closeBottom); - expect(entity.polygon.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.polygon.closeBottom.getValue(time)).toEqual( + packet.polygon.closeBottom + ); + expect(entity.polygon.shadows.getValue(time)).toEqual( ShadowMode[packet.polygon.shadows] ); - expect(entity.polygon.zIndex.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.polygon.zIndex.getValue(time)).toEqual( packet.polygon.zIndex ); - expect( - entity.polygon.classificationType.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(ClassificationType[packet.polygon.classificationType]); + expect(entity.polygon.classificationType.getValue(time)).toEqual( + ClassificationType[packet.polygon.classificationType] + ); }); }); @@ -4445,6 +4437,8 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { @@ -4454,7 +4448,7 @@ describe("DataSources/CzmlDataSource", function () { expect(entity.polygon.hierarchy).toBeDefined(); expect(entity.polygon.hierarchy.isConstant).toEqual(true); - var hierarchy = entity.polygon.hierarchy.getValue(Iso8601.MINIMUM_VALUE); + var hierarchy = entity.polygon.hierarchy.getValue(time); expect(hierarchy).toBeInstanceOf(PolygonHierarchy); expect(hierarchy.positions).toEqual( Cartesian3.fromDegreesArrayHeights( @@ -4463,7 +4457,7 @@ describe("DataSources/CzmlDataSource", function () { ); hierarchy = entity.polygon.hierarchy.getValue( - Iso8601.MINIMUM_VALUE, + time, new PolygonHierarchy() ); expect(hierarchy).toBeInstanceOf(PolygonHierarchy); @@ -4496,6 +4490,8 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { @@ -4505,7 +4501,7 @@ describe("DataSources/CzmlDataSource", function () { expect(entity.polygon.hierarchy).toBeDefined(); expect(entity.polygon.hierarchy.isConstant).toEqual(true); - var hierarchy = entity.polygon.hierarchy.getValue(Iso8601.MINIMUM_VALUE); + var hierarchy = entity.polygon.hierarchy.getValue(time); expect(hierarchy).toBeInstanceOf(PolygonHierarchy); expect(hierarchy.positions).toEqual( Cartesian3.fromDegreesArrayHeights( @@ -4981,39 +4977,35 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; expect(entity.polyline).toBeDefined(); - expect( - entity.polyline.material.color.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual( + expect(entity.polyline.material.color.getValue(time)).toEqual( Color.unpack(packet.polyline.material.polylineOutline.color.rgbaf) ); - expect( - entity.polyline.material.outlineColor.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual( + expect(entity.polyline.material.outlineColor.getValue(time)).toEqual( Color.unpack( packet.polyline.material.polylineOutline.outlineColor.rgbaf ) ); - expect( - entity.polyline.material.outlineWidth.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.polyline.material.polylineOutline.outlineWidth); - expect(entity.polyline.width.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.polyline.width + expect(entity.polyline.material.outlineWidth.getValue(time)).toEqual( + packet.polyline.material.polylineOutline.outlineWidth ); - expect(entity.polyline.show.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.polyline.show + expect(entity.polyline.width.getValue(time)).toEqual( + packet.polyline.width ); - expect(entity.polyline.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.polyline.show.getValue(time)).toEqual(packet.polyline.show); + expect(entity.polyline.shadows.getValue(time)).toEqual( ShadowMode[packet.polyline.shadows] ); - expect( - entity.polyline.classificationType.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(ClassificationType[packet.polyline.classificationType]); + expect(entity.polyline.classificationType.getValue(time)).toEqual( + ClassificationType[packet.polyline.classificationType] + ); }); }); @@ -5098,68 +5090,47 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; expect(entity.polyline).toBeDefined(); - expect( - entity.polyline.material.color.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual( + expect(entity.polyline.material.color.getValue(time)).toEqual( Color.unpack(packet.polyline.material.polylineOutline.color.rgbaf) ); - expect( - entity.polyline.material.outlineColor.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual( + expect(entity.polyline.material.outlineColor.getValue(time)).toEqual( Color.unpack( packet.polyline.material.polylineOutline.outlineColor.rgbaf ) ); - expect( - entity.polyline.material.outlineWidth.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.polyline.material.polylineOutline.outlineWidth); - expect(entity.polyline.width.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.polyline.material.outlineWidth.getValue(time)).toEqual( + packet.polyline.material.polylineOutline.outlineWidth + ); + expect(entity.polyline.width.getValue(time)).toEqual( packet.polyline.width ); - expect(entity.polyline.show.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.polyline.show + expect(entity.polyline.show.getValue(time)).toEqual(packet.polyline.show); + expect(entity.polyline.clampToGround.getValue(time)).toEqual( + packet.polyline.clampToGround ); - expect( - entity.polyline.clampToGround.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.polyline.clampToGround); - expect(entity.polyline.zIndex.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.polyline.zIndex.getValue(time)).toEqual( packet.polyline.zIndex ); }); }); it("can load constant data for polylineVolume", function () { - var expectedPosition = [ - new Cartesian3(1.0, 2.0, 3.0), - new Cartesian3(5.0, 6.0, 7.0), - ]; - var expectedShape = [new Cartesian2(1.0, 2.0), new Cartesian2(3.0, 4.0)]; - - var polylineVolumePacket = { + var packet = { + id: "id", polylineVolume: { positions: { - cartesian: [ - expectedPosition[0].x, - expectedPosition[0].y, - expectedPosition[0].z, - expectedPosition[1].x, - expectedPosition[1].y, - expectedPosition[1].z, - ], + cartesian: [1.0, 2.0, 3.0, 5.0, 6.0, 7.0], }, shape: { - cartesian: [ - expectedShape[0].x, - expectedShape[0].y, - expectedShape[1].x, - expectedShape[1].y, - ], + cartesian2: [1.0, 2.0, 3.0, 4.0], }, cornerType: "MITERED", show: true, @@ -5181,48 +5152,61 @@ describe("DataSources/CzmlDataSource", function () { }, }; - var czmlPolylineVolume = polylineVolumePacket.polylineVolume; + var time = Iso8601.MINIMUM_VALUE; var dataSource = new CzmlDataSource(); return dataSource - .load(makeDocument(polylineVolumePacket)) + .load(makeDocument(packet)) .then(function (dataSource) { var entity = dataSource.entities.values[0]; + expect(entity.id).toEqual("id"); expect(entity.polylineVolume).toBeDefined(); - expect( - entity.polylineVolume.positions.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(expectedPosition); - expect( - entity.polylineVolume.shape.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(expectedShape); - expect( - entity.polylineVolume.cornerType.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(CornerType.MITERED); - expect( - entity.polylineVolume.show.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(czmlPolylineVolume.show); - expect( - entity.polylineVolume.fill.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(czmlPolylineVolume.fill); - expect( - entity.polylineVolume.material.getValue(Iso8601.MINIMUM_VALUE).color - ).toEqual(new Color(0.1, 0.2, 0.3, 0.4)); - expect( - entity.polylineVolume.outline.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(true); - expect( - entity.polylineVolume.outlineColor.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(new Color(0.2, 0.2, 0.2, 0.2)); - expect( - entity.polylineVolume.outlineWidth.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(6); - expect( - entity.polylineVolume.granularity.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(czmlPolylineVolume.granularity); - expect( - entity.polylineVolume.shadows.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(ShadowMode.ENABLED); + expect(entity.polylineVolume.positions.getValue(time)).toEqual( + Cartesian3.unpackArray(packet.polylineVolume.positions.cartesian) + ); + expect(entity.polylineVolume.shape.getValue(time)).toEqual( + Cartesian2.unpackArray(packet.polylineVolume.shape.cartesian2) + ); + expect(entity.polylineVolume.cornerType.getValue(time)).toEqual( + CornerType[packet.polylineVolume.cornerType] + ); + expect(entity.polylineVolume.show.getValue(time)).toEqual( + packet.polylineVolume.show + ); + expect(entity.polylineVolume.fill.getValue(time)).toEqual( + packet.polylineVolume.fill + ); + expect(entity.polylineVolume.material.getValue(time).color).toEqual( + Color.unpack(packet.polylineVolume.material.solidColor.color.rgbaf) + ); + expect(entity.polylineVolume.outline.getValue(time)).toEqual(true); + expect(entity.polylineVolume.outlineColor.getValue(time)).toEqual( + Color.unpack(packet.polylineVolume.outlineColor.rgbaf) + ); + expect(entity.polylineVolume.outlineWidth.getValue(time)).toEqual(6); + expect(entity.polylineVolume.granularity.getValue(time)).toEqual( + packet.polylineVolume.granularity + ); + expect(entity.polylineVolume.shadows.getValue(time)).toEqual( + ShadowMode[packet.polylineVolume.shadows] + ); + + // for backwards compatibility, also accept `shape` specified as `cartesian` + // (which normally always refers to a Cartesian3) + packet.polylineVolume.shape = { + cartesian: [1.0, 2.0, 3.0, 4.0], + }; + + return dataSource.load(makeDocument(packet)); + }) + .then(function (dataSource) { + var entity = dataSource.entities.values[0]; + expect(entity.id).toEqual("id"); + + expect(entity.polylineVolume.shape.getValue(time)).toEqual( + Cartesian2.unpackArray(packet.polylineVolume.shape.cartesian) + ); }); }); @@ -5267,55 +5251,49 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; expect(entity.model).toBeDefined(); - expect(entity.model.show.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.model.show - ); - expect(entity.model.scale.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.model.scale + expect(entity.model.show.getValue(time)).toEqual(packet.model.show); + expect(entity.model.scale.getValue(time)).toEqual(packet.model.scale); + expect(entity.model.minimumPixelSize.getValue(time)).toEqual( + packet.model.minimumPixelSize ); - expect( - entity.model.minimumPixelSize.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.model.minimumPixelSize); - expect(entity.model.maximumScale.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.model.maximumScale.getValue(time)).toEqual( packet.model.maximumScale ); - expect(entity.model.uri.getValue(Iso8601.MINIMUM_VALUE).url).toEqual( - packet.model.gltf + expect(entity.model.uri.getValue(time).url).toEqual(packet.model.gltf); + expect(entity.model.incrementallyLoadTextures.getValue(time)).toEqual( + packet.model.incrementallyLoadTextures ); - expect( - entity.model.incrementallyLoadTextures.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.model.incrementallyLoadTextures); - expect(entity.model.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.model.shadows.getValue(time)).toEqual( ShadowMode[packet.model.shadows] ); - expect( - entity.model.heightReference.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(HeightReference[packet.model.heightReference]); - expect( - entity.model.silhouetteColor.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(Color.unpack(packet.model.silhouetteColor.rgbaf)); - expect( - entity.model.silhouetteSize.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.model.silhouetteSize); - expect(entity.model.color.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.model.heightReference.getValue(time)).toEqual( + HeightReference[packet.model.heightReference] + ); + expect(entity.model.silhouetteColor.getValue(time)).toEqual( + Color.unpack(packet.model.silhouetteColor.rgbaf) + ); + expect(entity.model.silhouetteSize.getValue(time)).toEqual( + packet.model.silhouetteSize + ); + expect(entity.model.color.getValue(time)).toEqual( Color.unpack(packet.model.color.rgbaf) ); - expect( - entity.model.colorBlendMode.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(ColorBlendMode[packet.model.colorBlendMode]); - expect( - entity.model.colorBlendAmount.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.model.colorBlendAmount); + expect(entity.model.colorBlendMode.getValue(time)).toEqual( + ColorBlendMode[packet.model.colorBlendMode] + ); + expect(entity.model.colorBlendAmount.getValue(time)).toEqual( + packet.model.colorBlendAmount + ); - var nodeTransform = entity.model.nodeTransformations.getValue( - Iso8601.MINIMUM_VALUE - ).Mesh; + var nodeTransform = entity.model.nodeTransformations.getValue(time).Mesh; expect(nodeTransform).toBeDefined(); expect(nodeTransform.scale).toEqual( Cartesian3.unpack(packet.model.nodeTransformations.Mesh.scale.cartesian) @@ -5333,30 +5311,22 @@ describe("DataSources/CzmlDataSource", function () { expect(nodeTransform.rotation).toEqual(expectedRotation); expect( - entity.model.nodeTransformations.Mesh.scale.getValue( - Iso8601.MINIMUM_VALUE - ) + entity.model.nodeTransformations.Mesh.scale.getValue(time) ).toEqual( Cartesian3.unpack(packet.model.nodeTransformations.Mesh.scale.cartesian) ); expect( - entity.model.nodeTransformations.Mesh.translation.getValue( - Iso8601.MINIMUM_VALUE - ) + entity.model.nodeTransformations.Mesh.translation.getValue(time) ).toEqual( Cartesian3.unpack( packet.model.nodeTransformations.Mesh.translation.cartesian ) ); expect( - entity.model.nodeTransformations.Mesh.rotation.getValue( - Iso8601.MINIMUM_VALUE - ) + entity.model.nodeTransformations.Mesh.rotation.getValue(time) ).toEqual(expectedRotation); - var articulations = entity.model.articulations.getValue( - Iso8601.MINIMUM_VALUE - ); + var articulations = entity.model.articulations.getValue(time); expect(articulations).toBeDefined(); expect(articulations["SampleArticulation Yaw"]).toEqual( packet.model.articulations["SampleArticulation Yaw"] @@ -6016,54 +5986,56 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; expect(entity.rectangle).toBeDefined(); - expect( - entity.rectangle.coordinates.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(Rectangle.unpack(packet.rectangle.coordinates.wsen)); - expect( - entity.rectangle.material.getValue(Iso8601.MINIMUM_VALUE).color - ).toEqual(Color.unpack(packet.rectangle.material.solidColor.color.rgbaf)); - expect(entity.rectangle.show.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.rectangle.coordinates.getValue(time)).toEqual( + Rectangle.unpack(packet.rectangle.coordinates.wsen) + ); + expect(entity.rectangle.material.getValue(time).color).toEqual( + Color.unpack(packet.rectangle.material.solidColor.color.rgbaf) + ); + expect(entity.rectangle.show.getValue(time)).toEqual( packet.rectangle.show ); - expect(entity.rectangle.height.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.rectangle.height.getValue(time)).toEqual( packet.rectangle.height ); - expect( - entity.rectangle.extrudedHeight.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.rectangle.extrudedHeight); - expect( - entity.rectangle.granularity.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.rectangle.granularity); - expect(entity.rectangle.rotation.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.rectangle.extrudedHeight.getValue(time)).toEqual( + packet.rectangle.extrudedHeight + ); + expect(entity.rectangle.granularity.getValue(time)).toEqual( + packet.rectangle.granularity + ); + expect(entity.rectangle.rotation.getValue(time)).toEqual( packet.rectangle.rotation ); - expect( - entity.rectangle.stRotation.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.rectangle.stRotation); - expect(entity.rectangle.outline.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.rectangle.stRotation.getValue(time)).toEqual( + packet.rectangle.stRotation + ); + expect(entity.rectangle.outline.getValue(time)).toEqual( packet.rectangle.outline ); - expect( - entity.rectangle.outlineColor.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(Color.unpack(packet.rectangle.outlineColor.rgbaf)); - expect( - entity.rectangle.outlineWidth.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.rectangle.outlineWidth); - expect(entity.rectangle.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.rectangle.outlineColor.getValue(time)).toEqual( + Color.unpack(packet.rectangle.outlineColor.rgbaf) + ); + expect(entity.rectangle.outlineWidth.getValue(time)).toEqual( + packet.rectangle.outlineWidth + ); + expect(entity.rectangle.shadows.getValue(time)).toEqual( ShadowMode[packet.rectangle.shadows] ); - expect(entity.rectangle.zIndex.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.rectangle.zIndex.getValue(time)).toEqual( packet.rectangle.zIndex ); - expect( - entity.rectangle.classificationType.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(ClassificationType[packet.rectangle.classificationType]); + expect(entity.rectangle.classificationType.getValue(time)).toEqual( + ClassificationType[packet.rectangle.classificationType] + ); }); }); @@ -6076,13 +6048,15 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; - expect( - entity.rectangle.coordinates.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(Rectangle.fromDegrees(0, 1, 2, 3)); + expect(entity.rectangle.coordinates.getValue(time)).toEqual( + Rectangle.fromDegrees(0, 1, 2, 3) + ); }); }); @@ -6180,37 +6154,35 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; expect(entity.wall).toBeDefined(); - expect( - entity.wall.material.getValue(Iso8601.MINIMUM_VALUE).color - ).toEqual(Color.unpack(packet.wall.material.solidColor.color.rgbaf)); - expect(entity.wall.show.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.wall.show + expect(entity.wall.material.getValue(time).color).toEqual( + Color.unpack(packet.wall.material.solidColor.color.rgbaf) ); - expect(entity.wall.granularity.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.wall.show.getValue(time)).toEqual(packet.wall.show); + expect(entity.wall.granularity.getValue(time)).toEqual( packet.wall.granularity ); - expect( - entity.wall.minimumHeights.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.wall.minimumHeights.array); - expect( - entity.wall.maximumHeights.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.wall.maximumHeights.array); - expect(entity.wall.outline.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.wall.outline + expect(entity.wall.minimumHeights.getValue(time)).toEqual( + packet.wall.minimumHeights.array ); - expect(entity.wall.outlineColor.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.wall.maximumHeights.getValue(time)).toEqual( + packet.wall.maximumHeights.array + ); + expect(entity.wall.outline.getValue(time)).toEqual(packet.wall.outline); + expect(entity.wall.outlineColor.getValue(time)).toEqual( new Color(0.2, 0.2, 0.2, 0.2) ); - expect(entity.wall.outlineWidth.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.wall.outlineWidth.getValue(time)).toEqual( packet.wall.outlineWidth ); - expect(entity.wall.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.wall.shadows.getValue(time)).toEqual( ShadowMode[packet.wall.shadows] ); }); @@ -6247,16 +6219,20 @@ describe("DataSources/CzmlDataSource", function () { }, ]; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(packets).then(function (dataSource) { var entity = dataSource.entities.getById("wall"); expect(entity.wall).toBeDefined(); - expect( - entity.wall.minimumHeights.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual([packets[1].billboard.scale, packets[2].billboard.scale]); - expect( - entity.wall.maximumHeights.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual([packets[2].billboard.scale, packets[1].billboard.scale]); + expect(entity.wall.minimumHeights.getValue(time)).toEqual([ + packets[1].billboard.scale, + packets[2].billboard.scale, + ]); + expect(entity.wall.maximumHeights.getValue(time)).toEqual([ + packets[2].billboard.scale, + packets[1].billboard.scale, + ]); }); }); @@ -6347,31 +6323,29 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; expect(entity.box).toBeDefined(); - expect(entity.box.dimensions.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.box.dimensions.getValue(time)).toEqual( Cartesian3.unpack(packet.box.dimensions.cartesian) ); - expect(entity.box.material.getValue(Iso8601.MINIMUM_VALUE).color).toEqual( + expect(entity.box.material.getValue(time).color).toEqual( Color.unpack(packet.box.material.solidColor.color.rgbaf) ); - expect(entity.box.show.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.box.show - ); - expect(entity.box.outline.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.box.outline - ); - expect(entity.box.outlineColor.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.box.show.getValue(time)).toEqual(packet.box.show); + expect(entity.box.outline.getValue(time)).toEqual(packet.box.outline); + expect(entity.box.outlineColor.getValue(time)).toEqual( Color.unpack(packet.box.outlineColor.rgbaf) ); - expect(entity.box.outlineWidth.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.box.outlineWidth.getValue(time)).toEqual( packet.box.outlineWidth ); - expect(entity.box.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.box.shadows.getValue(time)).toEqual( ShadowMode[packet.box.shadows] ); }); @@ -6402,43 +6376,43 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; expect(entity.cylinder).toBeDefined(); - expect(entity.cylinder.length.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.cylinder.length.getValue(time)).toEqual( packet.cylinder.length ); - expect(entity.cylinder.topRadius.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.cylinder.topRadius.getValue(time)).toEqual( packet.cylinder.topRadius ); - expect( - entity.cylinder.bottomRadius.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.cylinder.bottomRadius); - expect( - entity.cylinder.material.getValue(Iso8601.MINIMUM_VALUE).color - ).toEqual(Color.unpack(packet.cylinder.material.solidColor.color.rgbaf)); - expect(entity.cylinder.show.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.cylinder.show + expect(entity.cylinder.bottomRadius.getValue(time)).toEqual( + packet.cylinder.bottomRadius + ); + expect(entity.cylinder.material.getValue(time).color).toEqual( + Color.unpack(packet.cylinder.material.solidColor.color.rgbaf) ); - expect(entity.cylinder.outline.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.cylinder.show.getValue(time)).toEqual(packet.cylinder.show); + expect(entity.cylinder.outline.getValue(time)).toEqual( packet.cylinder.outline ); - expect( - entity.cylinder.outlineColor.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(Color.unpack(packet.cylinder.outlineColor.rgbaf)); - expect( - entity.cylinder.outlineWidth.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.cylinder.outlineWidth); - expect( - entity.cylinder.numberOfVerticalLines.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.cylinder.numberOfVerticalLines); - expect(entity.cylinder.slices.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.cylinder.outlineColor.getValue(time)).toEqual( + Color.unpack(packet.cylinder.outlineColor.rgbaf) + ); + expect(entity.cylinder.outlineWidth.getValue(time)).toEqual( + packet.cylinder.outlineWidth + ); + expect(entity.cylinder.numberOfVerticalLines.getValue(time)).toEqual( + packet.cylinder.numberOfVerticalLines + ); + expect(entity.cylinder.slices.getValue(time)).toEqual( packet.cylinder.slices ); - expect(entity.cylinder.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.cylinder.shadows.getValue(time)).toEqual( ShadowMode[packet.cylinder.shadows] ); }); @@ -6474,54 +6448,54 @@ describe("DataSources/CzmlDataSource", function () { }, }; + var time = Iso8601.MINIMUM_VALUE; + return CzmlDataSource.load(makeDocument(packet)).then(function ( dataSource ) { var entity = dataSource.entities.values[0]; expect(entity.corridor).toBeDefined(); - expect(entity.corridor.positions.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.corridor.positions.getValue(time)).toEqual( Cartesian3.unpackArray(packet.corridor.positions.cartesian) ); - expect( - entity.corridor.material.getValue(Iso8601.MINIMUM_VALUE).color - ).toEqual(Color.unpack(packet.corridor.material.solidColor.color.rgbaf)); - expect(entity.corridor.show.getValue(Iso8601.MINIMUM_VALUE)).toEqual( - packet.corridor.show + expect(entity.corridor.material.getValue(time).color).toEqual( + Color.unpack(packet.corridor.material.solidColor.color.rgbaf) ); - expect(entity.corridor.height.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.corridor.show.getValue(time)).toEqual(packet.corridor.show); + expect(entity.corridor.height.getValue(time)).toEqual( packet.corridor.height ); - expect(entity.corridor.width.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.corridor.width.getValue(time)).toEqual( packet.corridor.width ); - expect( - entity.corridor.cornerType.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(CornerType[packet.corridor.cornerType]); - expect( - entity.corridor.extrudedHeight.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.corridor.extrudedHeight); - expect( - entity.corridor.granularity.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.corridor.granularity); - expect(entity.corridor.outline.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.corridor.cornerType.getValue(time)).toEqual( + CornerType[packet.corridor.cornerType] + ); + expect(entity.corridor.extrudedHeight.getValue(time)).toEqual( + packet.corridor.extrudedHeight + ); + expect(entity.corridor.granularity.getValue(time)).toEqual( + packet.corridor.granularity + ); + expect(entity.corridor.outline.getValue(time)).toEqual( packet.corridor.outline ); - expect( - entity.corridor.outlineColor.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(Color.unpack(packet.corridor.outlineColor.rgbaf)); - expect( - entity.corridor.outlineWidth.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(packet.corridor.outlineWidth); - expect(entity.corridor.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.corridor.outlineColor.getValue(time)).toEqual( + Color.unpack(packet.corridor.outlineColor.rgbaf) + ); + expect(entity.corridor.outlineWidth.getValue(time)).toEqual( + packet.corridor.outlineWidth + ); + expect(entity.corridor.shadows.getValue(time)).toEqual( ShadowMode[packet.corridor.shadows] ); - expect(entity.corridor.zIndex.getValue(Iso8601.MINIMUM_VALUE)).toEqual( + expect(entity.corridor.zIndex.getValue(time)).toEqual( packet.corridor.zIndex ); - expect( - entity.corridor.classificationType.getValue(Iso8601.MINIMUM_VALUE) - ).toEqual(ClassificationType[packet.corridor.classificationType]); + expect(entity.corridor.classificationType.getValue(time)).toEqual( + ClassificationType[packet.corridor.classificationType] + ); }); }); @@ -7075,12589 +7049,2999 @@ describe("DataSources/CzmlDataSource", function () { // then running the generated TestGenerateValidationDocument unit test // to produce ValidationDocument.czml and ValidationDocumentAssertions.js + // Since this is generated code, keep the existing formatting. + // prettier-ignore it("checks validation document", function () { - return CzmlDataSource.load("Data/CZML/ValidationDocument.czml").then( - function (dataSource) { - var e; - var date; - var documentStartDate = JulianDate.fromIso8601("2016-06-17T12:00:00Z"); - var documentStopDate = JulianDate.fromIso8601("2016-06-17T13:00:00Z"); - expect(dataSource.clock.startTime).toEqual(documentStartDate); - expect(dataSource.clock.stopTime).toEqual(documentStopDate); - expect(dataSource.clock.currentTime).toEqual(documentStartDate); - expect(dataSource.clock.multiplier).toEqual(1.0); - expect(dataSource.clock.clockRange).toEqual(ClockRange.UNBOUNDED); - expect(dataSource.clock.clockStep).toEqual( - ClockStep.SYSTEM_CLOCK_MULTIPLIER - ); - var constant = (e = dataSource.entities.getById("Constant")); - expect(e).toBeDefined(); - date = JulianDate.now(); - expect(e.description.getValue(date)).toEqual("string31449"); - expect(e.position.getValue(date)).toEqual( - new Cartesian3(24944, 16481, 24896) - ); - expect(e.orientation.getValue(date)).toEqualEpsilon( - new Quaternion( - 0.431493311977589, - 0.560811914509339, - 0.423522822587574, - 0.565625261998114 - ), - 1e-14 - ); - expect(e.viewFrom.getValue(date)).toEqual( - new Cartesian3(17794, 13381, 18228) - ); - expect(e.billboard.show.getValue(date)).toEqual(true); - expect(e.billboard.image.getValue(date).url).toEqual( - "http://example.com/3792" - ); - expect(e.billboard.scale.getValue(date)).toEqual(27514.0); - expect(e.billboard.pixelOffset.getValue(date)).toEqual( - new Cartesian2(16996, 51010) - ); - expect(e.billboard.eyeOffset.getValue(date)).toEqual( - new Cartesian3(64633, 11516, 17196) - ); - expect(e.billboard.horizontalOrigin.getValue(date)).toEqual( - HorizontalOrigin.LEFT - ); - expect(e.billboard.verticalOrigin.getValue(date)).toEqual( - VerticalOrigin.BOTTOM - ); - expect(e.billboard.heightReference.getValue(date)).toEqual( - HeightReference.CLAMP_TO_GROUND - ); - expect(e.billboard.color.getValue(date)).toEqual( - Color.fromBytes(87, 118, 167, 140) - ); - expect(e.billboard.rotation.getValue(date)).toEqual(57379.0); - expect(e.billboard.alignedAxis.getValue(date)).toEqualEpsilon( - new Cartesian3( - 0.205062091895724, - 0.975768213485699, - 0.0763277932228903 - ), - 1e-14 - ); - expect(e.billboard.sizeInMeters.getValue(date)).toEqual(true); - expect(e.billboard.width.getValue(date)).toEqual(25197.0); - expect(e.billboard.height.getValue(date)).toEqual(53328.0); - expect(e.billboard.scaleByDistance.getValue(date)).toEqual( - new NearFarScalar(59318, 31207, 63353, 55287) - ); - expect(e.billboard.translucencyByDistance.getValue(date)).toEqual( - new NearFarScalar(43707, 31146, 12921, 57138) - ); - expect(e.billboard.pixelOffsetScaleByDistance.getValue(date)).toEqual( - new NearFarScalar(11873, 40494, 29598, 27507) - ); - expect(e.billboard.imageSubRegion.getValue(date)).toEqual( - new BoundingRectangle(62620, 63220, 23030, 63321) - ); - expect(e.billboard.distanceDisplayCondition.getValue(date)).toEqual( - new DistanceDisplayCondition(22843, 27481) - ); - expect(e.billboard.disableDepthTestDistance.getValue(date)).toEqual( - 39764.0 - ); - expect(e.box.show.getValue(date)).toEqual(true); - expect(e.box.dimensions.getValue(date)).toEqual( - new Cartesian3(57494, 62432, 42995) - ); - expect(e.box.heightReference.getValue(date)).toEqual( - HeightReference.CLAMP_TO_GROUND - ); - expect(e.box.fill.getValue(date)).toEqual(true); - expect(e.box.material.color.getValue(date)).toEqual( - Color.fromBytes(88, 226, 91, 144) - ); - expect(e.box.outline.getValue(date)).toEqual(true); - expect(e.box.outlineColor.getValue(date)).toEqual( - Color.fromBytes(121, 42, 244, 168) - ); - expect(e.box.outlineWidth.getValue(date)).toEqual(15323.0); - expect(e.box.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); - expect(e.box.distanceDisplayCondition.getValue(date)).toEqual( - new DistanceDisplayCondition(3775, 49016) - ); - expect(e.corridor.show.getValue(date)).toEqual(true); - expect(e.corridor.positions.getValue(date)).toEqual([ - new Cartesian3(36415, 2702, 36618), - new Cartesian3(47759, 11706, 63277), - ]); - expect(e.corridor.width.getValue(date)).toEqual(20413.0); - expect(e.corridor.height.getValue(date)).toEqual(8062.0); - expect(e.corridor.heightReference.getValue(date)).toEqual( - HeightReference.CLAMP_TO_GROUND - ); - expect(e.corridor.extrudedHeight.getValue(date)).toEqual(22846.0); - expect(e.corridor.extrudedHeightReference.getValue(date)).toEqual( - HeightReference.CLAMP_TO_GROUND - ); - expect(e.corridor.cornerType.getValue(date)).toEqual( - CornerType.BEVELED - ); - expect(e.corridor.granularity.getValue(date)).toEqual(44105.0); - expect(e.corridor.fill.getValue(date)).toEqual(true); - expect(e.corridor.material.color.getValue(date)).toEqual( - Color.fromBytes(230, 252, 22, 236) - ); - expect(e.corridor.outline.getValue(date)).toEqual(true); - expect(e.corridor.outlineColor.getValue(date)).toEqual( - Color.fromBytes(198, 25, 134, 60) - ); - expect(e.corridor.outlineWidth.getValue(date)).toEqual(9132.0); - expect(e.corridor.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); - expect(e.corridor.distanceDisplayCondition.getValue(date)).toEqual( - new DistanceDisplayCondition(15797, 46507) - ); - expect(e.corridor.classificationType.getValue(date)).toEqual( - ClassificationType.TERRAIN - ); - expect(e.corridor.zIndex.getValue(date)).toEqual(59315); - expect(e.cylinder.show.getValue(date)).toEqual(true); - expect(e.cylinder.length.getValue(date)).toEqual(33298.0); - expect(e.cylinder.topRadius.getValue(date)).toEqual(16245.0); - expect(e.cylinder.bottomRadius.getValue(date)).toEqual(59378.0); - expect(e.cylinder.heightReference.getValue(date)).toEqual( - HeightReference.CLAMP_TO_GROUND - ); - expect(e.cylinder.fill.getValue(date)).toEqual(true); - expect(e.cylinder.material.color.getValue(date)).toEqual( - Color.fromBytes(216, 68, 53, 64) - ); - expect(e.cylinder.outline.getValue(date)).toEqual(true); - expect(e.cylinder.outlineColor.getValue(date)).toEqual( - Color.fromBytes(4, 90, 209, 96) - ); - expect(e.cylinder.outlineWidth.getValue(date)).toEqual(64018.0); - expect(e.cylinder.numberOfVerticalLines.getValue(date)).toEqual(38567); - expect(e.cylinder.slices.getValue(date)).toEqual(39979); - expect(e.cylinder.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); - expect(e.cylinder.distanceDisplayCondition.getValue(date)).toEqual( - new DistanceDisplayCondition(43860, 52395) - ); - expect(e.ellipse.show.getValue(date)).toEqual(true); - expect(e.ellipse.semiMajorAxis.getValue(date)).toEqual(60072.0); - expect(e.ellipse.semiMinorAxis.getValue(date)).toEqual(38653.0); - expect(e.ellipse.height.getValue(date)).toEqual(15549.0); - expect(e.ellipse.heightReference.getValue(date)).toEqual( - HeightReference.CLAMP_TO_GROUND - ); - expect(e.ellipse.extrudedHeight.getValue(date)).toEqual(55640.0); - expect(e.ellipse.extrudedHeightReference.getValue(date)).toEqual( - HeightReference.CLAMP_TO_GROUND - ); - expect(e.ellipse.rotation.getValue(date)).toEqual(27722.0); - expect(e.ellipse.stRotation.getValue(date)).toEqual(4692.0); - expect(e.ellipse.granularity.getValue(date)).toEqual(62192.0); - expect(e.ellipse.fill.getValue(date)).toEqual(true); - expect(e.ellipse.material.color.getValue(date)).toEqual( - Color.fromBytes(116, 186, 200, 40) - ); - expect(e.ellipse.outline.getValue(date)).toEqual(true); - expect(e.ellipse.outlineColor.getValue(date)).toEqual( - Color.fromBytes(160, 82, 145, 104) - ); - expect(e.ellipse.outlineWidth.getValue(date)).toEqual(8839.0); - expect(e.ellipse.numberOfVerticalLines.getValue(date)).toEqual(38878); - expect(e.ellipse.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); - expect(e.ellipse.distanceDisplayCondition.getValue(date)).toEqual( - new DistanceDisplayCondition(27813, 30828) - ); - expect(e.ellipse.classificationType.getValue(date)).toEqual( - ClassificationType.TERRAIN - ); - expect(e.ellipse.zIndex.getValue(date)).toEqual(3341); - expect(e.ellipsoid.show.getValue(date)).toEqual(true); - expect(e.ellipsoid.radii.getValue(date)).toEqual( - new Cartesian3(15638, 24381, 37983) - ); - expect(e.ellipsoid.innerRadii.getValue(date)).toEqual( - new Cartesian3(21988, 44373, 36013) - ); - expect(e.ellipsoid.minimumClock.getValue(date)).toEqual(57589.0); - expect(e.ellipsoid.maximumClock.getValue(date)).toEqual(24940.0); - expect(e.ellipsoid.minimumCone.getValue(date)).toEqual(54533.0); - expect(e.ellipsoid.maximumCone.getValue(date)).toEqual(64532.0); - expect(e.ellipsoid.heightReference.getValue(date)).toEqual( - HeightReference.CLAMP_TO_GROUND - ); - expect(e.ellipsoid.fill.getValue(date)).toEqual(true); - expect(e.ellipsoid.material.color.getValue(date)).toEqual( - Color.fromBytes(202, 67, 110, 69) - ); - expect(e.ellipsoid.outline.getValue(date)).toEqual(true); - expect(e.ellipsoid.outlineColor.getValue(date)).toEqual( - Color.fromBytes(55, 23, 226, 7) - ); - expect(e.ellipsoid.outlineWidth.getValue(date)).toEqual(47507.0); - expect(e.ellipsoid.stackPartitions.getValue(date)).toEqual(54278); - expect(e.ellipsoid.slicePartitions.getValue(date)).toEqual(28562); - expect(e.ellipsoid.subdivisions.getValue(date)).toEqual(14008); - expect(e.ellipsoid.shadows.getValue(date)).toEqual( - ShadowMode.CAST_ONLY - ); - expect(e.ellipsoid.distanceDisplayCondition.getValue(date)).toEqual( - new DistanceDisplayCondition(3293, 56793) - ); - expect(e.label.show.getValue(date)).toEqual(true); - expect(e.label.text.getValue(date)).toEqual("string36641"); - expect(e.label.font.getValue(date)).toEqual("14px sans-serif"); - expect(e.label.style.getValue(date)).toEqual( - LabelStyle.FILL_AND_OUTLINE - ); - expect(e.label.scale.getValue(date)).toEqual(6510.0); - expect(e.label.showBackground.getValue(date)).toEqual(true); - expect(e.label.backgroundColor.getValue(date)).toEqual( - Color.fromBytes(225, 114, 54, 128) - ); - expect(e.label.backgroundPadding.getValue(date)).toEqual( - new Cartesian2(5508, 56341) - ); - expect(e.label.pixelOffset.getValue(date)).toEqual( - new Cartesian2(25913, 30821) - ); - expect(e.label.eyeOffset.getValue(date)).toEqual( - new Cartesian3(30502, 29047, 25457) - ); - expect(e.label.horizontalOrigin.getValue(date)).toEqual( - HorizontalOrigin.LEFT - ); - expect(e.label.verticalOrigin.getValue(date)).toEqual( - VerticalOrigin.BOTTOM - ); - expect(e.label.heightReference.getValue(date)).toEqual( - HeightReference.CLAMP_TO_GROUND - ); - expect(e.label.fillColor.getValue(date)).toEqual( - Color.fromBytes(88, 197, 147, 137) - ); - expect(e.label.outlineColor.getValue(date)).toEqual( - Color.fromBytes(171, 128, 159, 223) - ); - expect(e.label.outlineWidth.getValue(date)).toEqual(36637.0); - expect(e.label.translucencyByDistance.getValue(date)).toEqual( - new NearFarScalar(34067, 16517, 11328, 13612) - ); - expect(e.label.pixelOffsetScaleByDistance.getValue(date)).toEqual( - new NearFarScalar(21220, 35154, 33161, 36737) - ); - expect(e.label.scaleByDistance.getValue(date)).toEqual( - new NearFarScalar(7350, 32796, 1408, 55045) - ); - expect(e.label.distanceDisplayCondition.getValue(date)).toEqual( - new DistanceDisplayCondition(5204, 21012) - ); - expect(e.label.disableDepthTestDistance.getValue(date)).toEqual( - 17959.0 - ); - expect(e.model.show.getValue(date)).toEqual(true); - expect(e.model.uri.getValue(date).url).toEqual( - "http://example.com/60043" - ); - expect(e.model.scale.getValue(date)).toEqual(44278.0); - expect(e.model.minimumPixelSize.getValue(date)).toEqual(35888.0); - expect(e.model.maximumScale.getValue(date)).toEqual(64305.0); - expect(e.model.incrementallyLoadTextures.getValue(date)).toEqual(true); - expect(e.model.runAnimations.getValue(date)).toEqual(true); - expect(e.model.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); - expect(e.model.heightReference.getValue(date)).toEqual( - HeightReference.CLAMP_TO_GROUND - ); - expect(e.model.silhouetteColor.getValue(date)).toEqual( - Color.fromBytes(29, 61, 52, 101) - ); - expect(e.model.silhouetteSize.getValue(date)).toEqual(4645.0); - expect(e.model.color.getValue(date)).toEqual( - Color.fromBytes(0, 52, 75, 73) - ); - expect(e.model.colorBlendMode.getValue(date)).toEqual( - ColorBlendMode.REPLACE - ); - expect(e.model.colorBlendAmount.getValue(date)).toEqual(7475.0); - expect(e.model.distanceDisplayCondition.getValue(date)).toEqual( - new DistanceDisplayCondition(31861, 62844) - ); - expect( - e.model.nodeTransformations.prop.translation.getValue(date) - ).toEqual(new Cartesian3(18548, 48456, 21181)); - expect( - e.model.nodeTransformations.prop.rotation.getValue(date) - ).toEqualEpsilon( - new Quaternion( - 0.527960606328925, - 0.567156704919186, - 0.624812964569899, - 0.0959146992664751 - ), - 1e-14 - ); - expect(e.model.nodeTransformations.prop.scale.getValue(date)).toEqual( - new Cartesian3(53739, 37841, 41107) - ); - expect(e.model.articulations.prop.getValue(date)).toEqual(25496.0); - expect(e.path.show.getValue(date)).toEqual(true); - expect(e.path.leadTime.getValue(date)).toEqual(5997.0); - expect(e.path.trailTime.getValue(date)).toEqual(52915.0); - expect(e.path.width.getValue(date)).toEqual(56040.0); - expect(e.path.resolution.getValue(date)).toEqual(31563.0); - expect(e.path.material.color.getValue(date)).toEqual( - Color.fromBytes(10, 78, 168, 13) - ); - expect(e.path.distanceDisplayCondition.getValue(date)).toEqual( - new DistanceDisplayCondition(11646, 32422) - ); - expect(e.point.show.getValue(date)).toEqual(true); - expect(e.point.pixelSize.getValue(date)).toEqual(53869.0); - expect(e.point.heightReference.getValue(date)).toEqual( - HeightReference.CLAMP_TO_GROUND - ); - expect(e.point.color.getValue(date)).toEqual( - Color.fromBytes(3, 147, 219, 77) - ); - expect(e.point.outlineColor.getValue(date)).toEqual( - Color.fromBytes(254, 106, 11, 94) - ); - expect(e.point.outlineWidth.getValue(date)).toEqual(27922.0); - expect(e.point.scaleByDistance.getValue(date)).toEqual( - new NearFarScalar(20128, 16462, 49728, 18882) - ); - expect(e.point.translucencyByDistance.getValue(date)).toEqual( - new NearFarScalar(52796, 43982, 61099, 50158) - ); - expect(e.point.distanceDisplayCondition.getValue(date)).toEqual( - new DistanceDisplayCondition(29646, 52915) - ); - expect(e.point.disableDepthTestDistance.getValue(date)).toEqual(9675.0); - expect(e.polygon.show.getValue(date)).toEqual(true); - expect(e.polygon.hierarchy.getValue(date).positions).toEqual([ - new Cartesian3(39143, 2200, 6408), - new Cartesian3(27161, 33386, 62338), - ]); - expect(e.polygon.hierarchy.getValue(date).holes).toEqual([ - new PolygonHierarchy([ - new Cartesian3(47462, 20409, 3151), - new Cartesian3(58636, 39653, 53914), - new Cartesian3(31954, 4988, 47462), - ]), - new PolygonHierarchy([ - new Cartesian3(20409, 3151, 58636), - new Cartesian3(39653, 53914, 31954), - new Cartesian3(4988, 47462, 20409), - new Cartesian3(3151, 58636, 39653), - ]), - ]); - expect(e.polygon.arcType.getValue(date)).toEqual(ArcType.RHUMB); - expect(e.polygon.height.getValue(date)).toEqual(26391.0); - expect(e.polygon.heightReference.getValue(date)).toEqual( - HeightReference.CLAMP_TO_GROUND - ); - expect(e.polygon.extrudedHeight.getValue(date)).toEqual(15922.0); - expect(e.polygon.extrudedHeightReference.getValue(date)).toEqual( - HeightReference.CLAMP_TO_GROUND - ); - expect(e.polygon.stRotation.getValue(date)).toEqual(2555.0); - expect(e.polygon.granularity.getValue(date)).toEqual(17060.0); - expect(e.polygon.fill.getValue(date)).toEqual(true); - expect(e.polygon.material.color.getValue(date)).toEqual( - Color.fromBytes(216, 139, 124, 253) - ); - expect(e.polygon.outline.getValue(date)).toEqual(true); - expect(e.polygon.outlineColor.getValue(date)).toEqual( - Color.fromBytes(172, 48, 134, 87) - ); - expect(e.polygon.outlineWidth.getValue(date)).toEqual(62220.0); - expect(e.polygon.perPositionHeight.getValue(date)).toEqual(true); - expect(e.polygon.closeTop.getValue(date)).toEqual(true); - expect(e.polygon.closeBottom.getValue(date)).toEqual(true); - expect(e.polygon.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); - expect(e.polygon.distanceDisplayCondition.getValue(date)).toEqual( - new DistanceDisplayCondition(5989, 26104) - ); - expect(e.polygon.classificationType.getValue(date)).toEqual( - ClassificationType.TERRAIN - ); - expect(e.polygon.zIndex.getValue(date)).toEqual(31269); - expect(e.polyline.show.getValue(date)).toEqual(true); - expect(e.polyline.positions.getValue(date)).toEqual([ - new Cartesian3(23333, 31067, 17529), - new Cartesian3(57924, 41186, 31648), - ]); - expect(e.polyline.arcType.getValue(date)).toEqual(ArcType.RHUMB); - expect(e.polyline.width.getValue(date)).toEqual(14667.0); - expect(e.polyline.granularity.getValue(date)).toEqual(53395.0); - expect(e.polyline.material.color.getValue(date)).toEqual( - Color.fromBytes(88, 0, 232, 230) - ); - expect(e.polyline.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); - expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual( - Color.fromBytes(197, 195, 115, 198) - ); - expect(e.polyline.distanceDisplayCondition.getValue(date)).toEqual( - new DistanceDisplayCondition(5807, 30486) - ); - expect(e.polyline.clampToGround.getValue(date)).toEqual(true); - expect(e.polyline.classificationType.getValue(date)).toEqual( - ClassificationType.TERRAIN - ); - expect(e.polyline.zIndex.getValue(date)).toEqual(17658); - expect(e.rectangle.show.getValue(date)).toEqual(true); - expect(e.rectangle.coordinates.getValue(date)).toEqual( - new Rectangle( - 1.13325368272577, - 0.703573207377445, - 0.756676249095309, - 0.339217858685931 - ) - ); - expect(e.rectangle.height.getValue(date)).toEqual(20608.0); - expect(e.rectangle.heightReference.getValue(date)).toEqual( - HeightReference.CLAMP_TO_GROUND - ); - expect(e.rectangle.extrudedHeight.getValue(date)).toEqual(23002.0); - expect(e.rectangle.extrudedHeightReference.getValue(date)).toEqual( - HeightReference.CLAMP_TO_GROUND - ); - expect(e.rectangle.rotation.getValue(date)).toEqual(54979.0); - expect(e.rectangle.stRotation.getValue(date)).toEqual(8079.0); - expect(e.rectangle.granularity.getValue(date)).toEqual(60343.0); - expect(e.rectangle.fill.getValue(date)).toEqual(true); - expect(e.rectangle.material.color.getValue(date)).toEqual( - Color.fromBytes(160, 249, 70, 249) - ); - expect(e.rectangle.outline.getValue(date)).toEqual(true); - expect(e.rectangle.outlineColor.getValue(date)).toEqual( - Color.fromBytes(196, 59, 142, 36) - ); - expect(e.rectangle.outlineWidth.getValue(date)).toEqual(59794.0); - expect(e.rectangle.shadows.getValue(date)).toEqual( - ShadowMode.CAST_ONLY - ); - expect(e.rectangle.distanceDisplayCondition.getValue(date)).toEqual( - new DistanceDisplayCondition(21388, 23379) - ); - expect(e.rectangle.classificationType.getValue(date)).toEqual( - ClassificationType.TERRAIN - ); - expect(e.rectangle.zIndex.getValue(date)).toEqual(445); - expect(e.tileset.show.getValue(date)).toEqual(true); - expect(e.tileset.uri.getValue(date).url).toEqual( - "http://example.com/6864" - ); - expect(e.tileset.maximumScreenSpaceError.getValue(date)).toEqual( - 51767.0 - ); - expect(e.wall.show.getValue(date)).toEqual(true); - expect(e.wall.positions.getValue(date)).toEqual([ - new Cartesian3(21681, 40276, 30621), - new Cartesian3(3959, 61967, 19442), - ]); - expect(e.wall.minimumHeights.getValue(date)).toEqual([49466, 44737]); - expect(e.wall.maximumHeights.getValue(date)).toEqual([59672, 62697]); - expect(e.wall.granularity.getValue(date)).toEqual(47652.0); - expect(e.wall.fill.getValue(date)).toEqual(true); - expect(e.wall.material.color.getValue(date)).toEqual( - Color.fromBytes(64, 176, 190, 65) - ); - expect(e.wall.outline.getValue(date)).toEqual(true); - expect(e.wall.outlineColor.getValue(date)).toEqual( - Color.fromBytes(107, 196, 96, 198) - ); - expect(e.wall.outlineWidth.getValue(date)).toEqual(50458.0); - expect(e.wall.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); - expect(e.wall.distanceDisplayCondition.getValue(date)).toEqual( - new DistanceDisplayCondition(27810, 41691) - ); - expect( - (e = dataSource.entities.getById( - "constant_position_cartographicRadians" - )) - ).toBeDefined(); - expect(e.position.getValue(date)).toEqual( - Cartesian3.fromRadians(0.368123392863751, 0.678098621973879, 32050) - ); - expect( - (e = dataSource.entities.getById( - "constant_position_cartographicDegrees" - )) - ).toBeDefined(); - expect(e.position.getValue(date)).toEqual( - Cartesian3.fromDegrees(14, 14, 24697) - ); - expect( - (e = dataSource.entities.getById( - "constant_position_cartesianVelocity" - )) - ).toBeDefined(); - expect(e.position.getValue(date)).toEqual( - new Cartesian3(15776, 23613, 14940) - ); - expect( - (e = dataSource.entities.getById("constant_billboard_color_rgbaf")) - ).toBeDefined(); - expect(e.billboard.color.getValue(date)).toEqualEpsilon( - new Color( - 0.674509803921569, - 0.866666666666667, - 0.6, - 0.650980392156863 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_billboard_alignedAxis_unitSpherical" - )) - ).toBeDefined(); - expect(e.billboard.alignedAxis.getValue(date)).toEqualEpsilon( - Cartesian3.fromSpherical(new Spherical(20514, 39760)), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_box_material_solidColor_color" - )) - ).toBeDefined(); - expect(e.box.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.996078431372549, - 0.0823529411764706, - 0.494117647058824, - 0.101960784313725 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("material_box_material_image")) - ).toBeDefined(); - expect(e.box.material.image.getValue(date).url).toEqual( - "http://example.com/50881" - ); - expect(e.box.material.repeat.getValue(date)).toEqual( - new Cartesian2(58955, 45286) - ); - expect(e.box.material.color.getValue(date)).toEqual( - Color.fromBytes(98, 97, 133, 129) - ); - expect(e.box.material.transparent.getValue(date)).toEqual(true); - expect( - (e = dataSource.entities.getById("material_box_material_grid")) - ).toBeDefined(); - expect(e.box.material.color.getValue(date)).toEqual( - Color.fromBytes(178, 10, 106, 226) - ); - expect(e.box.material.cellAlpha.getValue(date)).toEqual(47180.0); - expect(e.box.material.lineCount.getValue(date)).toEqual( - new Cartesian2(24659, 13408) - ); - expect(e.box.material.lineThickness.getValue(date)).toEqual( - new Cartesian2(13897, 25654) - ); - expect(e.box.material.lineOffset.getValue(date)).toEqual( - new Cartesian2(14153, 49207) - ); - expect( - (e = dataSource.entities.getById("material_box_material_stripe")) - ).toBeDefined(); - expect(e.box.material.orientation.getValue(date)).toEqual( - StripeOrientation.VERTICAL - ); - expect(e.box.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(18, 147, 177, 80) - ); - expect(e.box.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(189, 226, 187, 107) - ); - expect(e.box.material.offset.getValue(date)).toEqual(43563.0); - expect(e.box.material.repeat.getValue(date)).toEqual(24480.0); - expect( - (e = dataSource.entities.getById( - "material_box_material_checkerboard" - )) - ).toBeDefined(); - expect(e.box.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(188, 19, 247, 166) - ); - expect(e.box.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(70, 241, 211, 45) - ); - expect(e.box.material.repeat.getValue(date)).toEqual( - new Cartesian2(31491, 2427) - ); - expect( - (e = dataSource.entities.getById("constant_box_material_image_color")) - ).toBeDefined(); - expect(e.box.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.733333333333333, - 0.474509803921569, - 0.56078431372549, - 0.349019607843137 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("constant_box_material_grid_color")) - ).toBeDefined(); - expect(e.box.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.847058823529412, - 0.392156862745098, - 0.352941176470588, - 0.898039215686275 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_box_material_stripe_evenColor" - )) - ).toBeDefined(); - expect(e.box.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.666666666666667, - 0.976470588235294, - 0.83921568627451, - 0.643137254901961 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_box_material_stripe_oddColor" - )) - ).toBeDefined(); - expect(e.box.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.258823529411765, - 0.796078431372549, - 0.717647058823529, - 0.749019607843137 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_box_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect(e.box.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.741176470588235, - 0.0941176470588235, - 0.101960784313725, - 0.509803921568627 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_box_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect(e.box.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.403921568627451, - 0.768627450980392, - 0.717647058823529, - 0.0392156862745098 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("constant_box_outlineColor_rgbaf")) - ).toBeDefined(); - expect(e.box.outlineColor.getValue(date)).toEqualEpsilon( - new Color( - 0.835294117647059, - 0.0313725490196078, - 0.282352941176471, - 0.337254901960784 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_corridor_positions_cartographicRadians" - )) - ).toBeDefined(); - expect(e.corridor.positions.getValue(date)).toEqual([ - Cartesian3.fromRadians(0.220356654342316, 0.879184920197648, 64909), - Cartesian3.fromRadians(0.175978952571564, 1.00316515710468, 913), - ]); - expect( - (e = dataSource.entities.getById( - "constant_corridor_positions_cartographicDegrees" - )) - ).toBeDefined(); - expect(e.corridor.positions.getValue(date)).toEqual([ - Cartesian3.fromDegrees(28, 14, 63058), - Cartesian3.fromDegrees(15, 37, 26381), - ]); - expect( - (e = dataSource.entities.getById( - "constant_corridor_material_solidColor_color" - )) - ).toBeDefined(); - expect(e.corridor.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.333333333333333, - 0.87843137254902, - 0.356862745098039, - 0.435294117647059 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("material_corridor_material_image")) - ).toBeDefined(); - expect(e.corridor.material.image.getValue(date).url).toEqual( - "http://example.com/8903" - ); - expect(e.corridor.material.repeat.getValue(date)).toEqual( - new Cartesian2(41660, 35234) - ); - expect(e.corridor.material.color.getValue(date)).toEqual( - Color.fromBytes(213, 25, 147, 247) - ); - expect(e.corridor.material.transparent.getValue(date)).toEqual(true); - expect( - (e = dataSource.entities.getById("material_corridor_material_grid")) - ).toBeDefined(); - expect(e.corridor.material.color.getValue(date)).toEqual( - Color.fromBytes(236, 51, 112, 235) - ); - expect(e.corridor.material.cellAlpha.getValue(date)).toEqual(11472.0); - expect(e.corridor.material.lineCount.getValue(date)).toEqual( - new Cartesian2(1254, 38404) - ); - expect(e.corridor.material.lineThickness.getValue(date)).toEqual( - new Cartesian2(48962, 63679) - ); - expect(e.corridor.material.lineOffset.getValue(date)).toEqual( - new Cartesian2(39061, 47000) - ); - expect( - (e = dataSource.entities.getById("material_corridor_material_stripe")) - ).toBeDefined(); - expect(e.corridor.material.orientation.getValue(date)).toEqual( - StripeOrientation.VERTICAL - ); - expect(e.corridor.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(245, 61, 208, 138) - ); - expect(e.corridor.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(114, 73, 91, 165) - ); - expect(e.corridor.material.offset.getValue(date)).toEqual(12788.0); - expect(e.corridor.material.repeat.getValue(date)).toEqual(33136.0); - expect( - (e = dataSource.entities.getById( - "material_corridor_material_checkerboard" - )) - ).toBeDefined(); - expect(e.corridor.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(24, 195, 5, 165) - ); - expect(e.corridor.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(15, 107, 210, 249) - ); - expect(e.corridor.material.repeat.getValue(date)).toEqual( - new Cartesian2(19640, 18252) - ); - expect( - (e = dataSource.entities.getById( - "constant_corridor_material_image_color" - )) - ).toBeDefined(); - expect(e.corridor.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.0156862745098039, - 0.0941176470588235, - 0.4, - 0.529411764705882 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_corridor_material_grid_color" - )) - ).toBeDefined(); - expect(e.corridor.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.576470588235294, - 0.76078431372549, - 0.152941176470588, - 0.00392156862745098 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_corridor_material_stripe_evenColor" - )) - ).toBeDefined(); - expect(e.corridor.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.913725490196078, - 0.63921568627451, - 0.631372549019608, - 0.890196078431372 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_corridor_material_stripe_oddColor" - )) - ).toBeDefined(); - expect(e.corridor.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.2, - 0.137254901960784, - 0.792156862745098, - 0.301960784313725 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_corridor_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect(e.corridor.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.286274509803922, - 0.619607843137255, - 0.615686274509804, - 0.231372549019608 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_corridor_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect(e.corridor.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.690196078431373, - 0.172549019607843, - 0.984313725490196, - 0.43921568627451 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_corridor_outlineColor_rgbaf" - )) - ).toBeDefined(); - expect(e.corridor.outlineColor.getValue(date)).toEqualEpsilon( - new Color( - 0.690196078431373, - 0.0549019607843137, - 0.247058823529412, - 0.298039215686275 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_cylinder_material_solidColor_color" - )) - ).toBeDefined(); - expect(e.cylinder.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.47843137254902, - 0.0509803921568627, - 0.450980392156863, - 0.87843137254902 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("material_cylinder_material_image")) - ).toBeDefined(); - expect(e.cylinder.material.image.getValue(date).url).toEqual( - "http://example.com/27447" - ); - expect(e.cylinder.material.repeat.getValue(date)).toEqual( - new Cartesian2(65243, 41470) - ); - expect(e.cylinder.material.color.getValue(date)).toEqual( - Color.fromBytes(200, 175, 107, 217) - ); - expect(e.cylinder.material.transparent.getValue(date)).toEqual(true); - expect( - (e = dataSource.entities.getById("material_cylinder_material_grid")) - ).toBeDefined(); - expect(e.cylinder.material.color.getValue(date)).toEqual( - Color.fromBytes(173, 210, 231, 62) - ); - expect(e.cylinder.material.cellAlpha.getValue(date)).toEqual(9555.0); - expect(e.cylinder.material.lineCount.getValue(date)).toEqual( - new Cartesian2(58545, 26852) - ); - expect(e.cylinder.material.lineThickness.getValue(date)).toEqual( - new Cartesian2(58520, 44260) - ); - expect(e.cylinder.material.lineOffset.getValue(date)).toEqual( - new Cartesian2(61513, 28656) - ); - expect( - (e = dataSource.entities.getById("material_cylinder_material_stripe")) - ).toBeDefined(); - expect(e.cylinder.material.orientation.getValue(date)).toEqual( - StripeOrientation.VERTICAL - ); - expect(e.cylinder.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(158, 155, 154, 86) - ); - expect(e.cylinder.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(191, 226, 188, 74) - ); - expect(e.cylinder.material.offset.getValue(date)).toEqual(55018.0); - expect(e.cylinder.material.repeat.getValue(date)).toEqual(33073.0); - expect( - (e = dataSource.entities.getById( - "material_cylinder_material_checkerboard" - )) - ).toBeDefined(); - expect(e.cylinder.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(90, 151, 142, 93) - ); - expect(e.cylinder.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(29, 42, 163, 118) - ); - expect(e.cylinder.material.repeat.getValue(date)).toEqual( - new Cartesian2(62750, 3317) - ); - expect( - (e = dataSource.entities.getById( - "constant_cylinder_material_image_color" - )) - ).toBeDefined(); - expect(e.cylinder.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.654901960784314, - 0.0627450980392157, - 0.517647058823529, - 0.537254901960784 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_cylinder_material_grid_color" - )) - ).toBeDefined(); - expect(e.cylinder.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.901960784313726, - 0.364705882352941, - 0.305882352941176, - 0.945098039215686 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_cylinder_material_stripe_evenColor" - )) - ).toBeDefined(); - expect(e.cylinder.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.0901960784313725, - 0.133333333333333, - 0.372549019607843, - 0.498039215686275 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_cylinder_material_stripe_oddColor" - )) - ).toBeDefined(); - expect(e.cylinder.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.905882352941176, - 0.564705882352941, - 0.486274509803922, - 0.67843137254902 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_cylinder_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect(e.cylinder.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.513725490196078, - 0.756862745098039, - 0.764705882352941, - 0.882352941176471 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_cylinder_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect(e.cylinder.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.450980392156863, - 0.392156862745098, - 0.333333333333333, - 0.537254901960784 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_cylinder_outlineColor_rgbaf" - )) - ).toBeDefined(); - expect(e.cylinder.outlineColor.getValue(date)).toEqualEpsilon( - new Color( - 0.647058823529412, - 0.564705882352941, - 0.4, - 0.0862745098039216 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_ellipse_material_solidColor_color" - )) - ).toBeDefined(); - expect(e.ellipse.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.0980392156862745, - 0.913725490196078, - 0.811764705882353, - 0.2 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("material_ellipse_material_image")) - ).toBeDefined(); - expect(e.ellipse.material.image.getValue(date).url).toEqual( - "http://example.com/2481" - ); - expect(e.ellipse.material.repeat.getValue(date)).toEqual( - new Cartesian2(45447, 53937) - ); - expect(e.ellipse.material.color.getValue(date)).toEqual( - Color.fromBytes(45, 86, 136, 120) - ); - expect(e.ellipse.material.transparent.getValue(date)).toEqual(true); - expect( - (e = dataSource.entities.getById("material_ellipse_material_grid")) - ).toBeDefined(); - expect(e.ellipse.material.color.getValue(date)).toEqual( - Color.fromBytes(217, 159, 32, 60) - ); - expect(e.ellipse.material.cellAlpha.getValue(date)).toEqual(24764.0); - expect(e.ellipse.material.lineCount.getValue(date)).toEqual( - new Cartesian2(25721, 6500) - ); - expect(e.ellipse.material.lineThickness.getValue(date)).toEqual( - new Cartesian2(57205, 63455) - ); - expect(e.ellipse.material.lineOffset.getValue(date)).toEqual( - new Cartesian2(49829, 3778) - ); - expect( - (e = dataSource.entities.getById("material_ellipse_material_stripe")) - ).toBeDefined(); - expect(e.ellipse.material.orientation.getValue(date)).toEqual( - StripeOrientation.VERTICAL - ); - expect(e.ellipse.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(7, 152, 58, 224) - ); - expect(e.ellipse.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(4, 228, 224, 57) - ); - expect(e.ellipse.material.offset.getValue(date)).toEqual(26719.0); - expect(e.ellipse.material.repeat.getValue(date)).toEqual(15097.0); - expect( - (e = dataSource.entities.getById( - "material_ellipse_material_checkerboard" - )) - ).toBeDefined(); - expect(e.ellipse.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(62, 67, 234, 118) - ); - expect(e.ellipse.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(116, 61, 76, 32) - ); - expect(e.ellipse.material.repeat.getValue(date)).toEqual( - new Cartesian2(62262, 11507) - ); - expect( - (e = dataSource.entities.getById( - "constant_ellipse_material_image_color" - )) - ).toBeDefined(); - expect(e.ellipse.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.364705882352941, - 0.698039215686274, - 0.803921568627451, - 0.843137254901961 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_ellipse_material_grid_color" - )) - ).toBeDefined(); - expect(e.ellipse.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.67843137254902, - 0.580392156862745, - 0.823529411764706, - 0.627450980392157 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_ellipse_material_stripe_evenColor" - )) - ).toBeDefined(); - expect(e.ellipse.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.313725490196078, - 0.768627450980392, - 0.674509803921569, - 0.705882352941177 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_ellipse_material_stripe_oddColor" - )) - ).toBeDefined(); - expect(e.ellipse.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.682352941176471, - 0.658823529411765, - 0.952941176470588, - 0.0823529411764706 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_ellipse_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect(e.ellipse.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.0196078431372549, - 0.537254901960784, - 0.290196078431373, - 0.403921568627451 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_ellipse_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect(e.ellipse.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.317647058823529, - 0.690196078431373, - 0.223529411764706, - 0.886274509803922 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_ellipse_outlineColor_rgbaf" - )) - ).toBeDefined(); - expect(e.ellipse.outlineColor.getValue(date)).toEqualEpsilon( - new Color( - 0.572549019607843, - 0.956862745098039, - 0.968627450980392, - 0.674509803921569 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_ellipsoid_material_solidColor_color" - )) - ).toBeDefined(); - expect(e.ellipsoid.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.572549019607843, - 0.533333333333333, - 0.384313725490196, - 0.2 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("material_ellipsoid_material_image")) - ).toBeDefined(); - expect(e.ellipsoid.material.image.getValue(date).url).toEqual( - "http://example.com/47428" - ); - expect(e.ellipsoid.material.repeat.getValue(date)).toEqual( - new Cartesian2(53733, 35793) - ); - expect(e.ellipsoid.material.color.getValue(date)).toEqual( - Color.fromBytes(125, 49, 160, 165) - ); - expect(e.ellipsoid.material.transparent.getValue(date)).toEqual(true); - expect( - (e = dataSource.entities.getById("material_ellipsoid_material_grid")) - ).toBeDefined(); - expect(e.ellipsoid.material.color.getValue(date)).toEqual( - Color.fromBytes(95, 212, 218, 57) - ); - expect(e.ellipsoid.material.cellAlpha.getValue(date)).toEqual(53044.0); - expect(e.ellipsoid.material.lineCount.getValue(date)).toEqual( - new Cartesian2(7763, 58654) - ); - expect(e.ellipsoid.material.lineThickness.getValue(date)).toEqual( - new Cartesian2(25480, 4707) - ); - expect(e.ellipsoid.material.lineOffset.getValue(date)).toEqual( - new Cartesian2(38422, 44182) - ); - expect( - (e = dataSource.entities.getById( - "material_ellipsoid_material_stripe" - )) - ).toBeDefined(); - expect(e.ellipsoid.material.orientation.getValue(date)).toEqual( - StripeOrientation.VERTICAL - ); - expect(e.ellipsoid.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(174, 241, 84, 24) - ); - expect(e.ellipsoid.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(134, 51, 175, 154) - ); - expect(e.ellipsoid.material.offset.getValue(date)).toEqual(24796.0); - expect(e.ellipsoid.material.repeat.getValue(date)).toEqual(2913.0); - expect( - (e = dataSource.entities.getById( - "material_ellipsoid_material_checkerboard" - )) - ).toBeDefined(); - expect(e.ellipsoid.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(65, 215, 40, 252) - ); - expect(e.ellipsoid.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(63, 63, 46, 195) - ); - expect(e.ellipsoid.material.repeat.getValue(date)).toEqual( - new Cartesian2(40702, 13470) - ); - expect( - (e = dataSource.entities.getById( - "constant_ellipsoid_material_image_color" - )) - ).toBeDefined(); - expect(e.ellipsoid.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.247058823529412, - 0.403921568627451, - 0.145098039215686, - 0.47843137254902 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_ellipsoid_material_grid_color" - )) - ).toBeDefined(); - expect(e.ellipsoid.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.270588235294118, - 0.784313725490196, - 0.172549019607843, - 0.835294117647059 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_ellipsoid_material_stripe_evenColor" - )) - ).toBeDefined(); - expect(e.ellipsoid.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.415686274509804, - 0.192156862745098, - 0.368627450980392, - 0.129411764705882 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_ellipsoid_material_stripe_oddColor" - )) - ).toBeDefined(); - expect(e.ellipsoid.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.580392156862745, - 0.164705882352941, - 0.741176470588235, - 0.0941176470588235 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_ellipsoid_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect(e.ellipsoid.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.137254901960784, - 0.784313725490196, - 0.294117647058824, - 0.964705882352941 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_ellipsoid_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect(e.ellipsoid.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.905882352941176, - 0.929411764705882, - 0.427450980392157, - 0.113725490196078 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_ellipsoid_outlineColor_rgbaf" - )) - ).toBeDefined(); - expect(e.ellipsoid.outlineColor.getValue(date)).toEqualEpsilon( - new Color( - 0.494117647058824, - 0.0823529411764706, - 0.274509803921569, - 0.823529411764706 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_label_backgroundColor_rgbaf" - )) - ).toBeDefined(); - expect(e.label.backgroundColor.getValue(date)).toEqualEpsilon( - new Color( - 0.894117647058824, - 0.949019607843137, - 0.494117647058824, - 0.843137254901961 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("constant_label_fillColor_rgbaf")) - ).toBeDefined(); - expect(e.label.fillColor.getValue(date)).toEqualEpsilon( - new Color( - 0.16078431372549, - 0.568627450980392, - 0.776470588235294, - 0.505882352941176 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("constant_label_outlineColor_rgbaf")) - ).toBeDefined(); - expect(e.label.outlineColor.getValue(date)).toEqualEpsilon( - new Color( - 0.458823529411765, - 0.325490196078431, - 0.909803921568627, - 0.67843137254902 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_model_silhouetteColor_rgbaf" - )) - ).toBeDefined(); - expect(e.model.silhouetteColor.getValue(date)).toEqualEpsilon( - new Color( - 0.294117647058824, - 0.313725490196078, - 0.419607843137255, - 0.87843137254902 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("constant_model_color_rgbaf")) - ).toBeDefined(); - expect(e.model.color.getValue(date)).toEqualEpsilon( - new Color( - 0.568627450980392, - 0.333333333333333, - 0.141176470588235, - 0.572549019607843 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_path_material_solidColor_color" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.458823529411765, - 0.517647058823529, - 0.52156862745098, - 0.925490196078431 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "material_path_material_polylineOutline" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqual( - Color.fromBytes(158, 14, 3, 86) - ); - expect(e.path.material.outlineColor.getValue(date)).toEqual( - Color.fromBytes(137, 101, 236, 136) - ); - expect(e.path.material.outlineWidth.getValue(date)).toEqual(11017.0); - expect( - (e = dataSource.entities.getById( - "material_path_material_polylineArrow" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqual( - Color.fromBytes(166, 131, 155, 102) - ); - expect( - (e = dataSource.entities.getById( - "material_path_material_polylineDash" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqual( - Color.fromBytes(190, 189, 9, 7) - ); - expect(e.path.material.gapColor.getValue(date)).toEqual( - Color.fromBytes(170, 88, 12, 24) - ); - expect(e.path.material.dashLength.getValue(date)).toEqual(45848.0); - expect(e.path.material.dashPattern.getValue(date)).toEqual(13519); - expect( - (e = dataSource.entities.getById( - "material_path_material_polylineGlow" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqual( - Color.fromBytes(72, 114, 200, 147) - ); - expect(e.path.material.glowPower.getValue(date)).toEqual(42344.0); - expect(e.path.material.taperPower.getValue(date)).toEqual(39950.0); - expect( - (e = dataSource.entities.getById("material_path_material_image")) - ).toBeDefined(); - expect(e.path.material.image.getValue(date).url).toEqual( - "http://example.com/31068" - ); - expect(e.path.material.repeat.getValue(date)).toEqual( - new Cartesian2(48351, 63420) - ); - expect(e.path.material.color.getValue(date)).toEqual( - Color.fromBytes(105, 166, 133, 7) - ); - expect(e.path.material.transparent.getValue(date)).toEqual(true); - expect( - (e = dataSource.entities.getById("material_path_material_grid")) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqual( - Color.fromBytes(120, 196, 99, 165) - ); - expect(e.path.material.cellAlpha.getValue(date)).toEqual(41317.0); - expect(e.path.material.lineCount.getValue(date)).toEqual( - new Cartesian2(52557, 7629) - ); - expect(e.path.material.lineThickness.getValue(date)).toEqual( - new Cartesian2(21845, 52309) - ); - expect(e.path.material.lineOffset.getValue(date)).toEqual( - new Cartesian2(48700, 4542) - ); - expect( - (e = dataSource.entities.getById("material_path_material_stripe")) - ).toBeDefined(); - expect(e.path.material.orientation.getValue(date)).toEqual( - StripeOrientation.VERTICAL - ); - expect(e.path.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(20, 43, 77, 229) - ); - expect(e.path.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(157, 171, 93, 187) - ); - expect(e.path.material.offset.getValue(date)).toEqual(41305.0); - expect(e.path.material.repeat.getValue(date)).toEqual(43637.0); - expect( - (e = dataSource.entities.getById( - "material_path_material_checkerboard" - )) - ).toBeDefined(); - expect(e.path.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(174, 238, 222, 107) - ); - expect(e.path.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(184, 189, 156, 237) - ); - expect(e.path.material.repeat.getValue(date)).toEqual( - new Cartesian2(57303, 45535) - ); - expect( - (e = dataSource.entities.getById( - "constant_path_material_polylineOutline_color" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.0588235294117647, - 0.0823529411764706, - 0.964705882352941, - 0.317647058823529 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_path_material_polylineOutline_outlineColor" - )) - ).toBeDefined(); - expect(e.path.material.outlineColor.getValue(date)).toEqualEpsilon( - new Color( - 0.266666666666667, - 0.556862745098039, - 0.352941176470588, - 0.76078431372549 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_path_material_polylineArrow_color" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.627450980392157, - 0.27843137254902, - 0.972549019607843, - 0.92156862745098 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_path_material_polylineDash_color" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.113725490196078, - 0.368627450980392, - 0.411764705882353, - 0.745098039215686 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_path_material_polylineDash_gapColor" - )) - ).toBeDefined(); - expect(e.path.material.gapColor.getValue(date)).toEqualEpsilon( - new Color( - 0.831372549019608, - 0.313725490196078, - 0.341176470588235, - 0.749019607843137 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_path_material_polylineGlow_color" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.584313725490196, - 0.0156862745098039, - 0.329411764705882, - 0.270588235294118 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_path_material_image_color" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.443137254901961, - 0.450980392156863, - 0.63921568627451, - 0.415686274509804 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("constant_path_material_grid_color")) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.984313725490196, - 0.945098039215686, - 0.764705882352941, - 0.933333333333333 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_path_material_stripe_evenColor" - )) - ).toBeDefined(); - expect(e.path.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.584313725490196, - 0.631372549019608, - 0.0196078431372549, - 0.349019607843137 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_path_material_stripe_oddColor" - )) - ).toBeDefined(); - expect(e.path.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.231372549019608, - 0.211764705882353, - 0.941176470588235, - 0.501960784313725 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_path_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect(e.path.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.258823529411765, - 0.850980392156863, - 0.196078431372549, - 0.811764705882353 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_path_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect(e.path.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.0745098039215686, - 0.933333333333333, - 0.184313725490196, - 0.117647058823529 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("constant_point_color_rgbaf")) - ).toBeDefined(); - expect(e.point.color.getValue(date)).toEqualEpsilon( - new Color( - 0.662745098039216, - 0.317647058823529, - 0.643137254901961, - 0.705882352941177 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("constant_point_outlineColor_rgbaf")) - ).toBeDefined(); - expect(e.point.outlineColor.getValue(date)).toEqualEpsilon( - new Color( - 0.00392156862745098, - 0.388235294117647, - 0.101960784313725, - 0.16078431372549 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polygon_positions_cartographicRadians" - )) - ).toBeDefined(); - expect(e.polygon.hierarchy.getValue(date).positions).toEqual([ - Cartesian3.fromRadians(0.278819883450618, 1.34192534297912, 13112), - Cartesian3.fromRadians(1.08460649779701, 1.26665808721843, 9013), - ]); - expect( - (e = dataSource.entities.getById( - "constant_polygon_positions_cartographicDegrees" - )) - ).toBeDefined(); - expect(e.polygon.hierarchy.getValue(date).positions).toEqual([ - Cartesian3.fromDegrees(20, 42, 343), - Cartesian3.fromDegrees(21, 14, 24042), - ]); - expect( - (e = dataSource.entities.getById( - "constant_polygon_holes_cartographicRadians" - )) - ).toBeDefined(); - expect(e.polygon.hierarchy.getValue(date).holes).toEqual([ - new PolygonHierarchy([ - Cartesian3.fromRadians(0.799220652820836, 1.50366253893541, 4776), - Cartesian3.fromRadians(0.179862066646486, 1.42489853818289, 42245), - Cartesian3.fromRadians( - 0.0636782022426772, - 0.558333087028927, - 32510 - ), - ]), - new PolygonHierarchy([ - Cartesian3.fromRadians(1.50366253893541, 0.779166543514464, 33810), - Cartesian3.fromRadians( - 1.42489853818289, - 0.00358717805196918, - 20389 - ), - Cartesian3.fromRadians(0.558333087028927, 0.799220652820836, 43134), - Cartesian3.fromRadians(0.779166543514464, 0.179862066646486, 1412), - ]), - ]); - expect( - (e = dataSource.entities.getById( - "constant_polygon_holes_cartographicDegrees" - )) - ).toBeDefined(); - expect(e.polygon.hierarchy.getValue(date).holes).toEqual([ - new PolygonHierarchy([ - Cartesian3.fromDegrees(38, 39, 52122), - Cartesian3.fromDegrees(30, 41, 40406), - Cartesian3.fromDegrees(9, 42, 55073), - ]), - new PolygonHierarchy([ - Cartesian3.fromDegrees(39, 12, 5835), - Cartesian3.fromDegrees(41, 41, 39069), - Cartesian3.fromDegrees(42, 38, 39639), - Cartesian3.fromDegrees(12, 30, 54806), - ]), - ]); - expect( - (e = dataSource.entities.getById( - "constant_polygon_material_solidColor_color" - )) - ).toBeDefined(); - expect(e.polygon.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.980392156862745, - 0.905882352941176, - 0.274509803921569, - 0.972549019607843 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("material_polygon_material_image")) - ).toBeDefined(); - expect(e.polygon.material.image.getValue(date).url).toEqual( - "http://example.com/3481" - ); - expect(e.polygon.material.repeat.getValue(date)).toEqual( - new Cartesian2(29381, 10354) - ); - expect(e.polygon.material.color.getValue(date)).toEqual( - Color.fromBytes(36, 184, 236, 209) - ); - expect(e.polygon.material.transparent.getValue(date)).toEqual(true); - expect( - (e = dataSource.entities.getById("material_polygon_material_grid")) - ).toBeDefined(); - expect(e.polygon.material.color.getValue(date)).toEqual( - Color.fromBytes(246, 64, 141, 13) - ); - expect(e.polygon.material.cellAlpha.getValue(date)).toEqual(986.0); - expect(e.polygon.material.lineCount.getValue(date)).toEqual( - new Cartesian2(26094, 44645) - ); - expect(e.polygon.material.lineThickness.getValue(date)).toEqual( - new Cartesian2(30775, 17784) - ); - expect(e.polygon.material.lineOffset.getValue(date)).toEqual( - new Cartesian2(58344, 3555) - ); - expect( - (e = dataSource.entities.getById("material_polygon_material_stripe")) - ).toBeDefined(); - expect(e.polygon.material.orientation.getValue(date)).toEqual( - StripeOrientation.VERTICAL - ); - expect(e.polygon.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(98, 184, 45, 52) - ); - expect(e.polygon.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(164, 123, 182, 228) - ); - expect(e.polygon.material.offset.getValue(date)).toEqual(12114.0); - expect(e.polygon.material.repeat.getValue(date)).toEqual(60350.0); - expect( - (e = dataSource.entities.getById( - "material_polygon_material_checkerboard" - )) - ).toBeDefined(); - expect(e.polygon.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(187, 186, 46, 98) - ); - expect(e.polygon.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(19, 74, 101, 217) - ); - expect(e.polygon.material.repeat.getValue(date)).toEqual( - new Cartesian2(45028, 15023) - ); - expect( - (e = dataSource.entities.getById( - "constant_polygon_material_image_color" - )) - ).toBeDefined(); - expect(e.polygon.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.674509803921569, - 0.8, - 0.411764705882353, - 0.207843137254902 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polygon_material_grid_color" - )) - ).toBeDefined(); - expect(e.polygon.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.603921568627451, - 0.0941176470588235, - 0.00784313725490196, - 0.0862745098039216 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polygon_material_stripe_evenColor" - )) - ).toBeDefined(); - expect(e.polygon.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.772549019607843, - 0.866666666666667, - 0.964705882352941, - 0.862745098039216 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polygon_material_stripe_oddColor" - )) - ).toBeDefined(); - expect(e.polygon.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.862745098039216, - 0.0392156862745098, - 0.458823529411765, - 0.596078431372549 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polygon_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect(e.polygon.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.396078431372549, - 0.576470588235294, - 0.474509803921569, - 0.909803921568627 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polygon_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect(e.polygon.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.117647058823529, - 0.258823529411765, - 0.541176470588235, - 0.207843137254902 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polygon_outlineColor_rgbaf" - )) - ).toBeDefined(); - expect(e.polygon.outlineColor.getValue(date)).toEqualEpsilon( - new Color( - 0.105882352941176, - 0.423529411764706, - 0.619607843137255, - 0.956862745098039 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_positions_cartographicRadians" - )) - ).toBeDefined(); - expect(e.polyline.positions.getValue(date)).toEqual([ - Cartesian3.fromRadians(0.23083587429617, 0.738315731088925, 41390), - Cartesian3.fromRadians(0.537259577218533, 0.25389340391868, 10573), - ]); - expect( - (e = dataSource.entities.getById( - "constant_polyline_positions_cartographicDegrees" - )) - ).toBeDefined(); - expect(e.polyline.positions.getValue(date)).toEqual([ - Cartesian3.fromDegrees(19, 5, 11802), - Cartesian3.fromDegrees(15, 40, 39495), - ]); - expect( - (e = dataSource.entities.getById( - "constant_polyline_material_solidColor_color" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.764705882352941, - 0.894117647058824, - 0.874509803921569, - 0.105882352941176 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "material_polyline_material_polylineOutline" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqual( - Color.fromBytes(152, 14, 11, 33) - ); - expect(e.polyline.material.outlineColor.getValue(date)).toEqual( - Color.fromBytes(222, 51, 202, 92) - ); - expect(e.polyline.material.outlineWidth.getValue(date)).toEqual(6879.0); - expect( - (e = dataSource.entities.getById( - "material_polyline_material_polylineArrow" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqual( - Color.fromBytes(82, 169, 80, 107) - ); - expect( - (e = dataSource.entities.getById( - "material_polyline_material_polylineDash" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqual( - Color.fromBytes(22, 214, 57, 141) - ); - expect(e.polyline.material.gapColor.getValue(date)).toEqual( - Color.fromBytes(150, 91, 109, 117) - ); - expect(e.polyline.material.dashLength.getValue(date)).toEqual(60297.0); - expect(e.polyline.material.dashPattern.getValue(date)).toEqual(40430); - expect( - (e = dataSource.entities.getById( - "material_polyline_material_polylineGlow" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqual( - Color.fromBytes(59, 125, 181, 171) - ); - expect(e.polyline.material.glowPower.getValue(date)).toEqual(41345.0); - expect(e.polyline.material.taperPower.getValue(date)).toEqual(29908.0); - expect( - (e = dataSource.entities.getById("material_polyline_material_image")) - ).toBeDefined(); - expect(e.polyline.material.image.getValue(date).url).toEqual( - "http://example.com/29020" - ); - expect(e.polyline.material.repeat.getValue(date)).toEqual( - new Cartesian2(8980, 60451) - ); - expect(e.polyline.material.color.getValue(date)).toEqual( - Color.fromBytes(46, 136, 39, 94) - ); - expect(e.polyline.material.transparent.getValue(date)).toEqual(true); - expect( - (e = dataSource.entities.getById("material_polyline_material_grid")) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqual( - Color.fromBytes(157, 57, 26, 26) - ); - expect(e.polyline.material.cellAlpha.getValue(date)).toEqual(27197.0); - expect(e.polyline.material.lineCount.getValue(date)).toEqual( - new Cartesian2(17878, 15173) - ); - expect(e.polyline.material.lineThickness.getValue(date)).toEqual( - new Cartesian2(64504, 24571) - ); - expect(e.polyline.material.lineOffset.getValue(date)).toEqual( - new Cartesian2(51933, 9674) - ); - expect( - (e = dataSource.entities.getById("material_polyline_material_stripe")) - ).toBeDefined(); - expect(e.polyline.material.orientation.getValue(date)).toEqual( - StripeOrientation.VERTICAL - ); - expect(e.polyline.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(98, 239, 47, 132) - ); - expect(e.polyline.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(41, 198, 29, 144) - ); - expect(e.polyline.material.offset.getValue(date)).toEqual(10077.0); - expect(e.polyline.material.repeat.getValue(date)).toEqual(31817.0); - expect( - (e = dataSource.entities.getById( - "material_polyline_material_checkerboard" - )) - ).toBeDefined(); - expect(e.polyline.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(29, 196, 146, 39) - ); - expect(e.polyline.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(189, 110, 12, 32) - ); - expect(e.polyline.material.repeat.getValue(date)).toEqual( - new Cartesian2(22832, 11097) - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_material_polylineOutline_color" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.450980392156863, - 0.890196078431372, - 0.403921568627451, - 0.16078431372549 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_material_polylineOutline_outlineColor" - )) - ).toBeDefined(); - expect(e.polyline.material.outlineColor.getValue(date)).toEqualEpsilon( - new Color( - 0.815686274509804, - 0.545098039215686, - 0.529411764705882, - 0.317647058823529 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_material_polylineArrow_color" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.831372549019608, - 0.823529411764706, - 0.631372549019608, - 0.443137254901961 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_material_polylineDash_color" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqualEpsilon( - new Color(0.462745098039216, 0.184313725490196, 0.329411764705882, 0), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_material_polylineDash_gapColor" - )) - ).toBeDefined(); - expect(e.polyline.material.gapColor.getValue(date)).toEqualEpsilon( - new Color( - 0.0509803921568627, - 0.0313725490196078, - 0.23921568627451, - 0.4 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_material_polylineGlow_color" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.411764705882353, - 0.313725490196078, - 0.858823529411765, - 0.380392156862745 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_material_image_color" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.133333333333333, - 0.552941176470588, - 0.0431372549019608, - 0.184313725490196 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_material_grid_color" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.141176470588235, - 0.823529411764706, - 0.588235294117647, - 0.56078431372549 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_material_stripe_evenColor" - )) - ).toBeDefined(); - expect(e.polyline.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.647058823529412, - 0.862745098039216, - 0.129411764705882, - 0.780392156862745 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_material_stripe_oddColor" - )) - ).toBeDefined(); - expect(e.polyline.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.290196078431373, - 0.780392156862745, - 0.0705882352941176, - 0.27843137254902 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect(e.polyline.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.505882352941176, - 0.466666666666667, - 0.862745098039216, - 0.803921568627451 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect(e.polyline.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.32156862745098, - 0.454901960784314, - 0.803921568627451, - 0.203921568627451 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_depthFailMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(date) - ).toEqualEpsilon( - new Color( - 0.905882352941176, - 0.635294117647059, - 0.435294117647059, - 0.631372549019608 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "material_polyline_depthFailMaterial_polylineOutline" - )) - ).toBeDefined(); - expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual( - Color.fromBytes(238, 116, 228, 18) - ); - expect( - e.polyline.depthFailMaterial.outlineColor.getValue(date) - ).toEqual(Color.fromBytes(36, 55, 18, 134)); - expect( - e.polyline.depthFailMaterial.outlineWidth.getValue(date) - ).toEqual(33747.0); - expect( - (e = dataSource.entities.getById( - "material_polyline_depthFailMaterial_polylineArrow" - )) - ).toBeDefined(); - expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual( - Color.fromBytes(80, 78, 117, 160) - ); - expect( - (e = dataSource.entities.getById( - "material_polyline_depthFailMaterial_polylineDash" - )) - ).toBeDefined(); - expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual( - Color.fromBytes(139, 171, 44, 217) - ); - expect(e.polyline.depthFailMaterial.gapColor.getValue(date)).toEqual( - Color.fromBytes(253, 13, 109, 243) - ); - expect(e.polyline.depthFailMaterial.dashLength.getValue(date)).toEqual( - 21429.0 - ); - expect(e.polyline.depthFailMaterial.dashPattern.getValue(date)).toEqual( - 13659 - ); - expect( - (e = dataSource.entities.getById( - "material_polyline_depthFailMaterial_polylineGlow" - )) - ).toBeDefined(); - expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual( - Color.fromBytes(82, 227, 164, 249) - ); - expect(e.polyline.depthFailMaterial.glowPower.getValue(date)).toEqual( - 52932.0 - ); - expect(e.polyline.depthFailMaterial.taperPower.getValue(date)).toEqual( - 29589.0 - ); - expect( - (e = dataSource.entities.getById( - "material_polyline_depthFailMaterial_image" - )) - ).toBeDefined(); - expect(e.polyline.depthFailMaterial.image.getValue(date).url).toEqual( - "http://example.com/6349" - ); - expect(e.polyline.depthFailMaterial.repeat.getValue(date)).toEqual( - new Cartesian2(24549, 50015) - ); - expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual( - Color.fromBytes(71, 233, 193, 55) - ); - expect(e.polyline.depthFailMaterial.transparent.getValue(date)).toEqual( - true - ); - expect( - (e = dataSource.entities.getById( - "material_polyline_depthFailMaterial_grid" - )) - ).toBeDefined(); - expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual( - Color.fromBytes(241, 160, 22, 116) - ); - expect(e.polyline.depthFailMaterial.cellAlpha.getValue(date)).toEqual( - 32801.0 - ); - expect(e.polyline.depthFailMaterial.lineCount.getValue(date)).toEqual( - new Cartesian2(27318, 57194) - ); - expect( - e.polyline.depthFailMaterial.lineThickness.getValue(date) - ).toEqual(new Cartesian2(2299, 50440)); - expect(e.polyline.depthFailMaterial.lineOffset.getValue(date)).toEqual( - new Cartesian2(16744, 62785) - ); - expect( - (e = dataSource.entities.getById( - "material_polyline_depthFailMaterial_stripe" - )) - ).toBeDefined(); - expect(e.polyline.depthFailMaterial.orientation.getValue(date)).toEqual( - StripeOrientation.VERTICAL - ); - expect(e.polyline.depthFailMaterial.evenColor.getValue(date)).toEqual( - Color.fromBytes(174, 135, 160, 224) - ); - expect(e.polyline.depthFailMaterial.oddColor.getValue(date)).toEqual( - Color.fromBytes(8, 166, 115, 198) - ); - expect(e.polyline.depthFailMaterial.offset.getValue(date)).toEqual( - 58992.0 - ); - expect(e.polyline.depthFailMaterial.repeat.getValue(date)).toEqual( - 7346.0 - ); - expect( - (e = dataSource.entities.getById( - "material_polyline_depthFailMaterial_checkerboard" - )) - ).toBeDefined(); - expect(e.polyline.depthFailMaterial.evenColor.getValue(date)).toEqual( - Color.fromBytes(143, 196, 196, 1) - ); - expect(e.polyline.depthFailMaterial.oddColor.getValue(date)).toEqual( - Color.fromBytes(49, 118, 113, 119) - ); - expect(e.polyline.depthFailMaterial.repeat.getValue(date)).toEqual( - new Cartesian2(32284, 46718) - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_depthFailMaterial_polylineOutline_color" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(date) - ).toEqualEpsilon( - new Color( - 0.976470588235294, - 0.133333333333333, - 0.835294117647059, - 0.694117647058824 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_depthFailMaterial_polylineOutline_outlineColor" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.outlineColor.getValue(date) - ).toEqualEpsilon( - new Color( - 0.8, - 0.866666666666667, - 0.219607843137255, - 0.262745098039216 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_depthFailMaterial_polylineArrow_color" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(date) - ).toEqualEpsilon( - new Color( - 0.0392156862745098, - 0.988235294117647, - 0.784313725490196, - 0.211764705882353 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_depthFailMaterial_polylineDash_color" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(date) - ).toEqualEpsilon( - new Color( - 0.0431372549019608, - 0.235294117647059, - 0.443137254901961, - 0.701960784313725 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_depthFailMaterial_polylineDash_gapColor" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.gapColor.getValue(date) - ).toEqualEpsilon( - new Color( - 0.388235294117647, - 0.0196078431372549, - 0.780392156862745, - 0.941176470588235 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_depthFailMaterial_polylineGlow_color" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(date) - ).toEqualEpsilon( - new Color( - 0.733333333333333, - 0.180392156862745, - 0.407843137254902, - 0.168627450980392 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_depthFailMaterial_image_color" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(date) - ).toEqualEpsilon( - new Color( - 0.815686274509804, - 0.47843137254902, - 0.254901960784314, - 0.47843137254902 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_depthFailMaterial_grid_color" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(date) - ).toEqualEpsilon( - new Color( - 0.247058823529412, - 0.945098039215686, - 0.0274509803921569, - 0.968627450980392 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_depthFailMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.evenColor.getValue(date) - ).toEqualEpsilon( - new Color( - 0.517647058823529, - 0.576470588235294, - 0.615686274509804, - 0.682352941176471 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_depthFailMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.oddColor.getValue(date) - ).toEqualEpsilon( - new Color( - 0.333333333333333, - 0.537254901960784, - 0.443137254901961, - 0.658823529411765 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_depthFailMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.evenColor.getValue(date) - ).toEqualEpsilon( - new Color( - 0.145098039215686, - 0.815686274509804, - 0.113725490196078, - 0.729411764705882 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_polyline_depthFailMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.oddColor.getValue(date) - ).toEqualEpsilon( - new Color( - 0.0941176470588235, - 0.615686274509804, - 0.447058823529412, - 0.00392156862745098 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_rectangle_coordinates_wsenDegrees" - )) - ).toBeDefined(); - expect(e.rectangle.coordinates.getValue(date)).toEqual( - Rectangle.fromDegrees(42, 22, 5, 35) - ); - expect( - (e = dataSource.entities.getById( - "constant_rectangle_material_solidColor_color" - )) - ).toBeDefined(); - expect(e.rectangle.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.898039215686275, - 0.8, - 0.905882352941176, - 0.952941176470588 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("material_rectangle_material_image")) - ).toBeDefined(); - expect(e.rectangle.material.image.getValue(date).url).toEqual( - "http://example.com/18033" - ); - expect(e.rectangle.material.repeat.getValue(date)).toEqual( - new Cartesian2(41461, 31905) - ); - expect(e.rectangle.material.color.getValue(date)).toEqual( - Color.fromBytes(93, 203, 88, 125) - ); - expect(e.rectangle.material.transparent.getValue(date)).toEqual(true); - expect( - (e = dataSource.entities.getById("material_rectangle_material_grid")) - ).toBeDefined(); - expect(e.rectangle.material.color.getValue(date)).toEqual( - Color.fromBytes(245, 105, 152, 83) - ); - expect(e.rectangle.material.cellAlpha.getValue(date)).toEqual(57393.0); - expect(e.rectangle.material.lineCount.getValue(date)).toEqual( - new Cartesian2(4947, 4627) - ); - expect(e.rectangle.material.lineThickness.getValue(date)).toEqual( - new Cartesian2(37424, 19602) - ); - expect(e.rectangle.material.lineOffset.getValue(date)).toEqual( - new Cartesian2(43685, 31658) - ); - expect( - (e = dataSource.entities.getById( - "material_rectangle_material_stripe" - )) - ).toBeDefined(); - expect(e.rectangle.material.orientation.getValue(date)).toEqual( - StripeOrientation.VERTICAL - ); - expect(e.rectangle.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(196, 12, 53, 2) - ); - expect(e.rectangle.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(103, 243, 111, 72) - ); - expect(e.rectangle.material.offset.getValue(date)).toEqual(26578.0); - expect(e.rectangle.material.repeat.getValue(date)).toEqual(52842.0); - expect( - (e = dataSource.entities.getById( - "material_rectangle_material_checkerboard" - )) - ).toBeDefined(); - expect(e.rectangle.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(210, 132, 163, 116) - ); - expect(e.rectangle.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(159, 4, 119, 14) - ); - expect(e.rectangle.material.repeat.getValue(date)).toEqual( - new Cartesian2(27335, 51818) - ); - expect( - (e = dataSource.entities.getById( - "constant_rectangle_material_image_color" - )) - ).toBeDefined(); - expect(e.rectangle.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.247058823529412, - 0.498039215686275, - 0.741176470588235, - 0.968627450980392 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_rectangle_material_grid_color" - )) - ).toBeDefined(); - expect(e.rectangle.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.458823529411765, - 0.0627450980392157, - 0.886274509803922, - 0.83921568627451 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_rectangle_material_stripe_evenColor" - )) - ).toBeDefined(); - expect(e.rectangle.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.576470588235294, - 0.341176470588235, - 0.611764705882353, - 0.207843137254902 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_rectangle_material_stripe_oddColor" - )) - ).toBeDefined(); - expect(e.rectangle.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.866666666666667, - 0.949019607843137, - 0.0627450980392157, - 0.0196078431372549 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_rectangle_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect(e.rectangle.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.545098039215686, - 0.647058823529412, - 0.603921568627451, - 0.725490196078431 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_rectangle_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect(e.rectangle.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.227450980392157, - 0.164705882352941, - 0.619607843137255, - 0.905882352941176 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_rectangle_outlineColor_rgbaf" - )) - ).toBeDefined(); - expect(e.rectangle.outlineColor.getValue(date)).toEqualEpsilon( - new Color( - 0.301960784313725, - 0.0352941176470588, - 0.917647058823529, - 0.207843137254902 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_wall_positions_cartographicRadians" - )) - ).toBeDefined(); - expect(e.wall.positions.getValue(date)).toEqual([ - Cartesian3.fromRadians(0.990822494752221, 0.11729920547879, 47975), - Cartesian3.fromRadians(1.22405890229697, 1.46292679641256, 13438), - ]); - expect( - (e = dataSource.entities.getById( - "constant_wall_positions_cartographicDegrees" - )) - ).toBeDefined(); - expect(e.wall.positions.getValue(date)).toEqual([ - Cartesian3.fromDegrees(30, 24, 27738), - Cartesian3.fromDegrees(14, 41, 41667), - ]); - expect( - (e = dataSource.entities.getById( - "constant_wall_material_solidColor_color" - )) - ).toBeDefined(); - expect(e.wall.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.694117647058824, - 0.317647058823529, - 0.909803921568627, - 0.501960784313725 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("material_wall_material_image")) - ).toBeDefined(); - expect(e.wall.material.image.getValue(date).url).toEqual( - "http://example.com/58529" - ); - expect(e.wall.material.repeat.getValue(date)).toEqual( - new Cartesian2(36340, 47245) - ); - expect(e.wall.material.color.getValue(date)).toEqual( - Color.fromBytes(252, 63, 12, 38) - ); - expect(e.wall.material.transparent.getValue(date)).toEqual(true); - expect( - (e = dataSource.entities.getById("material_wall_material_grid")) - ).toBeDefined(); - expect(e.wall.material.color.getValue(date)).toEqual( - Color.fromBytes(38, 183, 237, 174) - ); - expect(e.wall.material.cellAlpha.getValue(date)).toEqual(59606.0); - expect(e.wall.material.lineCount.getValue(date)).toEqual( - new Cartesian2(3079, 31244) - ); - expect(e.wall.material.lineThickness.getValue(date)).toEqual( - new Cartesian2(32099, 44157) - ); - expect(e.wall.material.lineOffset.getValue(date)).toEqual( - new Cartesian2(13529, 1844) - ); - expect( - (e = dataSource.entities.getById("material_wall_material_stripe")) - ).toBeDefined(); - expect(e.wall.material.orientation.getValue(date)).toEqual( - StripeOrientation.VERTICAL - ); - expect(e.wall.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(202, 190, 37, 215) - ); - expect(e.wall.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(56, 107, 92, 38) - ); - expect(e.wall.material.offset.getValue(date)).toEqual(34142.0); - expect(e.wall.material.repeat.getValue(date)).toEqual(33528.0); - expect( - (e = dataSource.entities.getById( - "material_wall_material_checkerboard" - )) - ).toBeDefined(); - expect(e.wall.material.evenColor.getValue(date)).toEqual( - Color.fromBytes(187, 134, 139, 130) - ); - expect(e.wall.material.oddColor.getValue(date)).toEqual( - Color.fromBytes(177, 172, 79, 149) - ); - expect(e.wall.material.repeat.getValue(date)).toEqual( - new Cartesian2(22341, 60503) - ); - expect( - (e = dataSource.entities.getById( - "constant_wall_material_image_color" - )) - ).toBeDefined(); - expect(e.wall.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.349019607843137, - 0.843137254901961, - 0.290196078431373, - 0.0431372549019608 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("constant_wall_material_grid_color")) - ).toBeDefined(); - expect(e.wall.material.color.getValue(date)).toEqualEpsilon( - new Color( - 0.756862745098039, - 0.992156862745098, - 0.992156862745098, - 0.462745098039216 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_wall_material_stripe_evenColor" - )) - ).toBeDefined(); - expect(e.wall.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.690196078431373, - 0.211764705882353, - 0.615686274509804, - 0.627450980392157 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_wall_material_stripe_oddColor" - )) - ).toBeDefined(); - expect(e.wall.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.968627450980392, - 0.368627450980392, - 0.219607843137255, - 0.00392156862745098 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_wall_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect(e.wall.material.evenColor.getValue(date)).toEqualEpsilon( - new Color( - 0.376470588235294, - 0.396078431372549, - 0.698039215686274, - 0.545098039215686 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_wall_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect(e.wall.material.oddColor.getValue(date)).toEqualEpsilon( - new Color( - 0.396078431372549, - 0.0196078431372549, - 0.27843137254902, - 0.525490196078431 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("constant_wall_outlineColor_rgbaf")) - ).toBeDefined(); - expect(e.wall.outlineColor.getValue(date)).toEqualEpsilon( - new Color( - 0.564705882352941, - 0.67843137254902, - 0.764705882352941, - 0.811764705882353 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "constant_agi_conicSensor_intersectionColor_rgbaf" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_lateralSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_lateralSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_lateralSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_lateralSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_lateralSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_lateralSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_lateralSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_lateralSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_lateralSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_lateralSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_lateralSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_ellipsoidSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_ellipsoidSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_ellipsoidSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_ellipsoidSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_ellipsoidSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_ellipsoidSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_ellipsoidSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_ellipsoidSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_ellipsoidSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_ellipsoidSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_ellipsoidSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_ellipsoidHorizonSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_ellipsoidHorizonSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_ellipsoidHorizonSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_ellipsoidHorizonSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_ellipsoidHorizonSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_ellipsoidHorizonSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_ellipsoidHorizonSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_ellipsoidHorizonSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_ellipsoidHorizonSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_domeSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_domeSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_domeSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_domeSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_domeSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_domeSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_domeSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_domeSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_domeSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_domeSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_domeSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_environmentOcclusionMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_environmentOcclusionMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_environmentOcclusionMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_environmentOcclusionMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_conicSensor_environmentOcclusionMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_environmentOcclusionMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_environmentOcclusionMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_environmentOcclusionMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_environmentOcclusionMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_environmentOcclusionMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_conicSensor_environmentOcclusionMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_agi_conicSensor_environmentIntersectionColor_rgbaf" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_agi_customPatternSensor_directions_unitSpherical" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_agi_customPatternSensor_directions_cartesian" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_agi_customPatternSensor_directions_unitCartesian" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_agi_customPatternSensor_intersectionColor_rgbaf" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_lateralSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_lateralSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_lateralSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_lateralSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_lateralSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_lateralSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_lateralSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_lateralSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_lateralSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_lateralSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_lateralSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_ellipsoidSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_ellipsoidSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_ellipsoidSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_ellipsoidSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_ellipsoidSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_ellipsoidSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_ellipsoidSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_ellipsoidSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_ellipsoidSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_ellipsoidSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_ellipsoidSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_ellipsoidHorizonSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_ellipsoidHorizonSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_ellipsoidHorizonSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_ellipsoidHorizonSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_ellipsoidHorizonSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_ellipsoidHorizonSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_ellipsoidHorizonSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_ellipsoidHorizonSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_ellipsoidHorizonSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_domeSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_domeSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_domeSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_domeSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_domeSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_domeSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_domeSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_domeSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_domeSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_domeSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_domeSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_environmentOcclusionMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_environmentOcclusionMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_environmentOcclusionMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_environmentOcclusionMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_customPatternSensor_environmentOcclusionMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_environmentOcclusionMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_environmentOcclusionMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_environmentOcclusionMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_environmentOcclusionMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_environmentOcclusionMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_customPatternSensor_environmentOcclusionMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_agi_customPatternSensor_environmentIntersectionColor_rgbaf" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_agi_rectangularSensor_intersectionColor_rgbaf" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_lateralSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_lateralSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_lateralSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_lateralSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_lateralSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_lateralSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_lateralSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_lateralSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_lateralSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_lateralSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_lateralSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_ellipsoidSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_ellipsoidSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_ellipsoidSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_ellipsoidSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_ellipsoidSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_ellipsoidSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_ellipsoidSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_ellipsoidSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_ellipsoidSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_ellipsoidSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_ellipsoidSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_ellipsoidHorizonSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_ellipsoidHorizonSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_ellipsoidHorizonSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_ellipsoidHorizonSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_ellipsoidHorizonSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_ellipsoidHorizonSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_ellipsoidHorizonSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_ellipsoidHorizonSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_ellipsoidHorizonSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_domeSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_domeSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_domeSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_domeSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_domeSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_domeSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_domeSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_domeSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_domeSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_domeSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_domeSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_environmentOcclusionMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_environmentOcclusionMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_environmentOcclusionMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_environmentOcclusionMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_rectangularSensor_environmentOcclusionMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_environmentOcclusionMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_environmentOcclusionMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_environmentOcclusionMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_environmentOcclusionMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_environmentOcclusionMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_rectangularSensor_environmentOcclusionMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_agi_rectangularSensor_environmentIntersectionColor_rgbaf" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_agi_fan_directions_unitSpherical" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_agi_fan_directions_cartesian" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_agi_fan_directions_unitCartesian" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_fan_material_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("material_fan_material_image")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("material_fan_material_grid")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("material_fan_material_stripe")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "material_fan_material_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("constant_fan_material_image_color")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("constant_fan_material_grid_color")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_fan_material_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_fan_material_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_fan_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_fan_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_agi_fan_outlineColor_rgbaf" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("constant_agi_vector_color_rgbaf")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_agi_vector_direction_unitSpherical" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_agi_vector_direction_cartesian" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "constant_agi_vector_direction_unitCartesian" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("constant_custom")) - ).toBeDefined(); - expect(e.properties.custom_boolean.getValue(date)).toEqual(true); - expect(e.properties.custom_boundingRectangle.getValue(date)).toEqual( - new BoundingRectangle(9369, 63524, 6904, 17690) - ); - expect(e.properties.custom_cartesian.getValue(date)).toEqual( - new Cartesian3(28502, 45167, 944) - ); - expect(e.properties.custom_cartographicRadians.getValue(date)).toEqual( - Cartesian3.fromRadians(0.350571264887744, 0.633274262413284, 42979) - ); - expect(e.properties.custom_cartographicDegrees.getValue(date)).toEqual( - Cartesian3.fromDegrees(18, 36, 37743) - ); - expect(e.properties.custom_cartesian2.getValue(date)).toEqual( - new Cartesian2(44825, 16303) - ); - expect(e.properties.custom_unitCartesian.getValue(date)).toEqualEpsilon( - new Cartesian3( - 0.77935070007851, - 0.565493818550955, - 0.269868907930861 - ), - 1e-14 - ); - expect(e.properties.custom_spherical.getValue(date)).toEqual( - Cartesian3.fromSpherical(new Spherical(1705, 13830, 21558)) - ); - expect(e.properties.custom_unitSpherical.getValue(date)).toEqualEpsilon( - Cartesian3.fromSpherical(new Spherical(59387, 15591)), - 1e-14 - ); - expect(e.properties.custom_rgba.getValue(date)).toEqual( - Color.fromBytes(50, 149, 175, 147) - ); - expect(e.properties.custom_rgbaf.getValue(date)).toEqualEpsilon( - new Color( - 0.0666666666666667, - 0.0666666666666667, - 0.231372549019608, - 0.427450980392157 - ), - 1e-14 - ); - expect(e.properties.custom_colorBlendMode.getValue(date)).toEqual( - ColorBlendMode.REPLACE - ); - expect(e.properties.custom_cornerType.getValue(date)).toEqual( - CornerType.BEVELED - ); - expect(e.properties.custom_heightReference.getValue(date)).toEqual( - HeightReference.CLAMP_TO_GROUND - ); - expect(e.properties.custom_horizontalOrigin.getValue(date)).toEqual( - HorizontalOrigin.LEFT - ); - expect(e.properties.custom_labelStyle.getValue(date)).toEqual( - LabelStyle.FILL_AND_OUTLINE - ); - expect(e.properties.custom_number.getValue(date)).toEqual(31507.0); - expect(e.properties.custom_nearFarScalar.getValue(date)).toEqual( - new NearFarScalar(14621, 24121, 16734, 56129) - ); - expect( - e.properties.custom_unitQuaternion.getValue(date) - ).toEqualEpsilon( - new Quaternion( - 0.742737937277143, - 0.267679401430615, - 0.507905263014791, - 0.344558178514049 - ), - 1e-14 - ); - expect(e.properties.custom_shadowMode.getValue(date)).toEqual( - ShadowMode.CAST_ONLY - ); - expect(e.properties.custom_string.getValue(date)).toEqual( - "string41758" - ); - expect(e.properties.custom_stripeOrientation.getValue(date)).toEqual( - StripeOrientation.VERTICAL - ); - expect(e.properties.custom_wsen.getValue(date)).toEqual( - new Rectangle( - 1.47520917005826, - 1.17615981869183, - 0.973692387723505, - 1.00039738410474 - ) - ); - expect(e.properties.custom_wsenDegrees.getValue(date)).toEqual( - Rectangle.fromDegrees(5, 3, 6, 19) - ); - expect(e.properties.custom_uri.getValue(date).url).toEqual( - "http://example.com/41986" - ); - expect(e.properties.custom_verticalOrigin.getValue(date)).toEqual( - VerticalOrigin.BOTTOM - ); - expect( - (e = dataSource.entities.getById("ConstantPosition1")) - ).toBeDefined(); - expect(e.position.getValue(date)).toEqual( - new Cartesian3(48370, 3260, 44044) - ); - expect( - (e = dataSource.entities.getById("ConstantDouble1")) - ).toBeDefined(); - expect(e.billboard.scale.getValue(date)).toEqual(1155.0); - expect( - (e = dataSource.entities.getById("ConstantPosition2")) - ).toBeDefined(); - expect(e.position.getValue(date)).toEqual( - new Cartesian3(2599, 10, 39168) - ); - expect( - (e = dataSource.entities.getById("ConstantDouble2")) - ).toBeDefined(); - expect(e.billboard.scale.getValue(date)).toEqual(16451.0); - expect( - (e = dataSource.entities.getById("ConstantPosition3")) - ).toBeDefined(); - expect(e.position.getValue(date)).toEqual( - new Cartesian3(1758, 45062, 8624) - ); - expect( - (e = dataSource.entities.getById("ConstantDouble3")) - ).toBeDefined(); - expect(e.billboard.scale.getValue(date)).toEqual(50938.0); - expect((e = dataSource.entities.getById("Reference"))).toBeDefined(); - expect(e.description.getValue(date)).toEqual( - constant.description.getValue(date) - ); - expect(e.position.getValue(date)).toEqual( - constant.position.getValue(date) - ); - expect(e.orientation.getValue(date)).toEqual( - constant.orientation.getValue(date) - ); - expect(e.viewFrom.getValue(date)).toEqual( - constant.viewFrom.getValue(date) - ); - expect(e.billboard.show.getValue(date)).toEqual( - constant.billboard.show.getValue(date) - ); - expect(e.billboard.image.getValue(date)).toEqual( - constant.billboard.image.getValue(date) - ); - expect(e.billboard.scale.getValue(date)).toEqual( - constant.billboard.scale.getValue(date) - ); - expect(e.billboard.pixelOffset.getValue(date)).toEqual( - constant.billboard.pixelOffset.getValue(date) - ); - expect(e.billboard.eyeOffset.getValue(date)).toEqual( - constant.billboard.eyeOffset.getValue(date) - ); - expect(e.billboard.horizontalOrigin.getValue(date)).toEqual( - constant.billboard.horizontalOrigin.getValue(date) - ); - expect(e.billboard.verticalOrigin.getValue(date)).toEqual( - constant.billboard.verticalOrigin.getValue(date) - ); - expect(e.billboard.heightReference.getValue(date)).toEqual( - constant.billboard.heightReference.getValue(date) - ); - expect(e.billboard.color.getValue(date)).toEqual( - constant.billboard.color.getValue(date) - ); - expect(e.billboard.rotation.getValue(date)).toEqual( - constant.billboard.rotation.getValue(date) - ); - expect(e.billboard.alignedAxis.getValue(date)).toEqual( - constant.billboard.alignedAxis.getValue(date) - ); - expect(e.billboard.sizeInMeters.getValue(date)).toEqual( - constant.billboard.sizeInMeters.getValue(date) - ); - expect(e.billboard.width.getValue(date)).toEqual( - constant.billboard.width.getValue(date) - ); - expect(e.billboard.height.getValue(date)).toEqual( - constant.billboard.height.getValue(date) - ); - expect(e.billboard.scaleByDistance.getValue(date)).toEqual( - constant.billboard.scaleByDistance.getValue(date) - ); - expect(e.billboard.translucencyByDistance.getValue(date)).toEqual( - constant.billboard.translucencyByDistance.getValue(date) - ); - expect(e.billboard.pixelOffsetScaleByDistance.getValue(date)).toEqual( - constant.billboard.pixelOffsetScaleByDistance.getValue(date) - ); - expect(e.billboard.imageSubRegion.getValue(date)).toEqual( - constant.billboard.imageSubRegion.getValue(date) - ); - expect(e.billboard.distanceDisplayCondition.getValue(date)).toEqual( - constant.billboard.distanceDisplayCondition.getValue(date) - ); - expect(e.billboard.disableDepthTestDistance.getValue(date)).toEqual( - constant.billboard.disableDepthTestDistance.getValue(date) - ); - expect(e.box.show.getValue(date)).toEqual( - constant.box.show.getValue(date) - ); - expect(e.box.dimensions.getValue(date)).toEqual( - constant.box.dimensions.getValue(date) - ); - expect(e.box.heightReference.getValue(date)).toEqual( - constant.box.heightReference.getValue(date) - ); - expect(e.box.fill.getValue(date)).toEqual( - constant.box.fill.getValue(date) - ); - expect(e.box.material.color.getValue(date)).toEqual( - constant.box.material.color.getValue(date) - ); - expect(e.box.outline.getValue(date)).toEqual( - constant.box.outline.getValue(date) - ); - expect(e.box.outlineColor.getValue(date)).toEqual( - constant.box.outlineColor.getValue(date) - ); - expect(e.box.outlineWidth.getValue(date)).toEqual( - constant.box.outlineWidth.getValue(date) - ); - expect(e.box.shadows.getValue(date)).toEqual( - constant.box.shadows.getValue(date) - ); - expect(e.box.distanceDisplayCondition.getValue(date)).toEqual( - constant.box.distanceDisplayCondition.getValue(date) - ); - expect(e.corridor.show.getValue(date)).toEqual( - constant.corridor.show.getValue(date) - ); - expect(e.corridor.positions.getValue(date)).toEqual([ - dataSource.entities - .getById("ConstantPosition1") - .position.getValue(date), - dataSource.entities - .getById("ConstantPosition2") - .position.getValue(date), - ]); - expect(e.corridor.width.getValue(date)).toEqual( - constant.corridor.width.getValue(date) - ); - expect(e.corridor.height.getValue(date)).toEqual( - constant.corridor.height.getValue(date) - ); - expect(e.corridor.heightReference.getValue(date)).toEqual( - constant.corridor.heightReference.getValue(date) - ); - expect(e.corridor.extrudedHeight.getValue(date)).toEqual( - constant.corridor.extrudedHeight.getValue(date) - ); - expect(e.corridor.extrudedHeightReference.getValue(date)).toEqual( - constant.corridor.extrudedHeightReference.getValue(date) - ); - expect(e.corridor.cornerType.getValue(date)).toEqual( - constant.corridor.cornerType.getValue(date) - ); - expect(e.corridor.granularity.getValue(date)).toEqual( - constant.corridor.granularity.getValue(date) - ); - expect(e.corridor.fill.getValue(date)).toEqual( - constant.corridor.fill.getValue(date) - ); - expect(e.corridor.material.color.getValue(date)).toEqual( - constant.corridor.material.color.getValue(date) - ); - expect(e.corridor.outline.getValue(date)).toEqual( - constant.corridor.outline.getValue(date) - ); - expect(e.corridor.outlineColor.getValue(date)).toEqual( - constant.corridor.outlineColor.getValue(date) - ); - expect(e.corridor.outlineWidth.getValue(date)).toEqual( - constant.corridor.outlineWidth.getValue(date) - ); - expect(e.corridor.shadows.getValue(date)).toEqual( - constant.corridor.shadows.getValue(date) - ); - expect(e.corridor.distanceDisplayCondition.getValue(date)).toEqual( - constant.corridor.distanceDisplayCondition.getValue(date) - ); - expect(e.corridor.classificationType.getValue(date)).toEqual( - constant.corridor.classificationType.getValue(date) - ); - expect(e.corridor.zIndex.getValue(date)).toEqual( - constant.corridor.zIndex.getValue(date) - ); - expect(e.cylinder.show.getValue(date)).toEqual( - constant.cylinder.show.getValue(date) - ); - expect(e.cylinder.length.getValue(date)).toEqual( - constant.cylinder.length.getValue(date) - ); - expect(e.cylinder.topRadius.getValue(date)).toEqual( - constant.cylinder.topRadius.getValue(date) - ); - expect(e.cylinder.bottomRadius.getValue(date)).toEqual( - constant.cylinder.bottomRadius.getValue(date) - ); - expect(e.cylinder.heightReference.getValue(date)).toEqual( - constant.cylinder.heightReference.getValue(date) - ); - expect(e.cylinder.fill.getValue(date)).toEqual( - constant.cylinder.fill.getValue(date) - ); - expect(e.cylinder.material.color.getValue(date)).toEqual( - constant.cylinder.material.color.getValue(date) - ); - expect(e.cylinder.outline.getValue(date)).toEqual( - constant.cylinder.outline.getValue(date) - ); - expect(e.cylinder.outlineColor.getValue(date)).toEqual( - constant.cylinder.outlineColor.getValue(date) - ); - expect(e.cylinder.outlineWidth.getValue(date)).toEqual( - constant.cylinder.outlineWidth.getValue(date) - ); - expect(e.cylinder.numberOfVerticalLines.getValue(date)).toEqual( - constant.cylinder.numberOfVerticalLines.getValue(date) - ); - expect(e.cylinder.slices.getValue(date)).toEqual( - constant.cylinder.slices.getValue(date) - ); - expect(e.cylinder.shadows.getValue(date)).toEqual( - constant.cylinder.shadows.getValue(date) - ); - expect(e.cylinder.distanceDisplayCondition.getValue(date)).toEqual( - constant.cylinder.distanceDisplayCondition.getValue(date) - ); - expect(e.ellipse.show.getValue(date)).toEqual( - constant.ellipse.show.getValue(date) - ); - expect(e.ellipse.semiMajorAxis.getValue(date)).toEqual( - constant.ellipse.semiMajorAxis.getValue(date) - ); - expect(e.ellipse.semiMinorAxis.getValue(date)).toEqual( - constant.ellipse.semiMinorAxis.getValue(date) - ); - expect(e.ellipse.height.getValue(date)).toEqual( - constant.ellipse.height.getValue(date) - ); - expect(e.ellipse.heightReference.getValue(date)).toEqual( - constant.ellipse.heightReference.getValue(date) - ); - expect(e.ellipse.extrudedHeight.getValue(date)).toEqual( - constant.ellipse.extrudedHeight.getValue(date) - ); - expect(e.ellipse.extrudedHeightReference.getValue(date)).toEqual( - constant.ellipse.extrudedHeightReference.getValue(date) - ); - expect(e.ellipse.rotation.getValue(date)).toEqual( - constant.ellipse.rotation.getValue(date) - ); - expect(e.ellipse.stRotation.getValue(date)).toEqual( - constant.ellipse.stRotation.getValue(date) - ); - expect(e.ellipse.granularity.getValue(date)).toEqual( - constant.ellipse.granularity.getValue(date) - ); - expect(e.ellipse.fill.getValue(date)).toEqual( - constant.ellipse.fill.getValue(date) - ); - expect(e.ellipse.material.color.getValue(date)).toEqual( - constant.ellipse.material.color.getValue(date) - ); - expect(e.ellipse.outline.getValue(date)).toEqual( - constant.ellipse.outline.getValue(date) - ); - expect(e.ellipse.outlineColor.getValue(date)).toEqual( - constant.ellipse.outlineColor.getValue(date) - ); - expect(e.ellipse.outlineWidth.getValue(date)).toEqual( - constant.ellipse.outlineWidth.getValue(date) - ); - expect(e.ellipse.numberOfVerticalLines.getValue(date)).toEqual( - constant.ellipse.numberOfVerticalLines.getValue(date) - ); - expect(e.ellipse.shadows.getValue(date)).toEqual( - constant.ellipse.shadows.getValue(date) - ); - expect(e.ellipse.distanceDisplayCondition.getValue(date)).toEqual( - constant.ellipse.distanceDisplayCondition.getValue(date) - ); - expect(e.ellipse.classificationType.getValue(date)).toEqual( - constant.ellipse.classificationType.getValue(date) - ); - expect(e.ellipse.zIndex.getValue(date)).toEqual( - constant.ellipse.zIndex.getValue(date) - ); - expect(e.ellipsoid.show.getValue(date)).toEqual( - constant.ellipsoid.show.getValue(date) - ); - expect(e.ellipsoid.radii.getValue(date)).toEqual( - constant.ellipsoid.radii.getValue(date) - ); - expect(e.ellipsoid.innerRadii.getValue(date)).toEqual( - constant.ellipsoid.innerRadii.getValue(date) - ); - expect(e.ellipsoid.minimumClock.getValue(date)).toEqual( - constant.ellipsoid.minimumClock.getValue(date) - ); - expect(e.ellipsoid.maximumClock.getValue(date)).toEqual( - constant.ellipsoid.maximumClock.getValue(date) - ); - expect(e.ellipsoid.minimumCone.getValue(date)).toEqual( - constant.ellipsoid.minimumCone.getValue(date) - ); - expect(e.ellipsoid.maximumCone.getValue(date)).toEqual( - constant.ellipsoid.maximumCone.getValue(date) - ); - expect(e.ellipsoid.heightReference.getValue(date)).toEqual( - constant.ellipsoid.heightReference.getValue(date) - ); - expect(e.ellipsoid.fill.getValue(date)).toEqual( - constant.ellipsoid.fill.getValue(date) - ); - expect(e.ellipsoid.material.color.getValue(date)).toEqual( - constant.ellipsoid.material.color.getValue(date) - ); - expect(e.ellipsoid.outline.getValue(date)).toEqual( - constant.ellipsoid.outline.getValue(date) - ); - expect(e.ellipsoid.outlineColor.getValue(date)).toEqual( - constant.ellipsoid.outlineColor.getValue(date) - ); - expect(e.ellipsoid.outlineWidth.getValue(date)).toEqual( - constant.ellipsoid.outlineWidth.getValue(date) - ); - expect(e.ellipsoid.stackPartitions.getValue(date)).toEqual( - constant.ellipsoid.stackPartitions.getValue(date) - ); - expect(e.ellipsoid.slicePartitions.getValue(date)).toEqual( - constant.ellipsoid.slicePartitions.getValue(date) - ); - expect(e.ellipsoid.subdivisions.getValue(date)).toEqual( - constant.ellipsoid.subdivisions.getValue(date) - ); - expect(e.ellipsoid.shadows.getValue(date)).toEqual( - constant.ellipsoid.shadows.getValue(date) - ); - expect(e.ellipsoid.distanceDisplayCondition.getValue(date)).toEqual( - constant.ellipsoid.distanceDisplayCondition.getValue(date) - ); - expect(e.label.show.getValue(date)).toEqual( - constant.label.show.getValue(date) - ); - expect(e.label.text.getValue(date)).toEqual( - constant.label.text.getValue(date) - ); - expect(e.label.font.getValue(date)).toEqual( - constant.label.font.getValue(date) - ); - expect(e.label.style.getValue(date)).toEqual( - constant.label.style.getValue(date) - ); - expect(e.label.scale.getValue(date)).toEqual( - constant.label.scale.getValue(date) - ); - expect(e.label.showBackground.getValue(date)).toEqual( - constant.label.showBackground.getValue(date) - ); - expect(e.label.backgroundColor.getValue(date)).toEqual( - constant.label.backgroundColor.getValue(date) - ); - expect(e.label.backgroundPadding.getValue(date)).toEqual( - constant.label.backgroundPadding.getValue(date) - ); - expect(e.label.pixelOffset.getValue(date)).toEqual( - constant.label.pixelOffset.getValue(date) - ); - expect(e.label.eyeOffset.getValue(date)).toEqual( - constant.label.eyeOffset.getValue(date) - ); - expect(e.label.horizontalOrigin.getValue(date)).toEqual( - constant.label.horizontalOrigin.getValue(date) - ); - expect(e.label.verticalOrigin.getValue(date)).toEqual( - constant.label.verticalOrigin.getValue(date) - ); - expect(e.label.heightReference.getValue(date)).toEqual( - constant.label.heightReference.getValue(date) - ); - expect(e.label.fillColor.getValue(date)).toEqual( - constant.label.fillColor.getValue(date) - ); - expect(e.label.outlineColor.getValue(date)).toEqual( - constant.label.outlineColor.getValue(date) - ); - expect(e.label.outlineWidth.getValue(date)).toEqual( - constant.label.outlineWidth.getValue(date) - ); - expect(e.label.translucencyByDistance.getValue(date)).toEqual( - constant.label.translucencyByDistance.getValue(date) - ); - expect(e.label.pixelOffsetScaleByDistance.getValue(date)).toEqual( - constant.label.pixelOffsetScaleByDistance.getValue(date) - ); - expect(e.label.scaleByDistance.getValue(date)).toEqual( - constant.label.scaleByDistance.getValue(date) - ); - expect(e.label.distanceDisplayCondition.getValue(date)).toEqual( - constant.label.distanceDisplayCondition.getValue(date) - ); - expect(e.label.disableDepthTestDistance.getValue(date)).toEqual( - constant.label.disableDepthTestDistance.getValue(date) - ); - expect(e.model.show.getValue(date)).toEqual( - constant.model.show.getValue(date) - ); - expect(e.model.uri.getValue(date)).toEqual( - constant.model.uri.getValue(date) - ); - expect(e.model.scale.getValue(date)).toEqual( - constant.model.scale.getValue(date) - ); - expect(e.model.minimumPixelSize.getValue(date)).toEqual( - constant.model.minimumPixelSize.getValue(date) - ); - expect(e.model.maximumScale.getValue(date)).toEqual( - constant.model.maximumScale.getValue(date) - ); - expect(e.model.incrementallyLoadTextures.getValue(date)).toEqual( - constant.model.incrementallyLoadTextures.getValue(date) - ); - expect(e.model.runAnimations.getValue(date)).toEqual( - constant.model.runAnimations.getValue(date) - ); - expect(e.model.shadows.getValue(date)).toEqual( - constant.model.shadows.getValue(date) - ); - expect(e.model.heightReference.getValue(date)).toEqual( - constant.model.heightReference.getValue(date) - ); - expect(e.model.silhouetteColor.getValue(date)).toEqual( - constant.model.silhouetteColor.getValue(date) - ); - expect(e.model.silhouetteSize.getValue(date)).toEqual( - constant.model.silhouetteSize.getValue(date) - ); - expect(e.model.color.getValue(date)).toEqual( - constant.model.color.getValue(date) - ); - expect(e.model.colorBlendMode.getValue(date)).toEqual( - constant.model.colorBlendMode.getValue(date) - ); - expect(e.model.colorBlendAmount.getValue(date)).toEqual( - constant.model.colorBlendAmount.getValue(date) - ); - expect(e.model.distanceDisplayCondition.getValue(date)).toEqual( - constant.model.distanceDisplayCondition.getValue(date) - ); - expect( - e.model.nodeTransformations.referenceProp.translation.getValue(date) - ).toEqual( - constant.model.nodeTransformations.prop.translation.getValue(date) - ); - expect( - e.model.nodeTransformations.referenceProp.rotation.getValue(date) - ).toEqual( - constant.model.nodeTransformations.prop.rotation.getValue(date) - ); - expect( - e.model.nodeTransformations.referenceProp.scale.getValue(date) - ).toEqual(constant.model.nodeTransformations.prop.scale.getValue(date)); - expect(e.model.articulations.referenceProp.getValue(date)).toEqual( - constant.model.articulations.prop.getValue(date) - ); - expect(e.path.show.getValue(date)).toEqual( - constant.path.show.getValue(date) - ); - expect(e.path.leadTime.getValue(date)).toEqual( - constant.path.leadTime.getValue(date) - ); - expect(e.path.trailTime.getValue(date)).toEqual( - constant.path.trailTime.getValue(date) - ); - expect(e.path.width.getValue(date)).toEqual( - constant.path.width.getValue(date) - ); - expect(e.path.resolution.getValue(date)).toEqual( - constant.path.resolution.getValue(date) - ); - expect(e.path.material.color.getValue(date)).toEqual( - constant.path.material.color.getValue(date) - ); - expect(e.path.distanceDisplayCondition.getValue(date)).toEqual( - constant.path.distanceDisplayCondition.getValue(date) - ); - expect(e.point.show.getValue(date)).toEqual( - constant.point.show.getValue(date) - ); - expect(e.point.pixelSize.getValue(date)).toEqual( - constant.point.pixelSize.getValue(date) - ); - expect(e.point.heightReference.getValue(date)).toEqual( - constant.point.heightReference.getValue(date) - ); - expect(e.point.color.getValue(date)).toEqual( - constant.point.color.getValue(date) - ); - expect(e.point.outlineColor.getValue(date)).toEqual( - constant.point.outlineColor.getValue(date) - ); - expect(e.point.outlineWidth.getValue(date)).toEqual( - constant.point.outlineWidth.getValue(date) - ); - expect(e.point.scaleByDistance.getValue(date)).toEqual( - constant.point.scaleByDistance.getValue(date) - ); - expect(e.point.translucencyByDistance.getValue(date)).toEqual( - constant.point.translucencyByDistance.getValue(date) - ); - expect(e.point.distanceDisplayCondition.getValue(date)).toEqual( - constant.point.distanceDisplayCondition.getValue(date) - ); - expect(e.point.disableDepthTestDistance.getValue(date)).toEqual( - constant.point.disableDepthTestDistance.getValue(date) - ); - expect(e.polygon.show.getValue(date)).toEqual( - constant.polygon.show.getValue(date) - ); - expect(e.polygon.hierarchy.getValue(date).positions).toEqual([ - dataSource.entities - .getById("ConstantPosition1") - .position.getValue(date), - dataSource.entities - .getById("ConstantPosition2") - .position.getValue(date), - ]); - expect(e.polygon.hierarchy.getValue(date).holes).toEqual([ - new PolygonHierarchy([ - dataSource.entities - .getById("ConstantPosition1") - .position.getValue(date), - dataSource.entities - .getById("ConstantPosition2") - .position.getValue(date), - dataSource.entities - .getById("ConstantPosition3") - .position.getValue(date), - ]), - ]); - expect(e.polygon.arcType.getValue(date)).toEqual( - constant.polygon.arcType.getValue(date) - ); - expect(e.polygon.height.getValue(date)).toEqual( - constant.polygon.height.getValue(date) - ); - expect(e.polygon.heightReference.getValue(date)).toEqual( - constant.polygon.heightReference.getValue(date) - ); - expect(e.polygon.extrudedHeight.getValue(date)).toEqual( - constant.polygon.extrudedHeight.getValue(date) - ); - expect(e.polygon.extrudedHeightReference.getValue(date)).toEqual( - constant.polygon.extrudedHeightReference.getValue(date) - ); - expect(e.polygon.stRotation.getValue(date)).toEqual( - constant.polygon.stRotation.getValue(date) - ); - expect(e.polygon.granularity.getValue(date)).toEqual( - constant.polygon.granularity.getValue(date) - ); - expect(e.polygon.fill.getValue(date)).toEqual( - constant.polygon.fill.getValue(date) - ); - expect(e.polygon.material.color.getValue(date)).toEqual( - constant.polygon.material.color.getValue(date) - ); - expect(e.polygon.outline.getValue(date)).toEqual( - constant.polygon.outline.getValue(date) - ); - expect(e.polygon.outlineColor.getValue(date)).toEqual( - constant.polygon.outlineColor.getValue(date) - ); - expect(e.polygon.outlineWidth.getValue(date)).toEqual( - constant.polygon.outlineWidth.getValue(date) - ); - expect(e.polygon.perPositionHeight.getValue(date)).toEqual( - constant.polygon.perPositionHeight.getValue(date) - ); - expect(e.polygon.closeTop.getValue(date)).toEqual( - constant.polygon.closeTop.getValue(date) - ); - expect(e.polygon.closeBottom.getValue(date)).toEqual( - constant.polygon.closeBottom.getValue(date) - ); - expect(e.polygon.shadows.getValue(date)).toEqual( - constant.polygon.shadows.getValue(date) - ); - expect(e.polygon.distanceDisplayCondition.getValue(date)).toEqual( - constant.polygon.distanceDisplayCondition.getValue(date) - ); - expect(e.polygon.classificationType.getValue(date)).toEqual( - constant.polygon.classificationType.getValue(date) - ); - expect(e.polygon.zIndex.getValue(date)).toEqual( - constant.polygon.zIndex.getValue(date) - ); - expect(e.polyline.show.getValue(date)).toEqual( - constant.polyline.show.getValue(date) - ); - expect(e.polyline.positions.getValue(date)).toEqual([ - dataSource.entities - .getById("ConstantPosition1") - .position.getValue(date), - dataSource.entities - .getById("ConstantPosition2") - .position.getValue(date), - ]); - expect(e.polyline.arcType.getValue(date)).toEqual( - constant.polyline.arcType.getValue(date) - ); - expect(e.polyline.width.getValue(date)).toEqual( - constant.polyline.width.getValue(date) - ); - expect(e.polyline.granularity.getValue(date)).toEqual( - constant.polyline.granularity.getValue(date) - ); - expect(e.polyline.material.color.getValue(date)).toEqual( - constant.polyline.material.color.getValue(date) - ); - expect(e.polyline.shadows.getValue(date)).toEqual( - constant.polyline.shadows.getValue(date) - ); - expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual( - constant.polyline.depthFailMaterial.color.getValue(date) - ); - expect(e.polyline.distanceDisplayCondition.getValue(date)).toEqual( - constant.polyline.distanceDisplayCondition.getValue(date) - ); - expect(e.polyline.clampToGround.getValue(date)).toEqual( - constant.polyline.clampToGround.getValue(date) - ); - expect(e.polyline.classificationType.getValue(date)).toEqual( - constant.polyline.classificationType.getValue(date) - ); - expect(e.polyline.zIndex.getValue(date)).toEqual( - constant.polyline.zIndex.getValue(date) - ); - expect(e.rectangle.show.getValue(date)).toEqual( - constant.rectangle.show.getValue(date) - ); - expect(e.rectangle.coordinates.getValue(date)).toEqual( - constant.rectangle.coordinates.getValue(date) - ); - expect(e.rectangle.height.getValue(date)).toEqual( - constant.rectangle.height.getValue(date) - ); - expect(e.rectangle.heightReference.getValue(date)).toEqual( - constant.rectangle.heightReference.getValue(date) - ); - expect(e.rectangle.extrudedHeight.getValue(date)).toEqual( - constant.rectangle.extrudedHeight.getValue(date) - ); - expect(e.rectangle.extrudedHeightReference.getValue(date)).toEqual( - constant.rectangle.extrudedHeightReference.getValue(date) - ); - expect(e.rectangle.rotation.getValue(date)).toEqual( - constant.rectangle.rotation.getValue(date) - ); - expect(e.rectangle.stRotation.getValue(date)).toEqual( - constant.rectangle.stRotation.getValue(date) - ); - expect(e.rectangle.granularity.getValue(date)).toEqual( - constant.rectangle.granularity.getValue(date) - ); - expect(e.rectangle.fill.getValue(date)).toEqual( - constant.rectangle.fill.getValue(date) - ); - expect(e.rectangle.material.color.getValue(date)).toEqual( - constant.rectangle.material.color.getValue(date) - ); - expect(e.rectangle.outline.getValue(date)).toEqual( - constant.rectangle.outline.getValue(date) - ); - expect(e.rectangle.outlineColor.getValue(date)).toEqual( - constant.rectangle.outlineColor.getValue(date) - ); - expect(e.rectangle.outlineWidth.getValue(date)).toEqual( - constant.rectangle.outlineWidth.getValue(date) - ); - expect(e.rectangle.shadows.getValue(date)).toEqual( - constant.rectangle.shadows.getValue(date) - ); - expect(e.rectangle.distanceDisplayCondition.getValue(date)).toEqual( - constant.rectangle.distanceDisplayCondition.getValue(date) - ); - expect(e.rectangle.classificationType.getValue(date)).toEqual( - constant.rectangle.classificationType.getValue(date) - ); - expect(e.rectangle.zIndex.getValue(date)).toEqual( - constant.rectangle.zIndex.getValue(date) - ); - expect(e.tileset.show.getValue(date)).toEqual( - constant.tileset.show.getValue(date) - ); - expect(e.tileset.uri.getValue(date)).toEqual( - constant.tileset.uri.getValue(date) - ); - expect(e.tileset.maximumScreenSpaceError.getValue(date)).toEqual( - constant.tileset.maximumScreenSpaceError.getValue(date) - ); - expect(e.wall.show.getValue(date)).toEqual( - constant.wall.show.getValue(date) - ); - expect(e.wall.positions.getValue(date)).toEqual([ - dataSource.entities - .getById("ConstantPosition1") - .position.getValue(date), - dataSource.entities - .getById("ConstantPosition2") - .position.getValue(date), - ]); - expect(e.wall.minimumHeights.getValue(date)).toEqual([ - dataSource.entities - .getById("ConstantDouble1") - .billboard.scale.getValue(date), - dataSource.entities - .getById("ConstantDouble2") - .billboard.scale.getValue(date), - ]); - expect(e.wall.maximumHeights.getValue(date)).toEqual([ - dataSource.entities - .getById("ConstantDouble1") - .billboard.scale.getValue(date), - dataSource.entities - .getById("ConstantDouble2") - .billboard.scale.getValue(date), - ]); - expect(e.wall.granularity.getValue(date)).toEqual( - constant.wall.granularity.getValue(date) - ); - expect(e.wall.fill.getValue(date)).toEqual( - constant.wall.fill.getValue(date) - ); - expect(e.wall.material.color.getValue(date)).toEqual( - constant.wall.material.color.getValue(date) - ); - expect(e.wall.outline.getValue(date)).toEqual( - constant.wall.outline.getValue(date) - ); - expect(e.wall.outlineColor.getValue(date)).toEqual( - constant.wall.outlineColor.getValue(date) - ); - expect(e.wall.outlineWidth.getValue(date)).toEqual( - constant.wall.outlineWidth.getValue(date) - ); - expect(e.wall.shadows.getValue(date)).toEqual( - constant.wall.shadows.getValue(date) - ); - expect(e.wall.distanceDisplayCondition.getValue(date)).toEqual( - constant.wall.distanceDisplayCondition.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_box_material_image")) - ).toBeDefined(); - expect(e.box.material.image.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_image") - .box.material.image.getValue(date) - ); - expect(e.box.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_image") - .box.material.repeat.getValue(date) - ); - expect(e.box.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_image") - .box.material.color.getValue(date) - ); - expect(e.box.material.transparent.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_image") - .box.material.transparent.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_box_material_grid")) - ).toBeDefined(); - expect(e.box.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_grid") - .box.material.color.getValue(date) - ); - expect(e.box.material.cellAlpha.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_grid") - .box.material.cellAlpha.getValue(date) - ); - expect(e.box.material.lineCount.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_grid") - .box.material.lineCount.getValue(date) - ); - expect(e.box.material.lineThickness.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_grid") - .box.material.lineThickness.getValue(date) - ); - expect(e.box.material.lineOffset.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_grid") - .box.material.lineOffset.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_box_material_stripe")) - ).toBeDefined(); - expect(e.box.material.orientation.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_stripe") - .box.material.orientation.getValue(date) - ); - expect(e.box.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_stripe") - .box.material.evenColor.getValue(date) - ); - expect(e.box.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_stripe") - .box.material.oddColor.getValue(date) - ); - expect(e.box.material.offset.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_stripe") - .box.material.offset.getValue(date) - ); - expect(e.box.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_stripe") - .box.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_box_material_checkerboard" - )) - ).toBeDefined(); - expect(e.box.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_checkerboard") - .box.material.evenColor.getValue(date) - ); - expect(e.box.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_checkerboard") - .box.material.oddColor.getValue(date) - ); - expect(e.box.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_box_material_checkerboard") - .box.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_corridor_material_image")) - ).toBeDefined(); - expect(e.corridor.material.image.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_image") - .corridor.material.image.getValue(date) - ); - expect(e.corridor.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_image") - .corridor.material.repeat.getValue(date) - ); - expect(e.corridor.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_image") - .corridor.material.color.getValue(date) - ); - expect(e.corridor.material.transparent.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_image") - .corridor.material.transparent.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_corridor_material_grid")) - ).toBeDefined(); - expect(e.corridor.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_grid") - .corridor.material.color.getValue(date) - ); - expect(e.corridor.material.cellAlpha.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_grid") - .corridor.material.cellAlpha.getValue(date) - ); - expect(e.corridor.material.lineCount.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_grid") - .corridor.material.lineCount.getValue(date) - ); - expect(e.corridor.material.lineThickness.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_grid") - .corridor.material.lineThickness.getValue(date) - ); - expect(e.corridor.material.lineOffset.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_grid") - .corridor.material.lineOffset.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_corridor_material_stripe" - )) - ).toBeDefined(); - expect(e.corridor.material.orientation.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_stripe") - .corridor.material.orientation.getValue(date) - ); - expect(e.corridor.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_stripe") - .corridor.material.evenColor.getValue(date) - ); - expect(e.corridor.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_stripe") - .corridor.material.oddColor.getValue(date) - ); - expect(e.corridor.material.offset.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_stripe") - .corridor.material.offset.getValue(date) - ); - expect(e.corridor.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_stripe") - .corridor.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_corridor_material_checkerboard" - )) - ).toBeDefined(); - expect(e.corridor.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_checkerboard") - .corridor.material.evenColor.getValue(date) - ); - expect(e.corridor.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_checkerboard") - .corridor.material.oddColor.getValue(date) - ); - expect(e.corridor.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_corridor_material_checkerboard") - .corridor.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_cylinder_material_image")) - ).toBeDefined(); - expect(e.cylinder.material.image.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_image") - .cylinder.material.image.getValue(date) - ); - expect(e.cylinder.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_image") - .cylinder.material.repeat.getValue(date) - ); - expect(e.cylinder.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_image") - .cylinder.material.color.getValue(date) - ); - expect(e.cylinder.material.transparent.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_image") - .cylinder.material.transparent.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_cylinder_material_grid")) - ).toBeDefined(); - expect(e.cylinder.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_grid") - .cylinder.material.color.getValue(date) - ); - expect(e.cylinder.material.cellAlpha.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_grid") - .cylinder.material.cellAlpha.getValue(date) - ); - expect(e.cylinder.material.lineCount.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_grid") - .cylinder.material.lineCount.getValue(date) - ); - expect(e.cylinder.material.lineThickness.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_grid") - .cylinder.material.lineThickness.getValue(date) - ); - expect(e.cylinder.material.lineOffset.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_grid") - .cylinder.material.lineOffset.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_cylinder_material_stripe" - )) - ).toBeDefined(); - expect(e.cylinder.material.orientation.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_stripe") - .cylinder.material.orientation.getValue(date) - ); - expect(e.cylinder.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_stripe") - .cylinder.material.evenColor.getValue(date) - ); - expect(e.cylinder.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_stripe") - .cylinder.material.oddColor.getValue(date) - ); - expect(e.cylinder.material.offset.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_stripe") - .cylinder.material.offset.getValue(date) - ); - expect(e.cylinder.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_stripe") - .cylinder.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_cylinder_material_checkerboard" - )) - ).toBeDefined(); - expect(e.cylinder.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_checkerboard") - .cylinder.material.evenColor.getValue(date) - ); - expect(e.cylinder.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_checkerboard") - .cylinder.material.oddColor.getValue(date) - ); - expect(e.cylinder.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_cylinder_material_checkerboard") - .cylinder.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_ellipse_material_image")) - ).toBeDefined(); - expect(e.ellipse.material.image.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_image") - .ellipse.material.image.getValue(date) - ); - expect(e.ellipse.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_image") - .ellipse.material.repeat.getValue(date) - ); - expect(e.ellipse.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_image") - .ellipse.material.color.getValue(date) - ); - expect(e.ellipse.material.transparent.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_image") - .ellipse.material.transparent.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_ellipse_material_grid")) - ).toBeDefined(); - expect(e.ellipse.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_grid") - .ellipse.material.color.getValue(date) - ); - expect(e.ellipse.material.cellAlpha.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_grid") - .ellipse.material.cellAlpha.getValue(date) - ); - expect(e.ellipse.material.lineCount.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_grid") - .ellipse.material.lineCount.getValue(date) - ); - expect(e.ellipse.material.lineThickness.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_grid") - .ellipse.material.lineThickness.getValue(date) - ); - expect(e.ellipse.material.lineOffset.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_grid") - .ellipse.material.lineOffset.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_ellipse_material_stripe")) - ).toBeDefined(); - expect(e.ellipse.material.orientation.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_stripe") - .ellipse.material.orientation.getValue(date) - ); - expect(e.ellipse.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_stripe") - .ellipse.material.evenColor.getValue(date) - ); - expect(e.ellipse.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_stripe") - .ellipse.material.oddColor.getValue(date) - ); - expect(e.ellipse.material.offset.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_stripe") - .ellipse.material.offset.getValue(date) - ); - expect(e.ellipse.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_stripe") - .ellipse.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_ellipse_material_checkerboard" - )) - ).toBeDefined(); - expect(e.ellipse.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_checkerboard") - .ellipse.material.evenColor.getValue(date) - ); - expect(e.ellipse.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_checkerboard") - .ellipse.material.oddColor.getValue(date) - ); - expect(e.ellipse.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipse_material_checkerboard") - .ellipse.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_ellipsoid_material_image" - )) - ).toBeDefined(); - expect(e.ellipsoid.material.image.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_image") - .ellipsoid.material.image.getValue(date) - ); - expect(e.ellipsoid.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_image") - .ellipsoid.material.repeat.getValue(date) - ); - expect(e.ellipsoid.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_image") - .ellipsoid.material.color.getValue(date) - ); - expect(e.ellipsoid.material.transparent.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_image") - .ellipsoid.material.transparent.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_ellipsoid_material_grid")) - ).toBeDefined(); - expect(e.ellipsoid.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_grid") - .ellipsoid.material.color.getValue(date) - ); - expect(e.ellipsoid.material.cellAlpha.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_grid") - .ellipsoid.material.cellAlpha.getValue(date) - ); - expect(e.ellipsoid.material.lineCount.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_grid") - .ellipsoid.material.lineCount.getValue(date) - ); - expect(e.ellipsoid.material.lineThickness.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_grid") - .ellipsoid.material.lineThickness.getValue(date) - ); - expect(e.ellipsoid.material.lineOffset.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_grid") - .ellipsoid.material.lineOffset.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_ellipsoid_material_stripe" - )) - ).toBeDefined(); - expect(e.ellipsoid.material.orientation.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_stripe") - .ellipsoid.material.orientation.getValue(date) - ); - expect(e.ellipsoid.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_stripe") - .ellipsoid.material.evenColor.getValue(date) - ); - expect(e.ellipsoid.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_stripe") - .ellipsoid.material.oddColor.getValue(date) - ); - expect(e.ellipsoid.material.offset.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_stripe") - .ellipsoid.material.offset.getValue(date) - ); - expect(e.ellipsoid.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_stripe") - .ellipsoid.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_ellipsoid_material_checkerboard" - )) - ).toBeDefined(); - expect(e.ellipsoid.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_checkerboard") - .ellipsoid.material.evenColor.getValue(date) - ); - expect(e.ellipsoid.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_checkerboard") - .ellipsoid.material.oddColor.getValue(date) - ); - expect(e.ellipsoid.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_ellipsoid_material_checkerboard") - .ellipsoid.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_path_material_polylineOutline" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_polylineOutline") - .path.material.color.getValue(date) - ); - expect(e.path.material.outlineColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_polylineOutline") - .path.material.outlineColor.getValue(date) - ); - expect(e.path.material.outlineWidth.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_polylineOutline") - .path.material.outlineWidth.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_path_material_polylineArrow" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_polylineArrow") - .path.material.color.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_path_material_polylineDash" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_polylineDash") - .path.material.color.getValue(date) - ); - expect(e.path.material.gapColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_polylineDash") - .path.material.gapColor.getValue(date) - ); - expect(e.path.material.dashLength.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_polylineDash") - .path.material.dashLength.getValue(date) - ); - expect(e.path.material.dashPattern.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_polylineDash") - .path.material.dashPattern.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_path_material_polylineGlow" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_polylineGlow") - .path.material.color.getValue(date) - ); - expect(e.path.material.glowPower.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_polylineGlow") - .path.material.glowPower.getValue(date) - ); - expect(e.path.material.taperPower.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_polylineGlow") - .path.material.taperPower.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_path_material_image")) - ).toBeDefined(); - expect(e.path.material.image.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_image") - .path.material.image.getValue(date) - ); - expect(e.path.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_image") - .path.material.repeat.getValue(date) - ); - expect(e.path.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_image") - .path.material.color.getValue(date) - ); - expect(e.path.material.transparent.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_image") - .path.material.transparent.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_path_material_grid")) - ).toBeDefined(); - expect(e.path.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_grid") - .path.material.color.getValue(date) - ); - expect(e.path.material.cellAlpha.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_grid") - .path.material.cellAlpha.getValue(date) - ); - expect(e.path.material.lineCount.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_grid") - .path.material.lineCount.getValue(date) - ); - expect(e.path.material.lineThickness.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_grid") - .path.material.lineThickness.getValue(date) - ); - expect(e.path.material.lineOffset.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_grid") - .path.material.lineOffset.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_path_material_stripe")) - ).toBeDefined(); - expect(e.path.material.orientation.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_stripe") - .path.material.orientation.getValue(date) - ); - expect(e.path.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_stripe") - .path.material.evenColor.getValue(date) - ); - expect(e.path.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_stripe") - .path.material.oddColor.getValue(date) - ); - expect(e.path.material.offset.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_stripe") - .path.material.offset.getValue(date) - ); - expect(e.path.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_stripe") - .path.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_path_material_checkerboard" - )) - ).toBeDefined(); - expect(e.path.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_checkerboard") - .path.material.evenColor.getValue(date) - ); - expect(e.path.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_checkerboard") - .path.material.oddColor.getValue(date) - ); - expect(e.path.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_path_material_checkerboard") - .path.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_polygon_material_image")) - ).toBeDefined(); - expect(e.polygon.material.image.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_image") - .polygon.material.image.getValue(date) - ); - expect(e.polygon.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_image") - .polygon.material.repeat.getValue(date) - ); - expect(e.polygon.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_image") - .polygon.material.color.getValue(date) - ); - expect(e.polygon.material.transparent.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_image") - .polygon.material.transparent.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_polygon_material_grid")) - ).toBeDefined(); - expect(e.polygon.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_grid") - .polygon.material.color.getValue(date) - ); - expect(e.polygon.material.cellAlpha.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_grid") - .polygon.material.cellAlpha.getValue(date) - ); - expect(e.polygon.material.lineCount.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_grid") - .polygon.material.lineCount.getValue(date) - ); - expect(e.polygon.material.lineThickness.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_grid") - .polygon.material.lineThickness.getValue(date) - ); - expect(e.polygon.material.lineOffset.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_grid") - .polygon.material.lineOffset.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_polygon_material_stripe")) - ).toBeDefined(); - expect(e.polygon.material.orientation.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_stripe") - .polygon.material.orientation.getValue(date) - ); - expect(e.polygon.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_stripe") - .polygon.material.evenColor.getValue(date) - ); - expect(e.polygon.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_stripe") - .polygon.material.oddColor.getValue(date) - ); - expect(e.polygon.material.offset.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_stripe") - .polygon.material.offset.getValue(date) - ); - expect(e.polygon.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_stripe") - .polygon.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_polygon_material_checkerboard" - )) - ).toBeDefined(); - expect(e.polygon.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_checkerboard") - .polygon.material.evenColor.getValue(date) - ); - expect(e.polygon.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_checkerboard") - .polygon.material.oddColor.getValue(date) - ); - expect(e.polygon.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_polygon_material_checkerboard") - .polygon.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_polyline_material_polylineOutline" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_polylineOutline") - .polyline.material.color.getValue(date) - ); - expect(e.polyline.material.outlineColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_polylineOutline") - .polyline.material.outlineColor.getValue(date) - ); - expect(e.polyline.material.outlineWidth.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_polylineOutline") - .polyline.material.outlineWidth.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_polyline_material_polylineArrow" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_polylineArrow") - .polyline.material.color.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_polyline_material_polylineDash" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_polylineDash") - .polyline.material.color.getValue(date) - ); - expect(e.polyline.material.gapColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_polylineDash") - .polyline.material.gapColor.getValue(date) - ); - expect(e.polyline.material.dashLength.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_polylineDash") - .polyline.material.dashLength.getValue(date) - ); - expect(e.polyline.material.dashPattern.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_polylineDash") - .polyline.material.dashPattern.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_polyline_material_polylineGlow" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_polylineGlow") - .polyline.material.color.getValue(date) - ); - expect(e.polyline.material.glowPower.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_polylineGlow") - .polyline.material.glowPower.getValue(date) - ); - expect(e.polyline.material.taperPower.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_polylineGlow") - .polyline.material.taperPower.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_polyline_material_image")) - ).toBeDefined(); - expect(e.polyline.material.image.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_image") - .polyline.material.image.getValue(date) - ); - expect(e.polyline.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_image") - .polyline.material.repeat.getValue(date) - ); - expect(e.polyline.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_image") - .polyline.material.color.getValue(date) - ); - expect(e.polyline.material.transparent.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_image") - .polyline.material.transparent.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_polyline_material_grid")) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_grid") - .polyline.material.color.getValue(date) - ); - expect(e.polyline.material.cellAlpha.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_grid") - .polyline.material.cellAlpha.getValue(date) - ); - expect(e.polyline.material.lineCount.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_grid") - .polyline.material.lineCount.getValue(date) - ); - expect(e.polyline.material.lineThickness.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_grid") - .polyline.material.lineThickness.getValue(date) - ); - expect(e.polyline.material.lineOffset.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_grid") - .polyline.material.lineOffset.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_polyline_material_stripe" - )) - ).toBeDefined(); - expect(e.polyline.material.orientation.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_stripe") - .polyline.material.orientation.getValue(date) - ); - expect(e.polyline.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_stripe") - .polyline.material.evenColor.getValue(date) - ); - expect(e.polyline.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_stripe") - .polyline.material.oddColor.getValue(date) - ); - expect(e.polyline.material.offset.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_stripe") - .polyline.material.offset.getValue(date) - ); - expect(e.polyline.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_stripe") - .polyline.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_polyline_material_checkerboard" - )) - ).toBeDefined(); - expect(e.polyline.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_checkerboard") - .polyline.material.evenColor.getValue(date) - ); - expect(e.polyline.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_checkerboard") - .polyline.material.oddColor.getValue(date) - ); - expect(e.polyline.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_material_checkerboard") - .polyline.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_polyline_depthFailMaterial_polylineOutline" - )) - ).toBeDefined(); - expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_polylineOutline") - .polyline.depthFailMaterial.color.getValue(date) - ); - expect( - e.polyline.depthFailMaterial.outlineColor.getValue(date) - ).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_polylineOutline") - .polyline.depthFailMaterial.outlineColor.getValue(date) - ); - expect( - e.polyline.depthFailMaterial.outlineWidth.getValue(date) - ).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_polylineOutline") - .polyline.depthFailMaterial.outlineWidth.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_polyline_depthFailMaterial_polylineArrow" - )) - ).toBeDefined(); - expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_polylineArrow") - .polyline.depthFailMaterial.color.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_polyline_depthFailMaterial_polylineDash" - )) - ).toBeDefined(); - expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_polylineDash") - .polyline.depthFailMaterial.color.getValue(date) - ); - expect(e.polyline.depthFailMaterial.gapColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_polylineDash") - .polyline.depthFailMaterial.gapColor.getValue(date) - ); - expect(e.polyline.depthFailMaterial.dashLength.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_polylineDash") - .polyline.depthFailMaterial.dashLength.getValue(date) - ); - expect(e.polyline.depthFailMaterial.dashPattern.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_polylineDash") - .polyline.depthFailMaterial.dashPattern.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_polyline_depthFailMaterial_polylineGlow" - )) - ).toBeDefined(); - expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_polylineGlow") - .polyline.depthFailMaterial.color.getValue(date) - ); - expect(e.polyline.depthFailMaterial.glowPower.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_polylineGlow") - .polyline.depthFailMaterial.glowPower.getValue(date) - ); - expect(e.polyline.depthFailMaterial.taperPower.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_polylineGlow") - .polyline.depthFailMaterial.taperPower.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_polyline_depthFailMaterial_image" - )) - ).toBeDefined(); - expect(e.polyline.depthFailMaterial.image.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_image") - .polyline.depthFailMaterial.image.getValue(date) - ); - expect(e.polyline.depthFailMaterial.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_image") - .polyline.depthFailMaterial.repeat.getValue(date) - ); - expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_image") - .polyline.depthFailMaterial.color.getValue(date) - ); - expect(e.polyline.depthFailMaterial.transparent.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_image") - .polyline.depthFailMaterial.transparent.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_polyline_depthFailMaterial_grid" - )) - ).toBeDefined(); - expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_grid") - .polyline.depthFailMaterial.color.getValue(date) - ); - expect(e.polyline.depthFailMaterial.cellAlpha.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_grid") - .polyline.depthFailMaterial.cellAlpha.getValue(date) - ); - expect(e.polyline.depthFailMaterial.lineCount.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_grid") - .polyline.depthFailMaterial.lineCount.getValue(date) - ); - expect( - e.polyline.depthFailMaterial.lineThickness.getValue(date) - ).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_grid") - .polyline.depthFailMaterial.lineThickness.getValue(date) - ); - expect(e.polyline.depthFailMaterial.lineOffset.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_grid") - .polyline.depthFailMaterial.lineOffset.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_polyline_depthFailMaterial_stripe" - )) - ).toBeDefined(); - expect(e.polyline.depthFailMaterial.orientation.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_stripe") - .polyline.depthFailMaterial.orientation.getValue(date) - ); - expect(e.polyline.depthFailMaterial.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_stripe") - .polyline.depthFailMaterial.evenColor.getValue(date) - ); - expect(e.polyline.depthFailMaterial.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_stripe") - .polyline.depthFailMaterial.oddColor.getValue(date) - ); - expect(e.polyline.depthFailMaterial.offset.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_stripe") - .polyline.depthFailMaterial.offset.getValue(date) - ); - expect(e.polyline.depthFailMaterial.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_stripe") - .polyline.depthFailMaterial.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_polyline_depthFailMaterial_checkerboard" - )) - ).toBeDefined(); - expect(e.polyline.depthFailMaterial.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_checkerboard") - .polyline.depthFailMaterial.evenColor.getValue(date) - ); - expect(e.polyline.depthFailMaterial.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_checkerboard") - .polyline.depthFailMaterial.oddColor.getValue(date) - ); - expect(e.polyline.depthFailMaterial.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_polyline_depthFailMaterial_checkerboard") - .polyline.depthFailMaterial.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_rectangle_material_image" - )) - ).toBeDefined(); - expect(e.rectangle.material.image.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_image") - .rectangle.material.image.getValue(date) - ); - expect(e.rectangle.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_image") - .rectangle.material.repeat.getValue(date) - ); - expect(e.rectangle.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_image") - .rectangle.material.color.getValue(date) - ); - expect(e.rectangle.material.transparent.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_image") - .rectangle.material.transparent.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_rectangle_material_grid")) - ).toBeDefined(); - expect(e.rectangle.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_grid") - .rectangle.material.color.getValue(date) - ); - expect(e.rectangle.material.cellAlpha.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_grid") - .rectangle.material.cellAlpha.getValue(date) - ); - expect(e.rectangle.material.lineCount.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_grid") - .rectangle.material.lineCount.getValue(date) - ); - expect(e.rectangle.material.lineThickness.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_grid") - .rectangle.material.lineThickness.getValue(date) - ); - expect(e.rectangle.material.lineOffset.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_grid") - .rectangle.material.lineOffset.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_rectangle_material_stripe" - )) - ).toBeDefined(); - expect(e.rectangle.material.orientation.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_stripe") - .rectangle.material.orientation.getValue(date) - ); - expect(e.rectangle.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_stripe") - .rectangle.material.evenColor.getValue(date) - ); - expect(e.rectangle.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_stripe") - .rectangle.material.oddColor.getValue(date) - ); - expect(e.rectangle.material.offset.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_stripe") - .rectangle.material.offset.getValue(date) - ); - expect(e.rectangle.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_stripe") - .rectangle.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_rectangle_material_checkerboard" - )) - ).toBeDefined(); - expect(e.rectangle.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_checkerboard") - .rectangle.material.evenColor.getValue(date) - ); - expect(e.rectangle.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_checkerboard") - .rectangle.material.oddColor.getValue(date) - ); - expect(e.rectangle.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_rectangle_material_checkerboard") - .rectangle.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_wall_material_image")) - ).toBeDefined(); - expect(e.wall.material.image.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_image") - .wall.material.image.getValue(date) - ); - expect(e.wall.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_image") - .wall.material.repeat.getValue(date) - ); - expect(e.wall.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_image") - .wall.material.color.getValue(date) - ); - expect(e.wall.material.transparent.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_image") - .wall.material.transparent.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_wall_material_grid")) - ).toBeDefined(); - expect(e.wall.material.color.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_grid") - .wall.material.color.getValue(date) - ); - expect(e.wall.material.cellAlpha.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_grid") - .wall.material.cellAlpha.getValue(date) - ); - expect(e.wall.material.lineCount.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_grid") - .wall.material.lineCount.getValue(date) - ); - expect(e.wall.material.lineThickness.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_grid") - .wall.material.lineThickness.getValue(date) - ); - expect(e.wall.material.lineOffset.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_grid") - .wall.material.lineOffset.getValue(date) - ); - expect( - (e = dataSource.entities.getById("reference_wall_material_stripe")) - ).toBeDefined(); - expect(e.wall.material.orientation.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_stripe") - .wall.material.orientation.getValue(date) - ); - expect(e.wall.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_stripe") - .wall.material.evenColor.getValue(date) - ); - expect(e.wall.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_stripe") - .wall.material.oddColor.getValue(date) - ); - expect(e.wall.material.offset.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_stripe") - .wall.material.offset.getValue(date) - ); - expect(e.wall.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_stripe") - .wall.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_wall_material_checkerboard" - )) - ).toBeDefined(); - expect(e.wall.material.evenColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_checkerboard") - .wall.material.evenColor.getValue(date) - ); - expect(e.wall.material.oddColor.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_checkerboard") - .wall.material.oddColor.getValue(date) - ); - expect(e.wall.material.repeat.getValue(date)).toEqual( - dataSource.entities - .getById("material_wall_material_checkerboard") - .wall.material.repeat.getValue(date) - ); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_lateralSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_lateralSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_lateralSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_lateralSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_ellipsoidSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_ellipsoidSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_ellipsoidSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_ellipsoidSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_ellipsoidHorizonSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_ellipsoidHorizonSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_ellipsoidHorizonSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_ellipsoidHorizonSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_domeSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_domeSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_domeSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_domeSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_environmentOcclusionMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_environmentOcclusionMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_environmentOcclusionMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_conicSensor_environmentOcclusionMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_lateralSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_lateralSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_lateralSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_lateralSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_ellipsoidSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_ellipsoidSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_ellipsoidSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_ellipsoidSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_ellipsoidHorizonSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_ellipsoidHorizonSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_ellipsoidHorizonSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_ellipsoidHorizonSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_domeSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_domeSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_domeSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_domeSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_environmentOcclusionMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_environmentOcclusionMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_environmentOcclusionMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_customPatternSensor_environmentOcclusionMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_lateralSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_lateralSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_lateralSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_lateralSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_ellipsoidSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_ellipsoidSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_ellipsoidSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_ellipsoidSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_ellipsoidHorizonSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_ellipsoidHorizonSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_ellipsoidHorizonSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_ellipsoidHorizonSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_domeSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_domeSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_domeSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_domeSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_environmentOcclusionMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_environmentOcclusionMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_environmentOcclusionMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_rectangularSensor_environmentOcclusionMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("reference_fan_material_image")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("reference_fan_material_grid")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("reference_fan_material_stripe")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "reference_fan_material_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("VelocityPosition")) - ).toBeDefined(); - expect(e.position.getValue(documentStartDate)).toEqual( - new Cartesian3(1, 2, 3) - ); - expect( - e.position.getValue( - JulianDate.addSeconds(documentStartDate, 60, new JulianDate()) - ) - ).toEqual(new Cartesian3(61, 122, 183)); - expect( - (e = dataSource.entities.getById( - "velocityReference_billboard_alignedAxis" - )) - ).toBeDefined(); - expect( - e.billboard.alignedAxis.getValue( - JulianDate.addSeconds(documentStartDate, 50, new JulianDate()) - ) - ).toEqualEpsilon( - new Cartesian3( - 0.267261241912424, - 0.534522483824849, - 0.801783725737273 - ), - 1e-13 - ); - expect((e = dataSource.entities.getById("Sampled"))).toBeDefined(); - expect(e.position.getValue(documentStartDate)).toEqual( - new Cartesian3(14893, 22330, 50775) - ); - expect(e.position.getValue(documentStopDate)).toEqual( - new Cartesian3(44952, 52911, 45006) - ); - expect(e.orientation.getValue(documentStartDate)).toEqualEpsilon( - new Quaternion( - 0.63382030572505, - 0.114406464045845, - 0.748788933003267, - 0.156518736408648 - ), - 1e-14 - ); - expect(e.orientation.getValue(documentStopDate)).toEqualEpsilon( - new Quaternion( - 0.670778929875422, - 0.608790403475694, - 0.320013828781515, - 0.277526613606122 - ), - 1e-14 - ); - expect(e.viewFrom.getValue(documentStartDate)).toEqual( - new Cartesian3(36965, 47504, 12985) - ); - expect(e.viewFrom.getValue(documentStopDate)).toEqual( - new Cartesian3(16155, 2367, 57353) - ); - expect(e.billboard.scale.getValue(documentStartDate)).toEqual(5763.0); - expect(e.billboard.scale.getValue(documentStopDate)).toEqual(31607.0); - expect(e.billboard.pixelOffset.getValue(documentStartDate)).toEqual( - new Cartesian2(2029, 62215) - ); - expect(e.billboard.pixelOffset.getValue(documentStopDate)).toEqual( - new Cartesian2(30658, 12919) - ); - expect(e.billboard.eyeOffset.getValue(documentStartDate)).toEqual( - new Cartesian3(3553, 23821, 42589) - ); - expect(e.billboard.eyeOffset.getValue(documentStopDate)).toEqual( - new Cartesian3(3059, 48139, 28860) - ); - expect(e.billboard.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(85, 19, 239, 63) - ); - expect(e.billboard.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(160, 189, 87, 99) - ); - expect(e.billboard.rotation.getValue(documentStartDate)).toEqual( - 4554.0 - ); - expect(e.billboard.rotation.getValue(documentStopDate)).toEqual( - 21210.0 - ); - expect( - e.billboard.alignedAxis.getValue(documentStartDate) - ).toEqualEpsilon( - new Cartesian3( - 0.971559394453729, - 0.230094854374832, - 0.0559347927405484 - ), - 1e-14 - ); - expect( - e.billboard.alignedAxis.getValue(documentStopDate) - ).toEqualEpsilon( - new Cartesian3( - 0.384810775516236, - 0.82287332508932, - 0.418091088045462 - ), - 1e-14 - ); - expect(e.billboard.width.getValue(documentStartDate)).toEqual(21333.0); - expect(e.billboard.width.getValue(documentStopDate)).toEqual(51893.0); - expect(e.billboard.height.getValue(documentStartDate)).toEqual(48314.0); - expect(e.billboard.height.getValue(documentStopDate)).toEqual(61118.0); - expect(e.billboard.scaleByDistance.getValue(documentStartDate)).toEqual( - new NearFarScalar(46842, 10678, 46377, 15029) - ); - expect(e.billboard.scaleByDistance.getValue(documentStopDate)).toEqual( - new NearFarScalar(20642, 43600, 7082, 11291) - ); - expect( - e.billboard.translucencyByDistance.getValue(documentStartDate) - ).toEqual(new NearFarScalar(64366, 52219, 8139, 10015)); - expect( - e.billboard.translucencyByDistance.getValue(documentStopDate) - ).toEqual(new NearFarScalar(10918, 18986, 49738, 60610)); - expect( - e.billboard.pixelOffsetScaleByDistance.getValue(documentStartDate) - ).toEqual(new NearFarScalar(54503, 26068, 41061, 59552)); - expect( - e.billboard.pixelOffsetScaleByDistance.getValue(documentStopDate) - ).toEqual(new NearFarScalar(37417, 4754, 19986, 15182)); - expect(e.billboard.imageSubRegion.getValue(documentStartDate)).toEqual( - new BoundingRectangle(26590, 12135, 16431, 56640) - ); - expect(e.billboard.imageSubRegion.getValue(documentStopDate)).toEqual( - new BoundingRectangle(43063, 42664, 60326, 52715) - ); - expect( - e.billboard.distanceDisplayCondition.getValue(documentStartDate) - ).toEqual(new DistanceDisplayCondition(952, 47317)); - expect( - e.billboard.distanceDisplayCondition.getValue(documentStopDate) - ).toEqual(new DistanceDisplayCondition(16896, 28226)); - expect( - e.billboard.disableDepthTestDistance.getValue(documentStartDate) - ).toEqual(18661.0); - expect( - e.billboard.disableDepthTestDistance.getValue(documentStopDate) - ).toEqual(61609.0); - expect(e.box.dimensions.getValue(documentStartDate)).toEqual( - new Cartesian3(37525, 42898, 18087) - ); - expect(e.box.dimensions.getValue(documentStopDate)).toEqual( - new Cartesian3(49399, 59584, 63976) - ); - expect(e.box.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(172, 28, 222, 165) - ); - expect(e.box.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(16, 192, 121, 150) - ); - expect(e.box.outlineColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(53, 66, 217, 237) - ); - expect(e.box.outlineColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(163, 75, 228, 48) - ); - expect(e.box.outlineWidth.getValue(documentStartDate)).toEqual(45211.0); - expect(e.box.outlineWidth.getValue(documentStopDate)).toEqual(20490.0); - expect( - e.box.distanceDisplayCondition.getValue(documentStartDate) - ).toEqual(new DistanceDisplayCondition(8940, 60664)); - expect( - e.box.distanceDisplayCondition.getValue(documentStopDate) - ).toEqual(new DistanceDisplayCondition(41202, 60832)); - expect(e.corridor.width.getValue(documentStartDate)).toEqual(62443.0); - expect(e.corridor.width.getValue(documentStopDate)).toEqual(13988.0); - expect(e.corridor.height.getValue(documentStartDate)).toEqual(20585.0); - expect(e.corridor.height.getValue(documentStopDate)).toEqual(63872.0); - expect(e.corridor.extrudedHeight.getValue(documentStartDate)).toEqual( - 63407.0 - ); - expect(e.corridor.extrudedHeight.getValue(documentStopDate)).toEqual( - 42397.0 - ); - expect(e.corridor.granularity.getValue(documentStartDate)).toEqual( - 43027.0 - ); - expect(e.corridor.granularity.getValue(documentStopDate)).toEqual( - 55912.0 - ); - expect(e.corridor.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(35, 213, 31, 79) - ); - expect(e.corridor.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(87, 126, 23, 40) - ); - expect(e.corridor.outlineColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(137, 114, 57, 34) - ); - expect(e.corridor.outlineColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(93, 178, 74, 64) - ); - expect(e.corridor.outlineWidth.getValue(documentStartDate)).toEqual( - 14678.0 - ); - expect(e.corridor.outlineWidth.getValue(documentStopDate)).toEqual( - 57820.0 - ); - expect( - e.corridor.distanceDisplayCondition.getValue(documentStartDate) - ).toEqual(new DistanceDisplayCondition(10884, 63530)); - expect( - e.corridor.distanceDisplayCondition.getValue(documentStopDate) - ).toEqual(new DistanceDisplayCondition(20076, 27683)); - expect(e.corridor.zIndex.getValue(documentStartDate)).toEqual(36068); - expect(e.corridor.zIndex.getValue(documentStopDate)).toEqual(60697); - expect(e.cylinder.length.getValue(documentStartDate)).toEqual(30241.0); - expect(e.cylinder.length.getValue(documentStopDate)).toEqual(48364.0); - expect(e.cylinder.topRadius.getValue(documentStartDate)).toEqual( - 62881.0 - ); - expect(e.cylinder.topRadius.getValue(documentStopDate)).toEqual( - 16270.0 - ); - expect(e.cylinder.bottomRadius.getValue(documentStartDate)).toEqual( - 61925.0 - ); - expect(e.cylinder.bottomRadius.getValue(documentStopDate)).toEqual( - 21514.0 - ); - expect(e.cylinder.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(133, 36, 52, 121) - ); - expect(e.cylinder.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(7, 13, 34, 201) - ); - expect(e.cylinder.outlineColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(112, 241, 40, 103) - ); - expect(e.cylinder.outlineColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(237, 75, 59, 51) - ); - expect(e.cylinder.outlineWidth.getValue(documentStartDate)).toEqual( - 36483.0 - ); - expect(e.cylinder.outlineWidth.getValue(documentStopDate)).toEqual( - 32586.0 - ); - expect( - e.cylinder.numberOfVerticalLines.getValue(documentStartDate) - ).toEqual(45816); - expect( - e.cylinder.numberOfVerticalLines.getValue(documentStopDate) - ).toEqual(42247); - expect(e.cylinder.slices.getValue(documentStartDate)).toEqual(46140); - expect(e.cylinder.slices.getValue(documentStopDate)).toEqual(53530); - expect( - e.cylinder.distanceDisplayCondition.getValue(documentStartDate) - ).toEqual(new DistanceDisplayCondition(2783, 57220)); - expect( - e.cylinder.distanceDisplayCondition.getValue(documentStopDate) - ).toEqual(new DistanceDisplayCondition(13855, 50230)); - expect(e.ellipse.semiMajorAxis.getValue(documentStartDate)).toEqual( - 13136.0 - ); - expect(e.ellipse.semiMajorAxis.getValue(documentStopDate)).toEqual( - 55507.0 - ); - expect(e.ellipse.semiMinorAxis.getValue(documentStartDate)).toEqual( - 41580.0 - ); - expect(e.ellipse.semiMinorAxis.getValue(documentStopDate)).toEqual( - 60905.0 - ); - expect(e.ellipse.height.getValue(documentStartDate)).toEqual(5567.0); - expect(e.ellipse.height.getValue(documentStopDate)).toEqual(45588.0); - expect(e.ellipse.extrudedHeight.getValue(documentStartDate)).toEqual( - 16542.0 - ); - expect(e.ellipse.extrudedHeight.getValue(documentStopDate)).toEqual( - 13545.0 - ); - expect(e.ellipse.rotation.getValue(documentStartDate)).toEqual(5797.0); - expect(e.ellipse.rotation.getValue(documentStopDate)).toEqual(24542.0); - expect(e.ellipse.stRotation.getValue(documentStartDate)).toEqual( - 20596.0 - ); - expect(e.ellipse.stRotation.getValue(documentStopDate)).toEqual( - 58204.0 - ); - expect(e.ellipse.granularity.getValue(documentStartDate)).toEqual( - 2228.0 - ); - expect(e.ellipse.granularity.getValue(documentStopDate)).toEqual( - 43731.0 - ); - expect(e.ellipse.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(174, 250, 78, 96) - ); - expect(e.ellipse.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(63, 102, 221, 174) - ); - expect(e.ellipse.outlineColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(243, 123, 194, 31) - ); - expect(e.ellipse.outlineColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(236, 100, 22, 203) - ); - expect(e.ellipse.outlineWidth.getValue(documentStartDate)).toEqual( - 60636.0 - ); - expect(e.ellipse.outlineWidth.getValue(documentStopDate)).toEqual( - 24194.0 - ); - expect( - e.ellipse.numberOfVerticalLines.getValue(documentStartDate) - ).toEqual(52822); - expect( - e.ellipse.numberOfVerticalLines.getValue(documentStopDate) - ).toEqual(45768); - expect( - e.ellipse.distanceDisplayCondition.getValue(documentStartDate) - ).toEqual(new DistanceDisplayCondition(38393, 63947)); - expect( - e.ellipse.distanceDisplayCondition.getValue(documentStopDate) - ).toEqual(new DistanceDisplayCondition(29119, 43121)); - expect(e.ellipse.zIndex.getValue(documentStartDate)).toEqual(8989); - expect(e.ellipse.zIndex.getValue(documentStopDate)).toEqual(52730); - expect(e.ellipsoid.radii.getValue(documentStartDate)).toEqual( - new Cartesian3(5183, 10004, 13863) - ); - expect(e.ellipsoid.radii.getValue(documentStopDate)).toEqual( - new Cartesian3(39497, 12186, 45103) - ); - expect(e.ellipsoid.innerRadii.getValue(documentStartDate)).toEqual( - new Cartesian3(40318, 27037, 59497) - ); - expect(e.ellipsoid.innerRadii.getValue(documentStopDate)).toEqual( - new Cartesian3(57650, 53729, 12241) - ); - expect(e.ellipsoid.minimumClock.getValue(documentStartDate)).toEqual( - 13484.0 - ); - expect(e.ellipsoid.minimumClock.getValue(documentStopDate)).toEqual( - 2170.0 - ); - expect(e.ellipsoid.maximumClock.getValue(documentStartDate)).toEqual( - 10874.0 - ); - expect(e.ellipsoid.maximumClock.getValue(documentStopDate)).toEqual( - 2968.0 - ); - expect(e.ellipsoid.minimumCone.getValue(documentStartDate)).toEqual( - 54230.0 - ); - expect(e.ellipsoid.minimumCone.getValue(documentStopDate)).toEqual( - 59454.0 - ); - expect(e.ellipsoid.maximumCone.getValue(documentStartDate)).toEqual( - 49077.0 - ); - expect(e.ellipsoid.maximumCone.getValue(documentStopDate)).toEqual( - 26303.0 - ); - expect(e.ellipsoid.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(137, 128, 194, 84) - ); - expect(e.ellipsoid.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(50, 122, 190, 247) - ); - expect(e.ellipsoid.outlineColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(247, 210, 180, 171) - ); - expect(e.ellipsoid.outlineColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(239, 35, 237, 247) - ); - expect(e.ellipsoid.outlineWidth.getValue(documentStartDate)).toEqual( - 10713.0 - ); - expect(e.ellipsoid.outlineWidth.getValue(documentStopDate)).toEqual( - 10444.0 - ); - expect(e.ellipsoid.stackPartitions.getValue(documentStartDate)).toEqual( - 5841 - ); - expect(e.ellipsoid.stackPartitions.getValue(documentStopDate)).toEqual( - 39170 - ); - expect(e.ellipsoid.slicePartitions.getValue(documentStartDate)).toEqual( - 50327 - ); - expect(e.ellipsoid.slicePartitions.getValue(documentStopDate)).toEqual( - 4672 - ); - expect(e.ellipsoid.subdivisions.getValue(documentStartDate)).toEqual( - 10225 - ); - expect(e.ellipsoid.subdivisions.getValue(documentStopDate)).toEqual( - 53957 - ); - expect( - e.ellipsoid.distanceDisplayCondition.getValue(documentStartDate) - ).toEqual(new DistanceDisplayCondition(11751, 59227)); - expect( - e.ellipsoid.distanceDisplayCondition.getValue(documentStopDate) - ).toEqual(new DistanceDisplayCondition(4769, 41441)); - expect(e.label.scale.getValue(documentStartDate)).toEqual(40153.0); - expect(e.label.scale.getValue(documentStopDate)).toEqual(42123.0); - expect(e.label.backgroundColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(30, 92, 161, 169) - ); - expect(e.label.backgroundColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(85, 52, 166, 62) - ); - expect(e.label.backgroundPadding.getValue(documentStartDate)).toEqual( - new Cartesian2(32945, 5504) - ); - expect(e.label.backgroundPadding.getValue(documentStopDate)).toEqual( - new Cartesian2(35323, 6281) - ); - expect(e.label.pixelOffset.getValue(documentStartDate)).toEqual( - new Cartesian2(8539, 9761) - ); - expect(e.label.pixelOffset.getValue(documentStopDate)).toEqual( - new Cartesian2(10537, 54569) - ); - expect(e.label.eyeOffset.getValue(documentStartDate)).toEqual( - new Cartesian3(5984, 34327, 59014) - ); - expect(e.label.eyeOffset.getValue(documentStopDate)).toEqual( - new Cartesian3(1931, 5127, 18964) - ); - expect(e.label.fillColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(17, 212, 62, 58) - ); - expect(e.label.fillColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(214, 69, 90, 116) - ); - expect(e.label.outlineColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(205, 14, 169, 70) - ); - expect(e.label.outlineColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(143, 73, 168, 17) - ); - expect(e.label.outlineWidth.getValue(documentStartDate)).toEqual( - 53305.0 - ); - expect(e.label.outlineWidth.getValue(documentStopDate)).toEqual( - 43838.0 - ); - expect( - e.label.translucencyByDistance.getValue(documentStartDate) - ).toEqual(new NearFarScalar(25055, 32865, 32128, 29309)); - expect( - e.label.translucencyByDistance.getValue(documentStopDate) - ).toEqual(new NearFarScalar(58875, 9189, 20515, 15696)); - expect( - e.label.pixelOffsetScaleByDistance.getValue(documentStartDate) - ).toEqual(new NearFarScalar(45296, 62896, 38133, 40084)); - expect( - e.label.pixelOffsetScaleByDistance.getValue(documentStopDate) - ).toEqual(new NearFarScalar(28657, 25711, 9316, 62756)); - expect(e.label.scaleByDistance.getValue(documentStartDate)).toEqual( - new NearFarScalar(22356, 26711, 58216, 52963) - ); - expect(e.label.scaleByDistance.getValue(documentStopDate)).toEqual( - new NearFarScalar(26464, 26471, 23143, 37466) - ); - expect( - e.label.distanceDisplayCondition.getValue(documentStartDate) - ).toEqual(new DistanceDisplayCondition(2314, 2614)); - expect( - e.label.distanceDisplayCondition.getValue(documentStopDate) - ).toEqual(new DistanceDisplayCondition(23998, 48733)); - expect( - e.label.disableDepthTestDistance.getValue(documentStartDate) - ).toEqual(250.0); - expect( - e.label.disableDepthTestDistance.getValue(documentStopDate) - ).toEqual(40425.0); - expect(e.model.scale.getValue(documentStartDate)).toEqual(63647.0); - expect(e.model.scale.getValue(documentStopDate)).toEqual(53878.0); - expect(e.model.minimumPixelSize.getValue(documentStartDate)).toEqual( - 16357.0 - ); - expect(e.model.minimumPixelSize.getValue(documentStopDate)).toEqual( - 40522.0 - ); - expect(e.model.maximumScale.getValue(documentStartDate)).toEqual( - 8290.0 - ); - expect(e.model.maximumScale.getValue(documentStopDate)).toEqual( - 25558.0 - ); - expect(e.model.silhouetteColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(33, 239, 70, 81) - ); - expect(e.model.silhouetteColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(60, 48, 26, 123) - ); - expect(e.model.silhouetteSize.getValue(documentStartDate)).toEqual( - 65103.0 - ); - expect(e.model.silhouetteSize.getValue(documentStopDate)).toEqual( - 29065.0 - ); - expect(e.model.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(74, 69, 164, 116) - ); - expect(e.model.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(127, 30, 46, 170) - ); - expect(e.model.colorBlendAmount.getValue(documentStartDate)).toEqual( - 64130.0 - ); - expect(e.model.colorBlendAmount.getValue(documentStopDate)).toEqual( - 21967.0 - ); - expect( - e.model.distanceDisplayCondition.getValue(documentStartDate) - ).toEqual(new DistanceDisplayCondition(33246, 36993)); - expect( - e.model.distanceDisplayCondition.getValue(documentStopDate) - ).toEqual(new DistanceDisplayCondition(5814, 10006)); - expect(e.path.leadTime.getValue(documentStartDate)).toEqual(40222.0); - expect(e.path.leadTime.getValue(documentStopDate)).toEqual(33294.0); - expect(e.path.trailTime.getValue(documentStartDate)).toEqual(34052.0); - expect(e.path.trailTime.getValue(documentStopDate)).toEqual(57713.0); - expect(e.path.width.getValue(documentStartDate)).toEqual(32449.0); - expect(e.path.width.getValue(documentStopDate)).toEqual(33819.0); - expect(e.path.resolution.getValue(documentStartDate)).toEqual(8399.0); - expect(e.path.resolution.getValue(documentStopDate)).toEqual(19400.0); - expect(e.path.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(97, 239, 22, 105) - ); - expect(e.path.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(242, 157, 215, 125) - ); - expect( - e.path.distanceDisplayCondition.getValue(documentStartDate) - ).toEqual(new DistanceDisplayCondition(42994, 62047)); - expect( - e.path.distanceDisplayCondition.getValue(documentStopDate) - ).toEqual(new DistanceDisplayCondition(52406, 59340)); - expect(e.point.pixelSize.getValue(documentStartDate)).toEqual(39714.0); - expect(e.point.pixelSize.getValue(documentStopDate)).toEqual(3313.0); - expect(e.point.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(137, 151, 128, 95) - ); - expect(e.point.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(99, 157, 124, 108) - ); - expect(e.point.outlineColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(225, 246, 102, 195) - ); - expect(e.point.outlineColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(248, 38, 75, 222) - ); - expect(e.point.outlineWidth.getValue(documentStartDate)).toEqual( - 48323.0 - ); - expect(e.point.outlineWidth.getValue(documentStopDate)).toEqual( - 50914.0 - ); - expect(e.point.scaleByDistance.getValue(documentStartDate)).toEqual( - new NearFarScalar(39727, 50843, 56262, 15579) - ); - expect(e.point.scaleByDistance.getValue(documentStopDate)).toEqual( - new NearFarScalar(60522, 63980, 30201, 25205) - ); - expect( - e.point.translucencyByDistance.getValue(documentStartDate) - ).toEqual(new NearFarScalar(61190, 16879, 16449, 10048)); - expect( - e.point.translucencyByDistance.getValue(documentStopDate) - ).toEqual(new NearFarScalar(46491, 47541, 35769, 13707)); - expect( - e.point.distanceDisplayCondition.getValue(documentStartDate) - ).toEqual(new DistanceDisplayCondition(7642, 55841)); - expect( - e.point.distanceDisplayCondition.getValue(documentStopDate) - ).toEqual(new DistanceDisplayCondition(24270, 29534)); - expect( - e.point.disableDepthTestDistance.getValue(documentStartDate) - ).toEqual(30881.0); - expect( - e.point.disableDepthTestDistance.getValue(documentStopDate) - ).toEqual(6667.0); - expect(e.polygon.height.getValue(documentStartDate)).toEqual(64265.0); - expect(e.polygon.height.getValue(documentStopDate)).toEqual(19257.0); - expect(e.polygon.extrudedHeight.getValue(documentStartDate)).toEqual( - 12315.0 - ); - expect(e.polygon.extrudedHeight.getValue(documentStopDate)).toEqual( - 4797.0 - ); - expect(e.polygon.stRotation.getValue(documentStartDate)).toEqual( - 24959.0 - ); - expect(e.polygon.stRotation.getValue(documentStopDate)).toEqual( - 32341.0 - ); - expect(e.polygon.granularity.getValue(documentStartDate)).toEqual( - 51922.0 - ); - expect(e.polygon.granularity.getValue(documentStopDate)).toEqual( - 9185.0 - ); - expect(e.polygon.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(19, 40, 12, 31) - ); - expect(e.polygon.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(179, 204, 8, 194) - ); - expect(e.polygon.outlineColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(187, 223, 120, 26) - ); - expect(e.polygon.outlineColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(20, 135, 105, 81) - ); - expect(e.polygon.outlineWidth.getValue(documentStartDate)).toEqual( - 48428.0 - ); - expect(e.polygon.outlineWidth.getValue(documentStopDate)).toEqual( - 41508.0 - ); - expect( - e.polygon.distanceDisplayCondition.getValue(documentStartDate) - ).toEqual(new DistanceDisplayCondition(22140, 31962)); - expect( - e.polygon.distanceDisplayCondition.getValue(documentStopDate) - ).toEqual(new DistanceDisplayCondition(3927, 22422)); - expect(e.polygon.zIndex.getValue(documentStartDate)).toEqual(37357); - expect(e.polygon.zIndex.getValue(documentStopDate)).toEqual(64769); - expect(e.polyline.width.getValue(documentStartDate)).toEqual(60367.0); - expect(e.polyline.width.getValue(documentStopDate)).toEqual(31077.0); - expect(e.polyline.granularity.getValue(documentStartDate)).toEqual( - 62537.0 - ); - expect(e.polyline.granularity.getValue(documentStopDate)).toEqual( - 14676.0 - ); - expect(e.polyline.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(90, 30, 195, 220) - ); - expect(e.polyline.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(39, 17, 221, 74) - ); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStartDate) - ).toEqual(Color.fromBytes(217, 122, 10, 152)); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStopDate) - ).toEqual(Color.fromBytes(76, 105, 5, 67)); - expect( - e.polyline.distanceDisplayCondition.getValue(documentStartDate) - ).toEqual(new DistanceDisplayCondition(4857, 10258)); - expect( - e.polyline.distanceDisplayCondition.getValue(documentStopDate) - ).toEqual(new DistanceDisplayCondition(36588, 47246)); - expect(e.polyline.zIndex.getValue(documentStartDate)).toEqual(55130); - expect(e.polyline.zIndex.getValue(documentStopDate)).toEqual(15491); - expect(e.rectangle.coordinates.getValue(documentStartDate)).toEqual( - new Rectangle( - 0.392205830501108, - 1.04907471338688, - 0.00211010473645246, - 0.064281089310235 - ) - ); - expect(e.rectangle.coordinates.getValue(documentStopDate)).toEqual( - new Rectangle( - 0.523469985903937, - 0.229690388867811, - 0.399550037703662, - 0.48478405941078 - ) - ); - expect(e.rectangle.height.getValue(documentStartDate)).toEqual(56388.0); - expect(e.rectangle.height.getValue(documentStopDate)).toEqual(59991.0); - expect(e.rectangle.extrudedHeight.getValue(documentStartDate)).toEqual( - 39796.0 - ); - expect(e.rectangle.extrudedHeight.getValue(documentStopDate)).toEqual( - 33335.0 - ); - expect(e.rectangle.rotation.getValue(documentStartDate)).toEqual( - 26921.0 - ); - expect(e.rectangle.rotation.getValue(documentStopDate)).toEqual( - 46937.0 - ); - expect(e.rectangle.stRotation.getValue(documentStartDate)).toEqual( - 65255.0 - ); - expect(e.rectangle.stRotation.getValue(documentStopDate)).toEqual( - 12220.0 - ); - expect(e.rectangle.granularity.getValue(documentStartDate)).toEqual( - 6948.0 - ); - expect(e.rectangle.granularity.getValue(documentStopDate)).toEqual( - 2204.0 - ); - expect(e.rectangle.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(106, 81, 64, 152) - ); - expect(e.rectangle.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(94, 108, 96, 154) - ); - expect(e.rectangle.outlineColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(6, 244, 49, 131) - ); - expect(e.rectangle.outlineColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(87, 190, 148, 55) - ); - expect(e.rectangle.outlineWidth.getValue(documentStartDate)).toEqual( - 41576.0 - ); - expect(e.rectangle.outlineWidth.getValue(documentStopDate)).toEqual( - 33933.0 - ); - expect( - e.rectangle.distanceDisplayCondition.getValue(documentStartDate) - ).toEqual(new DistanceDisplayCondition(24813, 30560)); - expect( - e.rectangle.distanceDisplayCondition.getValue(documentStopDate) - ).toEqual(new DistanceDisplayCondition(34617, 40071)); - expect(e.rectangle.zIndex.getValue(documentStartDate)).toEqual(27256); - expect(e.rectangle.zIndex.getValue(documentStopDate)).toEqual(53581); - expect( - e.tileset.maximumScreenSpaceError.getValue(documentStartDate) - ).toEqual(17401.0); - expect( - e.tileset.maximumScreenSpaceError.getValue(documentStopDate) - ).toEqual(7930.0); - expect(e.wall.granularity.getValue(documentStartDate)).toEqual(64428.0); - expect(e.wall.granularity.getValue(documentStopDate)).toEqual(25333.0); - expect(e.wall.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(31, 188, 250, 46) - ); - expect(e.wall.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(78, 91, 199, 227) - ); - expect(e.wall.outlineColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(241, 39, 105, 205) - ); - expect(e.wall.outlineColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(184, 17, 208, 44) - ); - expect(e.wall.outlineWidth.getValue(documentStartDate)).toEqual( - 62000.0 - ); - expect(e.wall.outlineWidth.getValue(documentStopDate)).toEqual(40549.0); - expect( - e.wall.distanceDisplayCondition.getValue(documentStartDate) - ).toEqual(new DistanceDisplayCondition(12470, 36912)); - expect( - e.wall.distanceDisplayCondition.getValue(documentStopDate) - ).toEqual(new DistanceDisplayCondition(35574, 63040)); - expect( - (e = dataSource.entities.getById( - "sampled_position_cartographicRadians" - )) - ).toBeDefined(); - expect(e.position.getValue(documentStartDate)).toEqual( - Cartesian3.fromRadians(1.00319530145806, 0.889718921347432, 16911) - ); - expect(e.position.getValue(documentStopDate)).toEqual( - Cartesian3.fromRadians(0.828301545608097, 0.517994728610812, 62937) - ); - expect( - (e = dataSource.entities.getById( - "sampled_position_cartographicDegrees" - )) - ).toBeDefined(); - expect(e.position.getValue(documentStartDate)).toEqual( - Cartesian3.fromDegrees(43, 23, 63733) - ); - expect(e.position.getValue(documentStopDate)).toEqual( - Cartesian3.fromDegrees(28, 12, 9806) - ); - expect( - (e = dataSource.entities.getById( - "sampled_position_cartesianVelocity" - )) - ).toBeDefined(); - expect(e.position.getValue(documentStartDate)).toEqual( - new Cartesian3(40342, 23709, 14940) - ); - expect(e.position.getValue(documentStopDate)).toEqual( - new Cartesian3(25648, 55396, 53208) - ); - expect( - (e = dataSource.entities.getById("sampled_billboard_color_rgbaf")) - ).toBeDefined(); - expect(e.billboard.color.getValue(documentStartDate)).toEqualEpsilon( - new Color( - 0.0235294117647059, - 0.427450980392157, - 0.658823529411765, - 0.0980392156862745 - ), - 1e-14 - ); - expect(e.billboard.color.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.968627450980392, - 0.752941176470588, - 0.843137254901961, - 0.164705882352941 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_billboard_alignedAxis_unitSpherical" - )) - ).toBeDefined(); - expect( - e.billboard.alignedAxis.getValue(documentStartDate) - ).toEqualEpsilon( - Cartesian3.fromSpherical(new Spherical(57328, 53471)), - 1e-14 - ); - expect( - e.billboard.alignedAxis.getValue(documentStopDate) - ).toEqualEpsilon( - Cartesian3.fromSpherical(new Spherical(51360, 27848)), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_box_material_solidColor_color" - )) - ).toBeDefined(); - expect(e.box.material.color.getValue(documentStartDate)).toEqualEpsilon( - new Color( - 0.556862745098039, - 0.541176470588235, - 0.956862745098039, - 0.317647058823529 - ), - 1e-14 - ); - expect(e.box.material.color.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.792156862745098, - 0.92156862745098, - 0.125490196078431, - 0.784313725490196 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_box_material_image")) - ).toBeDefined(); - expect(e.box.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(21562, 11604) - ); - expect(e.box.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(56719, 11741) - ); - expect(e.box.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(146, 124, 215, 53) - ); - expect(e.box.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(229, 219, 61, 100) - ); - expect( - (e = dataSource.entities.getById("sampled_box_material_grid")) - ).toBeDefined(); - expect(e.box.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(111, 151, 56, 118) - ); - expect(e.box.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(178, 77, 41, 86) - ); - expect(e.box.material.cellAlpha.getValue(documentStartDate)).toEqual( - 10400.0 - ); - expect(e.box.material.cellAlpha.getValue(documentStopDate)).toEqual( - 10941.0 - ); - expect(e.box.material.lineCount.getValue(documentStartDate)).toEqual( - new Cartesian2(3433, 28173) - ); - expect(e.box.material.lineCount.getValue(documentStopDate)).toEqual( - new Cartesian2(53350, 6864) - ); - expect( - e.box.material.lineThickness.getValue(documentStartDate) - ).toEqual(new Cartesian2(36990, 37264)); - expect(e.box.material.lineThickness.getValue(documentStopDate)).toEqual( - new Cartesian2(38412, 45974) - ); - expect(e.box.material.lineOffset.getValue(documentStartDate)).toEqual( - new Cartesian2(38761, 46487) - ); - expect(e.box.material.lineOffset.getValue(documentStopDate)).toEqual( - new Cartesian2(62553, 37876) - ); - expect( - (e = dataSource.entities.getById("sampled_box_material_stripe")) - ).toBeDefined(); - expect(e.box.material.evenColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(251, 59, 84, 41) - ); - expect(e.box.material.evenColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(20, 214, 81, 152) - ); - expect(e.box.material.oddColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(233, 71, 17, 115) - ); - expect(e.box.material.oddColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(20, 178, 40, 30) - ); - expect(e.box.material.offset.getValue(documentStartDate)).toEqual( - 46979.0 - ); - expect(e.box.material.offset.getValue(documentStopDate)).toEqual( - 1457.0 - ); - expect(e.box.material.repeat.getValue(documentStartDate)).toEqual( - 10283.0 - ); - expect(e.box.material.repeat.getValue(documentStopDate)).toEqual( - 63419.0 - ); - expect( - (e = dataSource.entities.getById("sampled_box_material_checkerboard")) - ).toBeDefined(); - expect(e.box.material.evenColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(2, 215, 87, 218) - ); - expect(e.box.material.evenColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(164, 235, 142, 227) - ); - expect(e.box.material.oddColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(117, 88, 89, 243) - ); - expect(e.box.material.oddColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(104, 182, 78, 49) - ); - expect(e.box.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(6238, 42520) - ); - expect(e.box.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(34685, 17543) - ); - expect( - (e = dataSource.entities.getById("sampled_box_material_image_color")) - ).toBeDefined(); - expect(e.box.material.color.getValue(documentStartDate)).toEqualEpsilon( - new Color( - 0.149019607843137, - 0.929411764705882, - 0.462745098039216, - 0.764705882352941 - ), - 1e-14 - ); - expect(e.box.material.color.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.890196078431372, - 0.262745098039216, - 0.866666666666667, - 0.792156862745098 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_box_material_grid_color")) - ).toBeDefined(); - expect(e.box.material.color.getValue(documentStartDate)).toEqualEpsilon( - new Color( - 0.501960784313725, - 0.447058823529412, - 0.72156862745098, - 0.392156862745098 - ), - 1e-14 - ); - expect(e.box.material.color.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.890196078431372, - 0.505882352941176, - 0.56078431372549, - 0.674509803921569 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_box_material_stripe_evenColor" - )) - ).toBeDefined(); - expect( - e.box.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.980392156862745, - 0.345098039215686, - 0.929411764705882, - 0.533333333333333 - ), - 1e-14 - ); - expect( - e.box.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.988235294117647, - 0.372549019607843, - 0.713725490196078, - 0.466666666666667 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_box_material_stripe_oddColor" - )) - ).toBeDefined(); - expect( - e.box.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.545098039215686, - 0.168627450980392, - 0.654901960784314, - 0.196078431372549 - ), - 1e-14 - ); - expect( - e.box.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.407843137254902, - 0.450980392156863, - 0.874509803921569, - 0.603921568627451 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_box_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - e.box.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.137254901960784, - 0.937254901960784, - 0.513725490196078, - 0.87843137254902 - ), - 1e-14 - ); - expect( - e.box.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.72156862745098, - 0.0666666666666667, - 0.274509803921569, - 0.207843137254902 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_box_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - e.box.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.352941176470588, - 0.274509803921569, - 0.850980392156863, - 0.00784313725490196 - ), - 1e-14 - ); - expect( - e.box.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.83921568627451, - 0.780392156862745, - 0.796078431372549, - 0.384313725490196 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_box_outlineColor_rgbaf")) - ).toBeDefined(); - expect(e.box.outlineColor.getValue(documentStartDate)).toEqualEpsilon( - new Color( - 0.215686274509804, - 0.498039215686275, - 0.274509803921569, - 0.129411764705882 - ), - 1e-14 - ); - expect(e.box.outlineColor.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.854901960784314, - 0.729411764705882, - 0.172549019607843, - 0.956862745098039 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_corridor_material_solidColor_color" - )) - ).toBeDefined(); - expect( - e.corridor.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.858823529411765, - 0.988235294117647, - 0.733333333333333, - 0.690196078431373 - ), - 1e-14 - ); - expect( - e.corridor.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.549019607843137, - 0.368627450980392, - 0.964705882352941, - 0.133333333333333 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_corridor_material_image")) - ).toBeDefined(); - expect(e.corridor.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(14885, 62522) - ); - expect(e.corridor.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(45129, 25776) - ); - expect(e.corridor.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(57, 37, 208, 54) - ); - expect(e.corridor.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(24, 80, 140, 151) - ); - expect( - (e = dataSource.entities.getById("sampled_corridor_material_grid")) - ).toBeDefined(); - expect(e.corridor.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(130, 99, 15, 168) - ); - expect(e.corridor.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(246, 60, 236, 5) - ); - expect( - e.corridor.material.cellAlpha.getValue(documentStartDate) - ).toEqual(22161.0); - expect( - e.corridor.material.cellAlpha.getValue(documentStopDate) - ).toEqual(55997.0); - expect( - e.corridor.material.lineCount.getValue(documentStartDate) - ).toEqual(new Cartesian2(7285, 25116)); - expect( - e.corridor.material.lineCount.getValue(documentStopDate) - ).toEqual(new Cartesian2(18095, 8262)); - expect( - e.corridor.material.lineThickness.getValue(documentStartDate) - ).toEqual(new Cartesian2(31150, 55929)); - expect( - e.corridor.material.lineThickness.getValue(documentStopDate) - ).toEqual(new Cartesian2(40043, 22428)); - expect( - e.corridor.material.lineOffset.getValue(documentStartDate) - ).toEqual(new Cartesian2(41105, 52128)); - expect( - e.corridor.material.lineOffset.getValue(documentStopDate) - ).toEqual(new Cartesian2(2387, 32009)); - expect( - (e = dataSource.entities.getById("sampled_corridor_material_stripe")) - ).toBeDefined(); - expect( - e.corridor.material.evenColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(8, 64, 254, 66)); - expect( - e.corridor.material.evenColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(47, 28, 112, 168)); - expect( - e.corridor.material.oddColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(17, 233, 150, 181)); - expect(e.corridor.material.oddColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(171, 148, 181, 68) - ); - expect(e.corridor.material.offset.getValue(documentStartDate)).toEqual( - 21351.0 - ); - expect(e.corridor.material.offset.getValue(documentStopDate)).toEqual( - 20709.0 - ); - expect(e.corridor.material.repeat.getValue(documentStartDate)).toEqual( - 25188.0 - ); - expect(e.corridor.material.repeat.getValue(documentStopDate)).toEqual( - 19705.0 - ); - expect( - (e = dataSource.entities.getById( - "sampled_corridor_material_checkerboard" - )) - ).toBeDefined(); - expect( - e.corridor.material.evenColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(135, 211, 180, 110)); - expect( - e.corridor.material.evenColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(44, 134, 8, 155)); - expect( - e.corridor.material.oddColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(212, 71, 156, 47)); - expect(e.corridor.material.oddColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(34, 36, 157, 104) - ); - expect(e.corridor.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(62107, 62450) - ); - expect(e.corridor.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(51782, 25290) - ); - expect( - (e = dataSource.entities.getById( - "sampled_corridor_material_image_color" - )) - ).toBeDefined(); - expect( - e.corridor.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.949019607843137, - 0.666666666666667, - 0.0588235294117647, - 0.784313725490196 - ), - 1e-14 - ); - expect( - e.corridor.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.388235294117647, - 0.262745098039216, - 0.764705882352941, - 0.882352941176471 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_corridor_material_grid_color" - )) - ).toBeDefined(); - expect( - e.corridor.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.290196078431373, - 0.83921568627451, - 0.588235294117647, - 0.525490196078431 - ), - 1e-14 - ); - expect( - e.corridor.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.266666666666667, - 0.00392156862745098, - 0.180392156862745, - 0.701960784313725 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_corridor_material_stripe_evenColor" - )) - ).toBeDefined(); - expect( - e.corridor.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.517647058823529, - 0.282352941176471, - 0.709803921568627, - 0.737254901960784 - ), - 1e-14 - ); - expect( - e.corridor.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.564705882352941, - 0.407843137254902, - 0.945098039215686, - 0.666666666666667 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_corridor_material_stripe_oddColor" - )) - ).toBeDefined(); - expect( - e.corridor.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.137254901960784, - 0.4, - 0.356862745098039, - 0.501960784313725 - ), - 1e-14 - ); - expect( - e.corridor.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.992156862745098, - 0.431372549019608, - 0.301960784313725, - 0.254901960784314 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_corridor_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - e.corridor.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.294117647058824, - 0.0588235294117647, - 0.149019607843137, - 0.756862745098039 - ), - 1e-14 - ); - expect( - e.corridor.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.243137254901961, - 0.56078431372549, - 0.254901960784314, - 0.83921568627451 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_corridor_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - e.corridor.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.768627450980392, - 0.650980392156863, - 0.529411764705882, - 0.372549019607843 - ), - 1e-14 - ); - expect( - e.corridor.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.12156862745098, - 0.780392156862745, - 0.745098039215686, - 0.725490196078431 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_corridor_outlineColor_rgbaf" - )) - ).toBeDefined(); - expect( - e.corridor.outlineColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.882352941176471, - 0.262745098039216, - 0.247058823529412, - 0.937254901960784 - ), - 1e-14 - ); - expect( - e.corridor.outlineColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.701960784313725, - 0.262745098039216, - 0.0627450980392157, - 0.627450980392157 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_cylinder_material_solidColor_color" - )) - ).toBeDefined(); - expect( - e.cylinder.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.117647058823529, - 0.349019607843137, - 0.411764705882353, - 0.105882352941176 - ), - 1e-14 - ); - expect( - e.cylinder.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.513725490196078, - 0.513725490196078, - 0.666666666666667, - 0.596078431372549 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_cylinder_material_image")) - ).toBeDefined(); - expect(e.cylinder.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(42846, 26023) - ); - expect(e.cylinder.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(19184, 35658) - ); - expect(e.cylinder.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(59, 239, 245, 44) - ); - expect(e.cylinder.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(77, 93, 176, 39) - ); - expect( - (e = dataSource.entities.getById("sampled_cylinder_material_grid")) - ).toBeDefined(); - expect(e.cylinder.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(211, 199, 71, 148) - ); - expect(e.cylinder.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(142, 126, 167, 247) - ); - expect( - e.cylinder.material.cellAlpha.getValue(documentStartDate) - ).toEqual(12751.0); - expect( - e.cylinder.material.cellAlpha.getValue(documentStopDate) - ).toEqual(16373.0); - expect( - e.cylinder.material.lineCount.getValue(documentStartDate) - ).toEqual(new Cartesian2(11469, 5164)); - expect( - e.cylinder.material.lineCount.getValue(documentStopDate) - ).toEqual(new Cartesian2(8167, 36383)); - expect( - e.cylinder.material.lineThickness.getValue(documentStartDate) - ).toEqual(new Cartesian2(22021, 38742)); - expect( - e.cylinder.material.lineThickness.getValue(documentStopDate) - ).toEqual(new Cartesian2(45350, 43441)); - expect( - e.cylinder.material.lineOffset.getValue(documentStartDate) - ).toEqual(new Cartesian2(23237, 58970)); - expect( - e.cylinder.material.lineOffset.getValue(documentStopDate) - ).toEqual(new Cartesian2(62223, 62963)); - expect( - (e = dataSource.entities.getById("sampled_cylinder_material_stripe")) - ).toBeDefined(); - expect( - e.cylinder.material.evenColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(131, 133, 216, 18)); - expect( - e.cylinder.material.evenColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(78, 238, 32, 231)); - expect( - e.cylinder.material.oddColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(209, 149, 133, 207)); - expect(e.cylinder.material.oddColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(53, 207, 16, 210) - ); - expect(e.cylinder.material.offset.getValue(documentStartDate)).toEqual( - 49593.0 - ); - expect(e.cylinder.material.offset.getValue(documentStopDate)).toEqual( - 25216.0 - ); - expect(e.cylinder.material.repeat.getValue(documentStartDate)).toEqual( - 16819.0 - ); - expect(e.cylinder.material.repeat.getValue(documentStopDate)).toEqual( - 12539.0 - ); - expect( - (e = dataSource.entities.getById( - "sampled_cylinder_material_checkerboard" - )) - ).toBeDefined(); - expect( - e.cylinder.material.evenColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(199, 80, 86, 158)); - expect( - e.cylinder.material.evenColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(207, 161, 23, 187)); - expect( - e.cylinder.material.oddColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(175, 210, 242, 198)); - expect(e.cylinder.material.oddColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(116, 91, 127, 24) - ); - expect(e.cylinder.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(27893, 32108) - ); - expect(e.cylinder.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(57420, 52960) - ); - expect( - (e = dataSource.entities.getById( - "sampled_cylinder_material_image_color" - )) - ).toBeDefined(); - expect( - e.cylinder.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.76078431372549, - 0.133333333333333, - 0.231372549019608, - 0.631372549019608 - ), - 1e-14 - ); - expect( - e.cylinder.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.882352941176471, - 0.0823529411764706, - 0.8, - 0.0823529411764706 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_cylinder_material_grid_color" - )) - ).toBeDefined(); - expect( - e.cylinder.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.176470588235294, - 0.407843137254902, - 0.623529411764706, - 0.729411764705882 - ), - 1e-14 - ); - expect( - e.cylinder.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.43921568627451, - 0.0745098039215686, - 0.603921568627451, - 0.713725490196078 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_cylinder_material_stripe_evenColor" - )) - ).toBeDefined(); - expect( - e.cylinder.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.380392156862745, - 0.149019607843137, - 0.8, - 0.658823529411765 - ), - 1e-14 - ); - expect( - e.cylinder.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.462745098039216, - 0.172549019607843, - 0.325490196078431, - 0.854901960784314 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_cylinder_material_stripe_oddColor" - )) - ).toBeDefined(); - expect( - e.cylinder.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.207843137254902, - 0.466666666666667, - 0.427450980392157, - 0.109803921568627 - ), - 1e-14 - ); - expect( - e.cylinder.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.313725490196078, - 0.498039215686275, - 0.2, - 0.423529411764706 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_cylinder_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - e.cylinder.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.52156862745098, - 0.72156862745098, - 0.294117647058824, - 0.513725490196078 - ), - 1e-14 - ); - expect( - e.cylinder.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.964705882352941, - 0.411764705882353, - 0.0549019607843137, - 0.0392156862745098 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_cylinder_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - e.cylinder.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.784313725490196, - 0.309803921568627, - 0.0666666666666667, - 0.403921568627451 - ), - 1e-14 - ); - expect( - e.cylinder.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.643137254901961, - 0.737254901960784, - 0.337254901960784, - 0.925490196078431 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_cylinder_outlineColor_rgbaf" - )) - ).toBeDefined(); - expect( - e.cylinder.outlineColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.780392156862745, - 0.658823529411765, - 0.235294117647059, - 0.0705882352941176 - ), - 1e-14 - ); - expect( - e.cylinder.outlineColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.643137254901961, - 0.372549019607843, - 0.16078431372549, - 0.588235294117647 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipse_material_solidColor_color" - )) - ).toBeDefined(); - expect( - e.ellipse.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.67843137254902, - 0.807843137254902, - 0.541176470588235, - 0.290196078431373 - ), - 1e-14 - ); - expect( - e.ellipse.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.749019607843137, - 0.258823529411765, - 0.733333333333333, - 0.247058823529412 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_ellipse_material_image")) - ).toBeDefined(); - expect(e.ellipse.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(41027, 32928) - ); - expect(e.ellipse.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(30513, 54647) - ); - expect(e.ellipse.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(243, 25, 233, 224) - ); - expect(e.ellipse.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(230, 62, 9, 20) - ); - expect( - (e = dataSource.entities.getById("sampled_ellipse_material_grid")) - ).toBeDefined(); - expect(e.ellipse.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(103, 140, 88, 233) - ); - expect(e.ellipse.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(224, 133, 210, 4) - ); - expect( - e.ellipse.material.cellAlpha.getValue(documentStartDate) - ).toEqual(39159.0); - expect(e.ellipse.material.cellAlpha.getValue(documentStopDate)).toEqual( - 47494.0 - ); - expect( - e.ellipse.material.lineCount.getValue(documentStartDate) - ).toEqual(new Cartesian2(40987, 3488)); - expect(e.ellipse.material.lineCount.getValue(documentStopDate)).toEqual( - new Cartesian2(5066, 58131) - ); - expect( - e.ellipse.material.lineThickness.getValue(documentStartDate) - ).toEqual(new Cartesian2(11466, 25388)); - expect( - e.ellipse.material.lineThickness.getValue(documentStopDate) - ).toEqual(new Cartesian2(17761, 21317)); - expect( - e.ellipse.material.lineOffset.getValue(documentStartDate) - ).toEqual(new Cartesian2(478, 18945)); - expect( - e.ellipse.material.lineOffset.getValue(documentStopDate) - ).toEqual(new Cartesian2(25914, 29541)); - expect( - (e = dataSource.entities.getById("sampled_ellipse_material_stripe")) - ).toBeDefined(); - expect( - e.ellipse.material.evenColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(218, 225, 186, 34)); - expect(e.ellipse.material.evenColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(109, 193, 18, 44) - ); - expect(e.ellipse.material.oddColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(119, 198, 180, 58) - ); - expect(e.ellipse.material.oddColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(79, 137, 65, 31) - ); - expect(e.ellipse.material.offset.getValue(documentStartDate)).toEqual( - 16964.0 - ); - expect(e.ellipse.material.offset.getValue(documentStopDate)).toEqual( - 16523.0 - ); - expect(e.ellipse.material.repeat.getValue(documentStartDate)).toEqual( - 50015.0 - ); - expect(e.ellipse.material.repeat.getValue(documentStopDate)).toEqual( - 64942.0 - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipse_material_checkerboard" - )) - ).toBeDefined(); - expect( - e.ellipse.material.evenColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(65, 135, 226, 200)); - expect(e.ellipse.material.evenColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(70, 33, 98, 112) - ); - expect(e.ellipse.material.oddColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(246, 224, 230, 224) - ); - expect(e.ellipse.material.oddColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(110, 127, 138, 204) - ); - expect(e.ellipse.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(24670, 352) - ); - expect(e.ellipse.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(16830, 33857) - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipse_material_image_color" - )) - ).toBeDefined(); - expect( - e.ellipse.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.207843137254902, - 0.0392156862745098, - 0.12156862745098, - 0.611764705882353 - ), - 1e-14 - ); - expect( - e.ellipse.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.611764705882353, - 0.0117647058823529, - 0.694117647058824, - 0.576470588235294 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipse_material_grid_color" - )) - ).toBeDefined(); - expect( - e.ellipse.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.580392156862745, - 0.0313725490196078, - 0.27843137254902, - 0.203921568627451 - ), - 1e-14 - ); - expect( - e.ellipse.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.0509803921568627, - 0.870588235294118, - 0.117647058823529, - 0.588235294117647 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipse_material_stripe_evenColor" - )) - ).toBeDefined(); - expect( - e.ellipse.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.0549019607843137, - 0.117647058823529, - 0.623529411764706, - 0.929411764705882 - ), - 1e-14 - ); - expect( - e.ellipse.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.266666666666667, - 0.113725490196078, - 0.937254901960784, - 0.168627450980392 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipse_material_stripe_oddColor" - )) - ).toBeDefined(); - expect( - e.ellipse.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.262745098039216, - 0.172549019607843, - 0.282352941176471, - 0.129411764705882 - ), - 1e-14 - ); - expect( - e.ellipse.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.968627450980392, - 0.635294117647059, - 0.525490196078431, - 0.831372549019608 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipse_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - e.ellipse.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.207843137254902, - 0.156862745098039, - 0.952941176470588, - 0.717647058823529 - ), - 1e-14 - ); - expect( - e.ellipse.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.635294117647059, - 0.835294117647059, - 0.76078431372549, - 0.235294117647059 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipse_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - e.ellipse.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.890196078431372, - 0.141176470588235, - 0.231372549019608, - 0.623529411764706 - ), - 1e-14 - ); - expect( - e.ellipse.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.192156862745098, - 0.294117647058824, - 0.741176470588235, - 0.0274509803921569 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipse_outlineColor_rgbaf" - )) - ).toBeDefined(); - expect( - e.ellipse.outlineColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.76078431372549, - 0.36078431372549, - 0.223529411764706, - 0.611764705882353 - ), - 1e-14 - ); - expect( - e.ellipse.outlineColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.16078431372549, - 0.83921568627451, - 0.752941176470588, - 0.647058823529412 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipsoid_material_solidColor_color" - )) - ).toBeDefined(); - expect( - e.ellipsoid.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.592156862745098, - 0.976470588235294, - 0.207843137254902, - 0.501960784313725 - ), - 1e-14 - ); - expect( - e.ellipsoid.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.0901960784313725, - 0.662745098039216, - 0.819607843137255, - 0.235294117647059 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_ellipsoid_material_image")) - ).toBeDefined(); - expect(e.ellipsoid.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(63583, 15096) - ); - expect(e.ellipsoid.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(48977, 60351) - ); - expect(e.ellipsoid.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(49, 50, 177, 104) - ); - expect(e.ellipsoid.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(131, 27, 208, 157) - ); - expect( - (e = dataSource.entities.getById("sampled_ellipsoid_material_grid")) - ).toBeDefined(); - expect(e.ellipsoid.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(121, 105, 70, 72) - ); - expect(e.ellipsoid.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(204, 122, 157, 57) - ); - expect( - e.ellipsoid.material.cellAlpha.getValue(documentStartDate) - ).toEqual(39442.0); - expect( - e.ellipsoid.material.cellAlpha.getValue(documentStopDate) - ).toEqual(463.0); - expect( - e.ellipsoid.material.lineCount.getValue(documentStartDate) - ).toEqual(new Cartesian2(33778, 30083)); - expect( - e.ellipsoid.material.lineCount.getValue(documentStopDate) - ).toEqual(new Cartesian2(5202, 18708)); - expect( - e.ellipsoid.material.lineThickness.getValue(documentStartDate) - ).toEqual(new Cartesian2(44058, 37804)); - expect( - e.ellipsoid.material.lineThickness.getValue(documentStopDate) - ).toEqual(new Cartesian2(34449, 3718)); - expect( - e.ellipsoid.material.lineOffset.getValue(documentStartDate) - ).toEqual(new Cartesian2(33149, 21889)); - expect( - e.ellipsoid.material.lineOffset.getValue(documentStopDate) - ).toEqual(new Cartesian2(35482, 10122)); - expect( - (e = dataSource.entities.getById("sampled_ellipsoid_material_stripe")) - ).toBeDefined(); - expect( - e.ellipsoid.material.evenColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(153, 245, 201, 196)); - expect( - e.ellipsoid.material.evenColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(245, 113, 5, 131)); - expect( - e.ellipsoid.material.oddColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(99, 151, 174, 111)); - expect( - e.ellipsoid.material.oddColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(188, 89, 18, 1)); - expect(e.ellipsoid.material.offset.getValue(documentStartDate)).toEqual( - 44961.0 - ); - expect(e.ellipsoid.material.offset.getValue(documentStopDate)).toEqual( - 5690.0 - ); - expect(e.ellipsoid.material.repeat.getValue(documentStartDate)).toEqual( - 3351.0 - ); - expect(e.ellipsoid.material.repeat.getValue(documentStopDate)).toEqual( - 44332.0 - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipsoid_material_checkerboard" - )) - ).toBeDefined(); - expect( - e.ellipsoid.material.evenColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(147, 239, 19, 56)); - expect( - e.ellipsoid.material.evenColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(5, 32, 143, 178)); - expect( - e.ellipsoid.material.oddColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(131, 51, 246, 186)); - expect( - e.ellipsoid.material.oddColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(214, 117, 149, 89)); - expect(e.ellipsoid.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(28116, 51821) - ); - expect(e.ellipsoid.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(60296, 50923) - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipsoid_material_image_color" - )) - ).toBeDefined(); - expect( - e.ellipsoid.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.654901960784314, - 0.517647058823529, - 0.858823529411765, - 0.486274509803922 - ), - 1e-14 - ); - expect( - e.ellipsoid.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.862745098039216, - 0.713725490196078, - 0.564705882352941, - 0.0901960784313725 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipsoid_material_grid_color" - )) - ).toBeDefined(); - expect( - e.ellipsoid.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.6, - 0.427450980392157, - 0.203921568627451, - 0.223529411764706 - ), - 1e-14 - ); - expect( - e.ellipsoid.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.525490196078431, - 0.305882352941176, - 0.16078431372549, - 0.819607843137255 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipsoid_material_stripe_evenColor" - )) - ).toBeDefined(); - expect( - e.ellipsoid.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.301960784313725, - 0.572549019607843, - 0.87843137254902, - 0.219607843137255 - ), - 1e-14 - ); - expect( - e.ellipsoid.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.337254901960784, - 0.835294117647059, - 0.964705882352941, - 0.909803921568627 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipsoid_material_stripe_oddColor" - )) - ).toBeDefined(); - expect( - e.ellipsoid.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.647058823529412, - 0.635294117647059, - 0.258823529411765, - 0.250980392156863 - ), - 1e-14 - ); - expect( - e.ellipsoid.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.917647058823529, - 0.262745098039216, - 0.666666666666667, - 0.980392156862745 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipsoid_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - e.ellipsoid.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.819607843137255, - 0.282352941176471, - 0.929411764705882, - 0.501960784313725 - ), - 1e-14 - ); - expect( - e.ellipsoid.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.850980392156863, - 0.294117647058824, - 0.498039215686275, - 0.956862745098039 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipsoid_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - e.ellipsoid.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.227450980392157, - 0.862745098039216, - 0.890196078431372, - 0.207843137254902 - ), - 1e-14 - ); - expect( - e.ellipsoid.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.796078431372549, - 0.0470588235294118, - 0.843137254901961, - 0.388235294117647 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_ellipsoid_outlineColor_rgbaf" - )) - ).toBeDefined(); - expect( - e.ellipsoid.outlineColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.552941176470588, - 0.549019607843137, - 0.431372549019608, - 0.568627450980392 - ), - 1e-14 - ); - expect( - e.ellipsoid.outlineColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.435294117647059, - 0.698039215686274, - 0.396078431372549, - 0.772549019607843 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_label_backgroundColor_rgbaf" - )) - ).toBeDefined(); - expect( - e.label.backgroundColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.96078431372549, - 0.188235294117647, - 0.870588235294118, - 0.270588235294118 - ), - 1e-14 - ); - expect( - e.label.backgroundColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.882352941176471, - 0.796078431372549, - 0.603921568627451, - 0.823529411764706 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_label_fillColor_rgbaf")) - ).toBeDefined(); - expect(e.label.fillColor.getValue(documentStartDate)).toEqualEpsilon( - new Color( - 0.709803921568627, - 0.556862745098039, - 0.337254901960784, - 0.247058823529412 - ), - 1e-14 - ); - expect(e.label.fillColor.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.43921568627451, - 0.694117647058824, - 0.901960784313726, - 0.0823529411764706 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_label_outlineColor_rgbaf")) - ).toBeDefined(); - expect(e.label.outlineColor.getValue(documentStartDate)).toEqualEpsilon( - new Color( - 0.631372549019608, - 0.709803921568627, - 0.270588235294118, - 0.792156862745098 - ), - 1e-14 - ); - expect(e.label.outlineColor.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.435294117647059, - 0.176470588235294, - 0.235294117647059, - 0.631372549019608 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_model_silhouetteColor_rgbaf" - )) - ).toBeDefined(); - expect( - e.model.silhouetteColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.231372549019608, - 0.866666666666667, - 0.266666666666667, - 0.635294117647059 - ), - 1e-14 - ); - expect( - e.model.silhouetteColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.749019607843137, - 0.227450980392157, - 0.807843137254902, - 0.0823529411764706 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_model_color_rgbaf")) - ).toBeDefined(); - expect(e.model.color.getValue(documentStartDate)).toEqualEpsilon( - new Color( - 0.0509803921568627, - 0.83921568627451, - 0.470588235294118, - 0.956862745098039 - ), - 1e-14 - ); - expect(e.model.color.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.435294117647059, - 0.945098039215686, - 0.431372549019608, - 0.619607843137255 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_path_material_solidColor_color" - )) - ).toBeDefined(); - expect( - e.path.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.517647058823529, - 0.56078431372549, - 0.254901960784314, - 0.494117647058824 - ), - 1e-14 - ); - expect(e.path.material.color.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.905882352941176, - 0.152941176470588, - 0.854901960784314, - 0.890196078431372 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_path_material_polylineOutline" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(209, 154, 35, 76) - ); - expect(e.path.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(186, 25, 242, 140) - ); - expect( - e.path.material.outlineColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(218, 241, 216, 157)); - expect(e.path.material.outlineColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(70, 200, 183, 199) - ); - expect( - e.path.material.outlineWidth.getValue(documentStartDate) - ).toEqual(2699.0); - expect(e.path.material.outlineWidth.getValue(documentStopDate)).toEqual( - 1320.0 - ); - expect( - (e = dataSource.entities.getById( - "sampled_path_material_polylineArrow" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(150, 221, 161, 136) - ); - expect(e.path.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(19, 231, 68, 117) - ); - expect( - (e = dataSource.entities.getById( - "sampled_path_material_polylineDash" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(140, 167, 151, 119) - ); - expect(e.path.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(65, 100, 228, 104) - ); - expect(e.path.material.gapColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(154, 198, 168, 151) - ); - expect(e.path.material.gapColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(16, 23, 0, 42) - ); - expect(e.path.material.dashLength.getValue(documentStartDate)).toEqual( - 38294.0 - ); - expect(e.path.material.dashLength.getValue(documentStopDate)).toEqual( - 33057.0 - ); - expect(e.path.material.dashPattern.getValue(documentStartDate)).toEqual( - 58660 - ); - expect(e.path.material.dashPattern.getValue(documentStopDate)).toEqual( - 3340 - ); - expect( - (e = dataSource.entities.getById( - "sampled_path_material_polylineGlow" - )) - ).toBeDefined(); - expect(e.path.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(197, 117, 196, 254) - ); - expect(e.path.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(18, 17, 195, 230) - ); - expect(e.path.material.glowPower.getValue(documentStartDate)).toEqual( - 5579.0 - ); - expect(e.path.material.glowPower.getValue(documentStopDate)).toEqual( - 59951.0 - ); - expect(e.path.material.taperPower.getValue(documentStartDate)).toEqual( - 30159.0 - ); - expect(e.path.material.taperPower.getValue(documentStopDate)).toEqual( - 35636.0 - ); - expect( - (e = dataSource.entities.getById("sampled_path_material_image")) - ).toBeDefined(); - expect(e.path.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(25033, 47457) - ); - expect(e.path.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(30413, 15734) - ); - expect(e.path.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(225, 149, 237, 92) - ); - expect(e.path.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(234, 146, 229, 9) - ); - expect( - (e = dataSource.entities.getById("sampled_path_material_grid")) - ).toBeDefined(); - expect(e.path.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(99, 177, 19, 203) - ); - expect(e.path.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(231, 169, 202, 127) - ); - expect(e.path.material.cellAlpha.getValue(documentStartDate)).toEqual( - 63572.0 - ); - expect(e.path.material.cellAlpha.getValue(documentStopDate)).toEqual( - 26232.0 - ); - expect(e.path.material.lineCount.getValue(documentStartDate)).toEqual( - new Cartesian2(34101, 5509) - ); - expect(e.path.material.lineCount.getValue(documentStopDate)).toEqual( - new Cartesian2(11991, 23086) - ); - expect( - e.path.material.lineThickness.getValue(documentStartDate) - ).toEqual(new Cartesian2(39225, 58265)); - expect( - e.path.material.lineThickness.getValue(documentStopDate) - ).toEqual(new Cartesian2(60443, 36332)); - expect(e.path.material.lineOffset.getValue(documentStartDate)).toEqual( - new Cartesian2(25536, 59747) - ); - expect(e.path.material.lineOffset.getValue(documentStopDate)).toEqual( - new Cartesian2(43164, 57256) - ); - expect( - (e = dataSource.entities.getById("sampled_path_material_stripe")) - ).toBeDefined(); - expect(e.path.material.evenColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(252, 51, 215, 123) - ); - expect(e.path.material.evenColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(164, 66, 75, 80) - ); - expect(e.path.material.oddColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(192, 190, 37, 99) - ); - expect(e.path.material.oddColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(196, 81, 62, 248) - ); - expect(e.path.material.offset.getValue(documentStartDate)).toEqual( - 45320.0 - ); - expect(e.path.material.offset.getValue(documentStopDate)).toEqual( - 41173.0 - ); - expect(e.path.material.repeat.getValue(documentStartDate)).toEqual( - 42078.0 - ); - expect(e.path.material.repeat.getValue(documentStopDate)).toEqual( - 11633.0 - ); - expect( - (e = dataSource.entities.getById( - "sampled_path_material_checkerboard" - )) - ).toBeDefined(); - expect(e.path.material.evenColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(29, 130, 90, 174) - ); - expect(e.path.material.evenColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(42, 131, 191, 181) - ); - expect(e.path.material.oddColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(32, 82, 30, 56) - ); - expect(e.path.material.oddColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(161, 13, 144, 118) - ); - expect(e.path.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(14368, 54840) - ); - expect(e.path.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(58386, 2276) - ); - expect( - (e = dataSource.entities.getById( - "sampled_path_material_polylineOutline_color" - )) - ).toBeDefined(); - expect( - e.path.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.490196078431373, - 0.498039215686275, - 0.819607843137255, - 0.72156862745098 - ), - 1e-14 - ); - expect(e.path.material.color.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.309803921568627, - 0.329411764705882, - 0.807843137254902, - 0.368627450980392 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_path_material_polylineOutline_outlineColor" - )) - ).toBeDefined(); - expect( - e.path.material.outlineColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.427450980392157, - 0.96078431372549, - 0.996078431372549, - 0.662745098039216 - ), - 1e-14 - ); - expect( - e.path.material.outlineColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.917647058823529, - 0.635294117647059, - 0.674509803921569, - 0.298039215686275 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_path_material_polylineArrow_color" - )) - ).toBeDefined(); - expect( - e.path.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.0666666666666667, - 0.972549019607843, - 0.686274509803922, - 0.325490196078431 - ), - 1e-14 - ); - expect(e.path.material.color.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.2, - 0.482352941176471, - 0.498039215686275, - 0.219607843137255 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_path_material_polylineDash_color" - )) - ).toBeDefined(); - expect( - e.path.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.803921568627451, - 0.67843137254902, - 0.176470588235294, - 0.709803921568627 - ), - 1e-14 - ); - expect(e.path.material.color.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.674509803921569, - 0.0980392156862745, - 0.447058823529412, - 0.803921568627451 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_path_material_polylineDash_gapColor" - )) - ).toBeDefined(); - expect( - e.path.material.gapColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.231372549019608, - 0.745098039215686, - 0.772549019607843, - 0.901960784313726 - ), - 1e-14 - ); - expect( - e.path.material.gapColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.713725490196078, - 0.180392156862745, - 0.317647058823529, - 0.309803921568627 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_path_material_polylineGlow_color" - )) - ).toBeDefined(); - expect( - e.path.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.63921568627451, - 0.2, - 0.0196078431372549, - 0.984313725490196 - ), - 1e-14 - ); - expect(e.path.material.color.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.376470588235294, - 0.815686274509804, - 0.933333333333333, - 0.0235294117647059 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_path_material_image_color")) - ).toBeDefined(); - expect( - e.path.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.898039215686275, - 0.772549019607843, - 0.294117647058824, - 0.0431372549019608 - ), - 1e-14 - ); - expect(e.path.material.color.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.815686274509804, - 0.0901960784313725, - 0.898039215686275, - 0.309803921568627 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_path_material_grid_color")) - ).toBeDefined(); - expect( - e.path.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color(0.890196078431372, 0, 0.717647058823529, 0.329411764705882), - 1e-14 - ); - expect(e.path.material.color.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.474509803921569, - 0.690196078431373, - 0.0431372549019608, - 0.258823529411765 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_path_material_stripe_evenColor" - )) - ).toBeDefined(); - expect( - e.path.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.368627450980392, - 0.584313725490196, - 0.831372549019608, - 0.541176470588235 - ), - 1e-14 - ); - expect( - e.path.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.317647058823529, - 0.4, - 0.83921568627451, - 0.537254901960784 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_path_material_stripe_oddColor" - )) - ).toBeDefined(); - expect( - e.path.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.145098039215686, - 0.588235294117647, - 0.917647058823529, - 0.607843137254902 - ), - 1e-14 - ); - expect( - e.path.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.117647058823529, - 0.0705882352941176, - 0.901960784313726, - 0.525490196078431 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_path_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - e.path.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.631372549019608, - 0.741176470588235, - 0.282352941176471, - 0.196078431372549 - ), - 1e-14 - ); - expect( - e.path.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.250980392156863, - 0.109803921568627, - 0.188235294117647, - 0.796078431372549 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_path_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - e.path.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.388235294117647, - 0.129411764705882, - 0.333333333333333, - 0.658823529411765 - ), - 1e-14 - ); - expect( - e.path.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.156862745098039, - 0.631372549019608, - 0.290196078431373, - 0.713725490196078 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_point_color_rgbaf")) - ).toBeDefined(); - expect(e.point.color.getValue(documentStartDate)).toEqualEpsilon( - new Color( - 0.67843137254902, - 0.356862745098039, - 0.588235294117647, - 0.796078431372549 - ), - 1e-14 - ); - expect(e.point.color.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.968627450980392, - 0.298039215686275, - 0.513725490196078, - 0.631372549019608 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_point_outlineColor_rgbaf")) - ).toBeDefined(); - expect(e.point.outlineColor.getValue(documentStartDate)).toEqualEpsilon( - new Color( - 0.427450980392157, - 0.894117647058824, - 0.168627450980392, - 0.768627450980392 - ), - 1e-14 - ); - expect(e.point.outlineColor.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.458823529411765, - 0.466666666666667, - 0.388235294117647, - 0.792156862745098 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polygon_material_solidColor_color" - )) - ).toBeDefined(); - expect( - e.polygon.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.305882352941176, - 0.615686274509804, - 0.337254901960784, - 0.894117647058824 - ), - 1e-14 - ); - expect( - e.polygon.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.184313725490196, - 0.619607843137255, - 0.352941176470588, - 0.0313725490196078 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_polygon_material_image")) - ).toBeDefined(); - expect(e.polygon.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(19536, 17484) - ); - expect(e.polygon.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(46291, 28852) - ); - expect(e.polygon.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(157, 5, 231, 29) - ); - expect(e.polygon.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(53, 2, 148, 36) - ); - expect( - (e = dataSource.entities.getById("sampled_polygon_material_grid")) - ).toBeDefined(); - expect(e.polygon.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(179, 243, 247, 124) - ); - expect(e.polygon.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(15, 128, 159, 42) - ); - expect( - e.polygon.material.cellAlpha.getValue(documentStartDate) - ).toEqual(11565.0); - expect(e.polygon.material.cellAlpha.getValue(documentStopDate)).toEqual( - 42611.0 - ); - expect( - e.polygon.material.lineCount.getValue(documentStartDate) - ).toEqual(new Cartesian2(47065, 65463)); - expect(e.polygon.material.lineCount.getValue(documentStopDate)).toEqual( - new Cartesian2(29170, 16497) - ); - expect( - e.polygon.material.lineThickness.getValue(documentStartDate) - ).toEqual(new Cartesian2(62674, 26868)); - expect( - e.polygon.material.lineThickness.getValue(documentStopDate) - ).toEqual(new Cartesian2(22008, 39509)); - expect( - e.polygon.material.lineOffset.getValue(documentStartDate) - ).toEqual(new Cartesian2(28793, 1648)); - expect( - e.polygon.material.lineOffset.getValue(documentStopDate) - ).toEqual(new Cartesian2(44991, 42159)); - expect( - (e = dataSource.entities.getById("sampled_polygon_material_stripe")) - ).toBeDefined(); - expect( - e.polygon.material.evenColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(113, 233, 143, 146)); - expect(e.polygon.material.evenColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(106, 138, 115, 44) - ); - expect(e.polygon.material.oddColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(104, 146, 138, 244) - ); - expect(e.polygon.material.oddColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(161, 95, 25, 36) - ); - expect(e.polygon.material.offset.getValue(documentStartDate)).toEqual( - 4711.0 - ); - expect(e.polygon.material.offset.getValue(documentStopDate)).toEqual( - 65087.0 - ); - expect(e.polygon.material.repeat.getValue(documentStartDate)).toEqual( - 44013.0 - ); - expect(e.polygon.material.repeat.getValue(documentStopDate)).toEqual( - 7595.0 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polygon_material_checkerboard" - )) - ).toBeDefined(); - expect( - e.polygon.material.evenColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(167, 56, 202, 219)); - expect(e.polygon.material.evenColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(231, 169, 74, 125) - ); - expect(e.polygon.material.oddColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(88, 174, 167, 35) - ); - expect(e.polygon.material.oddColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(12, 69, 69, 23) - ); - expect(e.polygon.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(32132, 20093) - ); - expect(e.polygon.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(31300, 27514) - ); - expect( - (e = dataSource.entities.getById( - "sampled_polygon_material_image_color" - )) - ).toBeDefined(); - expect( - e.polygon.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.501960784313725, - 0.0823529411764706, - 0.282352941176471, - 0.305882352941176 - ), - 1e-14 - ); - expect( - e.polygon.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.0745098039215686, - 0.654901960784314, - 0.6, - 0.886274509803922 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polygon_material_grid_color" - )) - ).toBeDefined(); - expect( - e.polygon.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.192156862745098, - 0.709803921568627, - 0.807843137254902, - 0.737254901960784 - ), - 1e-14 - ); - expect( - e.polygon.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.674509803921569, - 0.0235294117647059, - 0.764705882352941, - 0.976470588235294 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polygon_material_stripe_evenColor" - )) - ).toBeDefined(); - expect( - e.polygon.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.568627450980392, - 0.352941176470588, - 0.396078431372549, - 0.435294117647059 - ), - 1e-14 - ); - expect( - e.polygon.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.274509803921569, - 0.43921568627451, - 0.686274509803922, - 0.419607843137255 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polygon_material_stripe_oddColor" - )) - ).toBeDefined(); - expect( - e.polygon.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.325490196078431, - 0.349019607843137, - 0.580392156862745, - 0.725490196078431 - ), - 1e-14 - ); - expect( - e.polygon.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.568627450980392, - 0.690196078431373, - 0.00392156862745098, - 0.858823529411765 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polygon_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - e.polygon.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.831372549019608, - 0.454901960784314, - 0.882352941176471, - 0.270588235294118 - ), - 1e-14 - ); - expect( - e.polygon.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.494117647058824, - 0.384313725490196, - 0.345098039215686, - 0.16078431372549 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polygon_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - e.polygon.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.0117647058823529, - 0.905882352941176, - 0.592156862745098, - 0.784313725490196 - ), - 1e-14 - ); - expect( - e.polygon.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.427450980392157, - 0.701960784313725, - 0.0901960784313725, - 0.643137254901961 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polygon_outlineColor_rgbaf" - )) - ).toBeDefined(); - expect( - e.polygon.outlineColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.674509803921569, - 0.556862745098039, - 0.113725490196078, - 0.6 - ), - 1e-14 - ); - expect( - e.polygon.outlineColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.650980392156863, - 0.827450980392157, - 0.537254901960784, - 0.713725490196078 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_solidColor_color" - )) - ).toBeDefined(); - expect( - e.polyline.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.976470588235294, - 0.949019607843137, - 0.450980392156863, - 0.466666666666667 - ), - 1e-14 - ); - expect( - e.polyline.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.262745098039216, - 0.509803921568627, - 0.537254901960784, - 0.850980392156863 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_polylineOutline" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(245, 92, 109, 218) - ); - expect(e.polyline.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(241, 96, 196, 167) - ); - expect( - e.polyline.material.outlineColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(174, 2, 11, 244)); - expect( - e.polyline.material.outlineColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(31, 126, 140, 138)); - expect( - e.polyline.material.outlineWidth.getValue(documentStartDate) - ).toEqual(33279.0); - expect( - e.polyline.material.outlineWidth.getValue(documentStopDate) - ).toEqual(26855.0); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_polylineArrow" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(141, 137, 252, 157) - ); - expect(e.polyline.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(8, 236, 198, 57) - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_polylineDash" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(77, 159, 238, 158) - ); - expect(e.polyline.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(206, 194, 234, 158) - ); - expect( - e.polyline.material.gapColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(232, 145, 15, 164)); - expect(e.polyline.material.gapColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(173, 151, 118, 138) - ); - expect( - e.polyline.material.dashLength.getValue(documentStartDate) - ).toEqual(41757.0); - expect( - e.polyline.material.dashLength.getValue(documentStopDate) - ).toEqual(10126.0); - expect( - e.polyline.material.dashPattern.getValue(documentStartDate) - ).toEqual(33948); - expect( - e.polyline.material.dashPattern.getValue(documentStopDate) - ).toEqual(16892); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_polylineGlow" - )) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(174, 178, 78, 176) - ); - expect(e.polyline.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(79, 191, 38, 195) - ); - expect( - e.polyline.material.glowPower.getValue(documentStartDate) - ).toEqual(55378.0); - expect( - e.polyline.material.glowPower.getValue(documentStopDate) - ).toEqual(60643.0); - expect( - e.polyline.material.taperPower.getValue(documentStartDate) - ).toEqual(50068.0); - expect( - e.polyline.material.taperPower.getValue(documentStopDate) - ).toEqual(2516.0); - expect( - (e = dataSource.entities.getById("sampled_polyline_material_image")) - ).toBeDefined(); - expect(e.polyline.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(50957, 35783) - ); - expect(e.polyline.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(59533, 65000) - ); - expect(e.polyline.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(174, 154, 113, 185) - ); - expect(e.polyline.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(123, 236, 118, 155) - ); - expect( - (e = dataSource.entities.getById("sampled_polyline_material_grid")) - ).toBeDefined(); - expect(e.polyline.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(26, 89, 33, 224) - ); - expect(e.polyline.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(215, 131, 203, 1) - ); - expect( - e.polyline.material.cellAlpha.getValue(documentStartDate) - ).toEqual(34343.0); - expect( - e.polyline.material.cellAlpha.getValue(documentStopDate) - ).toEqual(63863.0); - expect( - e.polyline.material.lineCount.getValue(documentStartDate) - ).toEqual(new Cartesian2(52308, 51660)); - expect( - e.polyline.material.lineCount.getValue(documentStopDate) - ).toEqual(new Cartesian2(45338, 51633)); - expect( - e.polyline.material.lineThickness.getValue(documentStartDate) - ).toEqual(new Cartesian2(47738, 52154)); - expect( - e.polyline.material.lineThickness.getValue(documentStopDate) - ).toEqual(new Cartesian2(42674, 38822)); - expect( - e.polyline.material.lineOffset.getValue(documentStartDate) - ).toEqual(new Cartesian2(29194, 52338)); - expect( - e.polyline.material.lineOffset.getValue(documentStopDate) - ).toEqual(new Cartesian2(25319, 28514)); - expect( - (e = dataSource.entities.getById("sampled_polyline_material_stripe")) - ).toBeDefined(); - expect( - e.polyline.material.evenColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(141, 205, 78, 73)); - expect( - e.polyline.material.evenColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(107, 159, 97, 34)); - expect( - e.polyline.material.oddColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(19, 76, 127, 197)); - expect(e.polyline.material.oddColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(214, 222, 19, 168) - ); - expect(e.polyline.material.offset.getValue(documentStartDate)).toEqual( - 51126.0 - ); - expect(e.polyline.material.offset.getValue(documentStopDate)).toEqual( - 10891.0 - ); - expect(e.polyline.material.repeat.getValue(documentStartDate)).toEqual( - 25313.0 - ); - expect(e.polyline.material.repeat.getValue(documentStopDate)).toEqual( - 22020.0 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_checkerboard" - )) - ).toBeDefined(); - expect( - e.polyline.material.evenColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(94, 152, 152, 31)); - expect( - e.polyline.material.evenColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(76, 129, 223, 102)); - expect( - e.polyline.material.oddColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(71, 237, 5, 172)); - expect(e.polyline.material.oddColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(209, 132, 204, 160) - ); - expect(e.polyline.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(19943, 17997) - ); - expect(e.polyline.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(55528, 16856) - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_polylineOutline_color" - )) - ).toBeDefined(); - expect( - e.polyline.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.384313725490196, - 0.168627450980392, - 0.443137254901961, - 0.658823529411765 - ), - 1e-14 - ); - expect( - e.polyline.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.0274509803921569, - 0.647058823529412, - 0.396078431372549, - 0.105882352941176 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_polylineOutline_outlineColor" - )) - ).toBeDefined(); - expect( - e.polyline.material.outlineColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.0823529411764706, - 0.0549019607843137, - 0.149019607843137, - 0.580392156862745 - ), - 1e-14 - ); - expect( - e.polyline.material.outlineColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.733333333333333, - 0.792156862745098, - 0.63921568627451, - 0.564705882352941 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_polylineArrow_color" - )) - ).toBeDefined(); - expect( - e.polyline.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.52156862745098, - 0.725490196078431, - 0.87843137254902, - 0.823529411764706 - ), - 1e-14 - ); - expect( - e.polyline.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color(0.772549019607843, 0.862745098039216, 0.325490196078431, 0), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_polylineDash_color" - )) - ).toBeDefined(); - expect( - e.polyline.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.525490196078431, - 0.992156862745098, - 0.964705882352941, - 0.364705882352941 - ), - 1e-14 - ); - expect( - e.polyline.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.27843137254902, - 0.133333333333333, - 0.447058823529412, - 0.192156862745098 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_polylineDash_gapColor" - )) - ).toBeDefined(); - expect( - e.polyline.material.gapColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.498039215686275, - 0.776470588235294, - 0.803921568627451, - 0.690196078431373 - ), - 1e-14 - ); - expect( - e.polyline.material.gapColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.376470588235294, - 0.898039215686275, - 0.168627450980392, - 0.898039215686275 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_polylineGlow_color" - )) - ).toBeDefined(); - expect( - e.polyline.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.705882352941177, - 0.901960784313726, - 0.0784313725490196, - 0.356862745098039 - ), - 1e-14 - ); - expect( - e.polyline.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.517647058823529, - 0.207843137254902, - 0.701960784313725, - 0.105882352941176 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_image_color" - )) - ).toBeDefined(); - expect( - e.polyline.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.796078431372549, - 0.741176470588235, - 0.741176470588235, - 0.349019607843137 - ), - 1e-14 - ); - expect( - e.polyline.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.925490196078431, - 0.266666666666667, - 0.0941176470588235, - 0.556862745098039 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_grid_color" - )) - ).toBeDefined(); - expect( - e.polyline.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.545098039215686, - 0.847058823529412, - 0.341176470588235, - 0.101960784313725 - ), - 1e-14 - ); - expect( - e.polyline.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.431372549019608, - 0.952941176470588, - 0.184313725490196, - 0.184313725490196 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_stripe_evenColor" - )) - ).toBeDefined(); - expect( - e.polyline.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.807843137254902, - 0.262745098039216, - 0.898039215686275, - 0.811764705882353 - ), - 1e-14 - ); - expect( - e.polyline.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.415686274509804, - 0.968627450980392, - 0.0980392156862745, - 0.423529411764706 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_stripe_oddColor" - )) - ).toBeDefined(); - expect( - e.polyline.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.427450980392157, - 0.407843137254902, - 0.470588235294118, - 0.874509803921569 - ), - 1e-14 - ); - expect( - e.polyline.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color(0.509803921568627, 0.427450980392157, 0.976470588235294, 0), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - e.polyline.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.313725490196078, - 0.415686274509804, - 0.0823529411764706, - 0.576470588235294 - ), - 1e-14 - ); - expect( - e.polyline.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.0196078431372549, - 0.309803921568627, - 0.23921568627451, - 0.933333333333333 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - e.polyline.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.784313725490196, - 0.235294117647059, - 0.525490196078431, - 0.180392156862745 - ), - 1e-14 - ); - expect( - e.polyline.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.356862745098039, - 0.125490196078431, - 0.243137254901961, - 0.788235294117647 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.568627450980392, - 0.243137254901961, - 0.43921568627451, - 0.541176470588235 - ), - 1e-14 - ); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.729411764705882, - 0.505882352941176, - 0.282352941176471, - 0.0274509803921569 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_polylineOutline" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStartDate) - ).toEqual(Color.fromBytes(247, 124, 164, 106)); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStopDate) - ).toEqual(Color.fromBytes(91, 114, 116, 82)); - expect( - e.polyline.depthFailMaterial.outlineColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(35, 216, 157, 243)); - expect( - e.polyline.depthFailMaterial.outlineColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(111, 11, 143, 175)); - expect( - e.polyline.depthFailMaterial.outlineWidth.getValue(documentStartDate) - ).toEqual(45494.0); - expect( - e.polyline.depthFailMaterial.outlineWidth.getValue(documentStopDate) - ).toEqual(8666.0); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_polylineArrow" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStartDate) - ).toEqual(Color.fromBytes(143, 46, 33, 146)); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStopDate) - ).toEqual(Color.fromBytes(1, 147, 34, 93)); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_polylineDash" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStartDate) - ).toEqual(Color.fromBytes(64, 52, 179, 199)); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStopDate) - ).toEqual(Color.fromBytes(251, 205, 86, 110)); - expect( - e.polyline.depthFailMaterial.gapColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(98, 214, 1, 23)); - expect( - e.polyline.depthFailMaterial.gapColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(108, 132, 28, 207)); - expect( - e.polyline.depthFailMaterial.dashLength.getValue(documentStartDate) - ).toEqual(59636.0); - expect( - e.polyline.depthFailMaterial.dashLength.getValue(documentStopDate) - ).toEqual(9250.0); - expect( - e.polyline.depthFailMaterial.dashPattern.getValue(documentStartDate) - ).toEqual(33949); - expect( - e.polyline.depthFailMaterial.dashPattern.getValue(documentStopDate) - ).toEqual(58673); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_polylineGlow" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStartDate) - ).toEqual(Color.fromBytes(253, 71, 171, 138)); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStopDate) - ).toEqual(Color.fromBytes(112, 154, 76, 178)); - expect( - e.polyline.depthFailMaterial.glowPower.getValue(documentStartDate) - ).toEqual(8542.0); - expect( - e.polyline.depthFailMaterial.glowPower.getValue(documentStopDate) - ).toEqual(54440.0); - expect( - e.polyline.depthFailMaterial.taperPower.getValue(documentStartDate) - ).toEqual(61950.0); - expect( - e.polyline.depthFailMaterial.taperPower.getValue(documentStopDate) - ).toEqual(36891.0); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_image" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.repeat.getValue(documentStartDate) - ).toEqual(new Cartesian2(59796, 25065)); - expect( - e.polyline.depthFailMaterial.repeat.getValue(documentStopDate) - ).toEqual(new Cartesian2(38054, 9108)); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStartDate) - ).toEqual(Color.fromBytes(32, 24, 155, 151)); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStopDate) - ).toEqual(Color.fromBytes(9, 142, 253, 92)); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_grid" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStartDate) - ).toEqual(Color.fromBytes(206, 138, 53, 173)); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStopDate) - ).toEqual(Color.fromBytes(20, 11, 131, 253)); - expect( - e.polyline.depthFailMaterial.cellAlpha.getValue(documentStartDate) - ).toEqual(36676.0); - expect( - e.polyline.depthFailMaterial.cellAlpha.getValue(documentStopDate) - ).toEqual(5143.0); - expect( - e.polyline.depthFailMaterial.lineCount.getValue(documentStartDate) - ).toEqual(new Cartesian2(55344, 11736)); - expect( - e.polyline.depthFailMaterial.lineCount.getValue(documentStopDate) - ).toEqual(new Cartesian2(20410, 11343)); - expect( - e.polyline.depthFailMaterial.lineThickness.getValue(documentStartDate) - ).toEqual(new Cartesian2(22967, 31065)); - expect( - e.polyline.depthFailMaterial.lineThickness.getValue(documentStopDate) - ).toEqual(new Cartesian2(59168, 51431)); - expect( - e.polyline.depthFailMaterial.lineOffset.getValue(documentStartDate) - ).toEqual(new Cartesian2(59000, 31974)); - expect( - e.polyline.depthFailMaterial.lineOffset.getValue(documentStopDate) - ).toEqual(new Cartesian2(65334, 48383)); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_stripe" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.evenColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(166, 16, 249, 230)); - expect( - e.polyline.depthFailMaterial.evenColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(250, 177, 111, 216)); - expect( - e.polyline.depthFailMaterial.oddColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(210, 161, 181, 206)); - expect( - e.polyline.depthFailMaterial.oddColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(194, 73, 70, 224)); - expect( - e.polyline.depthFailMaterial.offset.getValue(documentStartDate) - ).toEqual(43239.0); - expect( - e.polyline.depthFailMaterial.offset.getValue(documentStopDate) - ).toEqual(47157.0); - expect( - e.polyline.depthFailMaterial.repeat.getValue(documentStartDate) - ).toEqual(58315.0); - expect( - e.polyline.depthFailMaterial.repeat.getValue(documentStopDate) - ).toEqual(45308.0); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.evenColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(0, 159, 59, 160)); - expect( - e.polyline.depthFailMaterial.evenColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(202, 33, 125, 165)); - expect( - e.polyline.depthFailMaterial.oddColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(19, 37, 14, 24)); - expect( - e.polyline.depthFailMaterial.oddColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(66, 150, 238, 84)); - expect( - e.polyline.depthFailMaterial.repeat.getValue(documentStartDate) - ).toEqual(new Cartesian2(15034, 58938)); - expect( - e.polyline.depthFailMaterial.repeat.getValue(documentStopDate) - ).toEqual(new Cartesian2(62661, 23796)); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_polylineOutline_color" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.611764705882353, - 0.407843137254902, - 0.807843137254902, - 0.380392156862745 - ), - 1e-14 - ); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.52156862745098, - 0.654901960784314, - 0.756862745098039, - 0.368627450980392 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_polylineOutline_outlineColor" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.outlineColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.670588235294118, - 0.211764705882353, - 0.607843137254902, - 0.388235294117647 - ), - 1e-14 - ); - expect( - e.polyline.depthFailMaterial.outlineColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.611764705882353, - 0.611764705882353, - 0.298039215686275, - 0.749019607843137 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_polylineArrow_color" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.874509803921569, - 0.541176470588235, - 0.231372549019608, - 0.596078431372549 - ), - 1e-14 - ); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.729411764705882, - 0.533333333333333, - 0.411764705882353, - 0.454901960784314 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_polylineDash_color" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.776470588235294, - 0.0823529411764706, - 0.96078431372549, - 0.776470588235294 - ), - 1e-14 - ); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.0941176470588235, - 0.643137254901961, - 0.717647058823529, - 0.890196078431372 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_polylineDash_gapColor" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.gapColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.219607843137255, - 0.403921568627451, - 0.815686274509804, - 0.803921568627451 - ), - 1e-14 - ); - expect( - e.polyline.depthFailMaterial.gapColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.294117647058824, - 0.615686274509804, - 0.172549019607843, - 0.0235294117647059 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_polylineGlow_color" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.168627450980392, - 0.847058823529412, - 0.968627450980392, - 0.431372549019608 - ), - 1e-14 - ); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.2, - 0.603921568627451, - 0.941176470588235, - 0.0901960784313725 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_image_color" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.980392156862745, - 0.450980392156863, - 0.329411764705882, - 0.670588235294118 - ), - 1e-14 - ); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.556862745098039, - 0.63921568627451, - 0.156862745098039, - 0.705882352941177 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_grid_color" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.623529411764706, - 0.607843137254902, - 0.913725490196078, - 0.596078431372549 - ), - 1e-14 - ); - expect( - e.polyline.depthFailMaterial.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.423529411764706, - 0.968627450980392, - 0.815686274509804, - 0.968627450980392 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.854901960784314, - 0.843137254901961, - 0.701960784313725, - 0.113725490196078 - ), - 1e-14 - ); - expect( - e.polyline.depthFailMaterial.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.941176470588235, - 0.890196078431372, - 0.933333333333333, - 0.588235294117647 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.427450980392157, - 0.870588235294118, - 0.96078431372549, - 0.219607843137255 - ), - 1e-14 - ); - expect( - e.polyline.depthFailMaterial.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.219607843137255, - 0.847058823529412, - 0.752941176470588, - 0.172549019607843 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.96078431372549, - 0.0941176470588235, - 0.725490196078431, - 0.819607843137255 - ), - 1e-14 - ); - expect( - e.polyline.depthFailMaterial.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.0588235294117647, - 0.447058823529412, - 0.572549019607843, - 0.0549019607843137 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_polyline_depthFailMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - e.polyline.depthFailMaterial.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.333333333333333, - 0.0431372549019608, - 0.886274509803922, - 0.384313725490196 - ), - 1e-14 - ); - expect( - e.polyline.depthFailMaterial.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.235294117647059, - 0.733333333333333, - 0.752941176470588, - 0.537254901960784 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_rectangle_coordinates_wsenDegrees" - )) - ).toBeDefined(); - expect(e.rectangle.coordinates.getValue(documentStartDate)).toEqual( - Rectangle.fromDegrees(35, 18, 38, 15) - ); - expect(e.rectangle.coordinates.getValue(documentStopDate)).toEqual( - Rectangle.fromDegrees(38, 1, 12, 30) - ); - expect( - (e = dataSource.entities.getById( - "sampled_rectangle_material_solidColor_color" - )) - ).toBeDefined(); - expect( - e.rectangle.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.203921568627451, - 0.243137254901961, - 0.576470588235294, - 0.0980392156862745 - ), - 1e-14 - ); - expect( - e.rectangle.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.913725490196078, - 0.831372549019608, - 0.76078431372549, - 0.952941176470588 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_rectangle_material_image")) - ).toBeDefined(); - expect(e.rectangle.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(3711, 44302) - ); - expect(e.rectangle.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(52318, 60108) - ); - expect(e.rectangle.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(49, 142, 97, 190) - ); - expect(e.rectangle.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(189, 250, 238, 118) - ); - expect( - (e = dataSource.entities.getById("sampled_rectangle_material_grid")) - ).toBeDefined(); - expect(e.rectangle.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(95, 53, 115, 82) - ); - expect(e.rectangle.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(204, 71, 209, 187) - ); - expect( - e.rectangle.material.cellAlpha.getValue(documentStartDate) - ).toEqual(48813.0); - expect( - e.rectangle.material.cellAlpha.getValue(documentStopDate) - ).toEqual(21269.0); - expect( - e.rectangle.material.lineCount.getValue(documentStartDate) - ).toEqual(new Cartesian2(22945, 32857)); - expect( - e.rectangle.material.lineCount.getValue(documentStopDate) - ).toEqual(new Cartesian2(55972, 34522)); - expect( - e.rectangle.material.lineThickness.getValue(documentStartDate) - ).toEqual(new Cartesian2(37146, 39825)); - expect( - e.rectangle.material.lineThickness.getValue(documentStopDate) - ).toEqual(new Cartesian2(64636, 13052)); - expect( - e.rectangle.material.lineOffset.getValue(documentStartDate) - ).toEqual(new Cartesian2(8882, 38690)); - expect( - e.rectangle.material.lineOffset.getValue(documentStopDate) - ).toEqual(new Cartesian2(8857, 21794)); - expect( - (e = dataSource.entities.getById("sampled_rectangle_material_stripe")) - ).toBeDefined(); - expect( - e.rectangle.material.evenColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(243, 96, 246, 5)); - expect( - e.rectangle.material.evenColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(74, 28, 207, 87)); - expect( - e.rectangle.material.oddColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(147, 18, 134, 10)); - expect( - e.rectangle.material.oddColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(59, 151, 72, 114)); - expect(e.rectangle.material.offset.getValue(documentStartDate)).toEqual( - 57328.0 - ); - expect(e.rectangle.material.offset.getValue(documentStopDate)).toEqual( - 2602.0 - ); - expect(e.rectangle.material.repeat.getValue(documentStartDate)).toEqual( - 29729.0 - ); - expect(e.rectangle.material.repeat.getValue(documentStopDate)).toEqual( - 30206.0 - ); - expect( - (e = dataSource.entities.getById( - "sampled_rectangle_material_checkerboard" - )) - ).toBeDefined(); - expect( - e.rectangle.material.evenColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(142, 184, 89, 24)); - expect( - e.rectangle.material.evenColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(200, 249, 166, 224)); - expect( - e.rectangle.material.oddColor.getValue(documentStartDate) - ).toEqual(Color.fromBytes(237, 53, 233, 244)); - expect( - e.rectangle.material.oddColor.getValue(documentStopDate) - ).toEqual(Color.fromBytes(101, 61, 234, 150)); - expect(e.rectangle.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(44089, 8876) - ); - expect(e.rectangle.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(60682, 18669) - ); - expect( - (e = dataSource.entities.getById( - "sampled_rectangle_material_image_color" - )) - ).toBeDefined(); - expect( - e.rectangle.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.552941176470588, - 0.101960784313725, - 0.772549019607843, - 0.00392156862745098 - ), - 1e-14 - ); - expect( - e.rectangle.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.0156862745098039, - 0.964705882352941, - 0.592156862745098, - 0.396078431372549 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_rectangle_material_grid_color" - )) - ).toBeDefined(); - expect( - e.rectangle.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.490196078431373, - 0.384313725490196, - 0.937254901960784, - 0.168627450980392 - ), - 1e-14 - ); - expect( - e.rectangle.material.color.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.392156862745098, - 0.756862745098039, - 0.454901960784314, - 0.529411764705882 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_rectangle_material_stripe_evenColor" - )) - ).toBeDefined(); - expect( - e.rectangle.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.32156862745098, - 0.776470588235294, - 0.227450980392157, - 0.0823529411764706 - ), - 1e-14 - ); - expect( - e.rectangle.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.929411764705882, - 0.725490196078431, - 0.00392156862745098, - 0.364705882352941 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_rectangle_material_stripe_oddColor" - )) - ).toBeDefined(); - expect( - e.rectangle.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.984313725490196, - 0.831372549019608, - 0.827450980392157, - 0.925490196078431 - ), - 1e-14 - ); - expect( - e.rectangle.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.145098039215686, - 0.0156862745098039, - 0.380392156862745, - 0.490196078431373 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_rectangle_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - e.rectangle.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.286274509803922, - 0.831372549019608, - 0.184313725490196, - 0.172549019607843 - ), - 1e-14 - ); - expect( - e.rectangle.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.596078431372549, - 0.603921568627451, - 0.694117647058824, - 0.235294117647059 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_rectangle_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - e.rectangle.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.929411764705882, - 0.92156862745098, - 0.270588235294118, - 0.0666666666666667 - ), - 1e-14 - ); - expect( - e.rectangle.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.411764705882353, - 0.125490196078431, - 0.505882352941176, - 0.509803921568627 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_rectangle_outlineColor_rgbaf" - )) - ).toBeDefined(); - expect( - e.rectangle.outlineColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.980392156862745, - 0.466666666666667, - 0.752941176470588, - 0.709803921568627 - ), - 1e-14 - ); - expect( - e.rectangle.outlineColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.549019607843137, - 0.949019607843137, - 0.545098039215686, - 0.380392156862745 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_wall_material_solidColor_color" - )) - ).toBeDefined(); - expect( - e.wall.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.384313725490196, - 0.964705882352941, - 0.827450980392157, - 0.815686274509804 - ), - 1e-14 - ); - expect(e.wall.material.color.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.00784313725490196, - 0.325490196078431, - 0.952941176470588, - 0.0549019607843137 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_wall_material_image")) - ).toBeDefined(); - expect(e.wall.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(13369, 38196) - ); - expect(e.wall.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(36874, 55696) - ); - expect(e.wall.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(1, 152, 139, 83) - ); - expect(e.wall.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(127, 110, 56, 69) - ); - expect( - (e = dataSource.entities.getById("sampled_wall_material_grid")) - ).toBeDefined(); - expect(e.wall.material.color.getValue(documentStartDate)).toEqual( - Color.fromBytes(243, 153, 88, 43) - ); - expect(e.wall.material.color.getValue(documentStopDate)).toEqual( - Color.fromBytes(169, 159, 82, 75) - ); - expect(e.wall.material.cellAlpha.getValue(documentStartDate)).toEqual( - 32179.0 - ); - expect(e.wall.material.cellAlpha.getValue(documentStopDate)).toEqual( - 55901.0 - ); - expect(e.wall.material.lineCount.getValue(documentStartDate)).toEqual( - new Cartesian2(46941, 30391) - ); - expect(e.wall.material.lineCount.getValue(documentStopDate)).toEqual( - new Cartesian2(51565, 6089) - ); - expect( - e.wall.material.lineThickness.getValue(documentStartDate) - ).toEqual(new Cartesian2(35543, 16778)); - expect( - e.wall.material.lineThickness.getValue(documentStopDate) - ).toEqual(new Cartesian2(32904, 18048)); - expect(e.wall.material.lineOffset.getValue(documentStartDate)).toEqual( - new Cartesian2(2955, 19723) - ); - expect(e.wall.material.lineOffset.getValue(documentStopDate)).toEqual( - new Cartesian2(58723, 15333) - ); - expect( - (e = dataSource.entities.getById("sampled_wall_material_stripe")) - ).toBeDefined(); - expect(e.wall.material.evenColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(204, 233, 122, 70) - ); - expect(e.wall.material.evenColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(215, 44, 132, 84) - ); - expect(e.wall.material.oddColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(20, 6, 10, 253) - ); - expect(e.wall.material.oddColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(96, 118, 90, 117) - ); - expect(e.wall.material.offset.getValue(documentStartDate)).toEqual( - 63629.0 - ); - expect(e.wall.material.offset.getValue(documentStopDate)).toEqual( - 38486.0 - ); - expect(e.wall.material.repeat.getValue(documentStartDate)).toEqual( - 41791.0 - ); - expect(e.wall.material.repeat.getValue(documentStopDate)).toEqual( - 56258.0 - ); - expect( - (e = dataSource.entities.getById( - "sampled_wall_material_checkerboard" - )) - ).toBeDefined(); - expect(e.wall.material.evenColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(38, 200, 78, 42) - ); - expect(e.wall.material.evenColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(115, 149, 62, 135) - ); - expect(e.wall.material.oddColor.getValue(documentStartDate)).toEqual( - Color.fromBytes(79, 103, 165, 56) - ); - expect(e.wall.material.oddColor.getValue(documentStopDate)).toEqual( - Color.fromBytes(201, 220, 190, 217) - ); - expect(e.wall.material.repeat.getValue(documentStartDate)).toEqual( - new Cartesian2(30510, 28535) - ); - expect(e.wall.material.repeat.getValue(documentStopDate)).toEqual( - new Cartesian2(22105, 29014) - ); - expect( - (e = dataSource.entities.getById("sampled_wall_material_image_color")) - ).toBeDefined(); - expect( - e.wall.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.584313725490196, - 0.752941176470588, - 0.588235294117647, - 0.733333333333333 - ), - 1e-14 - ); - expect(e.wall.material.color.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.309803921568627, - 0.988235294117647, - 0.0784313725490196, - 0.458823529411765 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_wall_material_grid_color")) - ).toBeDefined(); - expect( - e.wall.material.color.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.27843137254902, - 0.549019607843137, - 0.964705882352941, - 0.96078431372549 - ), - 1e-14 - ); - expect(e.wall.material.color.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.709803921568627, - 0.831372549019608, - 0.67843137254902, - 0.407843137254902 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_wall_material_stripe_evenColor" - )) - ).toBeDefined(); - expect( - e.wall.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.0901960784313725, - 0.243137254901961, - 0.537254901960784, - 0.168627450980392 - ), - 1e-14 - ); - expect( - e.wall.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.388235294117647, - 0.847058823529412, - 0.258823529411765, - 0.113725490196078 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_wall_material_stripe_oddColor" - )) - ).toBeDefined(); - expect( - e.wall.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.345098039215686, - 0.0196078431372549, - 0.0549019607843137, - 0.662745098039216 - ), - 1e-14 - ); - expect( - e.wall.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.694117647058824, - 0.890196078431372, - 0.380392156862745, - 0.317647058823529 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_wall_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - e.wall.material.evenColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.670588235294118, - 0.462745098039216, - 0.443137254901961, - 0.23921568627451 - ), - 1e-14 - ); - expect( - e.wall.material.evenColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.313725490196078, - 0.0901960784313725, - 0.623529411764706, - 0.933333333333333 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_wall_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - e.wall.material.oddColor.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.184313725490196, - 0.725490196078431, - 0.894117647058824, - 0.572549019607843 - ), - 1e-14 - ); - expect( - e.wall.material.oddColor.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.745098039215686, - 0.435294117647059, - 0.611764705882353, - 0.776470588235294 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById("sampled_wall_outlineColor_rgbaf")) - ).toBeDefined(); - expect(e.wall.outlineColor.getValue(documentStartDate)).toEqualEpsilon( - new Color( - 0.933333333333333, - 0.105882352941176, - 0.0627450980392157, - 0.396078431372549 - ), - 1e-14 - ); - expect(e.wall.outlineColor.getValue(documentStopDate)).toEqualEpsilon( - new Color( - 0.901960784313726, - 0.435294117647059, - 0.352941176470588, - 0.713725490196078 - ), - 1e-14 - ); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_intersectionColor_rgbaf" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_lateralSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_lateralSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_lateralSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_lateralSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_lateralSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_lateralSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_lateralSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_lateralSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_lateralSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_lateralSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_lateralSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_domeSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_domeSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_domeSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_domeSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_domeSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_domeSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_domeSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_domeSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_domeSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_domeSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_domeSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_environmentOcclusionMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_environmentOcclusionMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_environmentOcclusionMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_environmentOcclusionMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_environmentOcclusionMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_environmentOcclusionMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_environmentOcclusionMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_environmentOcclusionMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_environmentOcclusionMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_environmentOcclusionMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_environmentOcclusionMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_conicSensor_environmentIntersectionColor_rgbaf" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_intersectionColor_rgbaf" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_lateralSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_lateralSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_lateralSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_lateralSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_lateralSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_lateralSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_lateralSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_lateralSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_lateralSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_lateralSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_lateralSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_domeSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_domeSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_domeSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_domeSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_domeSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_domeSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_domeSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_domeSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_domeSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_domeSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_domeSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_environmentOcclusionMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_environmentOcclusionMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_environmentOcclusionMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_environmentOcclusionMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_environmentOcclusionMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_environmentOcclusionMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_environmentOcclusionMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_environmentOcclusionMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_environmentOcclusionMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_environmentOcclusionMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_environmentOcclusionMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_customPatternSensor_environmentIntersectionColor_rgbaf" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_intersectionColor_rgbaf" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_lateralSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_lateralSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_lateralSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_lateralSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_lateralSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_lateralSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_lateralSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_lateralSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_lateralSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_lateralSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_lateralSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_domeSurfaceMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_domeSurfaceMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_domeSurfaceMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_domeSurfaceMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_domeSurfaceMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_domeSurfaceMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_domeSurfaceMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_domeSurfaceMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_domeSurfaceMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_domeSurfaceMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_domeSurfaceMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_environmentOcclusionMaterial_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_environmentOcclusionMaterial_image" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_environmentOcclusionMaterial_grid" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_environmentOcclusionMaterial_stripe" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_environmentOcclusionMaterial_checkerboard" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_environmentOcclusionMaterial_image_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_environmentOcclusionMaterial_grid_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_environmentOcclusionMaterial_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_environmentOcclusionMaterial_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_environmentOcclusionMaterial_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_environmentOcclusionMaterial_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_rectangularSensor_environmentIntersectionColor_rgbaf" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_fan_material_solidColor_color" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("sampled_fan_material_image")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("sampled_fan_material_grid")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("sampled_fan_material_stripe")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("sampled_fan_material_checkerboard")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("sampled_fan_material_image_color")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("sampled_fan_material_grid_color")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_fan_material_stripe_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_fan_material_stripe_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_fan_material_checkerboard_evenColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_fan_material_checkerboard_oddColor" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("sampled_fan_outlineColor_rgbaf")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("sampled_vector_color_rgbaf")) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_vector_direction_unitSpherical" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_vector_direction_cartesian" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById( - "sampled_vector_direction_unitCartesian" - )) - ).toBeDefined(); - expect( - (e = dataSource.entities.getById("sampled_custom")) - ).toBeDefined(); - expect( - e.properties.custom_boundingRectangle.getValue(documentStartDate) - ).toEqual(new BoundingRectangle(10924, 3626, 12558, 56113)); - expect( - e.properties.custom_boundingRectangle.getValue(documentStopDate) - ).toEqual(new BoundingRectangle(59127, 45286, 34992, 17032)); - expect( - e.properties.custom_cartesian.getValue(documentStartDate) - ).toEqual(new Cartesian3(59456, 60648, 1004)); - expect( - e.properties.custom_cartesian.getValue(documentStopDate) - ).toEqual(new Cartesian3(37915, 14740, 14905)); - expect( - e.properties.custom_cartographicRadians.getValue(documentStartDate) - ).toEqual( - Cartesian3.fromRadians(1.25380297085855, 1.03510976346284, 7102) - ); - expect( - e.properties.custom_cartographicRadians.getValue(documentStopDate) - ).toEqual( - Cartesian3.fromRadians(1.10648839763778, 0.231915563506949, 340) - ); - expect( - e.properties.custom_cartographicDegrees.getValue(documentStartDate) - ).toEqual(Cartesian3.fromDegrees(44, 31, 55762)); - expect( - e.properties.custom_cartographicDegrees.getValue(documentStopDate) - ).toEqual(Cartesian3.fromDegrees(10, 18, 28847)); - expect( - e.properties.custom_cartesian2.getValue(documentStartDate) - ).toEqual(new Cartesian2(9033, 9251)); - expect( - e.properties.custom_cartesian2.getValue(documentStopDate) - ).toEqual(new Cartesian2(34048, 58501)); - expect( - e.properties.custom_unitCartesian.getValue(documentStartDate) - ).toEqualEpsilon( - new Cartesian3( - 0.0501133095086564, - 0.917195967206924, - 0.395272328843601 - ), - 1e-14 - ); - expect( - e.properties.custom_unitCartesian.getValue(documentStopDate) - ).toEqualEpsilon( - new Cartesian3( - 0.797476048450763, - 0.40584478979077, - 0.446454878735849 - ), - 1e-14 - ); - expect( - e.properties.custom_spherical.getValue(documentStartDate) - ).toEqual(Cartesian3.fromSpherical(new Spherical(47098, 2231, 14088))); - expect( - e.properties.custom_spherical.getValue(documentStopDate) - ).toEqual(Cartesian3.fromSpherical(new Spherical(34883, 48264, 41148))); - expect( - e.properties.custom_unitSpherical.getValue(documentStartDate) - ).toEqualEpsilon( - Cartesian3.fromSpherical(new Spherical(48811, 24254)), - 1e-14 - ); - expect( - e.properties.custom_unitSpherical.getValue(documentStopDate) - ).toEqualEpsilon( - Cartesian3.fromSpherical(new Spherical(44800, 8111)), - 1e-14 - ); - expect(e.properties.custom_rgba.getValue(documentStartDate)).toEqual( - Color.fromBytes(179, 175, 115, 46) - ); - expect(e.properties.custom_rgba.getValue(documentStopDate)).toEqual( - Color.fromBytes(136, 187, 237, 156) - ); - expect( - e.properties.custom_rgbaf.getValue(documentStartDate) - ).toEqualEpsilon( - new Color( - 0.890196078431372, - 0.450980392156863, - 0.588235294117647, - 0.72156862745098 - ), - 1e-14 - ); - expect( - e.properties.custom_rgbaf.getValue(documentStopDate) - ).toEqualEpsilon( - new Color( - 0.419607843137255, - 0.843137254901961, - 0.36078431372549, - 0.423529411764706 - ), - 1e-14 - ); - expect(e.properties.custom_number.getValue(documentStartDate)).toEqual( - 24561.0 - ); - expect(e.properties.custom_number.getValue(documentStopDate)).toEqual( - 45446.0 - ); - expect( - e.properties.custom_nearFarScalar.getValue(documentStartDate) - ).toEqual(new NearFarScalar(64112, 15354, 32827, 10368)); - expect( - e.properties.custom_nearFarScalar.getValue(documentStopDate) - ).toEqual(new NearFarScalar(55643, 45785, 33458, 29826)); - expect( - e.properties.custom_unitQuaternion.getValue(documentStartDate) - ).toEqualEpsilon( - new Quaternion( - 0.697299305414108, - 0.26496667122144, - 0.615947719782462, - 0.253327354041402 - ), - 1e-14 - ); - expect( - e.properties.custom_unitQuaternion.getValue(documentStopDate) - ).toEqualEpsilon( - new Quaternion( - 0.134764165794432, - 0.408681085292446, - 0.902060273565587, - 0.0332513608247514 - ), - 1e-14 - ); - expect(e.properties.custom_wsen.getValue(documentStartDate)).toEqual( - new Rectangle( - 1.4164143530628, - 1.2888469381038, - 0.679756561409663, - 1.29649258884014 - ) - ); - expect(e.properties.custom_wsen.getValue(documentStopDate)).toEqual( - new Rectangle( - 1.19133054275098, - 0.9154648059314, - 0.71347968461712, - 1.32750822775441 - ) - ); - expect( - e.properties.custom_wsenDegrees.getValue(documentStartDate) - ).toEqual(Rectangle.fromDegrees(29, 11, 17, 36)); - expect( - e.properties.custom_wsenDegrees.getValue(documentStopDate) - ).toEqual(Rectangle.fromDegrees(37, 16, 25, 23)); - } - ); + return CzmlDataSource.load('Data/CZML/ValidationDocument.czml').then(function(dataSource) { + var e; + var date; + var documentStartDate = JulianDate.fromIso8601('2016-06-17T12:00:00Z'); + var documentStopDate = JulianDate.fromIso8601('2016-06-17T13:00:00Z'); + expect(dataSource.clock.startTime).toEqual(documentStartDate); + expect(dataSource.clock.stopTime).toEqual(documentStopDate); + expect(dataSource.clock.currentTime).toEqual(documentStartDate); + expect(dataSource.clock.multiplier).toEqual(1.0); + expect(dataSource.clock.clockRange).toEqual(ClockRange.UNBOUNDED); + expect(dataSource.clock.clockStep).toEqual(ClockStep.SYSTEM_CLOCK_MULTIPLIER); + var constant = e = dataSource.entities.getById('Constant'); + expect(e).toBeDefined(); + date = JulianDate.now(); + expect(e.description.getValue(date)).toEqual('string31449'); + expect(e.position.getValue(date)).toEqual(new Cartesian3(24944, 16481, 24896)); + expect(e.orientation.getValue(date)).toEqualEpsilon(new Quaternion(0.431493311977589, 0.560811914509339, 0.423522822587574, 0.565625261998114), 1e-14); + expect(e.viewFrom.getValue(date)).toEqual(new Cartesian3(17794, 13381, 18228)); + expect(e.billboard.show.getValue(date)).toEqual(true); + expect(e.billboard.image.getValue(date).url).toEqual('http://example.com/3792'); + expect(e.billboard.scale.getValue(date)).toEqual(27514.0); + expect(e.billboard.pixelOffset.getValue(date)).toEqual(new Cartesian2(16996, 51010)); + expect(e.billboard.eyeOffset.getValue(date)).toEqual(new Cartesian3(64633, 11516, 17196)); + expect(e.billboard.horizontalOrigin.getValue(date)).toEqual(HorizontalOrigin.LEFT); + expect(e.billboard.verticalOrigin.getValue(date)).toEqual(VerticalOrigin.BOTTOM); + expect(e.billboard.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.billboard.color.getValue(date)).toEqual(Color.fromBytes(87, 118, 167, 140)); + expect(e.billboard.rotation.getValue(date)).toEqual(57379.0); + expect(e.billboard.alignedAxis.getValue(date)).toEqualEpsilon(new Cartesian3(0.205062091895724, 0.975768213485699, 0.0763277932228903), 1e-14); + expect(e.billboard.sizeInMeters.getValue(date)).toEqual(true); + expect(e.billboard.width.getValue(date)).toEqual(25197.0); + expect(e.billboard.height.getValue(date)).toEqual(53328.0); + expect(e.billboard.scaleByDistance.getValue(date)).toEqual(new NearFarScalar(59318, 31207, 63353, 55287)); + expect(e.billboard.translucencyByDistance.getValue(date)).toEqual(new NearFarScalar(43707, 31146, 12921, 57138)); + expect(e.billboard.pixelOffsetScaleByDistance.getValue(date)).toEqual(new NearFarScalar(11873, 40494, 29598, 27507)); + expect(e.billboard.imageSubRegion.getValue(date)).toEqual(new BoundingRectangle(62620, 63220, 23030, 63321)); + expect(e.billboard.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(22843, 27481)); + expect(e.billboard.disableDepthTestDistance.getValue(date)).toEqual(39764.0); + expect(e.box.show.getValue(date)).toEqual(true); + expect(e.box.dimensions.getValue(date)).toEqual(new Cartesian3(57494, 62432, 42995)); + expect(e.box.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.box.fill.getValue(date)).toEqual(true); + expect(e.box.material.color.getValue(date)).toEqual(Color.fromBytes(88, 226, 91, 144)); + expect(e.box.outline.getValue(date)).toEqual(true); + expect(e.box.outlineColor.getValue(date)).toEqual(Color.fromBytes(121, 42, 244, 168)); + expect(e.box.outlineWidth.getValue(date)).toEqual(15323.0); + expect(e.box.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); + expect(e.box.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(3775, 49016)); + expect(e.corridor.show.getValue(date)).toEqual(true); + expect(e.corridor.positions.getValue(date)).toEqual([ new Cartesian3(36415, 2702, 36618), new Cartesian3(47759, 11706, 63277) ]); + expect(e.corridor.width.getValue(date)).toEqual(20413.0); + expect(e.corridor.height.getValue(date)).toEqual(8062.0); + expect(e.corridor.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.corridor.extrudedHeight.getValue(date)).toEqual(22846.0); + expect(e.corridor.extrudedHeightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.corridor.cornerType.getValue(date)).toEqual(CornerType.BEVELED); + expect(e.corridor.granularity.getValue(date)).toEqual(44105.0); + expect(e.corridor.fill.getValue(date)).toEqual(true); + expect(e.corridor.material.color.getValue(date)).toEqual(Color.fromBytes(230, 252, 22, 236)); + expect(e.corridor.outline.getValue(date)).toEqual(true); + expect(e.corridor.outlineColor.getValue(date)).toEqual(Color.fromBytes(198, 25, 134, 60)); + expect(e.corridor.outlineWidth.getValue(date)).toEqual(9132.0); + expect(e.corridor.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); + expect(e.corridor.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(15797, 46507)); + expect(e.corridor.classificationType.getValue(date)).toEqual(ClassificationType.TERRAIN); + expect(e.corridor.zIndex.getValue(date)).toEqual(59315); + expect(e.cylinder.show.getValue(date)).toEqual(true); + expect(e.cylinder.length.getValue(date)).toEqual(33298.0); + expect(e.cylinder.topRadius.getValue(date)).toEqual(16245.0); + expect(e.cylinder.bottomRadius.getValue(date)).toEqual(59378.0); + expect(e.cylinder.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.cylinder.fill.getValue(date)).toEqual(true); + expect(e.cylinder.material.color.getValue(date)).toEqual(Color.fromBytes(216, 68, 53, 64)); + expect(e.cylinder.outline.getValue(date)).toEqual(true); + expect(e.cylinder.outlineColor.getValue(date)).toEqual(Color.fromBytes(4, 90, 209, 96)); + expect(e.cylinder.outlineWidth.getValue(date)).toEqual(64018.0); + expect(e.cylinder.numberOfVerticalLines.getValue(date)).toEqual(38567); + expect(e.cylinder.slices.getValue(date)).toEqual(39979); + expect(e.cylinder.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); + expect(e.cylinder.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(43860, 52395)); + expect(e.ellipse.show.getValue(date)).toEqual(true); + expect(e.ellipse.semiMajorAxis.getValue(date)).toEqual(60072.0); + expect(e.ellipse.semiMinorAxis.getValue(date)).toEqual(38653.0); + expect(e.ellipse.height.getValue(date)).toEqual(15549.0); + expect(e.ellipse.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.ellipse.extrudedHeight.getValue(date)).toEqual(55640.0); + expect(e.ellipse.extrudedHeightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.ellipse.rotation.getValue(date)).toEqual(27722.0); + expect(e.ellipse.stRotation.getValue(date)).toEqual(4692.0); + expect(e.ellipse.granularity.getValue(date)).toEqual(62192.0); + expect(e.ellipse.fill.getValue(date)).toEqual(true); + expect(e.ellipse.material.color.getValue(date)).toEqual(Color.fromBytes(116, 186, 200, 40)); + expect(e.ellipse.outline.getValue(date)).toEqual(true); + expect(e.ellipse.outlineColor.getValue(date)).toEqual(Color.fromBytes(160, 82, 145, 104)); + expect(e.ellipse.outlineWidth.getValue(date)).toEqual(8839.0); + expect(e.ellipse.numberOfVerticalLines.getValue(date)).toEqual(38878); + expect(e.ellipse.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); + expect(e.ellipse.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(27813, 30828)); + expect(e.ellipse.classificationType.getValue(date)).toEqual(ClassificationType.TERRAIN); + expect(e.ellipse.zIndex.getValue(date)).toEqual(3341); + expect(e.ellipsoid.show.getValue(date)).toEqual(true); + expect(e.ellipsoid.radii.getValue(date)).toEqual(new Cartesian3(15638, 24381, 37983)); + expect(e.ellipsoid.innerRadii.getValue(date)).toEqual(new Cartesian3(21988, 44373, 36013)); + expect(e.ellipsoid.minimumClock.getValue(date)).toEqual(57589.0); + expect(e.ellipsoid.maximumClock.getValue(date)).toEqual(24940.0); + expect(e.ellipsoid.minimumCone.getValue(date)).toEqual(54533.0); + expect(e.ellipsoid.maximumCone.getValue(date)).toEqual(64532.0); + expect(e.ellipsoid.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.ellipsoid.fill.getValue(date)).toEqual(true); + expect(e.ellipsoid.material.color.getValue(date)).toEqual(Color.fromBytes(202, 67, 110, 69)); + expect(e.ellipsoid.outline.getValue(date)).toEqual(true); + expect(e.ellipsoid.outlineColor.getValue(date)).toEqual(Color.fromBytes(55, 23, 226, 7)); + expect(e.ellipsoid.outlineWidth.getValue(date)).toEqual(47507.0); + expect(e.ellipsoid.stackPartitions.getValue(date)).toEqual(54278); + expect(e.ellipsoid.slicePartitions.getValue(date)).toEqual(28562); + expect(e.ellipsoid.subdivisions.getValue(date)).toEqual(14008); + expect(e.ellipsoid.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); + expect(e.ellipsoid.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(3293, 56793)); + expect(e.label.show.getValue(date)).toEqual(true); + expect(e.label.text.getValue(date)).toEqual('string36641'); + expect(e.label.font.getValue(date)).toEqual('14px sans-serif'); + expect(e.label.style.getValue(date)).toEqual(LabelStyle.FILL_AND_OUTLINE); + expect(e.label.scale.getValue(date)).toEqual(6510.0); + expect(e.label.showBackground.getValue(date)).toEqual(true); + expect(e.label.backgroundColor.getValue(date)).toEqual(Color.fromBytes(225, 114, 54, 128)); + expect(e.label.backgroundPadding.getValue(date)).toEqual(new Cartesian2(5508, 56341)); + expect(e.label.pixelOffset.getValue(date)).toEqual(new Cartesian2(25913, 30821)); + expect(e.label.eyeOffset.getValue(date)).toEqual(new Cartesian3(30502, 29047, 25457)); + expect(e.label.horizontalOrigin.getValue(date)).toEqual(HorizontalOrigin.LEFT); + expect(e.label.verticalOrigin.getValue(date)).toEqual(VerticalOrigin.BOTTOM); + expect(e.label.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.label.fillColor.getValue(date)).toEqual(Color.fromBytes(88, 197, 147, 137)); + expect(e.label.outlineColor.getValue(date)).toEqual(Color.fromBytes(171, 128, 159, 223)); + expect(e.label.outlineWidth.getValue(date)).toEqual(36637.0); + expect(e.label.translucencyByDistance.getValue(date)).toEqual(new NearFarScalar(34067, 16517, 11328, 13612)); + expect(e.label.pixelOffsetScaleByDistance.getValue(date)).toEqual(new NearFarScalar(21220, 35154, 33161, 36737)); + expect(e.label.scaleByDistance.getValue(date)).toEqual(new NearFarScalar(7350, 32796, 1408, 55045)); + expect(e.label.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(5204, 21012)); + expect(e.label.disableDepthTestDistance.getValue(date)).toEqual(17959.0); + expect(e.model.show.getValue(date)).toEqual(true); + expect(e.model.uri.getValue(date).url).toEqual('http://example.com/60043'); + expect(e.model.scale.getValue(date)).toEqual(44278.0); + expect(e.model.minimumPixelSize.getValue(date)).toEqual(35888.0); + expect(e.model.maximumScale.getValue(date)).toEqual(64305.0); + expect(e.model.incrementallyLoadTextures.getValue(date)).toEqual(true); + expect(e.model.runAnimations.getValue(date)).toEqual(true); + expect(e.model.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); + expect(e.model.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.model.silhouetteColor.getValue(date)).toEqual(Color.fromBytes(29, 61, 52, 101)); + expect(e.model.silhouetteSize.getValue(date)).toEqual(4645.0); + expect(e.model.color.getValue(date)).toEqual(Color.fromBytes(0, 52, 75, 73)); + expect(e.model.colorBlendMode.getValue(date)).toEqual(ColorBlendMode.REPLACE); + expect(e.model.colorBlendAmount.getValue(date)).toEqual(7475.0); + expect(e.model.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(31861, 62844)); + expect(e.model.nodeTransformations.prop.translation.getValue(date)).toEqual(new Cartesian3(18548, 48456, 21181)); + expect(e.model.nodeTransformations.prop.rotation.getValue(date)).toEqualEpsilon(new Quaternion(0.527960606328925, 0.567156704919186, 0.624812964569899, 0.0959146992664751), 1e-14); + expect(e.model.nodeTransformations.prop.scale.getValue(date)).toEqual(new Cartesian3(53739, 37841, 41107)); + expect(e.model.articulations.prop.getValue(date)).toEqual(25496.0); + expect(e.path.show.getValue(date)).toEqual(true); + expect(e.path.leadTime.getValue(date)).toEqual(5997.0); + expect(e.path.trailTime.getValue(date)).toEqual(52915.0); + expect(e.path.width.getValue(date)).toEqual(56040.0); + expect(e.path.resolution.getValue(date)).toEqual(31563.0); + expect(e.path.material.color.getValue(date)).toEqual(Color.fromBytes(10, 78, 168, 13)); + expect(e.path.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(11646, 32422)); + expect(e.point.show.getValue(date)).toEqual(true); + expect(e.point.pixelSize.getValue(date)).toEqual(53869.0); + expect(e.point.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.point.color.getValue(date)).toEqual(Color.fromBytes(3, 147, 219, 77)); + expect(e.point.outlineColor.getValue(date)).toEqual(Color.fromBytes(254, 106, 11, 94)); + expect(e.point.outlineWidth.getValue(date)).toEqual(27922.0); + expect(e.point.scaleByDistance.getValue(date)).toEqual(new NearFarScalar(20128, 16462, 49728, 18882)); + expect(e.point.translucencyByDistance.getValue(date)).toEqual(new NearFarScalar(52796, 43982, 61099, 50158)); + expect(e.point.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(29646, 52915)); + expect(e.point.disableDepthTestDistance.getValue(date)).toEqual(9675.0); + expect(e.polygon.show.getValue(date)).toEqual(true); + expect(e.polygon.hierarchy.getValue(date).positions).toEqual([ new Cartesian3(39143, 2200, 6408), new Cartesian3(27161, 33386, 62338) ]); + expect(e.polygon.hierarchy.getValue(date).holes).toEqual([ new PolygonHierarchy([ new Cartesian3(47462, 20409, 3151), new Cartesian3(58636, 39653, 53914), new Cartesian3(31954, 4988, 47462) ]), new PolygonHierarchy([ new Cartesian3(20409, 3151, 58636), new Cartesian3(39653, 53914, 31954), new Cartesian3(4988, 47462, 20409), new Cartesian3(3151, 58636, 39653) ]) ]); + expect(e.polygon.arcType.getValue(date)).toEqual(ArcType.RHUMB); + expect(e.polygon.height.getValue(date)).toEqual(26391.0); + expect(e.polygon.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.polygon.extrudedHeight.getValue(date)).toEqual(15922.0); + expect(e.polygon.extrudedHeightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.polygon.stRotation.getValue(date)).toEqual(2555.0); + expect(e.polygon.granularity.getValue(date)).toEqual(17060.0); + expect(e.polygon.fill.getValue(date)).toEqual(true); + expect(e.polygon.material.color.getValue(date)).toEqual(Color.fromBytes(216, 139, 124, 253)); + expect(e.polygon.outline.getValue(date)).toEqual(true); + expect(e.polygon.outlineColor.getValue(date)).toEqual(Color.fromBytes(172, 48, 134, 87)); + expect(e.polygon.outlineWidth.getValue(date)).toEqual(62220.0); + expect(e.polygon.perPositionHeight.getValue(date)).toEqual(true); + expect(e.polygon.closeTop.getValue(date)).toEqual(true); + expect(e.polygon.closeBottom.getValue(date)).toEqual(true); + expect(e.polygon.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); + expect(e.polygon.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(5989, 26104)); + expect(e.polygon.classificationType.getValue(date)).toEqual(ClassificationType.TERRAIN); + expect(e.polygon.zIndex.getValue(date)).toEqual(31269); + expect(e.polyline.show.getValue(date)).toEqual(true); + expect(e.polyline.positions.getValue(date)).toEqual([ new Cartesian3(23333, 31067, 17529), new Cartesian3(57924, 41186, 31648) ]); + expect(e.polyline.arcType.getValue(date)).toEqual(ArcType.RHUMB); + expect(e.polyline.width.getValue(date)).toEqual(14667.0); + expect(e.polyline.granularity.getValue(date)).toEqual(53395.0); + expect(e.polyline.material.color.getValue(date)).toEqual(Color.fromBytes(88, 0, 232, 230)); + expect(e.polyline.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual(Color.fromBytes(197, 195, 115, 198)); + expect(e.polyline.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(5807, 30486)); + expect(e.polyline.clampToGround.getValue(date)).toEqual(true); + expect(e.polyline.classificationType.getValue(date)).toEqual(ClassificationType.TERRAIN); + expect(e.polyline.zIndex.getValue(date)).toEqual(17658); + expect(e.polylineVolume.show.getValue(date)).toEqual(true); + expect(e.polylineVolume.positions.getValue(date)).toEqual([ new Cartesian3(62250, 34803, 52359), new Cartesian3(59852, 58857, 24549) ]); + expect(e.polylineVolume.shape.getValue(date)).toEqual([ new Cartesian2(45301, 43952), new Cartesian2(34475, 28294) ]); + expect(e.polylineVolume.cornerType.getValue(date)).toEqual(CornerType.BEVELED); + expect(e.polylineVolume.granularity.getValue(date)).toEqual(12007.0); + expect(e.polylineVolume.fill.getValue(date)).toEqual(true); + expect(e.polylineVolume.material.color.getValue(date)).toEqual(Color.fromBytes(232, 0, 34, 154)); + expect(e.polylineVolume.outline.getValue(date)).toEqual(true); + expect(e.polylineVolume.outlineColor.getValue(date)).toEqual(Color.fromBytes(179, 137, 151, 42)); + expect(e.polylineVolume.outlineWidth.getValue(date)).toEqual(23162.0); + expect(e.polylineVolume.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); + expect(e.polylineVolume.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(49375, 57097)); + expect(e.rectangle.show.getValue(date)).toEqual(true); + expect(e.rectangle.coordinates.getValue(date)).toEqual(new Rectangle(1.13325368272577, 0.703573207377445, 0.756676249095309, 0.339217858685931)); + expect(e.rectangle.height.getValue(date)).toEqual(20608.0); + expect(e.rectangle.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.rectangle.extrudedHeight.getValue(date)).toEqual(23002.0); + expect(e.rectangle.extrudedHeightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.rectangle.rotation.getValue(date)).toEqual(54979.0); + expect(e.rectangle.stRotation.getValue(date)).toEqual(8079.0); + expect(e.rectangle.granularity.getValue(date)).toEqual(60343.0); + expect(e.rectangle.fill.getValue(date)).toEqual(true); + expect(e.rectangle.material.color.getValue(date)).toEqual(Color.fromBytes(160, 249, 70, 249)); + expect(e.rectangle.outline.getValue(date)).toEqual(true); + expect(e.rectangle.outlineColor.getValue(date)).toEqual(Color.fromBytes(196, 59, 142, 36)); + expect(e.rectangle.outlineWidth.getValue(date)).toEqual(59794.0); + expect(e.rectangle.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); + expect(e.rectangle.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(21388, 23379)); + expect(e.rectangle.classificationType.getValue(date)).toEqual(ClassificationType.TERRAIN); + expect(e.rectangle.zIndex.getValue(date)).toEqual(445); + expect(e.tileset.show.getValue(date)).toEqual(true); + expect(e.tileset.uri.getValue(date).url).toEqual('http://example.com/6864'); + expect(e.tileset.maximumScreenSpaceError.getValue(date)).toEqual(51767.0); + expect(e.wall.show.getValue(date)).toEqual(true); + expect(e.wall.positions.getValue(date)).toEqual([ new Cartesian3(21681, 40276, 30621), new Cartesian3(3959, 61967, 19442) ]); + expect(e.wall.minimumHeights.getValue(date)).toEqual([ 49466, 44737 ]); + expect(e.wall.maximumHeights.getValue(date)).toEqual([ 59672, 62697 ]); + expect(e.wall.granularity.getValue(date)).toEqual(47652.0); + expect(e.wall.fill.getValue(date)).toEqual(true); + expect(e.wall.material.color.getValue(date)).toEqual(Color.fromBytes(64, 176, 190, 65)); + expect(e.wall.outline.getValue(date)).toEqual(true); + expect(e.wall.outlineColor.getValue(date)).toEqual(Color.fromBytes(107, 196, 96, 198)); + expect(e.wall.outlineWidth.getValue(date)).toEqual(50458.0); + expect(e.wall.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); + expect(e.wall.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(27810, 41691)); + expect(e = dataSource.entities.getById('constant_position_cartographicRadians')).toBeDefined(); + expect(e.position.getValue(date)).toEqual(Cartesian3.fromRadians(0.368123392863751, 0.678098621973879, 32050)); + expect(e = dataSource.entities.getById('constant_position_cartographicDegrees')).toBeDefined(); + expect(e.position.getValue(date)).toEqual(Cartesian3.fromDegrees(14, 14, 24697)); + expect(e = dataSource.entities.getById('constant_position_cartesianVelocity')).toBeDefined(); + expect(e.position.getValue(date)).toEqual(new Cartesian3(15776, 23613, 14940)); + expect(e = dataSource.entities.getById('constant_billboard_color_rgbaf')).toBeDefined(); + expect(e.billboard.color.getValue(date)).toEqualEpsilon(new Color(0.674509803921569, 0.866666666666667, 0.6, 0.650980392156863), 1e-14); + expect(e = dataSource.entities.getById('constant_billboard_alignedAxis_unitSpherical')).toBeDefined(); + expect(e.billboard.alignedAxis.getValue(date)).toEqualEpsilon(Cartesian3.fromSpherical(new Spherical(20514, 39760)), 1e-14); + expect(e = dataSource.entities.getById('constant_box_material_solidColor_color')).toBeDefined(); + expect(e.box.material.color.getValue(date)).toEqualEpsilon(new Color(0.996078431372549, 0.0823529411764706, 0.494117647058824, 0.101960784313725), 1e-14); + expect(e = dataSource.entities.getById('material_box_material_image')).toBeDefined(); + expect(e.box.material.image.getValue(date).url).toEqual('http://example.com/50881'); + expect(e.box.material.repeat.getValue(date)).toEqual(new Cartesian2(58955, 45286)); + expect(e.box.material.color.getValue(date)).toEqual(Color.fromBytes(98, 97, 133, 129)); + expect(e.box.material.transparent.getValue(date)).toEqual(true); + expect(e = dataSource.entities.getById('material_box_material_grid')).toBeDefined(); + expect(e.box.material.color.getValue(date)).toEqual(Color.fromBytes(178, 10, 106, 226)); + expect(e.box.material.cellAlpha.getValue(date)).toEqual(47180.0); + expect(e.box.material.lineCount.getValue(date)).toEqual(new Cartesian2(24659, 13408)); + expect(e.box.material.lineThickness.getValue(date)).toEqual(new Cartesian2(13897, 25654)); + expect(e.box.material.lineOffset.getValue(date)).toEqual(new Cartesian2(14153, 49207)); + expect(e = dataSource.entities.getById('material_box_material_stripe')).toBeDefined(); + expect(e.box.material.orientation.getValue(date)).toEqual(StripeOrientation.VERTICAL); + expect(e.box.material.evenColor.getValue(date)).toEqual(Color.fromBytes(18, 147, 177, 80)); + expect(e.box.material.oddColor.getValue(date)).toEqual(Color.fromBytes(189, 226, 187, 107)); + expect(e.box.material.offset.getValue(date)).toEqual(43563.0); + expect(e.box.material.repeat.getValue(date)).toEqual(24480.0); + expect(e = dataSource.entities.getById('material_box_material_checkerboard')).toBeDefined(); + expect(e.box.material.evenColor.getValue(date)).toEqual(Color.fromBytes(188, 19, 247, 166)); + expect(e.box.material.oddColor.getValue(date)).toEqual(Color.fromBytes(70, 241, 211, 45)); + expect(e.box.material.repeat.getValue(date)).toEqual(new Cartesian2(31491, 2427)); + expect(e = dataSource.entities.getById('constant_box_material_image_color')).toBeDefined(); + expect(e.box.material.color.getValue(date)).toEqualEpsilon(new Color(0.733333333333333, 0.474509803921569, 0.56078431372549, 0.349019607843137), 1e-14); + expect(e = dataSource.entities.getById('constant_box_material_grid_color')).toBeDefined(); + expect(e.box.material.color.getValue(date)).toEqualEpsilon(new Color(0.847058823529412, 0.392156862745098, 0.352941176470588, 0.898039215686275), 1e-14); + expect(e = dataSource.entities.getById('constant_box_material_stripe_evenColor')).toBeDefined(); + expect(e.box.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.666666666666667, 0.976470588235294, 0.83921568627451, 0.643137254901961), 1e-14); + expect(e = dataSource.entities.getById('constant_box_material_stripe_oddColor')).toBeDefined(); + expect(e.box.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.258823529411765, 0.796078431372549, 0.717647058823529, 0.749019607843137), 1e-14); + expect(e = dataSource.entities.getById('constant_box_material_checkerboard_evenColor')).toBeDefined(); + expect(e.box.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.741176470588235, 0.0941176470588235, 0.101960784313725, 0.509803921568627), 1e-14); + expect(e = dataSource.entities.getById('constant_box_material_checkerboard_oddColor')).toBeDefined(); + expect(e.box.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.403921568627451, 0.768627450980392, 0.717647058823529, 0.0392156862745098), 1e-14); + expect(e = dataSource.entities.getById('constant_box_outlineColor_rgbaf')).toBeDefined(); + expect(e.box.outlineColor.getValue(date)).toEqualEpsilon(new Color(0.835294117647059, 0.0313725490196078, 0.282352941176471, 0.337254901960784), 1e-14); + expect(e = dataSource.entities.getById('constant_corridor_positions_cartographicRadians')).toBeDefined(); + expect(e.corridor.positions.getValue(date)).toEqual([ Cartesian3.fromRadians(0.220356654342316, 0.879184920197648, 64909), Cartesian3.fromRadians(0.175978952571564, 1.00316515710468, 913) ]); + expect(e = dataSource.entities.getById('constant_corridor_positions_cartographicDegrees')).toBeDefined(); + expect(e.corridor.positions.getValue(date)).toEqual([ Cartesian3.fromDegrees(28, 14, 63058), Cartesian3.fromDegrees(15, 37, 26381) ]); + expect(e = dataSource.entities.getById('constant_corridor_material_solidColor_color')).toBeDefined(); + expect(e.corridor.material.color.getValue(date)).toEqualEpsilon(new Color(0.333333333333333, 0.87843137254902, 0.356862745098039, 0.435294117647059), 1e-14); + expect(e = dataSource.entities.getById('material_corridor_material_image')).toBeDefined(); + expect(e.corridor.material.image.getValue(date).url).toEqual('http://example.com/8903'); + expect(e.corridor.material.repeat.getValue(date)).toEqual(new Cartesian2(41660, 35234)); + expect(e.corridor.material.color.getValue(date)).toEqual(Color.fromBytes(213, 25, 147, 247)); + expect(e.corridor.material.transparent.getValue(date)).toEqual(true); + expect(e = dataSource.entities.getById('material_corridor_material_grid')).toBeDefined(); + expect(e.corridor.material.color.getValue(date)).toEqual(Color.fromBytes(236, 51, 112, 235)); + expect(e.corridor.material.cellAlpha.getValue(date)).toEqual(11472.0); + expect(e.corridor.material.lineCount.getValue(date)).toEqual(new Cartesian2(1254, 38404)); + expect(e.corridor.material.lineThickness.getValue(date)).toEqual(new Cartesian2(48962, 63679)); + expect(e.corridor.material.lineOffset.getValue(date)).toEqual(new Cartesian2(39061, 47000)); + expect(e = dataSource.entities.getById('material_corridor_material_stripe')).toBeDefined(); + expect(e.corridor.material.orientation.getValue(date)).toEqual(StripeOrientation.VERTICAL); + expect(e.corridor.material.evenColor.getValue(date)).toEqual(Color.fromBytes(245, 61, 208, 138)); + expect(e.corridor.material.oddColor.getValue(date)).toEqual(Color.fromBytes(114, 73, 91, 165)); + expect(e.corridor.material.offset.getValue(date)).toEqual(12788.0); + expect(e.corridor.material.repeat.getValue(date)).toEqual(33136.0); + expect(e = dataSource.entities.getById('material_corridor_material_checkerboard')).toBeDefined(); + expect(e.corridor.material.evenColor.getValue(date)).toEqual(Color.fromBytes(24, 195, 5, 165)); + expect(e.corridor.material.oddColor.getValue(date)).toEqual(Color.fromBytes(15, 107, 210, 249)); + expect(e.corridor.material.repeat.getValue(date)).toEqual(new Cartesian2(19640, 18252)); + expect(e = dataSource.entities.getById('constant_corridor_material_image_color')).toBeDefined(); + expect(e.corridor.material.color.getValue(date)).toEqualEpsilon(new Color(0.0156862745098039, 0.0941176470588235, 0.4, 0.529411764705882), 1e-14); + expect(e = dataSource.entities.getById('constant_corridor_material_grid_color')).toBeDefined(); + expect(e.corridor.material.color.getValue(date)).toEqualEpsilon(new Color(0.576470588235294, 0.76078431372549, 0.152941176470588, 0.00392156862745098), 1e-14); + expect(e = dataSource.entities.getById('constant_corridor_material_stripe_evenColor')).toBeDefined(); + expect(e.corridor.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.913725490196078, 0.63921568627451, 0.631372549019608, 0.890196078431372), 1e-14); + expect(e = dataSource.entities.getById('constant_corridor_material_stripe_oddColor')).toBeDefined(); + expect(e.corridor.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.2, 0.137254901960784, 0.792156862745098, 0.301960784313725), 1e-14); + expect(e = dataSource.entities.getById('constant_corridor_material_checkerboard_evenColor')).toBeDefined(); + expect(e.corridor.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.286274509803922, 0.619607843137255, 0.615686274509804, 0.231372549019608), 1e-14); + expect(e = dataSource.entities.getById('constant_corridor_material_checkerboard_oddColor')).toBeDefined(); + expect(e.corridor.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.690196078431373, 0.172549019607843, 0.984313725490196, 0.43921568627451), 1e-14); + expect(e = dataSource.entities.getById('constant_corridor_outlineColor_rgbaf')).toBeDefined(); + expect(e.corridor.outlineColor.getValue(date)).toEqualEpsilon(new Color(0.690196078431373, 0.0549019607843137, 0.247058823529412, 0.298039215686275), 1e-14); + expect(e = dataSource.entities.getById('constant_cylinder_material_solidColor_color')).toBeDefined(); + expect(e.cylinder.material.color.getValue(date)).toEqualEpsilon(new Color(0.47843137254902, 0.0509803921568627, 0.450980392156863, 0.87843137254902), 1e-14); + expect(e = dataSource.entities.getById('material_cylinder_material_image')).toBeDefined(); + expect(e.cylinder.material.image.getValue(date).url).toEqual('http://example.com/27447'); + expect(e.cylinder.material.repeat.getValue(date)).toEqual(new Cartesian2(65243, 41470)); + expect(e.cylinder.material.color.getValue(date)).toEqual(Color.fromBytes(200, 175, 107, 217)); + expect(e.cylinder.material.transparent.getValue(date)).toEqual(true); + expect(e = dataSource.entities.getById('material_cylinder_material_grid')).toBeDefined(); + expect(e.cylinder.material.color.getValue(date)).toEqual(Color.fromBytes(173, 210, 231, 62)); + expect(e.cylinder.material.cellAlpha.getValue(date)).toEqual(9555.0); + expect(e.cylinder.material.lineCount.getValue(date)).toEqual(new Cartesian2(58545, 26852)); + expect(e.cylinder.material.lineThickness.getValue(date)).toEqual(new Cartesian2(58520, 44260)); + expect(e.cylinder.material.lineOffset.getValue(date)).toEqual(new Cartesian2(61513, 28656)); + expect(e = dataSource.entities.getById('material_cylinder_material_stripe')).toBeDefined(); + expect(e.cylinder.material.orientation.getValue(date)).toEqual(StripeOrientation.VERTICAL); + expect(e.cylinder.material.evenColor.getValue(date)).toEqual(Color.fromBytes(158, 155, 154, 86)); + expect(e.cylinder.material.oddColor.getValue(date)).toEqual(Color.fromBytes(191, 226, 188, 74)); + expect(e.cylinder.material.offset.getValue(date)).toEqual(55018.0); + expect(e.cylinder.material.repeat.getValue(date)).toEqual(33073.0); + expect(e = dataSource.entities.getById('material_cylinder_material_checkerboard')).toBeDefined(); + expect(e.cylinder.material.evenColor.getValue(date)).toEqual(Color.fromBytes(90, 151, 142, 93)); + expect(e.cylinder.material.oddColor.getValue(date)).toEqual(Color.fromBytes(29, 42, 163, 118)); + expect(e.cylinder.material.repeat.getValue(date)).toEqual(new Cartesian2(62750, 3317)); + expect(e = dataSource.entities.getById('constant_cylinder_material_image_color')).toBeDefined(); + expect(e.cylinder.material.color.getValue(date)).toEqualEpsilon(new Color(0.654901960784314, 0.0627450980392157, 0.517647058823529, 0.537254901960784), 1e-14); + expect(e = dataSource.entities.getById('constant_cylinder_material_grid_color')).toBeDefined(); + expect(e.cylinder.material.color.getValue(date)).toEqualEpsilon(new Color(0.901960784313726, 0.364705882352941, 0.305882352941176, 0.945098039215686), 1e-14); + expect(e = dataSource.entities.getById('constant_cylinder_material_stripe_evenColor')).toBeDefined(); + expect(e.cylinder.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.0901960784313725, 0.133333333333333, 0.372549019607843, 0.498039215686275), 1e-14); + expect(e = dataSource.entities.getById('constant_cylinder_material_stripe_oddColor')).toBeDefined(); + expect(e.cylinder.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.905882352941176, 0.564705882352941, 0.486274509803922, 0.67843137254902), 1e-14); + expect(e = dataSource.entities.getById('constant_cylinder_material_checkerboard_evenColor')).toBeDefined(); + expect(e.cylinder.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.513725490196078, 0.756862745098039, 0.764705882352941, 0.882352941176471), 1e-14); + expect(e = dataSource.entities.getById('constant_cylinder_material_checkerboard_oddColor')).toBeDefined(); + expect(e.cylinder.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.450980392156863, 0.392156862745098, 0.333333333333333, 0.537254901960784), 1e-14); + expect(e = dataSource.entities.getById('constant_cylinder_outlineColor_rgbaf')).toBeDefined(); + expect(e.cylinder.outlineColor.getValue(date)).toEqualEpsilon(new Color(0.647058823529412, 0.564705882352941, 0.4, 0.0862745098039216), 1e-14); + expect(e = dataSource.entities.getById('constant_ellipse_material_solidColor_color')).toBeDefined(); + expect(e.ellipse.material.color.getValue(date)).toEqualEpsilon(new Color(0.0980392156862745, 0.913725490196078, 0.811764705882353, 0.2), 1e-14); + expect(e = dataSource.entities.getById('material_ellipse_material_image')).toBeDefined(); + expect(e.ellipse.material.image.getValue(date).url).toEqual('http://example.com/2481'); + expect(e.ellipse.material.repeat.getValue(date)).toEqual(new Cartesian2(45447, 53937)); + expect(e.ellipse.material.color.getValue(date)).toEqual(Color.fromBytes(45, 86, 136, 120)); + expect(e.ellipse.material.transparent.getValue(date)).toEqual(true); + expect(e = dataSource.entities.getById('material_ellipse_material_grid')).toBeDefined(); + expect(e.ellipse.material.color.getValue(date)).toEqual(Color.fromBytes(217, 159, 32, 60)); + expect(e.ellipse.material.cellAlpha.getValue(date)).toEqual(24764.0); + expect(e.ellipse.material.lineCount.getValue(date)).toEqual(new Cartesian2(25721, 6500)); + expect(e.ellipse.material.lineThickness.getValue(date)).toEqual(new Cartesian2(57205, 63455)); + expect(e.ellipse.material.lineOffset.getValue(date)).toEqual(new Cartesian2(49829, 3778)); + expect(e = dataSource.entities.getById('material_ellipse_material_stripe')).toBeDefined(); + expect(e.ellipse.material.orientation.getValue(date)).toEqual(StripeOrientation.VERTICAL); + expect(e.ellipse.material.evenColor.getValue(date)).toEqual(Color.fromBytes(7, 152, 58, 224)); + expect(e.ellipse.material.oddColor.getValue(date)).toEqual(Color.fromBytes(4, 228, 224, 57)); + expect(e.ellipse.material.offset.getValue(date)).toEqual(26719.0); + expect(e.ellipse.material.repeat.getValue(date)).toEqual(15097.0); + expect(e = dataSource.entities.getById('material_ellipse_material_checkerboard')).toBeDefined(); + expect(e.ellipse.material.evenColor.getValue(date)).toEqual(Color.fromBytes(62, 67, 234, 118)); + expect(e.ellipse.material.oddColor.getValue(date)).toEqual(Color.fromBytes(116, 61, 76, 32)); + expect(e.ellipse.material.repeat.getValue(date)).toEqual(new Cartesian2(62262, 11507)); + expect(e = dataSource.entities.getById('constant_ellipse_material_image_color')).toBeDefined(); + expect(e.ellipse.material.color.getValue(date)).toEqualEpsilon(new Color(0.364705882352941, 0.698039215686274, 0.803921568627451, 0.843137254901961), 1e-14); + expect(e = dataSource.entities.getById('constant_ellipse_material_grid_color')).toBeDefined(); + expect(e.ellipse.material.color.getValue(date)).toEqualEpsilon(new Color(0.67843137254902, 0.580392156862745, 0.823529411764706, 0.627450980392157), 1e-14); + expect(e = dataSource.entities.getById('constant_ellipse_material_stripe_evenColor')).toBeDefined(); + expect(e.ellipse.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.313725490196078, 0.768627450980392, 0.674509803921569, 0.705882352941177), 1e-14); + expect(e = dataSource.entities.getById('constant_ellipse_material_stripe_oddColor')).toBeDefined(); + expect(e.ellipse.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.682352941176471, 0.658823529411765, 0.952941176470588, 0.0823529411764706), 1e-14); + expect(e = dataSource.entities.getById('constant_ellipse_material_checkerboard_evenColor')).toBeDefined(); + expect(e.ellipse.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.0196078431372549, 0.537254901960784, 0.290196078431373, 0.403921568627451), 1e-14); + expect(e = dataSource.entities.getById('constant_ellipse_material_checkerboard_oddColor')).toBeDefined(); + expect(e.ellipse.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.317647058823529, 0.690196078431373, 0.223529411764706, 0.886274509803922), 1e-14); + expect(e = dataSource.entities.getById('constant_ellipse_outlineColor_rgbaf')).toBeDefined(); + expect(e.ellipse.outlineColor.getValue(date)).toEqualEpsilon(new Color(0.572549019607843, 0.956862745098039, 0.968627450980392, 0.674509803921569), 1e-14); + expect(e = dataSource.entities.getById('constant_ellipsoid_material_solidColor_color')).toBeDefined(); + expect(e.ellipsoid.material.color.getValue(date)).toEqualEpsilon(new Color(0.572549019607843, 0.533333333333333, 0.384313725490196, 0.2), 1e-14); + expect(e = dataSource.entities.getById('material_ellipsoid_material_image')).toBeDefined(); + expect(e.ellipsoid.material.image.getValue(date).url).toEqual('http://example.com/47428'); + expect(e.ellipsoid.material.repeat.getValue(date)).toEqual(new Cartesian2(53733, 35793)); + expect(e.ellipsoid.material.color.getValue(date)).toEqual(Color.fromBytes(125, 49, 160, 165)); + expect(e.ellipsoid.material.transparent.getValue(date)).toEqual(true); + expect(e = dataSource.entities.getById('material_ellipsoid_material_grid')).toBeDefined(); + expect(e.ellipsoid.material.color.getValue(date)).toEqual(Color.fromBytes(95, 212, 218, 57)); + expect(e.ellipsoid.material.cellAlpha.getValue(date)).toEqual(53044.0); + expect(e.ellipsoid.material.lineCount.getValue(date)).toEqual(new Cartesian2(7763, 58654)); + expect(e.ellipsoid.material.lineThickness.getValue(date)).toEqual(new Cartesian2(25480, 4707)); + expect(e.ellipsoid.material.lineOffset.getValue(date)).toEqual(new Cartesian2(38422, 44182)); + expect(e = dataSource.entities.getById('material_ellipsoid_material_stripe')).toBeDefined(); + expect(e.ellipsoid.material.orientation.getValue(date)).toEqual(StripeOrientation.VERTICAL); + expect(e.ellipsoid.material.evenColor.getValue(date)).toEqual(Color.fromBytes(174, 241, 84, 24)); + expect(e.ellipsoid.material.oddColor.getValue(date)).toEqual(Color.fromBytes(134, 51, 175, 154)); + expect(e.ellipsoid.material.offset.getValue(date)).toEqual(24796.0); + expect(e.ellipsoid.material.repeat.getValue(date)).toEqual(2913.0); + expect(e = dataSource.entities.getById('material_ellipsoid_material_checkerboard')).toBeDefined(); + expect(e.ellipsoid.material.evenColor.getValue(date)).toEqual(Color.fromBytes(65, 215, 40, 252)); + expect(e.ellipsoid.material.oddColor.getValue(date)).toEqual(Color.fromBytes(63, 63, 46, 195)); + expect(e.ellipsoid.material.repeat.getValue(date)).toEqual(new Cartesian2(40702, 13470)); + expect(e = dataSource.entities.getById('constant_ellipsoid_material_image_color')).toBeDefined(); + expect(e.ellipsoid.material.color.getValue(date)).toEqualEpsilon(new Color(0.247058823529412, 0.403921568627451, 0.145098039215686, 0.47843137254902), 1e-14); + expect(e = dataSource.entities.getById('constant_ellipsoid_material_grid_color')).toBeDefined(); + expect(e.ellipsoid.material.color.getValue(date)).toEqualEpsilon(new Color(0.270588235294118, 0.784313725490196, 0.172549019607843, 0.835294117647059), 1e-14); + expect(e = dataSource.entities.getById('constant_ellipsoid_material_stripe_evenColor')).toBeDefined(); + expect(e.ellipsoid.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.415686274509804, 0.192156862745098, 0.368627450980392, 0.129411764705882), 1e-14); + expect(e = dataSource.entities.getById('constant_ellipsoid_material_stripe_oddColor')).toBeDefined(); + expect(e.ellipsoid.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.580392156862745, 0.164705882352941, 0.741176470588235, 0.0941176470588235), 1e-14); + expect(e = dataSource.entities.getById('constant_ellipsoid_material_checkerboard_evenColor')).toBeDefined(); + expect(e.ellipsoid.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.137254901960784, 0.784313725490196, 0.294117647058824, 0.964705882352941), 1e-14); + expect(e = dataSource.entities.getById('constant_ellipsoid_material_checkerboard_oddColor')).toBeDefined(); + expect(e.ellipsoid.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.905882352941176, 0.929411764705882, 0.427450980392157, 0.113725490196078), 1e-14); + expect(e = dataSource.entities.getById('constant_ellipsoid_outlineColor_rgbaf')).toBeDefined(); + expect(e.ellipsoid.outlineColor.getValue(date)).toEqualEpsilon(new Color(0.494117647058824, 0.0823529411764706, 0.274509803921569, 0.823529411764706), 1e-14); + expect(e = dataSource.entities.getById('constant_label_backgroundColor_rgbaf')).toBeDefined(); + expect(e.label.backgroundColor.getValue(date)).toEqualEpsilon(new Color(0.894117647058824, 0.949019607843137, 0.494117647058824, 0.843137254901961), 1e-14); + expect(e = dataSource.entities.getById('constant_label_fillColor_rgbaf')).toBeDefined(); + expect(e.label.fillColor.getValue(date)).toEqualEpsilon(new Color(0.16078431372549, 0.568627450980392, 0.776470588235294, 0.505882352941176), 1e-14); + expect(e = dataSource.entities.getById('constant_label_outlineColor_rgbaf')).toBeDefined(); + expect(e.label.outlineColor.getValue(date)).toEqualEpsilon(new Color(0.458823529411765, 0.325490196078431, 0.909803921568627, 0.67843137254902), 1e-14); + expect(e = dataSource.entities.getById('constant_model_silhouetteColor_rgbaf')).toBeDefined(); + expect(e.model.silhouetteColor.getValue(date)).toEqualEpsilon(new Color(0.294117647058824, 0.313725490196078, 0.419607843137255, 0.87843137254902), 1e-14); + expect(e = dataSource.entities.getById('constant_model_color_rgbaf')).toBeDefined(); + expect(e.model.color.getValue(date)).toEqualEpsilon(new Color(0.568627450980392, 0.333333333333333, 0.141176470588235, 0.572549019607843), 1e-14); + expect(e = dataSource.entities.getById('constant_path_material_solidColor_color')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqualEpsilon(new Color(0.458823529411765, 0.517647058823529, 0.52156862745098, 0.925490196078431), 1e-14); + expect(e = dataSource.entities.getById('material_path_material_polylineOutline')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqual(Color.fromBytes(158, 14, 3, 86)); + expect(e.path.material.outlineColor.getValue(date)).toEqual(Color.fromBytes(137, 101, 236, 136)); + expect(e.path.material.outlineWidth.getValue(date)).toEqual(11017.0); + expect(e = dataSource.entities.getById('material_path_material_polylineArrow')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqual(Color.fromBytes(166, 131, 155, 102)); + expect(e = dataSource.entities.getById('material_path_material_polylineDash')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqual(Color.fromBytes(190, 189, 9, 7)); + expect(e.path.material.gapColor.getValue(date)).toEqual(Color.fromBytes(170, 88, 12, 24)); + expect(e.path.material.dashLength.getValue(date)).toEqual(45848.0); + expect(e.path.material.dashPattern.getValue(date)).toEqual(13519); + expect(e = dataSource.entities.getById('material_path_material_polylineGlow')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqual(Color.fromBytes(72, 114, 200, 147)); + expect(e.path.material.glowPower.getValue(date)).toEqual(42344.0); + expect(e.path.material.taperPower.getValue(date)).toEqual(39950.0); + expect(e = dataSource.entities.getById('material_path_material_image')).toBeDefined(); + expect(e.path.material.image.getValue(date).url).toEqual('http://example.com/31068'); + expect(e.path.material.repeat.getValue(date)).toEqual(new Cartesian2(48351, 63420)); + expect(e.path.material.color.getValue(date)).toEqual(Color.fromBytes(105, 166, 133, 7)); + expect(e.path.material.transparent.getValue(date)).toEqual(true); + expect(e = dataSource.entities.getById('material_path_material_grid')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqual(Color.fromBytes(120, 196, 99, 165)); + expect(e.path.material.cellAlpha.getValue(date)).toEqual(41317.0); + expect(e.path.material.lineCount.getValue(date)).toEqual(new Cartesian2(52557, 7629)); + expect(e.path.material.lineThickness.getValue(date)).toEqual(new Cartesian2(21845, 52309)); + expect(e.path.material.lineOffset.getValue(date)).toEqual(new Cartesian2(48700, 4542)); + expect(e = dataSource.entities.getById('material_path_material_stripe')).toBeDefined(); + expect(e.path.material.orientation.getValue(date)).toEqual(StripeOrientation.VERTICAL); + expect(e.path.material.evenColor.getValue(date)).toEqual(Color.fromBytes(20, 43, 77, 229)); + expect(e.path.material.oddColor.getValue(date)).toEqual(Color.fromBytes(157, 171, 93, 187)); + expect(e.path.material.offset.getValue(date)).toEqual(41305.0); + expect(e.path.material.repeat.getValue(date)).toEqual(43637.0); + expect(e = dataSource.entities.getById('material_path_material_checkerboard')).toBeDefined(); + expect(e.path.material.evenColor.getValue(date)).toEqual(Color.fromBytes(174, 238, 222, 107)); + expect(e.path.material.oddColor.getValue(date)).toEqual(Color.fromBytes(184, 189, 156, 237)); + expect(e.path.material.repeat.getValue(date)).toEqual(new Cartesian2(57303, 45535)); + expect(e = dataSource.entities.getById('constant_path_material_polylineOutline_color')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqualEpsilon(new Color(0.0588235294117647, 0.0823529411764706, 0.964705882352941, 0.317647058823529), 1e-14); + expect(e = dataSource.entities.getById('constant_path_material_polylineOutline_outlineColor')).toBeDefined(); + expect(e.path.material.outlineColor.getValue(date)).toEqualEpsilon(new Color(0.266666666666667, 0.556862745098039, 0.352941176470588, 0.76078431372549), 1e-14); + expect(e = dataSource.entities.getById('constant_path_material_polylineArrow_color')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqualEpsilon(new Color(0.627450980392157, 0.27843137254902, 0.972549019607843, 0.92156862745098), 1e-14); + expect(e = dataSource.entities.getById('constant_path_material_polylineDash_color')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqualEpsilon(new Color(0.113725490196078, 0.368627450980392, 0.411764705882353, 0.745098039215686), 1e-14); + expect(e = dataSource.entities.getById('constant_path_material_polylineDash_gapColor')).toBeDefined(); + expect(e.path.material.gapColor.getValue(date)).toEqualEpsilon(new Color(0.831372549019608, 0.313725490196078, 0.341176470588235, 0.749019607843137), 1e-14); + expect(e = dataSource.entities.getById('constant_path_material_polylineGlow_color')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqualEpsilon(new Color(0.584313725490196, 0.0156862745098039, 0.329411764705882, 0.270588235294118), 1e-14); + expect(e = dataSource.entities.getById('constant_path_material_image_color')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqualEpsilon(new Color(0.443137254901961, 0.450980392156863, 0.63921568627451, 0.415686274509804), 1e-14); + expect(e = dataSource.entities.getById('constant_path_material_grid_color')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqualEpsilon(new Color(0.984313725490196, 0.945098039215686, 0.764705882352941, 0.933333333333333), 1e-14); + expect(e = dataSource.entities.getById('constant_path_material_stripe_evenColor')).toBeDefined(); + expect(e.path.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.584313725490196, 0.631372549019608, 0.0196078431372549, 0.349019607843137), 1e-14); + expect(e = dataSource.entities.getById('constant_path_material_stripe_oddColor')).toBeDefined(); + expect(e.path.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.231372549019608, 0.211764705882353, 0.941176470588235, 0.501960784313725), 1e-14); + expect(e = dataSource.entities.getById('constant_path_material_checkerboard_evenColor')).toBeDefined(); + expect(e.path.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.258823529411765, 0.850980392156863, 0.196078431372549, 0.811764705882353), 1e-14); + expect(e = dataSource.entities.getById('constant_path_material_checkerboard_oddColor')).toBeDefined(); + expect(e.path.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.0745098039215686, 0.933333333333333, 0.184313725490196, 0.117647058823529), 1e-14); + expect(e = dataSource.entities.getById('constant_point_color_rgbaf')).toBeDefined(); + expect(e.point.color.getValue(date)).toEqualEpsilon(new Color(0.662745098039216, 0.317647058823529, 0.643137254901961, 0.705882352941177), 1e-14); + expect(e = dataSource.entities.getById('constant_point_outlineColor_rgbaf')).toBeDefined(); + expect(e.point.outlineColor.getValue(date)).toEqualEpsilon(new Color(0.00392156862745098, 0.388235294117647, 0.101960784313725, 0.16078431372549), 1e-14); + expect(e = dataSource.entities.getById('constant_polygon_positions_cartographicRadians')).toBeDefined(); + expect(e.polygon.hierarchy.getValue(date).positions).toEqual([ Cartesian3.fromRadians(0.278819883450618, 1.34192534297912, 13112), Cartesian3.fromRadians(1.08460649779701, 1.26665808721843, 9013) ]); + expect(e = dataSource.entities.getById('constant_polygon_positions_cartographicDegrees')).toBeDefined(); + expect(e.polygon.hierarchy.getValue(date).positions).toEqual([ Cartesian3.fromDegrees(20, 42, 343), Cartesian3.fromDegrees(21, 14, 24042) ]); + expect(e = dataSource.entities.getById('constant_polygon_holes_cartographicRadians')).toBeDefined(); + expect(e.polygon.hierarchy.getValue(date).holes).toEqual([ new PolygonHierarchy([ Cartesian3.fromRadians(0.799220652820836, 1.50366253893541, 4776), Cartesian3.fromRadians(0.179862066646486, 1.42489853818289, 42245), Cartesian3.fromRadians(0.0636782022426772, 0.558333087028927, 32510) ]), new PolygonHierarchy([ Cartesian3.fromRadians(1.50366253893541, 0.779166543514464, 33810), Cartesian3.fromRadians(1.42489853818289, 0.00358717805196918, 20389), Cartesian3.fromRadians(0.558333087028927, 0.799220652820836, 43134), Cartesian3.fromRadians(0.779166543514464, 0.179862066646486, 1412) ]) ]); + expect(e = dataSource.entities.getById('constant_polygon_holes_cartographicDegrees')).toBeDefined(); + expect(e.polygon.hierarchy.getValue(date).holes).toEqual([ new PolygonHierarchy([ Cartesian3.fromDegrees(38, 39, 52122), Cartesian3.fromDegrees(30, 41, 40406), Cartesian3.fromDegrees(9, 42, 55073) ]), new PolygonHierarchy([ Cartesian3.fromDegrees(39, 12, 5835), Cartesian3.fromDegrees(41, 41, 39069), Cartesian3.fromDegrees(42, 38, 39639), Cartesian3.fromDegrees(12, 30, 54806) ]) ]); + expect(e = dataSource.entities.getById('constant_polygon_material_solidColor_color')).toBeDefined(); + expect(e.polygon.material.color.getValue(date)).toEqualEpsilon(new Color(0.980392156862745, 0.905882352941176, 0.274509803921569, 0.972549019607843), 1e-14); + expect(e = dataSource.entities.getById('material_polygon_material_image')).toBeDefined(); + expect(e.polygon.material.image.getValue(date).url).toEqual('http://example.com/3481'); + expect(e.polygon.material.repeat.getValue(date)).toEqual(new Cartesian2(29381, 10354)); + expect(e.polygon.material.color.getValue(date)).toEqual(Color.fromBytes(36, 184, 236, 209)); + expect(e.polygon.material.transparent.getValue(date)).toEqual(true); + expect(e = dataSource.entities.getById('material_polygon_material_grid')).toBeDefined(); + expect(e.polygon.material.color.getValue(date)).toEqual(Color.fromBytes(246, 64, 141, 13)); + expect(e.polygon.material.cellAlpha.getValue(date)).toEqual(986.0); + expect(e.polygon.material.lineCount.getValue(date)).toEqual(new Cartesian2(26094, 44645)); + expect(e.polygon.material.lineThickness.getValue(date)).toEqual(new Cartesian2(30775, 17784)); + expect(e.polygon.material.lineOffset.getValue(date)).toEqual(new Cartesian2(58344, 3555)); + expect(e = dataSource.entities.getById('material_polygon_material_stripe')).toBeDefined(); + expect(e.polygon.material.orientation.getValue(date)).toEqual(StripeOrientation.VERTICAL); + expect(e.polygon.material.evenColor.getValue(date)).toEqual(Color.fromBytes(98, 184, 45, 52)); + expect(e.polygon.material.oddColor.getValue(date)).toEqual(Color.fromBytes(164, 123, 182, 228)); + expect(e.polygon.material.offset.getValue(date)).toEqual(12114.0); + expect(e.polygon.material.repeat.getValue(date)).toEqual(60350.0); + expect(e = dataSource.entities.getById('material_polygon_material_checkerboard')).toBeDefined(); + expect(e.polygon.material.evenColor.getValue(date)).toEqual(Color.fromBytes(187, 186, 46, 98)); + expect(e.polygon.material.oddColor.getValue(date)).toEqual(Color.fromBytes(19, 74, 101, 217)); + expect(e.polygon.material.repeat.getValue(date)).toEqual(new Cartesian2(45028, 15023)); + expect(e = dataSource.entities.getById('constant_polygon_material_image_color')).toBeDefined(); + expect(e.polygon.material.color.getValue(date)).toEqualEpsilon(new Color(0.674509803921569, 0.8, 0.411764705882353, 0.207843137254902), 1e-14); + expect(e = dataSource.entities.getById('constant_polygon_material_grid_color')).toBeDefined(); + expect(e.polygon.material.color.getValue(date)).toEqualEpsilon(new Color(0.603921568627451, 0.0941176470588235, 0.00784313725490196, 0.0862745098039216), 1e-14); + expect(e = dataSource.entities.getById('constant_polygon_material_stripe_evenColor')).toBeDefined(); + expect(e.polygon.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.772549019607843, 0.866666666666667, 0.964705882352941, 0.862745098039216), 1e-14); + expect(e = dataSource.entities.getById('constant_polygon_material_stripe_oddColor')).toBeDefined(); + expect(e.polygon.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.862745098039216, 0.0392156862745098, 0.458823529411765, 0.596078431372549), 1e-14); + expect(e = dataSource.entities.getById('constant_polygon_material_checkerboard_evenColor')).toBeDefined(); + expect(e.polygon.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.396078431372549, 0.576470588235294, 0.474509803921569, 0.909803921568627), 1e-14); + expect(e = dataSource.entities.getById('constant_polygon_material_checkerboard_oddColor')).toBeDefined(); + expect(e.polygon.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.117647058823529, 0.258823529411765, 0.541176470588235, 0.207843137254902), 1e-14); + expect(e = dataSource.entities.getById('constant_polygon_outlineColor_rgbaf')).toBeDefined(); + expect(e.polygon.outlineColor.getValue(date)).toEqualEpsilon(new Color(0.105882352941176, 0.423529411764706, 0.619607843137255, 0.956862745098039), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_positions_cartographicRadians')).toBeDefined(); + expect(e.polyline.positions.getValue(date)).toEqual([ Cartesian3.fromRadians(0.23083587429617, 0.738315731088925, 41390), Cartesian3.fromRadians(0.537259577218533, 0.25389340391868, 10573) ]); + expect(e = dataSource.entities.getById('constant_polyline_positions_cartographicDegrees')).toBeDefined(); + expect(e.polyline.positions.getValue(date)).toEqual([ Cartesian3.fromDegrees(19, 5, 11802), Cartesian3.fromDegrees(15, 40, 39495) ]); + expect(e = dataSource.entities.getById('constant_polyline_material_solidColor_color')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqualEpsilon(new Color(0.764705882352941, 0.894117647058824, 0.874509803921569, 0.105882352941176), 1e-14); + expect(e = dataSource.entities.getById('material_polyline_material_polylineOutline')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqual(Color.fromBytes(152, 14, 11, 33)); + expect(e.polyline.material.outlineColor.getValue(date)).toEqual(Color.fromBytes(222, 51, 202, 92)); + expect(e.polyline.material.outlineWidth.getValue(date)).toEqual(6879.0); + expect(e = dataSource.entities.getById('material_polyline_material_polylineArrow')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqual(Color.fromBytes(82, 169, 80, 107)); + expect(e = dataSource.entities.getById('material_polyline_material_polylineDash')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqual(Color.fromBytes(22, 214, 57, 141)); + expect(e.polyline.material.gapColor.getValue(date)).toEqual(Color.fromBytes(150, 91, 109, 117)); + expect(e.polyline.material.dashLength.getValue(date)).toEqual(60297.0); + expect(e.polyline.material.dashPattern.getValue(date)).toEqual(40430); + expect(e = dataSource.entities.getById('material_polyline_material_polylineGlow')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqual(Color.fromBytes(59, 125, 181, 171)); + expect(e.polyline.material.glowPower.getValue(date)).toEqual(41345.0); + expect(e.polyline.material.taperPower.getValue(date)).toEqual(29908.0); + expect(e = dataSource.entities.getById('material_polyline_material_image')).toBeDefined(); + expect(e.polyline.material.image.getValue(date).url).toEqual('http://example.com/29020'); + expect(e.polyline.material.repeat.getValue(date)).toEqual(new Cartesian2(8980, 60451)); + expect(e.polyline.material.color.getValue(date)).toEqual(Color.fromBytes(46, 136, 39, 94)); + expect(e.polyline.material.transparent.getValue(date)).toEqual(true); + expect(e = dataSource.entities.getById('material_polyline_material_grid')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqual(Color.fromBytes(157, 57, 26, 26)); + expect(e.polyline.material.cellAlpha.getValue(date)).toEqual(27197.0); + expect(e.polyline.material.lineCount.getValue(date)).toEqual(new Cartesian2(17878, 15173)); + expect(e.polyline.material.lineThickness.getValue(date)).toEqual(new Cartesian2(64504, 24571)); + expect(e.polyline.material.lineOffset.getValue(date)).toEqual(new Cartesian2(51933, 9674)); + expect(e = dataSource.entities.getById('material_polyline_material_stripe')).toBeDefined(); + expect(e.polyline.material.orientation.getValue(date)).toEqual(StripeOrientation.VERTICAL); + expect(e.polyline.material.evenColor.getValue(date)).toEqual(Color.fromBytes(98, 239, 47, 132)); + expect(e.polyline.material.oddColor.getValue(date)).toEqual(Color.fromBytes(41, 198, 29, 144)); + expect(e.polyline.material.offset.getValue(date)).toEqual(10077.0); + expect(e.polyline.material.repeat.getValue(date)).toEqual(31817.0); + expect(e = dataSource.entities.getById('material_polyline_material_checkerboard')).toBeDefined(); + expect(e.polyline.material.evenColor.getValue(date)).toEqual(Color.fromBytes(29, 196, 146, 39)); + expect(e.polyline.material.oddColor.getValue(date)).toEqual(Color.fromBytes(189, 110, 12, 32)); + expect(e.polyline.material.repeat.getValue(date)).toEqual(new Cartesian2(22832, 11097)); + expect(e = dataSource.entities.getById('constant_polyline_material_polylineOutline_color')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqualEpsilon(new Color(0.450980392156863, 0.890196078431372, 0.403921568627451, 0.16078431372549), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_material_polylineOutline_outlineColor')).toBeDefined(); + expect(e.polyline.material.outlineColor.getValue(date)).toEqualEpsilon(new Color(0.815686274509804, 0.545098039215686, 0.529411764705882, 0.317647058823529), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_material_polylineArrow_color')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqualEpsilon(new Color(0.831372549019608, 0.823529411764706, 0.631372549019608, 0.443137254901961), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_material_polylineDash_color')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqualEpsilon(new Color(0.462745098039216, 0.184313725490196, 0.329411764705882, 0), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_material_polylineDash_gapColor')).toBeDefined(); + expect(e.polyline.material.gapColor.getValue(date)).toEqualEpsilon(new Color(0.0509803921568627, 0.0313725490196078, 0.23921568627451, 0.4), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_material_polylineGlow_color')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqualEpsilon(new Color(0.411764705882353, 0.313725490196078, 0.858823529411765, 0.380392156862745), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_material_image_color')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqualEpsilon(new Color(0.133333333333333, 0.552941176470588, 0.0431372549019608, 0.184313725490196), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_material_grid_color')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqualEpsilon(new Color(0.141176470588235, 0.823529411764706, 0.588235294117647, 0.56078431372549), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_material_stripe_evenColor')).toBeDefined(); + expect(e.polyline.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.647058823529412, 0.862745098039216, 0.129411764705882, 0.780392156862745), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_material_stripe_oddColor')).toBeDefined(); + expect(e.polyline.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.290196078431373, 0.780392156862745, 0.0705882352941176, 0.27843137254902), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_material_checkerboard_evenColor')).toBeDefined(); + expect(e.polyline.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.505882352941176, 0.466666666666667, 0.862745098039216, 0.803921568627451), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_material_checkerboard_oddColor')).toBeDefined(); + expect(e.polyline.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.32156862745098, 0.454901960784314, 0.803921568627451, 0.203921568627451), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_depthFailMaterial_solidColor_color')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqualEpsilon(new Color(0.905882352941176, 0.635294117647059, 0.435294117647059, 0.631372549019608), 1e-14); + expect(e = dataSource.entities.getById('material_polyline_depthFailMaterial_polylineOutline')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual(Color.fromBytes(238, 116, 228, 18)); + expect(e.polyline.depthFailMaterial.outlineColor.getValue(date)).toEqual(Color.fromBytes(36, 55, 18, 134)); + expect(e.polyline.depthFailMaterial.outlineWidth.getValue(date)).toEqual(33747.0); + expect(e = dataSource.entities.getById('material_polyline_depthFailMaterial_polylineArrow')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual(Color.fromBytes(80, 78, 117, 160)); + expect(e = dataSource.entities.getById('material_polyline_depthFailMaterial_polylineDash')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual(Color.fromBytes(139, 171, 44, 217)); + expect(e.polyline.depthFailMaterial.gapColor.getValue(date)).toEqual(Color.fromBytes(253, 13, 109, 243)); + expect(e.polyline.depthFailMaterial.dashLength.getValue(date)).toEqual(21429.0); + expect(e.polyline.depthFailMaterial.dashPattern.getValue(date)).toEqual(13659); + expect(e = dataSource.entities.getById('material_polyline_depthFailMaterial_polylineGlow')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual(Color.fromBytes(82, 227, 164, 249)); + expect(e.polyline.depthFailMaterial.glowPower.getValue(date)).toEqual(52932.0); + expect(e.polyline.depthFailMaterial.taperPower.getValue(date)).toEqual(29589.0); + expect(e = dataSource.entities.getById('material_polyline_depthFailMaterial_image')).toBeDefined(); + expect(e.polyline.depthFailMaterial.image.getValue(date).url).toEqual('http://example.com/6349'); + expect(e.polyline.depthFailMaterial.repeat.getValue(date)).toEqual(new Cartesian2(24549, 50015)); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual(Color.fromBytes(71, 233, 193, 55)); + expect(e.polyline.depthFailMaterial.transparent.getValue(date)).toEqual(true); + expect(e = dataSource.entities.getById('material_polyline_depthFailMaterial_grid')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual(Color.fromBytes(241, 160, 22, 116)); + expect(e.polyline.depthFailMaterial.cellAlpha.getValue(date)).toEqual(32801.0); + expect(e.polyline.depthFailMaterial.lineCount.getValue(date)).toEqual(new Cartesian2(27318, 57194)); + expect(e.polyline.depthFailMaterial.lineThickness.getValue(date)).toEqual(new Cartesian2(2299, 50440)); + expect(e.polyline.depthFailMaterial.lineOffset.getValue(date)).toEqual(new Cartesian2(16744, 62785)); + expect(e = dataSource.entities.getById('material_polyline_depthFailMaterial_stripe')).toBeDefined(); + expect(e.polyline.depthFailMaterial.orientation.getValue(date)).toEqual(StripeOrientation.VERTICAL); + expect(e.polyline.depthFailMaterial.evenColor.getValue(date)).toEqual(Color.fromBytes(174, 135, 160, 224)); + expect(e.polyline.depthFailMaterial.oddColor.getValue(date)).toEqual(Color.fromBytes(8, 166, 115, 198)); + expect(e.polyline.depthFailMaterial.offset.getValue(date)).toEqual(58992.0); + expect(e.polyline.depthFailMaterial.repeat.getValue(date)).toEqual(7346.0); + expect(e = dataSource.entities.getById('material_polyline_depthFailMaterial_checkerboard')).toBeDefined(); + expect(e.polyline.depthFailMaterial.evenColor.getValue(date)).toEqual(Color.fromBytes(143, 196, 196, 1)); + expect(e.polyline.depthFailMaterial.oddColor.getValue(date)).toEqual(Color.fromBytes(49, 118, 113, 119)); + expect(e.polyline.depthFailMaterial.repeat.getValue(date)).toEqual(new Cartesian2(32284, 46718)); + expect(e = dataSource.entities.getById('constant_polyline_depthFailMaterial_polylineOutline_color')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqualEpsilon(new Color(0.976470588235294, 0.133333333333333, 0.835294117647059, 0.694117647058824), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_depthFailMaterial_polylineOutline_outlineColor')).toBeDefined(); + expect(e.polyline.depthFailMaterial.outlineColor.getValue(date)).toEqualEpsilon(new Color(0.8, 0.866666666666667, 0.219607843137255, 0.262745098039216), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_depthFailMaterial_polylineArrow_color')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqualEpsilon(new Color(0.0392156862745098, 0.988235294117647, 0.784313725490196, 0.211764705882353), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_depthFailMaterial_polylineDash_color')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqualEpsilon(new Color(0.0431372549019608, 0.235294117647059, 0.443137254901961, 0.701960784313725), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_depthFailMaterial_polylineDash_gapColor')).toBeDefined(); + expect(e.polyline.depthFailMaterial.gapColor.getValue(date)).toEqualEpsilon(new Color(0.388235294117647, 0.0196078431372549, 0.780392156862745, 0.941176470588235), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_depthFailMaterial_polylineGlow_color')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqualEpsilon(new Color(0.733333333333333, 0.180392156862745, 0.407843137254902, 0.168627450980392), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_depthFailMaterial_image_color')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqualEpsilon(new Color(0.815686274509804, 0.47843137254902, 0.254901960784314, 0.47843137254902), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_depthFailMaterial_grid_color')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqualEpsilon(new Color(0.247058823529412, 0.945098039215686, 0.0274509803921569, 0.968627450980392), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_depthFailMaterial_stripe_evenColor')).toBeDefined(); + expect(e.polyline.depthFailMaterial.evenColor.getValue(date)).toEqualEpsilon(new Color(0.517647058823529, 0.576470588235294, 0.615686274509804, 0.682352941176471), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_depthFailMaterial_stripe_oddColor')).toBeDefined(); + expect(e.polyline.depthFailMaterial.oddColor.getValue(date)).toEqualEpsilon(new Color(0.333333333333333, 0.537254901960784, 0.443137254901961, 0.658823529411765), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_depthFailMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e.polyline.depthFailMaterial.evenColor.getValue(date)).toEqualEpsilon(new Color(0.145098039215686, 0.815686274509804, 0.113725490196078, 0.729411764705882), 1e-14); + expect(e = dataSource.entities.getById('constant_polyline_depthFailMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e.polyline.depthFailMaterial.oddColor.getValue(date)).toEqualEpsilon(new Color(0.0941176470588235, 0.615686274509804, 0.447058823529412, 0.00392156862745098), 1e-14); + expect(e = dataSource.entities.getById('constant_polylineVolume_positions_cartographicRadians')).toBeDefined(); + expect(e.polylineVolume.positions.getValue(date)).toEqual([ Cartesian3.fromRadians(0.0883087457516627, 0.924587529983249, 8130), Cartesian3.fromRadians(0.613491452287313, 1.45657735287148, 19697) ]); + expect(e = dataSource.entities.getById('constant_polylineVolume_positions_cartographicDegrees')).toBeDefined(); + expect(e.polylineVolume.positions.getValue(date)).toEqual([ Cartesian3.fromDegrees(7, 43, 57136), Cartesian3.fromDegrees(44, 37, 65346) ]); + expect(e = dataSource.entities.getById('constant_polylineVolume_material_solidColor_color')).toBeDefined(); + expect(e.polylineVolume.material.color.getValue(date)).toEqualEpsilon(new Color(0.866666666666667, 0.129411764705882, 0.133333333333333, 0.643137254901961), 1e-14); + expect(e = dataSource.entities.getById('material_polylineVolume_material_image')).toBeDefined(); + expect(e.polylineVolume.material.image.getValue(date).url).toEqual('http://example.com/25029'); + expect(e.polylineVolume.material.repeat.getValue(date)).toEqual(new Cartesian2(16806, 36161)); + expect(e.polylineVolume.material.color.getValue(date)).toEqual(Color.fromBytes(29, 171, 22, 0)); + expect(e.polylineVolume.material.transparent.getValue(date)).toEqual(true); + expect(e = dataSource.entities.getById('material_polylineVolume_material_grid')).toBeDefined(); + expect(e.polylineVolume.material.color.getValue(date)).toEqual(Color.fromBytes(180, 62, 202, 240)); + expect(e.polylineVolume.material.cellAlpha.getValue(date)).toEqual(58563.0); + expect(e.polylineVolume.material.lineCount.getValue(date)).toEqual(new Cartesian2(13158, 59443)); + expect(e.polylineVolume.material.lineThickness.getValue(date)).toEqual(new Cartesian2(11642, 8493)); + expect(e.polylineVolume.material.lineOffset.getValue(date)).toEqual(new Cartesian2(2361, 14345)); + expect(e = dataSource.entities.getById('material_polylineVolume_material_stripe')).toBeDefined(); + expect(e.polylineVolume.material.orientation.getValue(date)).toEqual(StripeOrientation.VERTICAL); + expect(e.polylineVolume.material.evenColor.getValue(date)).toEqual(Color.fromBytes(100, 38, 210, 254)); + expect(e.polylineVolume.material.oddColor.getValue(date)).toEqual(Color.fromBytes(27, 12, 194, 159)); + expect(e.polylineVolume.material.offset.getValue(date)).toEqual(38819.0); + expect(e.polylineVolume.material.repeat.getValue(date)).toEqual(1822.0); + expect(e = dataSource.entities.getById('material_polylineVolume_material_checkerboard')).toBeDefined(); + expect(e.polylineVolume.material.evenColor.getValue(date)).toEqual(Color.fromBytes(146, 199, 90, 246)); + expect(e.polylineVolume.material.oddColor.getValue(date)).toEqual(Color.fromBytes(74, 232, 2, 60)); + expect(e.polylineVolume.material.repeat.getValue(date)).toEqual(new Cartesian2(13666, 60213)); + expect(e = dataSource.entities.getById('constant_polylineVolume_material_image_color')).toBeDefined(); + expect(e.polylineVolume.material.color.getValue(date)).toEqualEpsilon(new Color(0.443137254901961, 0.152941176470588, 0.462745098039216, 0.701960784313725), 1e-14); + expect(e = dataSource.entities.getById('constant_polylineVolume_material_grid_color')).toBeDefined(); + expect(e.polylineVolume.material.color.getValue(date)).toEqualEpsilon(new Color(0.356862745098039, 0.756862745098039, 0.968627450980392, 0.109803921568627), 1e-14); + expect(e = dataSource.entities.getById('constant_polylineVolume_material_stripe_evenColor')).toBeDefined(); + expect(e.polylineVolume.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.0901960784313725, 0.423529411764706, 0.576470588235294, 0.266666666666667), 1e-14); + expect(e = dataSource.entities.getById('constant_polylineVolume_material_stripe_oddColor')).toBeDefined(); + expect(e.polylineVolume.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.682352941176471, 0.929411764705882, 0.337254901960784, 0.933333333333333), 1e-14); + expect(e = dataSource.entities.getById('constant_polylineVolume_material_checkerboard_evenColor')).toBeDefined(); + expect(e.polylineVolume.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.854901960784314, 0.627450980392157, 0.337254901960784, 0.243137254901961), 1e-14); + expect(e = dataSource.entities.getById('constant_polylineVolume_material_checkerboard_oddColor')).toBeDefined(); + expect(e.polylineVolume.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.843137254901961, 0.0352941176470588, 0.505882352941176, 0.890196078431372), 1e-14); + expect(e = dataSource.entities.getById('constant_polylineVolume_outlineColor_rgbaf')).toBeDefined(); + expect(e.polylineVolume.outlineColor.getValue(date)).toEqualEpsilon(new Color(0.549019607843137, 0.407843137254902, 0.466666666666667, 0.423529411764706), 1e-14); + expect(e = dataSource.entities.getById('constant_rectangle_coordinates_wsenDegrees')).toBeDefined(); + expect(e.rectangle.coordinates.getValue(date)).toEqual(Rectangle.fromDegrees(42, 22, 5, 35)); + expect(e = dataSource.entities.getById('constant_rectangle_material_solidColor_color')).toBeDefined(); + expect(e.rectangle.material.color.getValue(date)).toEqualEpsilon(new Color(0.898039215686275, 0.8, 0.905882352941176, 0.952941176470588), 1e-14); + expect(e = dataSource.entities.getById('material_rectangle_material_image')).toBeDefined(); + expect(e.rectangle.material.image.getValue(date).url).toEqual('http://example.com/18033'); + expect(e.rectangle.material.repeat.getValue(date)).toEqual(new Cartesian2(41461, 31905)); + expect(e.rectangle.material.color.getValue(date)).toEqual(Color.fromBytes(93, 203, 88, 125)); + expect(e.rectangle.material.transparent.getValue(date)).toEqual(true); + expect(e = dataSource.entities.getById('material_rectangle_material_grid')).toBeDefined(); + expect(e.rectangle.material.color.getValue(date)).toEqual(Color.fromBytes(245, 105, 152, 83)); + expect(e.rectangle.material.cellAlpha.getValue(date)).toEqual(57393.0); + expect(e.rectangle.material.lineCount.getValue(date)).toEqual(new Cartesian2(4947, 4627)); + expect(e.rectangle.material.lineThickness.getValue(date)).toEqual(new Cartesian2(37424, 19602)); + expect(e.rectangle.material.lineOffset.getValue(date)).toEqual(new Cartesian2(43685, 31658)); + expect(e = dataSource.entities.getById('material_rectangle_material_stripe')).toBeDefined(); + expect(e.rectangle.material.orientation.getValue(date)).toEqual(StripeOrientation.VERTICAL); + expect(e.rectangle.material.evenColor.getValue(date)).toEqual(Color.fromBytes(196, 12, 53, 2)); + expect(e.rectangle.material.oddColor.getValue(date)).toEqual(Color.fromBytes(103, 243, 111, 72)); + expect(e.rectangle.material.offset.getValue(date)).toEqual(26578.0); + expect(e.rectangle.material.repeat.getValue(date)).toEqual(52842.0); + expect(e = dataSource.entities.getById('material_rectangle_material_checkerboard')).toBeDefined(); + expect(e.rectangle.material.evenColor.getValue(date)).toEqual(Color.fromBytes(210, 132, 163, 116)); + expect(e.rectangle.material.oddColor.getValue(date)).toEqual(Color.fromBytes(159, 4, 119, 14)); + expect(e.rectangle.material.repeat.getValue(date)).toEqual(new Cartesian2(27335, 51818)); + expect(e = dataSource.entities.getById('constant_rectangle_material_image_color')).toBeDefined(); + expect(e.rectangle.material.color.getValue(date)).toEqualEpsilon(new Color(0.247058823529412, 0.498039215686275, 0.741176470588235, 0.968627450980392), 1e-14); + expect(e = dataSource.entities.getById('constant_rectangle_material_grid_color')).toBeDefined(); + expect(e.rectangle.material.color.getValue(date)).toEqualEpsilon(new Color(0.458823529411765, 0.0627450980392157, 0.886274509803922, 0.83921568627451), 1e-14); + expect(e = dataSource.entities.getById('constant_rectangle_material_stripe_evenColor')).toBeDefined(); + expect(e.rectangle.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.576470588235294, 0.341176470588235, 0.611764705882353, 0.207843137254902), 1e-14); + expect(e = dataSource.entities.getById('constant_rectangle_material_stripe_oddColor')).toBeDefined(); + expect(e.rectangle.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.866666666666667, 0.949019607843137, 0.0627450980392157, 0.0196078431372549), 1e-14); + expect(e = dataSource.entities.getById('constant_rectangle_material_checkerboard_evenColor')).toBeDefined(); + expect(e.rectangle.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.545098039215686, 0.647058823529412, 0.603921568627451, 0.725490196078431), 1e-14); + expect(e = dataSource.entities.getById('constant_rectangle_material_checkerboard_oddColor')).toBeDefined(); + expect(e.rectangle.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.227450980392157, 0.164705882352941, 0.619607843137255, 0.905882352941176), 1e-14); + expect(e = dataSource.entities.getById('constant_rectangle_outlineColor_rgbaf')).toBeDefined(); + expect(e.rectangle.outlineColor.getValue(date)).toEqualEpsilon(new Color(0.301960784313725, 0.0352941176470588, 0.917647058823529, 0.207843137254902), 1e-14); + expect(e = dataSource.entities.getById('constant_wall_positions_cartographicRadians')).toBeDefined(); + expect(e.wall.positions.getValue(date)).toEqual([ Cartesian3.fromRadians(0.990822494752221, 0.11729920547879, 47975), Cartesian3.fromRadians(1.22405890229697, 1.46292679641256, 13438) ]); + expect(e = dataSource.entities.getById('constant_wall_positions_cartographicDegrees')).toBeDefined(); + expect(e.wall.positions.getValue(date)).toEqual([ Cartesian3.fromDegrees(30, 24, 27738), Cartesian3.fromDegrees(14, 41, 41667) ]); + expect(e = dataSource.entities.getById('constant_wall_material_solidColor_color')).toBeDefined(); + expect(e.wall.material.color.getValue(date)).toEqualEpsilon(new Color(0.694117647058824, 0.317647058823529, 0.909803921568627, 0.501960784313725), 1e-14); + expect(e = dataSource.entities.getById('material_wall_material_image')).toBeDefined(); + expect(e.wall.material.image.getValue(date).url).toEqual('http://example.com/58529'); + expect(e.wall.material.repeat.getValue(date)).toEqual(new Cartesian2(36340, 47245)); + expect(e.wall.material.color.getValue(date)).toEqual(Color.fromBytes(252, 63, 12, 38)); + expect(e.wall.material.transparent.getValue(date)).toEqual(true); + expect(e = dataSource.entities.getById('material_wall_material_grid')).toBeDefined(); + expect(e.wall.material.color.getValue(date)).toEqual(Color.fromBytes(38, 183, 237, 174)); + expect(e.wall.material.cellAlpha.getValue(date)).toEqual(59606.0); + expect(e.wall.material.lineCount.getValue(date)).toEqual(new Cartesian2(3079, 31244)); + expect(e.wall.material.lineThickness.getValue(date)).toEqual(new Cartesian2(32099, 44157)); + expect(e.wall.material.lineOffset.getValue(date)).toEqual(new Cartesian2(13529, 1844)); + expect(e = dataSource.entities.getById('material_wall_material_stripe')).toBeDefined(); + expect(e.wall.material.orientation.getValue(date)).toEqual(StripeOrientation.VERTICAL); + expect(e.wall.material.evenColor.getValue(date)).toEqual(Color.fromBytes(202, 190, 37, 215)); + expect(e.wall.material.oddColor.getValue(date)).toEqual(Color.fromBytes(56, 107, 92, 38)); + expect(e.wall.material.offset.getValue(date)).toEqual(34142.0); + expect(e.wall.material.repeat.getValue(date)).toEqual(33528.0); + expect(e = dataSource.entities.getById('material_wall_material_checkerboard')).toBeDefined(); + expect(e.wall.material.evenColor.getValue(date)).toEqual(Color.fromBytes(187, 134, 139, 130)); + expect(e.wall.material.oddColor.getValue(date)).toEqual(Color.fromBytes(177, 172, 79, 149)); + expect(e.wall.material.repeat.getValue(date)).toEqual(new Cartesian2(22341, 60503)); + expect(e = dataSource.entities.getById('constant_wall_material_image_color')).toBeDefined(); + expect(e.wall.material.color.getValue(date)).toEqualEpsilon(new Color(0.349019607843137, 0.843137254901961, 0.290196078431373, 0.0431372549019608), 1e-14); + expect(e = dataSource.entities.getById('constant_wall_material_grid_color')).toBeDefined(); + expect(e.wall.material.color.getValue(date)).toEqualEpsilon(new Color(0.756862745098039, 0.992156862745098, 0.992156862745098, 0.462745098039216), 1e-14); + expect(e = dataSource.entities.getById('constant_wall_material_stripe_evenColor')).toBeDefined(); + expect(e.wall.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.690196078431373, 0.211764705882353, 0.615686274509804, 0.627450980392157), 1e-14); + expect(e = dataSource.entities.getById('constant_wall_material_stripe_oddColor')).toBeDefined(); + expect(e.wall.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.968627450980392, 0.368627450980392, 0.219607843137255, 0.00392156862745098), 1e-14); + expect(e = dataSource.entities.getById('constant_wall_material_checkerboard_evenColor')).toBeDefined(); + expect(e.wall.material.evenColor.getValue(date)).toEqualEpsilon(new Color(0.376470588235294, 0.396078431372549, 0.698039215686274, 0.545098039215686), 1e-14); + expect(e = dataSource.entities.getById('constant_wall_material_checkerboard_oddColor')).toBeDefined(); + expect(e.wall.material.oddColor.getValue(date)).toEqualEpsilon(new Color(0.396078431372549, 0.0196078431372549, 0.27843137254902, 0.525490196078431), 1e-14); + expect(e = dataSource.entities.getById('constant_wall_outlineColor_rgbaf')).toBeDefined(); + expect(e.wall.outlineColor.getValue(date)).toEqualEpsilon(new Color(0.564705882352941, 0.67843137254902, 0.764705882352941, 0.811764705882353), 1e-14); + expect(e = dataSource.entities.getById('constant_agi_conicSensor_intersectionColor_rgbaf')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_lateralSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_lateralSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_lateralSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_lateralSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_lateralSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_lateralSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_lateralSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_lateralSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_lateralSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_lateralSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_lateralSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_ellipsoidSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_ellipsoidSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_ellipsoidSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_ellipsoidSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_ellipsoidSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_ellipsoidSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_ellipsoidSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_ellipsoidSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_ellipsoidSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_ellipsoidSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_ellipsoidSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_ellipsoidHorizonSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_ellipsoidHorizonSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_ellipsoidHorizonSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_ellipsoidHorizonSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_ellipsoidHorizonSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_ellipsoidHorizonSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_ellipsoidHorizonSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_ellipsoidHorizonSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_ellipsoidHorizonSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_domeSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_domeSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_domeSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_domeSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_domeSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_domeSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_domeSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_domeSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_domeSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_domeSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_domeSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_environmentOcclusionMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_environmentOcclusionMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_environmentOcclusionMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_environmentOcclusionMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('material_conicSensor_environmentOcclusionMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_environmentOcclusionMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_environmentOcclusionMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_environmentOcclusionMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_environmentOcclusionMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_environmentOcclusionMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_conicSensor_environmentOcclusionMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_agi_conicSensor_environmentIntersectionColor_rgbaf')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_agi_customPatternSensor_directions_unitSpherical')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_agi_customPatternSensor_directions_cartesian')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_agi_customPatternSensor_directions_unitCartesian')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_agi_customPatternSensor_intersectionColor_rgbaf')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_lateralSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_lateralSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_lateralSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_lateralSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_lateralSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_lateralSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_lateralSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_lateralSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_lateralSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_lateralSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_lateralSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_ellipsoidSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_ellipsoidSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_ellipsoidSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_ellipsoidSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_ellipsoidSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_ellipsoidSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_ellipsoidSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_ellipsoidSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_ellipsoidSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_ellipsoidSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_ellipsoidSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_ellipsoidHorizonSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_ellipsoidHorizonSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_ellipsoidHorizonSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_ellipsoidHorizonSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_ellipsoidHorizonSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_ellipsoidHorizonSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_ellipsoidHorizonSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_ellipsoidHorizonSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_ellipsoidHorizonSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_domeSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_domeSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_domeSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_domeSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_domeSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_domeSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_domeSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_domeSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_domeSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_domeSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_domeSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_environmentOcclusionMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_environmentOcclusionMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_environmentOcclusionMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_environmentOcclusionMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('material_customPatternSensor_environmentOcclusionMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_environmentOcclusionMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_environmentOcclusionMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_environmentOcclusionMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_environmentOcclusionMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_environmentOcclusionMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_customPatternSensor_environmentOcclusionMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_agi_customPatternSensor_environmentIntersectionColor_rgbaf')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_agi_rectangularSensor_intersectionColor_rgbaf')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_lateralSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_lateralSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_lateralSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_lateralSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_lateralSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_lateralSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_lateralSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_lateralSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_lateralSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_lateralSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_lateralSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_ellipsoidSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_ellipsoidSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_ellipsoidSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_ellipsoidSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_ellipsoidSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_ellipsoidSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_ellipsoidSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_ellipsoidSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_ellipsoidSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_ellipsoidSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_ellipsoidSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_ellipsoidHorizonSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_ellipsoidHorizonSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_ellipsoidHorizonSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_ellipsoidHorizonSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_ellipsoidHorizonSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_ellipsoidHorizonSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_ellipsoidHorizonSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_ellipsoidHorizonSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_ellipsoidHorizonSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_domeSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_domeSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_domeSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_domeSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_domeSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_domeSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_domeSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_domeSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_domeSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_domeSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_domeSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_environmentOcclusionMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_environmentOcclusionMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_environmentOcclusionMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_environmentOcclusionMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('material_rectangularSensor_environmentOcclusionMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_environmentOcclusionMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_environmentOcclusionMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_environmentOcclusionMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_environmentOcclusionMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_environmentOcclusionMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_rectangularSensor_environmentOcclusionMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_agi_rectangularSensor_environmentIntersectionColor_rgbaf')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_agi_fan_directions_unitSpherical')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_agi_fan_directions_cartesian')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_agi_fan_directions_unitCartesian')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_fan_material_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('material_fan_material_image')).toBeDefined(); + expect(e = dataSource.entities.getById('material_fan_material_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('material_fan_material_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('material_fan_material_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_fan_material_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_fan_material_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_fan_material_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_fan_material_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_fan_material_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_fan_material_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_agi_fan_outlineColor_rgbaf')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_agi_vector_color_rgbaf')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_agi_vector_direction_unitSpherical')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_agi_vector_direction_cartesian')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_agi_vector_direction_unitCartesian')).toBeDefined(); + expect(e = dataSource.entities.getById('constant_custom')).toBeDefined(); + expect(e.properties.custom_boolean.getValue(date)).toEqual(true); + expect(e.properties.custom_boundingRectangle.getValue(date)).toEqual(new BoundingRectangle(9369, 63524, 6904, 17690)); + expect(e.properties.custom_cartesian.getValue(date)).toEqual(new Cartesian3(28502, 45167, 944)); + expect(e.properties.custom_cartographicRadians.getValue(date)).toEqual(Cartesian3.fromRadians(0.350571264887744, 0.633274262413284, 42979)); + expect(e.properties.custom_cartographicDegrees.getValue(date)).toEqual(Cartesian3.fromDegrees(18, 36, 37743)); + expect(e.properties.custom_cartesian2.getValue(date)).toEqual(new Cartesian2(44825, 16303)); + expect(e.properties.custom_unitCartesian.getValue(date)).toEqualEpsilon(new Cartesian3(0.77935070007851, 0.565493818550955, 0.269868907930861), 1e-14); + expect(e.properties.custom_spherical.getValue(date)).toEqual(Cartesian3.fromSpherical(new Spherical(1705, 13830, 21558))); + expect(e.properties.custom_unitSpherical.getValue(date)).toEqualEpsilon(Cartesian3.fromSpherical(new Spherical(59387, 15591)), 1e-14); + expect(e.properties.custom_rgba.getValue(date)).toEqual(Color.fromBytes(50, 149, 175, 147)); + expect(e.properties.custom_rgbaf.getValue(date)).toEqualEpsilon(new Color(0.0666666666666667, 0.0666666666666667, 0.231372549019608, 0.427450980392157), 1e-14); + expect(e.properties.custom_colorBlendMode.getValue(date)).toEqual(ColorBlendMode.REPLACE); + expect(e.properties.custom_cornerType.getValue(date)).toEqual(CornerType.BEVELED); + expect(e.properties.custom_heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.properties.custom_horizontalOrigin.getValue(date)).toEqual(HorizontalOrigin.LEFT); + expect(e.properties.custom_labelStyle.getValue(date)).toEqual(LabelStyle.FILL_AND_OUTLINE); + expect(e.properties.custom_number.getValue(date)).toEqual(31507.0); + expect(e.properties.custom_nearFarScalar.getValue(date)).toEqual(new NearFarScalar(14621, 24121, 16734, 56129)); + expect(e.properties.custom_unitQuaternion.getValue(date)).toEqualEpsilon(new Quaternion(0.742737937277143, 0.267679401430615, 0.507905263014791, 0.344558178514049), 1e-14); + expect(e.properties.custom_shadowMode.getValue(date)).toEqual(ShadowMode.CAST_ONLY); + expect(e.properties.custom_string.getValue(date)).toEqual('string41758'); + expect(e.properties.custom_stripeOrientation.getValue(date)).toEqual(StripeOrientation.VERTICAL); + expect(e.properties.custom_wsen.getValue(date)).toEqual(new Rectangle(1.47520917005826, 1.17615981869183, 0.973692387723505, 1.00039738410474)); + expect(e.properties.custom_wsenDegrees.getValue(date)).toEqual(Rectangle.fromDegrees(5, 3, 6, 19)); + expect(e.properties.custom_uri.getValue(date).url).toEqual('http://example.com/41986'); + expect(e.properties.custom_verticalOrigin.getValue(date)).toEqual(VerticalOrigin.BOTTOM); + expect(e = dataSource.entities.getById('ConstantPosition1')).toBeDefined(); + expect(e.position.getValue(date)).toEqual(new Cartesian3(48370, 3260, 44044)); + expect(e = dataSource.entities.getById('ConstantDouble1')).toBeDefined(); + expect(e.billboard.scale.getValue(date)).toEqual(1155.0); + expect(e = dataSource.entities.getById('ConstantPosition2')).toBeDefined(); + expect(e.position.getValue(date)).toEqual(new Cartesian3(2599, 10, 39168)); + expect(e = dataSource.entities.getById('ConstantDouble2')).toBeDefined(); + expect(e.billboard.scale.getValue(date)).toEqual(16451.0); + expect(e = dataSource.entities.getById('ConstantPosition3')).toBeDefined(); + expect(e.position.getValue(date)).toEqual(new Cartesian3(1758, 45062, 8624)); + expect(e = dataSource.entities.getById('ConstantDouble3')).toBeDefined(); + expect(e.billboard.scale.getValue(date)).toEqual(50938.0); + expect(e = dataSource.entities.getById('Reference')).toBeDefined(); + expect(e.description.getValue(date)).toEqual(constant.description.getValue(date)); + expect(e.position.getValue(date)).toEqual(constant.position.getValue(date)); + expect(e.orientation.getValue(date)).toEqual(constant.orientation.getValue(date)); + expect(e.viewFrom.getValue(date)).toEqual(constant.viewFrom.getValue(date)); + expect(e.billboard.show.getValue(date)).toEqual(constant.billboard.show.getValue(date)); + expect(e.billboard.image.getValue(date)).toEqual(constant.billboard.image.getValue(date)); + expect(e.billboard.scale.getValue(date)).toEqual(constant.billboard.scale.getValue(date)); + expect(e.billboard.pixelOffset.getValue(date)).toEqual(constant.billboard.pixelOffset.getValue(date)); + expect(e.billboard.eyeOffset.getValue(date)).toEqual(constant.billboard.eyeOffset.getValue(date)); + expect(e.billboard.horizontalOrigin.getValue(date)).toEqual(constant.billboard.horizontalOrigin.getValue(date)); + expect(e.billboard.verticalOrigin.getValue(date)).toEqual(constant.billboard.verticalOrigin.getValue(date)); + expect(e.billboard.heightReference.getValue(date)).toEqual(constant.billboard.heightReference.getValue(date)); + expect(e.billboard.color.getValue(date)).toEqual(constant.billboard.color.getValue(date)); + expect(e.billboard.rotation.getValue(date)).toEqual(constant.billboard.rotation.getValue(date)); + expect(e.billboard.alignedAxis.getValue(date)).toEqual(constant.billboard.alignedAxis.getValue(date)); + expect(e.billboard.sizeInMeters.getValue(date)).toEqual(constant.billboard.sizeInMeters.getValue(date)); + expect(e.billboard.width.getValue(date)).toEqual(constant.billboard.width.getValue(date)); + expect(e.billboard.height.getValue(date)).toEqual(constant.billboard.height.getValue(date)); + expect(e.billboard.scaleByDistance.getValue(date)).toEqual(constant.billboard.scaleByDistance.getValue(date)); + expect(e.billboard.translucencyByDistance.getValue(date)).toEqual(constant.billboard.translucencyByDistance.getValue(date)); + expect(e.billboard.pixelOffsetScaleByDistance.getValue(date)).toEqual(constant.billboard.pixelOffsetScaleByDistance.getValue(date)); + expect(e.billboard.imageSubRegion.getValue(date)).toEqual(constant.billboard.imageSubRegion.getValue(date)); + expect(e.billboard.distanceDisplayCondition.getValue(date)).toEqual(constant.billboard.distanceDisplayCondition.getValue(date)); + expect(e.billboard.disableDepthTestDistance.getValue(date)).toEqual(constant.billboard.disableDepthTestDistance.getValue(date)); + expect(e.box.show.getValue(date)).toEqual(constant.box.show.getValue(date)); + expect(e.box.dimensions.getValue(date)).toEqual(constant.box.dimensions.getValue(date)); + expect(e.box.heightReference.getValue(date)).toEqual(constant.box.heightReference.getValue(date)); + expect(e.box.fill.getValue(date)).toEqual(constant.box.fill.getValue(date)); + expect(e.box.material.color.getValue(date)).toEqual(constant.box.material.color.getValue(date)); + expect(e.box.outline.getValue(date)).toEqual(constant.box.outline.getValue(date)); + expect(e.box.outlineColor.getValue(date)).toEqual(constant.box.outlineColor.getValue(date)); + expect(e.box.outlineWidth.getValue(date)).toEqual(constant.box.outlineWidth.getValue(date)); + expect(e.box.shadows.getValue(date)).toEqual(constant.box.shadows.getValue(date)); + expect(e.box.distanceDisplayCondition.getValue(date)).toEqual(constant.box.distanceDisplayCondition.getValue(date)); + expect(e.corridor.show.getValue(date)).toEqual(constant.corridor.show.getValue(date)); + expect(e.corridor.positions.getValue(date)).toEqual([dataSource.entities.getById('ConstantPosition1').position.getValue(date), dataSource.entities.getById('ConstantPosition2').position.getValue(date)]); + expect(e.corridor.width.getValue(date)).toEqual(constant.corridor.width.getValue(date)); + expect(e.corridor.height.getValue(date)).toEqual(constant.corridor.height.getValue(date)); + expect(e.corridor.heightReference.getValue(date)).toEqual(constant.corridor.heightReference.getValue(date)); + expect(e.corridor.extrudedHeight.getValue(date)).toEqual(constant.corridor.extrudedHeight.getValue(date)); + expect(e.corridor.extrudedHeightReference.getValue(date)).toEqual(constant.corridor.extrudedHeightReference.getValue(date)); + expect(e.corridor.cornerType.getValue(date)).toEqual(constant.corridor.cornerType.getValue(date)); + expect(e.corridor.granularity.getValue(date)).toEqual(constant.corridor.granularity.getValue(date)); + expect(e.corridor.fill.getValue(date)).toEqual(constant.corridor.fill.getValue(date)); + expect(e.corridor.material.color.getValue(date)).toEqual(constant.corridor.material.color.getValue(date)); + expect(e.corridor.outline.getValue(date)).toEqual(constant.corridor.outline.getValue(date)); + expect(e.corridor.outlineColor.getValue(date)).toEqual(constant.corridor.outlineColor.getValue(date)); + expect(e.corridor.outlineWidth.getValue(date)).toEqual(constant.corridor.outlineWidth.getValue(date)); + expect(e.corridor.shadows.getValue(date)).toEqual(constant.corridor.shadows.getValue(date)); + expect(e.corridor.distanceDisplayCondition.getValue(date)).toEqual(constant.corridor.distanceDisplayCondition.getValue(date)); + expect(e.corridor.classificationType.getValue(date)).toEqual(constant.corridor.classificationType.getValue(date)); + expect(e.corridor.zIndex.getValue(date)).toEqual(constant.corridor.zIndex.getValue(date)); + expect(e.cylinder.show.getValue(date)).toEqual(constant.cylinder.show.getValue(date)); + expect(e.cylinder.length.getValue(date)).toEqual(constant.cylinder.length.getValue(date)); + expect(e.cylinder.topRadius.getValue(date)).toEqual(constant.cylinder.topRadius.getValue(date)); + expect(e.cylinder.bottomRadius.getValue(date)).toEqual(constant.cylinder.bottomRadius.getValue(date)); + expect(e.cylinder.heightReference.getValue(date)).toEqual(constant.cylinder.heightReference.getValue(date)); + expect(e.cylinder.fill.getValue(date)).toEqual(constant.cylinder.fill.getValue(date)); + expect(e.cylinder.material.color.getValue(date)).toEqual(constant.cylinder.material.color.getValue(date)); + expect(e.cylinder.outline.getValue(date)).toEqual(constant.cylinder.outline.getValue(date)); + expect(e.cylinder.outlineColor.getValue(date)).toEqual(constant.cylinder.outlineColor.getValue(date)); + expect(e.cylinder.outlineWidth.getValue(date)).toEqual(constant.cylinder.outlineWidth.getValue(date)); + expect(e.cylinder.numberOfVerticalLines.getValue(date)).toEqual(constant.cylinder.numberOfVerticalLines.getValue(date)); + expect(e.cylinder.slices.getValue(date)).toEqual(constant.cylinder.slices.getValue(date)); + expect(e.cylinder.shadows.getValue(date)).toEqual(constant.cylinder.shadows.getValue(date)); + expect(e.cylinder.distanceDisplayCondition.getValue(date)).toEqual(constant.cylinder.distanceDisplayCondition.getValue(date)); + expect(e.ellipse.show.getValue(date)).toEqual(constant.ellipse.show.getValue(date)); + expect(e.ellipse.semiMajorAxis.getValue(date)).toEqual(constant.ellipse.semiMajorAxis.getValue(date)); + expect(e.ellipse.semiMinorAxis.getValue(date)).toEqual(constant.ellipse.semiMinorAxis.getValue(date)); + expect(e.ellipse.height.getValue(date)).toEqual(constant.ellipse.height.getValue(date)); + expect(e.ellipse.heightReference.getValue(date)).toEqual(constant.ellipse.heightReference.getValue(date)); + expect(e.ellipse.extrudedHeight.getValue(date)).toEqual(constant.ellipse.extrudedHeight.getValue(date)); + expect(e.ellipse.extrudedHeightReference.getValue(date)).toEqual(constant.ellipse.extrudedHeightReference.getValue(date)); + expect(e.ellipse.rotation.getValue(date)).toEqual(constant.ellipse.rotation.getValue(date)); + expect(e.ellipse.stRotation.getValue(date)).toEqual(constant.ellipse.stRotation.getValue(date)); + expect(e.ellipse.granularity.getValue(date)).toEqual(constant.ellipse.granularity.getValue(date)); + expect(e.ellipse.fill.getValue(date)).toEqual(constant.ellipse.fill.getValue(date)); + expect(e.ellipse.material.color.getValue(date)).toEqual(constant.ellipse.material.color.getValue(date)); + expect(e.ellipse.outline.getValue(date)).toEqual(constant.ellipse.outline.getValue(date)); + expect(e.ellipse.outlineColor.getValue(date)).toEqual(constant.ellipse.outlineColor.getValue(date)); + expect(e.ellipse.outlineWidth.getValue(date)).toEqual(constant.ellipse.outlineWidth.getValue(date)); + expect(e.ellipse.numberOfVerticalLines.getValue(date)).toEqual(constant.ellipse.numberOfVerticalLines.getValue(date)); + expect(e.ellipse.shadows.getValue(date)).toEqual(constant.ellipse.shadows.getValue(date)); + expect(e.ellipse.distanceDisplayCondition.getValue(date)).toEqual(constant.ellipse.distanceDisplayCondition.getValue(date)); + expect(e.ellipse.classificationType.getValue(date)).toEqual(constant.ellipse.classificationType.getValue(date)); + expect(e.ellipse.zIndex.getValue(date)).toEqual(constant.ellipse.zIndex.getValue(date)); + expect(e.ellipsoid.show.getValue(date)).toEqual(constant.ellipsoid.show.getValue(date)); + expect(e.ellipsoid.radii.getValue(date)).toEqual(constant.ellipsoid.radii.getValue(date)); + expect(e.ellipsoid.innerRadii.getValue(date)).toEqual(constant.ellipsoid.innerRadii.getValue(date)); + expect(e.ellipsoid.minimumClock.getValue(date)).toEqual(constant.ellipsoid.minimumClock.getValue(date)); + expect(e.ellipsoid.maximumClock.getValue(date)).toEqual(constant.ellipsoid.maximumClock.getValue(date)); + expect(e.ellipsoid.minimumCone.getValue(date)).toEqual(constant.ellipsoid.minimumCone.getValue(date)); + expect(e.ellipsoid.maximumCone.getValue(date)).toEqual(constant.ellipsoid.maximumCone.getValue(date)); + expect(e.ellipsoid.heightReference.getValue(date)).toEqual(constant.ellipsoid.heightReference.getValue(date)); + expect(e.ellipsoid.fill.getValue(date)).toEqual(constant.ellipsoid.fill.getValue(date)); + expect(e.ellipsoid.material.color.getValue(date)).toEqual(constant.ellipsoid.material.color.getValue(date)); + expect(e.ellipsoid.outline.getValue(date)).toEqual(constant.ellipsoid.outline.getValue(date)); + expect(e.ellipsoid.outlineColor.getValue(date)).toEqual(constant.ellipsoid.outlineColor.getValue(date)); + expect(e.ellipsoid.outlineWidth.getValue(date)).toEqual(constant.ellipsoid.outlineWidth.getValue(date)); + expect(e.ellipsoid.stackPartitions.getValue(date)).toEqual(constant.ellipsoid.stackPartitions.getValue(date)); + expect(e.ellipsoid.slicePartitions.getValue(date)).toEqual(constant.ellipsoid.slicePartitions.getValue(date)); + expect(e.ellipsoid.subdivisions.getValue(date)).toEqual(constant.ellipsoid.subdivisions.getValue(date)); + expect(e.ellipsoid.shadows.getValue(date)).toEqual(constant.ellipsoid.shadows.getValue(date)); + expect(e.ellipsoid.distanceDisplayCondition.getValue(date)).toEqual(constant.ellipsoid.distanceDisplayCondition.getValue(date)); + expect(e.label.show.getValue(date)).toEqual(constant.label.show.getValue(date)); + expect(e.label.text.getValue(date)).toEqual(constant.label.text.getValue(date)); + expect(e.label.font.getValue(date)).toEqual(constant.label.font.getValue(date)); + expect(e.label.style.getValue(date)).toEqual(constant.label.style.getValue(date)); + expect(e.label.scale.getValue(date)).toEqual(constant.label.scale.getValue(date)); + expect(e.label.showBackground.getValue(date)).toEqual(constant.label.showBackground.getValue(date)); + expect(e.label.backgroundColor.getValue(date)).toEqual(constant.label.backgroundColor.getValue(date)); + expect(e.label.backgroundPadding.getValue(date)).toEqual(constant.label.backgroundPadding.getValue(date)); + expect(e.label.pixelOffset.getValue(date)).toEqual(constant.label.pixelOffset.getValue(date)); + expect(e.label.eyeOffset.getValue(date)).toEqual(constant.label.eyeOffset.getValue(date)); + expect(e.label.horizontalOrigin.getValue(date)).toEqual(constant.label.horizontalOrigin.getValue(date)); + expect(e.label.verticalOrigin.getValue(date)).toEqual(constant.label.verticalOrigin.getValue(date)); + expect(e.label.heightReference.getValue(date)).toEqual(constant.label.heightReference.getValue(date)); + expect(e.label.fillColor.getValue(date)).toEqual(constant.label.fillColor.getValue(date)); + expect(e.label.outlineColor.getValue(date)).toEqual(constant.label.outlineColor.getValue(date)); + expect(e.label.outlineWidth.getValue(date)).toEqual(constant.label.outlineWidth.getValue(date)); + expect(e.label.translucencyByDistance.getValue(date)).toEqual(constant.label.translucencyByDistance.getValue(date)); + expect(e.label.pixelOffsetScaleByDistance.getValue(date)).toEqual(constant.label.pixelOffsetScaleByDistance.getValue(date)); + expect(e.label.scaleByDistance.getValue(date)).toEqual(constant.label.scaleByDistance.getValue(date)); + expect(e.label.distanceDisplayCondition.getValue(date)).toEqual(constant.label.distanceDisplayCondition.getValue(date)); + expect(e.label.disableDepthTestDistance.getValue(date)).toEqual(constant.label.disableDepthTestDistance.getValue(date)); + expect(e.model.show.getValue(date)).toEqual(constant.model.show.getValue(date)); + expect(e.model.uri.getValue(date)).toEqual(constant.model.uri.getValue(date)); + expect(e.model.scale.getValue(date)).toEqual(constant.model.scale.getValue(date)); + expect(e.model.minimumPixelSize.getValue(date)).toEqual(constant.model.minimumPixelSize.getValue(date)); + expect(e.model.maximumScale.getValue(date)).toEqual(constant.model.maximumScale.getValue(date)); + expect(e.model.incrementallyLoadTextures.getValue(date)).toEqual(constant.model.incrementallyLoadTextures.getValue(date)); + expect(e.model.runAnimations.getValue(date)).toEqual(constant.model.runAnimations.getValue(date)); + expect(e.model.shadows.getValue(date)).toEqual(constant.model.shadows.getValue(date)); + expect(e.model.heightReference.getValue(date)).toEqual(constant.model.heightReference.getValue(date)); + expect(e.model.silhouetteColor.getValue(date)).toEqual(constant.model.silhouetteColor.getValue(date)); + expect(e.model.silhouetteSize.getValue(date)).toEqual(constant.model.silhouetteSize.getValue(date)); + expect(e.model.color.getValue(date)).toEqual(constant.model.color.getValue(date)); + expect(e.model.colorBlendMode.getValue(date)).toEqual(constant.model.colorBlendMode.getValue(date)); + expect(e.model.colorBlendAmount.getValue(date)).toEqual(constant.model.colorBlendAmount.getValue(date)); + expect(e.model.distanceDisplayCondition.getValue(date)).toEqual(constant.model.distanceDisplayCondition.getValue(date)); + expect(e.model.nodeTransformations.referenceProp.translation.getValue(date)).toEqual(constant.model.nodeTransformations.prop.translation.getValue(date)); + expect(e.model.nodeTransformations.referenceProp.rotation.getValue(date)).toEqual(constant.model.nodeTransformations.prop.rotation.getValue(date)); + expect(e.model.nodeTransformations.referenceProp.scale.getValue(date)).toEqual(constant.model.nodeTransformations.prop.scale.getValue(date)); + expect(e.model.articulations.referenceProp.getValue(date)).toEqual(constant.model.articulations.prop.getValue(date)); + expect(e.path.show.getValue(date)).toEqual(constant.path.show.getValue(date)); + expect(e.path.leadTime.getValue(date)).toEqual(constant.path.leadTime.getValue(date)); + expect(e.path.trailTime.getValue(date)).toEqual(constant.path.trailTime.getValue(date)); + expect(e.path.width.getValue(date)).toEqual(constant.path.width.getValue(date)); + expect(e.path.resolution.getValue(date)).toEqual(constant.path.resolution.getValue(date)); + expect(e.path.material.color.getValue(date)).toEqual(constant.path.material.color.getValue(date)); + expect(e.path.distanceDisplayCondition.getValue(date)).toEqual(constant.path.distanceDisplayCondition.getValue(date)); + expect(e.point.show.getValue(date)).toEqual(constant.point.show.getValue(date)); + expect(e.point.pixelSize.getValue(date)).toEqual(constant.point.pixelSize.getValue(date)); + expect(e.point.heightReference.getValue(date)).toEqual(constant.point.heightReference.getValue(date)); + expect(e.point.color.getValue(date)).toEqual(constant.point.color.getValue(date)); + expect(e.point.outlineColor.getValue(date)).toEqual(constant.point.outlineColor.getValue(date)); + expect(e.point.outlineWidth.getValue(date)).toEqual(constant.point.outlineWidth.getValue(date)); + expect(e.point.scaleByDistance.getValue(date)).toEqual(constant.point.scaleByDistance.getValue(date)); + expect(e.point.translucencyByDistance.getValue(date)).toEqual(constant.point.translucencyByDistance.getValue(date)); + expect(e.point.distanceDisplayCondition.getValue(date)).toEqual(constant.point.distanceDisplayCondition.getValue(date)); + expect(e.point.disableDepthTestDistance.getValue(date)).toEqual(constant.point.disableDepthTestDistance.getValue(date)); + expect(e.polygon.show.getValue(date)).toEqual(constant.polygon.show.getValue(date)); + expect(e.polygon.hierarchy.getValue(date).positions).toEqual([dataSource.entities.getById('ConstantPosition1').position.getValue(date), dataSource.entities.getById('ConstantPosition2').position.getValue(date)]); + expect(e.polygon.hierarchy.getValue(date).holes).toEqual([ new PolygonHierarchy([ dataSource.entities.getById('ConstantPosition1').position.getValue(date), dataSource.entities.getById('ConstantPosition2').position.getValue(date), dataSource.entities.getById('ConstantPosition3').position.getValue(date) ])]); + expect(e.polygon.arcType.getValue(date)).toEqual(constant.polygon.arcType.getValue(date)); + expect(e.polygon.height.getValue(date)).toEqual(constant.polygon.height.getValue(date)); + expect(e.polygon.heightReference.getValue(date)).toEqual(constant.polygon.heightReference.getValue(date)); + expect(e.polygon.extrudedHeight.getValue(date)).toEqual(constant.polygon.extrudedHeight.getValue(date)); + expect(e.polygon.extrudedHeightReference.getValue(date)).toEqual(constant.polygon.extrudedHeightReference.getValue(date)); + expect(e.polygon.stRotation.getValue(date)).toEqual(constant.polygon.stRotation.getValue(date)); + expect(e.polygon.granularity.getValue(date)).toEqual(constant.polygon.granularity.getValue(date)); + expect(e.polygon.fill.getValue(date)).toEqual(constant.polygon.fill.getValue(date)); + expect(e.polygon.material.color.getValue(date)).toEqual(constant.polygon.material.color.getValue(date)); + expect(e.polygon.outline.getValue(date)).toEqual(constant.polygon.outline.getValue(date)); + expect(e.polygon.outlineColor.getValue(date)).toEqual(constant.polygon.outlineColor.getValue(date)); + expect(e.polygon.outlineWidth.getValue(date)).toEqual(constant.polygon.outlineWidth.getValue(date)); + expect(e.polygon.perPositionHeight.getValue(date)).toEqual(constant.polygon.perPositionHeight.getValue(date)); + expect(e.polygon.closeTop.getValue(date)).toEqual(constant.polygon.closeTop.getValue(date)); + expect(e.polygon.closeBottom.getValue(date)).toEqual(constant.polygon.closeBottom.getValue(date)); + expect(e.polygon.shadows.getValue(date)).toEqual(constant.polygon.shadows.getValue(date)); + expect(e.polygon.distanceDisplayCondition.getValue(date)).toEqual(constant.polygon.distanceDisplayCondition.getValue(date)); + expect(e.polygon.classificationType.getValue(date)).toEqual(constant.polygon.classificationType.getValue(date)); + expect(e.polygon.zIndex.getValue(date)).toEqual(constant.polygon.zIndex.getValue(date)); + expect(e.polyline.show.getValue(date)).toEqual(constant.polyline.show.getValue(date)); + expect(e.polyline.positions.getValue(date)).toEqual([dataSource.entities.getById('ConstantPosition1').position.getValue(date), dataSource.entities.getById('ConstantPosition2').position.getValue(date)]); + expect(e.polyline.arcType.getValue(date)).toEqual(constant.polyline.arcType.getValue(date)); + expect(e.polyline.width.getValue(date)).toEqual(constant.polyline.width.getValue(date)); + expect(e.polyline.granularity.getValue(date)).toEqual(constant.polyline.granularity.getValue(date)); + expect(e.polyline.material.color.getValue(date)).toEqual(constant.polyline.material.color.getValue(date)); + expect(e.polyline.shadows.getValue(date)).toEqual(constant.polyline.shadows.getValue(date)); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual(constant.polyline.depthFailMaterial.color.getValue(date)); + expect(e.polyline.distanceDisplayCondition.getValue(date)).toEqual(constant.polyline.distanceDisplayCondition.getValue(date)); + expect(e.polyline.clampToGround.getValue(date)).toEqual(constant.polyline.clampToGround.getValue(date)); + expect(e.polyline.classificationType.getValue(date)).toEqual(constant.polyline.classificationType.getValue(date)); + expect(e.polyline.zIndex.getValue(date)).toEqual(constant.polyline.zIndex.getValue(date)); + expect(e.polylineVolume.show.getValue(date)).toEqual(constant.polylineVolume.show.getValue(date)); + expect(e.polylineVolume.positions.getValue(date)).toEqual([dataSource.entities.getById('ConstantPosition1').position.getValue(date), dataSource.entities.getById('ConstantPosition2').position.getValue(date)]); + expect(e.polylineVolume.cornerType.getValue(date)).toEqual(constant.polylineVolume.cornerType.getValue(date)); + expect(e.polylineVolume.granularity.getValue(date)).toEqual(constant.polylineVolume.granularity.getValue(date)); + expect(e.polylineVolume.fill.getValue(date)).toEqual(constant.polylineVolume.fill.getValue(date)); + expect(e.polylineVolume.material.color.getValue(date)).toEqual(constant.polylineVolume.material.color.getValue(date)); + expect(e.polylineVolume.outline.getValue(date)).toEqual(constant.polylineVolume.outline.getValue(date)); + expect(e.polylineVolume.outlineColor.getValue(date)).toEqual(constant.polylineVolume.outlineColor.getValue(date)); + expect(e.polylineVolume.outlineWidth.getValue(date)).toEqual(constant.polylineVolume.outlineWidth.getValue(date)); + expect(e.polylineVolume.shadows.getValue(date)).toEqual(constant.polylineVolume.shadows.getValue(date)); + expect(e.polylineVolume.distanceDisplayCondition.getValue(date)).toEqual(constant.polylineVolume.distanceDisplayCondition.getValue(date)); + expect(e.rectangle.show.getValue(date)).toEqual(constant.rectangle.show.getValue(date)); + expect(e.rectangle.coordinates.getValue(date)).toEqual(constant.rectangle.coordinates.getValue(date)); + expect(e.rectangle.height.getValue(date)).toEqual(constant.rectangle.height.getValue(date)); + expect(e.rectangle.heightReference.getValue(date)).toEqual(constant.rectangle.heightReference.getValue(date)); + expect(e.rectangle.extrudedHeight.getValue(date)).toEqual(constant.rectangle.extrudedHeight.getValue(date)); + expect(e.rectangle.extrudedHeightReference.getValue(date)).toEqual(constant.rectangle.extrudedHeightReference.getValue(date)); + expect(e.rectangle.rotation.getValue(date)).toEqual(constant.rectangle.rotation.getValue(date)); + expect(e.rectangle.stRotation.getValue(date)).toEqual(constant.rectangle.stRotation.getValue(date)); + expect(e.rectangle.granularity.getValue(date)).toEqual(constant.rectangle.granularity.getValue(date)); + expect(e.rectangle.fill.getValue(date)).toEqual(constant.rectangle.fill.getValue(date)); + expect(e.rectangle.material.color.getValue(date)).toEqual(constant.rectangle.material.color.getValue(date)); + expect(e.rectangle.outline.getValue(date)).toEqual(constant.rectangle.outline.getValue(date)); + expect(e.rectangle.outlineColor.getValue(date)).toEqual(constant.rectangle.outlineColor.getValue(date)); + expect(e.rectangle.outlineWidth.getValue(date)).toEqual(constant.rectangle.outlineWidth.getValue(date)); + expect(e.rectangle.shadows.getValue(date)).toEqual(constant.rectangle.shadows.getValue(date)); + expect(e.rectangle.distanceDisplayCondition.getValue(date)).toEqual(constant.rectangle.distanceDisplayCondition.getValue(date)); + expect(e.rectangle.classificationType.getValue(date)).toEqual(constant.rectangle.classificationType.getValue(date)); + expect(e.rectangle.zIndex.getValue(date)).toEqual(constant.rectangle.zIndex.getValue(date)); + expect(e.tileset.show.getValue(date)).toEqual(constant.tileset.show.getValue(date)); + expect(e.tileset.uri.getValue(date)).toEqual(constant.tileset.uri.getValue(date)); + expect(e.tileset.maximumScreenSpaceError.getValue(date)).toEqual(constant.tileset.maximumScreenSpaceError.getValue(date)); + expect(e.wall.show.getValue(date)).toEqual(constant.wall.show.getValue(date)); + expect(e.wall.positions.getValue(date)).toEqual([dataSource.entities.getById('ConstantPosition1').position.getValue(date), dataSource.entities.getById('ConstantPosition2').position.getValue(date)]); + expect(e.wall.minimumHeights.getValue(date)).toEqual([dataSource.entities.getById('ConstantDouble1').billboard.scale.getValue(date), dataSource.entities.getById('ConstantDouble2').billboard.scale.getValue(date)]); + expect(e.wall.maximumHeights.getValue(date)).toEqual([dataSource.entities.getById('ConstantDouble1').billboard.scale.getValue(date), dataSource.entities.getById('ConstantDouble2').billboard.scale.getValue(date)]); + expect(e.wall.granularity.getValue(date)).toEqual(constant.wall.granularity.getValue(date)); + expect(e.wall.fill.getValue(date)).toEqual(constant.wall.fill.getValue(date)); + expect(e.wall.material.color.getValue(date)).toEqual(constant.wall.material.color.getValue(date)); + expect(e.wall.outline.getValue(date)).toEqual(constant.wall.outline.getValue(date)); + expect(e.wall.outlineColor.getValue(date)).toEqual(constant.wall.outlineColor.getValue(date)); + expect(e.wall.outlineWidth.getValue(date)).toEqual(constant.wall.outlineWidth.getValue(date)); + expect(e.wall.shadows.getValue(date)).toEqual(constant.wall.shadows.getValue(date)); + expect(e.wall.distanceDisplayCondition.getValue(date)).toEqual(constant.wall.distanceDisplayCondition.getValue(date)); + expect(e = dataSource.entities.getById('reference_box_material_image')).toBeDefined(); + expect(e.box.material.image.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_image').box.material.image.getValue(date)); + expect(e.box.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_image').box.material.repeat.getValue(date)); + expect(e.box.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_image').box.material.color.getValue(date)); + expect(e.box.material.transparent.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_image').box.material.transparent.getValue(date)); + expect(e = dataSource.entities.getById('reference_box_material_grid')).toBeDefined(); + expect(e.box.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_grid').box.material.color.getValue(date)); + expect(e.box.material.cellAlpha.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_grid').box.material.cellAlpha.getValue(date)); + expect(e.box.material.lineCount.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_grid').box.material.lineCount.getValue(date)); + expect(e.box.material.lineThickness.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_grid').box.material.lineThickness.getValue(date)); + expect(e.box.material.lineOffset.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_grid').box.material.lineOffset.getValue(date)); + expect(e = dataSource.entities.getById('reference_box_material_stripe')).toBeDefined(); + expect(e.box.material.orientation.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_stripe').box.material.orientation.getValue(date)); + expect(e.box.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_stripe').box.material.evenColor.getValue(date)); + expect(e.box.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_stripe').box.material.oddColor.getValue(date)); + expect(e.box.material.offset.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_stripe').box.material.offset.getValue(date)); + expect(e.box.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_stripe').box.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_box_material_checkerboard')).toBeDefined(); + expect(e.box.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_checkerboard').box.material.evenColor.getValue(date)); + expect(e.box.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_checkerboard').box.material.oddColor.getValue(date)); + expect(e.box.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_box_material_checkerboard').box.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_corridor_material_image')).toBeDefined(); + expect(e.corridor.material.image.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_image').corridor.material.image.getValue(date)); + expect(e.corridor.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_image').corridor.material.repeat.getValue(date)); + expect(e.corridor.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_image').corridor.material.color.getValue(date)); + expect(e.corridor.material.transparent.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_image').corridor.material.transparent.getValue(date)); + expect(e = dataSource.entities.getById('reference_corridor_material_grid')).toBeDefined(); + expect(e.corridor.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_grid').corridor.material.color.getValue(date)); + expect(e.corridor.material.cellAlpha.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_grid').corridor.material.cellAlpha.getValue(date)); + expect(e.corridor.material.lineCount.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_grid').corridor.material.lineCount.getValue(date)); + expect(e.corridor.material.lineThickness.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_grid').corridor.material.lineThickness.getValue(date)); + expect(e.corridor.material.lineOffset.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_grid').corridor.material.lineOffset.getValue(date)); + expect(e = dataSource.entities.getById('reference_corridor_material_stripe')).toBeDefined(); + expect(e.corridor.material.orientation.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_stripe').corridor.material.orientation.getValue(date)); + expect(e.corridor.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_stripe').corridor.material.evenColor.getValue(date)); + expect(e.corridor.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_stripe').corridor.material.oddColor.getValue(date)); + expect(e.corridor.material.offset.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_stripe').corridor.material.offset.getValue(date)); + expect(e.corridor.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_stripe').corridor.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_corridor_material_checkerboard')).toBeDefined(); + expect(e.corridor.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_checkerboard').corridor.material.evenColor.getValue(date)); + expect(e.corridor.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_checkerboard').corridor.material.oddColor.getValue(date)); + expect(e.corridor.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_corridor_material_checkerboard').corridor.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_cylinder_material_image')).toBeDefined(); + expect(e.cylinder.material.image.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_image').cylinder.material.image.getValue(date)); + expect(e.cylinder.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_image').cylinder.material.repeat.getValue(date)); + expect(e.cylinder.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_image').cylinder.material.color.getValue(date)); + expect(e.cylinder.material.transparent.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_image').cylinder.material.transparent.getValue(date)); + expect(e = dataSource.entities.getById('reference_cylinder_material_grid')).toBeDefined(); + expect(e.cylinder.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_grid').cylinder.material.color.getValue(date)); + expect(e.cylinder.material.cellAlpha.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_grid').cylinder.material.cellAlpha.getValue(date)); + expect(e.cylinder.material.lineCount.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_grid').cylinder.material.lineCount.getValue(date)); + expect(e.cylinder.material.lineThickness.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_grid').cylinder.material.lineThickness.getValue(date)); + expect(e.cylinder.material.lineOffset.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_grid').cylinder.material.lineOffset.getValue(date)); + expect(e = dataSource.entities.getById('reference_cylinder_material_stripe')).toBeDefined(); + expect(e.cylinder.material.orientation.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_stripe').cylinder.material.orientation.getValue(date)); + expect(e.cylinder.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_stripe').cylinder.material.evenColor.getValue(date)); + expect(e.cylinder.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_stripe').cylinder.material.oddColor.getValue(date)); + expect(e.cylinder.material.offset.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_stripe').cylinder.material.offset.getValue(date)); + expect(e.cylinder.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_stripe').cylinder.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_cylinder_material_checkerboard')).toBeDefined(); + expect(e.cylinder.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_checkerboard').cylinder.material.evenColor.getValue(date)); + expect(e.cylinder.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_checkerboard').cylinder.material.oddColor.getValue(date)); + expect(e.cylinder.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_cylinder_material_checkerboard').cylinder.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_ellipse_material_image')).toBeDefined(); + expect(e.ellipse.material.image.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_image').ellipse.material.image.getValue(date)); + expect(e.ellipse.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_image').ellipse.material.repeat.getValue(date)); + expect(e.ellipse.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_image').ellipse.material.color.getValue(date)); + expect(e.ellipse.material.transparent.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_image').ellipse.material.transparent.getValue(date)); + expect(e = dataSource.entities.getById('reference_ellipse_material_grid')).toBeDefined(); + expect(e.ellipse.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_grid').ellipse.material.color.getValue(date)); + expect(e.ellipse.material.cellAlpha.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_grid').ellipse.material.cellAlpha.getValue(date)); + expect(e.ellipse.material.lineCount.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_grid').ellipse.material.lineCount.getValue(date)); + expect(e.ellipse.material.lineThickness.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_grid').ellipse.material.lineThickness.getValue(date)); + expect(e.ellipse.material.lineOffset.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_grid').ellipse.material.lineOffset.getValue(date)); + expect(e = dataSource.entities.getById('reference_ellipse_material_stripe')).toBeDefined(); + expect(e.ellipse.material.orientation.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_stripe').ellipse.material.orientation.getValue(date)); + expect(e.ellipse.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_stripe').ellipse.material.evenColor.getValue(date)); + expect(e.ellipse.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_stripe').ellipse.material.oddColor.getValue(date)); + expect(e.ellipse.material.offset.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_stripe').ellipse.material.offset.getValue(date)); + expect(e.ellipse.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_stripe').ellipse.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_ellipse_material_checkerboard')).toBeDefined(); + expect(e.ellipse.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_checkerboard').ellipse.material.evenColor.getValue(date)); + expect(e.ellipse.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_checkerboard').ellipse.material.oddColor.getValue(date)); + expect(e.ellipse.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_ellipse_material_checkerboard').ellipse.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_ellipsoid_material_image')).toBeDefined(); + expect(e.ellipsoid.material.image.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_image').ellipsoid.material.image.getValue(date)); + expect(e.ellipsoid.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_image').ellipsoid.material.repeat.getValue(date)); + expect(e.ellipsoid.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_image').ellipsoid.material.color.getValue(date)); + expect(e.ellipsoid.material.transparent.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_image').ellipsoid.material.transparent.getValue(date)); + expect(e = dataSource.entities.getById('reference_ellipsoid_material_grid')).toBeDefined(); + expect(e.ellipsoid.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_grid').ellipsoid.material.color.getValue(date)); + expect(e.ellipsoid.material.cellAlpha.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_grid').ellipsoid.material.cellAlpha.getValue(date)); + expect(e.ellipsoid.material.lineCount.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_grid').ellipsoid.material.lineCount.getValue(date)); + expect(e.ellipsoid.material.lineThickness.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_grid').ellipsoid.material.lineThickness.getValue(date)); + expect(e.ellipsoid.material.lineOffset.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_grid').ellipsoid.material.lineOffset.getValue(date)); + expect(e = dataSource.entities.getById('reference_ellipsoid_material_stripe')).toBeDefined(); + expect(e.ellipsoid.material.orientation.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_stripe').ellipsoid.material.orientation.getValue(date)); + expect(e.ellipsoid.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_stripe').ellipsoid.material.evenColor.getValue(date)); + expect(e.ellipsoid.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_stripe').ellipsoid.material.oddColor.getValue(date)); + expect(e.ellipsoid.material.offset.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_stripe').ellipsoid.material.offset.getValue(date)); + expect(e.ellipsoid.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_stripe').ellipsoid.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_ellipsoid_material_checkerboard')).toBeDefined(); + expect(e.ellipsoid.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_checkerboard').ellipsoid.material.evenColor.getValue(date)); + expect(e.ellipsoid.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_checkerboard').ellipsoid.material.oddColor.getValue(date)); + expect(e.ellipsoid.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_ellipsoid_material_checkerboard').ellipsoid.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_path_material_polylineOutline')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_polylineOutline').path.material.color.getValue(date)); + expect(e.path.material.outlineColor.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_polylineOutline').path.material.outlineColor.getValue(date)); + expect(e.path.material.outlineWidth.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_polylineOutline').path.material.outlineWidth.getValue(date)); + expect(e = dataSource.entities.getById('reference_path_material_polylineArrow')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_polylineArrow').path.material.color.getValue(date)); + expect(e = dataSource.entities.getById('reference_path_material_polylineDash')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_polylineDash').path.material.color.getValue(date)); + expect(e.path.material.gapColor.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_polylineDash').path.material.gapColor.getValue(date)); + expect(e.path.material.dashLength.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_polylineDash').path.material.dashLength.getValue(date)); + expect(e.path.material.dashPattern.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_polylineDash').path.material.dashPattern.getValue(date)); + expect(e = dataSource.entities.getById('reference_path_material_polylineGlow')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_polylineGlow').path.material.color.getValue(date)); + expect(e.path.material.glowPower.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_polylineGlow').path.material.glowPower.getValue(date)); + expect(e.path.material.taperPower.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_polylineGlow').path.material.taperPower.getValue(date)); + expect(e = dataSource.entities.getById('reference_path_material_image')).toBeDefined(); + expect(e.path.material.image.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_image').path.material.image.getValue(date)); + expect(e.path.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_image').path.material.repeat.getValue(date)); + expect(e.path.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_image').path.material.color.getValue(date)); + expect(e.path.material.transparent.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_image').path.material.transparent.getValue(date)); + expect(e = dataSource.entities.getById('reference_path_material_grid')).toBeDefined(); + expect(e.path.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_grid').path.material.color.getValue(date)); + expect(e.path.material.cellAlpha.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_grid').path.material.cellAlpha.getValue(date)); + expect(e.path.material.lineCount.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_grid').path.material.lineCount.getValue(date)); + expect(e.path.material.lineThickness.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_grid').path.material.lineThickness.getValue(date)); + expect(e.path.material.lineOffset.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_grid').path.material.lineOffset.getValue(date)); + expect(e = dataSource.entities.getById('reference_path_material_stripe')).toBeDefined(); + expect(e.path.material.orientation.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_stripe').path.material.orientation.getValue(date)); + expect(e.path.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_stripe').path.material.evenColor.getValue(date)); + expect(e.path.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_stripe').path.material.oddColor.getValue(date)); + expect(e.path.material.offset.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_stripe').path.material.offset.getValue(date)); + expect(e.path.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_stripe').path.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_path_material_checkerboard')).toBeDefined(); + expect(e.path.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_checkerboard').path.material.evenColor.getValue(date)); + expect(e.path.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_checkerboard').path.material.oddColor.getValue(date)); + expect(e.path.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_path_material_checkerboard').path.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_polygon_material_image')).toBeDefined(); + expect(e.polygon.material.image.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_image').polygon.material.image.getValue(date)); + expect(e.polygon.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_image').polygon.material.repeat.getValue(date)); + expect(e.polygon.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_image').polygon.material.color.getValue(date)); + expect(e.polygon.material.transparent.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_image').polygon.material.transparent.getValue(date)); + expect(e = dataSource.entities.getById('reference_polygon_material_grid')).toBeDefined(); + expect(e.polygon.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_grid').polygon.material.color.getValue(date)); + expect(e.polygon.material.cellAlpha.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_grid').polygon.material.cellAlpha.getValue(date)); + expect(e.polygon.material.lineCount.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_grid').polygon.material.lineCount.getValue(date)); + expect(e.polygon.material.lineThickness.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_grid').polygon.material.lineThickness.getValue(date)); + expect(e.polygon.material.lineOffset.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_grid').polygon.material.lineOffset.getValue(date)); + expect(e = dataSource.entities.getById('reference_polygon_material_stripe')).toBeDefined(); + expect(e.polygon.material.orientation.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_stripe').polygon.material.orientation.getValue(date)); + expect(e.polygon.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_stripe').polygon.material.evenColor.getValue(date)); + expect(e.polygon.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_stripe').polygon.material.oddColor.getValue(date)); + expect(e.polygon.material.offset.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_stripe').polygon.material.offset.getValue(date)); + expect(e.polygon.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_stripe').polygon.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_polygon_material_checkerboard')).toBeDefined(); + expect(e.polygon.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_checkerboard').polygon.material.evenColor.getValue(date)); + expect(e.polygon.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_checkerboard').polygon.material.oddColor.getValue(date)); + expect(e.polygon.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_polygon_material_checkerboard').polygon.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_polyline_material_polylineOutline')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_polylineOutline').polyline.material.color.getValue(date)); + expect(e.polyline.material.outlineColor.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_polylineOutline').polyline.material.outlineColor.getValue(date)); + expect(e.polyline.material.outlineWidth.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_polylineOutline').polyline.material.outlineWidth.getValue(date)); + expect(e = dataSource.entities.getById('reference_polyline_material_polylineArrow')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_polylineArrow').polyline.material.color.getValue(date)); + expect(e = dataSource.entities.getById('reference_polyline_material_polylineDash')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_polylineDash').polyline.material.color.getValue(date)); + expect(e.polyline.material.gapColor.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_polylineDash').polyline.material.gapColor.getValue(date)); + expect(e.polyline.material.dashLength.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_polylineDash').polyline.material.dashLength.getValue(date)); + expect(e.polyline.material.dashPattern.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_polylineDash').polyline.material.dashPattern.getValue(date)); + expect(e = dataSource.entities.getById('reference_polyline_material_polylineGlow')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_polylineGlow').polyline.material.color.getValue(date)); + expect(e.polyline.material.glowPower.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_polylineGlow').polyline.material.glowPower.getValue(date)); + expect(e.polyline.material.taperPower.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_polylineGlow').polyline.material.taperPower.getValue(date)); + expect(e = dataSource.entities.getById('reference_polyline_material_image')).toBeDefined(); + expect(e.polyline.material.image.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_image').polyline.material.image.getValue(date)); + expect(e.polyline.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_image').polyline.material.repeat.getValue(date)); + expect(e.polyline.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_image').polyline.material.color.getValue(date)); + expect(e.polyline.material.transparent.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_image').polyline.material.transparent.getValue(date)); + expect(e = dataSource.entities.getById('reference_polyline_material_grid')).toBeDefined(); + expect(e.polyline.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_grid').polyline.material.color.getValue(date)); + expect(e.polyline.material.cellAlpha.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_grid').polyline.material.cellAlpha.getValue(date)); + expect(e.polyline.material.lineCount.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_grid').polyline.material.lineCount.getValue(date)); + expect(e.polyline.material.lineThickness.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_grid').polyline.material.lineThickness.getValue(date)); + expect(e.polyline.material.lineOffset.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_grid').polyline.material.lineOffset.getValue(date)); + expect(e = dataSource.entities.getById('reference_polyline_material_stripe')).toBeDefined(); + expect(e.polyline.material.orientation.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_stripe').polyline.material.orientation.getValue(date)); + expect(e.polyline.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_stripe').polyline.material.evenColor.getValue(date)); + expect(e.polyline.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_stripe').polyline.material.oddColor.getValue(date)); + expect(e.polyline.material.offset.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_stripe').polyline.material.offset.getValue(date)); + expect(e.polyline.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_stripe').polyline.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_polyline_material_checkerboard')).toBeDefined(); + expect(e.polyline.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_checkerboard').polyline.material.evenColor.getValue(date)); + expect(e.polyline.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_checkerboard').polyline.material.oddColor.getValue(date)); + expect(e.polyline.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_material_checkerboard').polyline.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_polyline_depthFailMaterial_polylineOutline')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_polylineOutline').polyline.depthFailMaterial.color.getValue(date)); + expect(e.polyline.depthFailMaterial.outlineColor.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_polylineOutline').polyline.depthFailMaterial.outlineColor.getValue(date)); + expect(e.polyline.depthFailMaterial.outlineWidth.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_polylineOutline').polyline.depthFailMaterial.outlineWidth.getValue(date)); + expect(e = dataSource.entities.getById('reference_polyline_depthFailMaterial_polylineArrow')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_polylineArrow').polyline.depthFailMaterial.color.getValue(date)); + expect(e = dataSource.entities.getById('reference_polyline_depthFailMaterial_polylineDash')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_polylineDash').polyline.depthFailMaterial.color.getValue(date)); + expect(e.polyline.depthFailMaterial.gapColor.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_polylineDash').polyline.depthFailMaterial.gapColor.getValue(date)); + expect(e.polyline.depthFailMaterial.dashLength.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_polylineDash').polyline.depthFailMaterial.dashLength.getValue(date)); + expect(e.polyline.depthFailMaterial.dashPattern.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_polylineDash').polyline.depthFailMaterial.dashPattern.getValue(date)); + expect(e = dataSource.entities.getById('reference_polyline_depthFailMaterial_polylineGlow')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_polylineGlow').polyline.depthFailMaterial.color.getValue(date)); + expect(e.polyline.depthFailMaterial.glowPower.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_polylineGlow').polyline.depthFailMaterial.glowPower.getValue(date)); + expect(e.polyline.depthFailMaterial.taperPower.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_polylineGlow').polyline.depthFailMaterial.taperPower.getValue(date)); + expect(e = dataSource.entities.getById('reference_polyline_depthFailMaterial_image')).toBeDefined(); + expect(e.polyline.depthFailMaterial.image.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_image').polyline.depthFailMaterial.image.getValue(date)); + expect(e.polyline.depthFailMaterial.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_image').polyline.depthFailMaterial.repeat.getValue(date)); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_image').polyline.depthFailMaterial.color.getValue(date)); + expect(e.polyline.depthFailMaterial.transparent.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_image').polyline.depthFailMaterial.transparent.getValue(date)); + expect(e = dataSource.entities.getById('reference_polyline_depthFailMaterial_grid')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_grid').polyline.depthFailMaterial.color.getValue(date)); + expect(e.polyline.depthFailMaterial.cellAlpha.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_grid').polyline.depthFailMaterial.cellAlpha.getValue(date)); + expect(e.polyline.depthFailMaterial.lineCount.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_grid').polyline.depthFailMaterial.lineCount.getValue(date)); + expect(e.polyline.depthFailMaterial.lineThickness.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_grid').polyline.depthFailMaterial.lineThickness.getValue(date)); + expect(e.polyline.depthFailMaterial.lineOffset.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_grid').polyline.depthFailMaterial.lineOffset.getValue(date)); + expect(e = dataSource.entities.getById('reference_polyline_depthFailMaterial_stripe')).toBeDefined(); + expect(e.polyline.depthFailMaterial.orientation.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_stripe').polyline.depthFailMaterial.orientation.getValue(date)); + expect(e.polyline.depthFailMaterial.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_stripe').polyline.depthFailMaterial.evenColor.getValue(date)); + expect(e.polyline.depthFailMaterial.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_stripe').polyline.depthFailMaterial.oddColor.getValue(date)); + expect(e.polyline.depthFailMaterial.offset.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_stripe').polyline.depthFailMaterial.offset.getValue(date)); + expect(e.polyline.depthFailMaterial.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_stripe').polyline.depthFailMaterial.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_polyline_depthFailMaterial_checkerboard')).toBeDefined(); + expect(e.polyline.depthFailMaterial.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_checkerboard').polyline.depthFailMaterial.evenColor.getValue(date)); + expect(e.polyline.depthFailMaterial.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_checkerboard').polyline.depthFailMaterial.oddColor.getValue(date)); + expect(e.polyline.depthFailMaterial.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_polyline_depthFailMaterial_checkerboard').polyline.depthFailMaterial.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_polylineVolume_material_image')).toBeDefined(); + expect(e.polylineVolume.material.image.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_image').polylineVolume.material.image.getValue(date)); + expect(e.polylineVolume.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_image').polylineVolume.material.repeat.getValue(date)); + expect(e.polylineVolume.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_image').polylineVolume.material.color.getValue(date)); + expect(e.polylineVolume.material.transparent.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_image').polylineVolume.material.transparent.getValue(date)); + expect(e = dataSource.entities.getById('reference_polylineVolume_material_grid')).toBeDefined(); + expect(e.polylineVolume.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_grid').polylineVolume.material.color.getValue(date)); + expect(e.polylineVolume.material.cellAlpha.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_grid').polylineVolume.material.cellAlpha.getValue(date)); + expect(e.polylineVolume.material.lineCount.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_grid').polylineVolume.material.lineCount.getValue(date)); + expect(e.polylineVolume.material.lineThickness.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_grid').polylineVolume.material.lineThickness.getValue(date)); + expect(e.polylineVolume.material.lineOffset.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_grid').polylineVolume.material.lineOffset.getValue(date)); + expect(e = dataSource.entities.getById('reference_polylineVolume_material_stripe')).toBeDefined(); + expect(e.polylineVolume.material.orientation.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_stripe').polylineVolume.material.orientation.getValue(date)); + expect(e.polylineVolume.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_stripe').polylineVolume.material.evenColor.getValue(date)); + expect(e.polylineVolume.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_stripe').polylineVolume.material.oddColor.getValue(date)); + expect(e.polylineVolume.material.offset.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_stripe').polylineVolume.material.offset.getValue(date)); + expect(e.polylineVolume.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_stripe').polylineVolume.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_polylineVolume_material_checkerboard')).toBeDefined(); + expect(e.polylineVolume.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_checkerboard').polylineVolume.material.evenColor.getValue(date)); + expect(e.polylineVolume.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_checkerboard').polylineVolume.material.oddColor.getValue(date)); + expect(e.polylineVolume.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_polylineVolume_material_checkerboard').polylineVolume.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_rectangle_material_image')).toBeDefined(); + expect(e.rectangle.material.image.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_image').rectangle.material.image.getValue(date)); + expect(e.rectangle.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_image').rectangle.material.repeat.getValue(date)); + expect(e.rectangle.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_image').rectangle.material.color.getValue(date)); + expect(e.rectangle.material.transparent.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_image').rectangle.material.transparent.getValue(date)); + expect(e = dataSource.entities.getById('reference_rectangle_material_grid')).toBeDefined(); + expect(e.rectangle.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_grid').rectangle.material.color.getValue(date)); + expect(e.rectangle.material.cellAlpha.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_grid').rectangle.material.cellAlpha.getValue(date)); + expect(e.rectangle.material.lineCount.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_grid').rectangle.material.lineCount.getValue(date)); + expect(e.rectangle.material.lineThickness.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_grid').rectangle.material.lineThickness.getValue(date)); + expect(e.rectangle.material.lineOffset.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_grid').rectangle.material.lineOffset.getValue(date)); + expect(e = dataSource.entities.getById('reference_rectangle_material_stripe')).toBeDefined(); + expect(e.rectangle.material.orientation.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_stripe').rectangle.material.orientation.getValue(date)); + expect(e.rectangle.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_stripe').rectangle.material.evenColor.getValue(date)); + expect(e.rectangle.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_stripe').rectangle.material.oddColor.getValue(date)); + expect(e.rectangle.material.offset.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_stripe').rectangle.material.offset.getValue(date)); + expect(e.rectangle.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_stripe').rectangle.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_rectangle_material_checkerboard')).toBeDefined(); + expect(e.rectangle.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_checkerboard').rectangle.material.evenColor.getValue(date)); + expect(e.rectangle.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_checkerboard').rectangle.material.oddColor.getValue(date)); + expect(e.rectangle.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_rectangle_material_checkerboard').rectangle.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_wall_material_image')).toBeDefined(); + expect(e.wall.material.image.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_image').wall.material.image.getValue(date)); + expect(e.wall.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_image').wall.material.repeat.getValue(date)); + expect(e.wall.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_image').wall.material.color.getValue(date)); + expect(e.wall.material.transparent.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_image').wall.material.transparent.getValue(date)); + expect(e = dataSource.entities.getById('reference_wall_material_grid')).toBeDefined(); + expect(e.wall.material.color.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_grid').wall.material.color.getValue(date)); + expect(e.wall.material.cellAlpha.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_grid').wall.material.cellAlpha.getValue(date)); + expect(e.wall.material.lineCount.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_grid').wall.material.lineCount.getValue(date)); + expect(e.wall.material.lineThickness.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_grid').wall.material.lineThickness.getValue(date)); + expect(e.wall.material.lineOffset.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_grid').wall.material.lineOffset.getValue(date)); + expect(e = dataSource.entities.getById('reference_wall_material_stripe')).toBeDefined(); + expect(e.wall.material.orientation.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_stripe').wall.material.orientation.getValue(date)); + expect(e.wall.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_stripe').wall.material.evenColor.getValue(date)); + expect(e.wall.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_stripe').wall.material.oddColor.getValue(date)); + expect(e.wall.material.offset.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_stripe').wall.material.offset.getValue(date)); + expect(e.wall.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_stripe').wall.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_wall_material_checkerboard')).toBeDefined(); + expect(e.wall.material.evenColor.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_checkerboard').wall.material.evenColor.getValue(date)); + expect(e.wall.material.oddColor.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_checkerboard').wall.material.oddColor.getValue(date)); + expect(e.wall.material.repeat.getValue(date)).toEqual(dataSource.entities.getById('material_wall_material_checkerboard').wall.material.repeat.getValue(date)); + expect(e = dataSource.entities.getById('reference_conicSensor_lateralSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_lateralSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_lateralSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_lateralSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_ellipsoidSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_ellipsoidSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_ellipsoidSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_ellipsoidSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_ellipsoidHorizonSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_ellipsoidHorizonSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_ellipsoidHorizonSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_ellipsoidHorizonSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_domeSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_domeSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_domeSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_domeSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_environmentOcclusionMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_environmentOcclusionMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_environmentOcclusionMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_conicSensor_environmentOcclusionMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_lateralSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_lateralSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_lateralSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_lateralSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_ellipsoidSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_ellipsoidSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_ellipsoidSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_ellipsoidSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_ellipsoidHorizonSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_ellipsoidHorizonSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_ellipsoidHorizonSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_ellipsoidHorizonSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_domeSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_domeSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_domeSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_domeSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_environmentOcclusionMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_environmentOcclusionMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_environmentOcclusionMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_customPatternSensor_environmentOcclusionMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_lateralSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_lateralSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_lateralSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_lateralSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_ellipsoidSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_ellipsoidSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_ellipsoidSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_ellipsoidSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_ellipsoidHorizonSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_ellipsoidHorizonSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_ellipsoidHorizonSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_ellipsoidHorizonSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_domeSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_domeSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_domeSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_domeSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_environmentOcclusionMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_environmentOcclusionMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_environmentOcclusionMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_rectangularSensor_environmentOcclusionMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_fan_material_image')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_fan_material_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_fan_material_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('reference_fan_material_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('VelocityPosition')).toBeDefined(); + expect(e.position.getValue(documentStartDate)).toEqual(new Cartesian3(1, 2, 3)); + expect(e.position.getValue(JulianDate.addSeconds(documentStartDate, 60, new JulianDate()))).toEqual(new Cartesian3(61, 122, 183)); + expect(e = dataSource.entities.getById('velocityReference_billboard_alignedAxis')).toBeDefined(); + expect(e.billboard.alignedAxis.getValue(JulianDate.addSeconds(documentStartDate, 50, new JulianDate()))).toEqualEpsilon(new Cartesian3(0.267261241912424, 0.534522483824849, 0.801783725737273), 1e-13); + expect(e = dataSource.entities.getById('Sampled')).toBeDefined(); + expect(e.position.getValue(documentStartDate)).toEqual(new Cartesian3(14893, 22330, 50775)); + expect(e.position.getValue(documentStopDate)).toEqual(new Cartesian3(44952, 52911, 45006)); + expect(e.orientation.getValue(documentStartDate)).toEqualEpsilon(new Quaternion(0.63382030572505, 0.114406464045845, 0.748788933003267, 0.156518736408648), 1e-14); + expect(e.orientation.getValue(documentStopDate)).toEqualEpsilon(new Quaternion(0.670778929875422, 0.608790403475694, 0.320013828781515, 0.277526613606122), 1e-14); + expect(e.viewFrom.getValue(documentStartDate)).toEqual(new Cartesian3(36965, 47504, 12985)); + expect(e.viewFrom.getValue(documentStopDate)).toEqual(new Cartesian3(16155, 2367, 57353)); + expect(e.billboard.scale.getValue(documentStartDate)).toEqual(5763.0); + expect(e.billboard.scale.getValue(documentStopDate)).toEqual(31607.0); + expect(e.billboard.pixelOffset.getValue(documentStartDate)).toEqual(new Cartesian2(2029, 62215)); + expect(e.billboard.pixelOffset.getValue(documentStopDate)).toEqual(new Cartesian2(30658, 12919)); + expect(e.billboard.eyeOffset.getValue(documentStartDate)).toEqual(new Cartesian3(3553, 23821, 42589)); + expect(e.billboard.eyeOffset.getValue(documentStopDate)).toEqual(new Cartesian3(3059, 48139, 28860)); + expect(e.billboard.color.getValue(documentStartDate)).toEqual(Color.fromBytes(85, 19, 239, 63)); + expect(e.billboard.color.getValue(documentStopDate)).toEqual(Color.fromBytes(160, 189, 87, 99)); + expect(e.billboard.rotation.getValue(documentStartDate)).toEqual(4554.0); + expect(e.billboard.rotation.getValue(documentStopDate)).toEqual(21210.0); + expect(e.billboard.alignedAxis.getValue(documentStartDate)).toEqualEpsilon(new Cartesian3(0.971559394453729, 0.230094854374832, 0.0559347927405484), 1e-14); + expect(e.billboard.alignedAxis.getValue(documentStopDate)).toEqualEpsilon(new Cartesian3(0.384810775516236, 0.82287332508932, 0.418091088045462), 1e-14); + expect(e.billboard.width.getValue(documentStartDate)).toEqual(21333.0); + expect(e.billboard.width.getValue(documentStopDate)).toEqual(51893.0); + expect(e.billboard.height.getValue(documentStartDate)).toEqual(48314.0); + expect(e.billboard.height.getValue(documentStopDate)).toEqual(61118.0); + expect(e.billboard.scaleByDistance.getValue(documentStartDate)).toEqual(new NearFarScalar(46842, 10678, 46377, 15029)); + expect(e.billboard.scaleByDistance.getValue(documentStopDate)).toEqual(new NearFarScalar(20642, 43600, 7082, 11291)); + expect(e.billboard.translucencyByDistance.getValue(documentStartDate)).toEqual(new NearFarScalar(64366, 52219, 8139, 10015)); + expect(e.billboard.translucencyByDistance.getValue(documentStopDate)).toEqual(new NearFarScalar(10918, 18986, 49738, 60610)); + expect(e.billboard.pixelOffsetScaleByDistance.getValue(documentStartDate)).toEqual(new NearFarScalar(54503, 26068, 41061, 59552)); + expect(e.billboard.pixelOffsetScaleByDistance.getValue(documentStopDate)).toEqual(new NearFarScalar(37417, 4754, 19986, 15182)); + expect(e.billboard.imageSubRegion.getValue(documentStartDate)).toEqual(new BoundingRectangle(26590, 12135, 16431, 56640)); + expect(e.billboard.imageSubRegion.getValue(documentStopDate)).toEqual(new BoundingRectangle(43063, 42664, 60326, 52715)); + expect(e.billboard.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(952, 47317)); + expect(e.billboard.distanceDisplayCondition.getValue(documentStopDate)).toEqual(new DistanceDisplayCondition(16896, 28226)); + expect(e.billboard.disableDepthTestDistance.getValue(documentStartDate)).toEqual(18661.0); + expect(e.billboard.disableDepthTestDistance.getValue(documentStopDate)).toEqual(61609.0); + expect(e.box.dimensions.getValue(documentStartDate)).toEqual(new Cartesian3(37525, 42898, 18087)); + expect(e.box.dimensions.getValue(documentStopDate)).toEqual(new Cartesian3(49399, 59584, 63976)); + expect(e.box.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(172, 28, 222, 165)); + expect(e.box.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(16, 192, 121, 150)); + expect(e.box.outlineColor.getValue(documentStartDate)).toEqual(Color.fromBytes(53, 66, 217, 237)); + expect(e.box.outlineColor.getValue(documentStopDate)).toEqual(Color.fromBytes(163, 75, 228, 48)); + expect(e.box.outlineWidth.getValue(documentStartDate)).toEqual(45211.0); + expect(e.box.outlineWidth.getValue(documentStopDate)).toEqual(20490.0); + expect(e.box.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(8940, 60664)); + expect(e.box.distanceDisplayCondition.getValue(documentStopDate)).toEqual(new DistanceDisplayCondition(41202, 60832)); + expect(e.corridor.width.getValue(documentStartDate)).toEqual(62443.0); + expect(e.corridor.width.getValue(documentStopDate)).toEqual(13988.0); + expect(e.corridor.height.getValue(documentStartDate)).toEqual(20585.0); + expect(e.corridor.height.getValue(documentStopDate)).toEqual(63872.0); + expect(e.corridor.extrudedHeight.getValue(documentStartDate)).toEqual(63407.0); + expect(e.corridor.extrudedHeight.getValue(documentStopDate)).toEqual(42397.0); + expect(e.corridor.granularity.getValue(documentStartDate)).toEqual(43027.0); + expect(e.corridor.granularity.getValue(documentStopDate)).toEqual(55912.0); + expect(e.corridor.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(35, 213, 31, 79)); + expect(e.corridor.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(87, 126, 23, 40)); + expect(e.corridor.outlineColor.getValue(documentStartDate)).toEqual(Color.fromBytes(137, 114, 57, 34)); + expect(e.corridor.outlineColor.getValue(documentStopDate)).toEqual(Color.fromBytes(93, 178, 74, 64)); + expect(e.corridor.outlineWidth.getValue(documentStartDate)).toEqual(14678.0); + expect(e.corridor.outlineWidth.getValue(documentStopDate)).toEqual(57820.0); + expect(e.corridor.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(10884, 63530)); + expect(e.corridor.distanceDisplayCondition.getValue(documentStopDate)).toEqual(new DistanceDisplayCondition(20076, 27683)); + expect(e.corridor.zIndex.getValue(documentStartDate)).toEqual(36068); + expect(e.corridor.zIndex.getValue(documentStopDate)).toEqual(60697); + expect(e.cylinder.length.getValue(documentStartDate)).toEqual(30241.0); + expect(e.cylinder.length.getValue(documentStopDate)).toEqual(48364.0); + expect(e.cylinder.topRadius.getValue(documentStartDate)).toEqual(62881.0); + expect(e.cylinder.topRadius.getValue(documentStopDate)).toEqual(16270.0); + expect(e.cylinder.bottomRadius.getValue(documentStartDate)).toEqual(61925.0); + expect(e.cylinder.bottomRadius.getValue(documentStopDate)).toEqual(21514.0); + expect(e.cylinder.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(133, 36, 52, 121)); + expect(e.cylinder.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(7, 13, 34, 201)); + expect(e.cylinder.outlineColor.getValue(documentStartDate)).toEqual(Color.fromBytes(112, 241, 40, 103)); + expect(e.cylinder.outlineColor.getValue(documentStopDate)).toEqual(Color.fromBytes(237, 75, 59, 51)); + expect(e.cylinder.outlineWidth.getValue(documentStartDate)).toEqual(36483.0); + expect(e.cylinder.outlineWidth.getValue(documentStopDate)).toEqual(32586.0); + expect(e.cylinder.numberOfVerticalLines.getValue(documentStartDate)).toEqual(45816); + expect(e.cylinder.numberOfVerticalLines.getValue(documentStopDate)).toEqual(42247); + expect(e.cylinder.slices.getValue(documentStartDate)).toEqual(46140); + expect(e.cylinder.slices.getValue(documentStopDate)).toEqual(53530); + expect(e.cylinder.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(2783, 57220)); + expect(e.cylinder.distanceDisplayCondition.getValue(documentStopDate)).toEqual(new DistanceDisplayCondition(13855, 50230)); + expect(e.ellipse.semiMajorAxis.getValue(documentStartDate)).toEqual(13136.0); + expect(e.ellipse.semiMajorAxis.getValue(documentStopDate)).toEqual(55507.0); + expect(e.ellipse.semiMinorAxis.getValue(documentStartDate)).toEqual(41580.0); + expect(e.ellipse.semiMinorAxis.getValue(documentStopDate)).toEqual(60905.0); + expect(e.ellipse.height.getValue(documentStartDate)).toEqual(5567.0); + expect(e.ellipse.height.getValue(documentStopDate)).toEqual(45588.0); + expect(e.ellipse.extrudedHeight.getValue(documentStartDate)).toEqual(16542.0); + expect(e.ellipse.extrudedHeight.getValue(documentStopDate)).toEqual(13545.0); + expect(e.ellipse.rotation.getValue(documentStartDate)).toEqual(5797.0); + expect(e.ellipse.rotation.getValue(documentStopDate)).toEqual(24542.0); + expect(e.ellipse.stRotation.getValue(documentStartDate)).toEqual(20596.0); + expect(e.ellipse.stRotation.getValue(documentStopDate)).toEqual(58204.0); + expect(e.ellipse.granularity.getValue(documentStartDate)).toEqual(2228.0); + expect(e.ellipse.granularity.getValue(documentStopDate)).toEqual(43731.0); + expect(e.ellipse.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(174, 250, 78, 96)); + expect(e.ellipse.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(63, 102, 221, 174)); + expect(e.ellipse.outlineColor.getValue(documentStartDate)).toEqual(Color.fromBytes(243, 123, 194, 31)); + expect(e.ellipse.outlineColor.getValue(documentStopDate)).toEqual(Color.fromBytes(236, 100, 22, 203)); + expect(e.ellipse.outlineWidth.getValue(documentStartDate)).toEqual(60636.0); + expect(e.ellipse.outlineWidth.getValue(documentStopDate)).toEqual(24194.0); + expect(e.ellipse.numberOfVerticalLines.getValue(documentStartDate)).toEqual(52822); + expect(e.ellipse.numberOfVerticalLines.getValue(documentStopDate)).toEqual(45768); + expect(e.ellipse.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(38393, 63947)); + expect(e.ellipse.distanceDisplayCondition.getValue(documentStopDate)).toEqual(new DistanceDisplayCondition(29119, 43121)); + expect(e.ellipse.zIndex.getValue(documentStartDate)).toEqual(8989); + expect(e.ellipse.zIndex.getValue(documentStopDate)).toEqual(52730); + expect(e.ellipsoid.radii.getValue(documentStartDate)).toEqual(new Cartesian3(5183, 10004, 13863)); + expect(e.ellipsoid.radii.getValue(documentStopDate)).toEqual(new Cartesian3(39497, 12186, 45103)); + expect(e.ellipsoid.innerRadii.getValue(documentStartDate)).toEqual(new Cartesian3(40318, 27037, 59497)); + expect(e.ellipsoid.innerRadii.getValue(documentStopDate)).toEqual(new Cartesian3(57650, 53729, 12241)); + expect(e.ellipsoid.minimumClock.getValue(documentStartDate)).toEqual(13484.0); + expect(e.ellipsoid.minimumClock.getValue(documentStopDate)).toEqual(2170.0); + expect(e.ellipsoid.maximumClock.getValue(documentStartDate)).toEqual(10874.0); + expect(e.ellipsoid.maximumClock.getValue(documentStopDate)).toEqual(2968.0); + expect(e.ellipsoid.minimumCone.getValue(documentStartDate)).toEqual(54230.0); + expect(e.ellipsoid.minimumCone.getValue(documentStopDate)).toEqual(59454.0); + expect(e.ellipsoid.maximumCone.getValue(documentStartDate)).toEqual(49077.0); + expect(e.ellipsoid.maximumCone.getValue(documentStopDate)).toEqual(26303.0); + expect(e.ellipsoid.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(137, 128, 194, 84)); + expect(e.ellipsoid.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(50, 122, 190, 247)); + expect(e.ellipsoid.outlineColor.getValue(documentStartDate)).toEqual(Color.fromBytes(247, 210, 180, 171)); + expect(e.ellipsoid.outlineColor.getValue(documentStopDate)).toEqual(Color.fromBytes(239, 35, 237, 247)); + expect(e.ellipsoid.outlineWidth.getValue(documentStartDate)).toEqual(10713.0); + expect(e.ellipsoid.outlineWidth.getValue(documentStopDate)).toEqual(10444.0); + expect(e.ellipsoid.stackPartitions.getValue(documentStartDate)).toEqual(5841); + expect(e.ellipsoid.stackPartitions.getValue(documentStopDate)).toEqual(39170); + expect(e.ellipsoid.slicePartitions.getValue(documentStartDate)).toEqual(50327); + expect(e.ellipsoid.slicePartitions.getValue(documentStopDate)).toEqual(4672); + expect(e.ellipsoid.subdivisions.getValue(documentStartDate)).toEqual(10225); + expect(e.ellipsoid.subdivisions.getValue(documentStopDate)).toEqual(53957); + expect(e.ellipsoid.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(11751, 59227)); + expect(e.ellipsoid.distanceDisplayCondition.getValue(documentStopDate)).toEqual(new DistanceDisplayCondition(4769, 41441)); + expect(e.label.scale.getValue(documentStartDate)).toEqual(40153.0); + expect(e.label.scale.getValue(documentStopDate)).toEqual(42123.0); + expect(e.label.backgroundColor.getValue(documentStartDate)).toEqual(Color.fromBytes(30, 92, 161, 169)); + expect(e.label.backgroundColor.getValue(documentStopDate)).toEqual(Color.fromBytes(85, 52, 166, 62)); + expect(e.label.backgroundPadding.getValue(documentStartDate)).toEqual(new Cartesian2(32945, 5504)); + expect(e.label.backgroundPadding.getValue(documentStopDate)).toEqual(new Cartesian2(35323, 6281)); + expect(e.label.pixelOffset.getValue(documentStartDate)).toEqual(new Cartesian2(8539, 9761)); + expect(e.label.pixelOffset.getValue(documentStopDate)).toEqual(new Cartesian2(10537, 54569)); + expect(e.label.eyeOffset.getValue(documentStartDate)).toEqual(new Cartesian3(5984, 34327, 59014)); + expect(e.label.eyeOffset.getValue(documentStopDate)).toEqual(new Cartesian3(1931, 5127, 18964)); + expect(e.label.fillColor.getValue(documentStartDate)).toEqual(Color.fromBytes(17, 212, 62, 58)); + expect(e.label.fillColor.getValue(documentStopDate)).toEqual(Color.fromBytes(214, 69, 90, 116)); + expect(e.label.outlineColor.getValue(documentStartDate)).toEqual(Color.fromBytes(205, 14, 169, 70)); + expect(e.label.outlineColor.getValue(documentStopDate)).toEqual(Color.fromBytes(143, 73, 168, 17)); + expect(e.label.outlineWidth.getValue(documentStartDate)).toEqual(53305.0); + expect(e.label.outlineWidth.getValue(documentStopDate)).toEqual(43838.0); + expect(e.label.translucencyByDistance.getValue(documentStartDate)).toEqual(new NearFarScalar(25055, 32865, 32128, 29309)); + expect(e.label.translucencyByDistance.getValue(documentStopDate)).toEqual(new NearFarScalar(58875, 9189, 20515, 15696)); + expect(e.label.pixelOffsetScaleByDistance.getValue(documentStartDate)).toEqual(new NearFarScalar(45296, 62896, 38133, 40084)); + expect(e.label.pixelOffsetScaleByDistance.getValue(documentStopDate)).toEqual(new NearFarScalar(28657, 25711, 9316, 62756)); + expect(e.label.scaleByDistance.getValue(documentStartDate)).toEqual(new NearFarScalar(22356, 26711, 58216, 52963)); + expect(e.label.scaleByDistance.getValue(documentStopDate)).toEqual(new NearFarScalar(26464, 26471, 23143, 37466)); + expect(e.label.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(2314, 2614)); + expect(e.label.distanceDisplayCondition.getValue(documentStopDate)).toEqual(new DistanceDisplayCondition(23998, 48733)); + expect(e.label.disableDepthTestDistance.getValue(documentStartDate)).toEqual(250.0); + expect(e.label.disableDepthTestDistance.getValue(documentStopDate)).toEqual(40425.0); + expect(e.model.scale.getValue(documentStartDate)).toEqual(63647.0); + expect(e.model.scale.getValue(documentStopDate)).toEqual(53878.0); + expect(e.model.minimumPixelSize.getValue(documentStartDate)).toEqual(16357.0); + expect(e.model.minimumPixelSize.getValue(documentStopDate)).toEqual(40522.0); + expect(e.model.maximumScale.getValue(documentStartDate)).toEqual(8290.0); + expect(e.model.maximumScale.getValue(documentStopDate)).toEqual(25558.0); + expect(e.model.silhouetteColor.getValue(documentStartDate)).toEqual(Color.fromBytes(33, 239, 70, 81)); + expect(e.model.silhouetteColor.getValue(documentStopDate)).toEqual(Color.fromBytes(60, 48, 26, 123)); + expect(e.model.silhouetteSize.getValue(documentStartDate)).toEqual(65103.0); + expect(e.model.silhouetteSize.getValue(documentStopDate)).toEqual(29065.0); + expect(e.model.color.getValue(documentStartDate)).toEqual(Color.fromBytes(74, 69, 164, 116)); + expect(e.model.color.getValue(documentStopDate)).toEqual(Color.fromBytes(127, 30, 46, 170)); + expect(e.model.colorBlendAmount.getValue(documentStartDate)).toEqual(64130.0); + expect(e.model.colorBlendAmount.getValue(documentStopDate)).toEqual(21967.0); + expect(e.model.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(33246, 36993)); + expect(e.model.distanceDisplayCondition.getValue(documentStopDate)).toEqual(new DistanceDisplayCondition(5814, 10006)); + expect(e.path.leadTime.getValue(documentStartDate)).toEqual(40222.0); + expect(e.path.leadTime.getValue(documentStopDate)).toEqual(33294.0); + expect(e.path.trailTime.getValue(documentStartDate)).toEqual(34052.0); + expect(e.path.trailTime.getValue(documentStopDate)).toEqual(57713.0); + expect(e.path.width.getValue(documentStartDate)).toEqual(32449.0); + expect(e.path.width.getValue(documentStopDate)).toEqual(33819.0); + expect(e.path.resolution.getValue(documentStartDate)).toEqual(8399.0); + expect(e.path.resolution.getValue(documentStopDate)).toEqual(19400.0); + expect(e.path.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(97, 239, 22, 105)); + expect(e.path.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(242, 157, 215, 125)); + expect(e.path.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(42994, 62047)); + expect(e.path.distanceDisplayCondition.getValue(documentStopDate)).toEqual(new DistanceDisplayCondition(52406, 59340)); + expect(e.point.pixelSize.getValue(documentStartDate)).toEqual(39714.0); + expect(e.point.pixelSize.getValue(documentStopDate)).toEqual(3313.0); + expect(e.point.color.getValue(documentStartDate)).toEqual(Color.fromBytes(137, 151, 128, 95)); + expect(e.point.color.getValue(documentStopDate)).toEqual(Color.fromBytes(99, 157, 124, 108)); + expect(e.point.outlineColor.getValue(documentStartDate)).toEqual(Color.fromBytes(225, 246, 102, 195)); + expect(e.point.outlineColor.getValue(documentStopDate)).toEqual(Color.fromBytes(248, 38, 75, 222)); + expect(e.point.outlineWidth.getValue(documentStartDate)).toEqual(48323.0); + expect(e.point.outlineWidth.getValue(documentStopDate)).toEqual(50914.0); + expect(e.point.scaleByDistance.getValue(documentStartDate)).toEqual(new NearFarScalar(39727, 50843, 56262, 15579)); + expect(e.point.scaleByDistance.getValue(documentStopDate)).toEqual(new NearFarScalar(60522, 63980, 30201, 25205)); + expect(e.point.translucencyByDistance.getValue(documentStartDate)).toEqual(new NearFarScalar(61190, 16879, 16449, 10048)); + expect(e.point.translucencyByDistance.getValue(documentStopDate)).toEqual(new NearFarScalar(46491, 47541, 35769, 13707)); + expect(e.point.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(7642, 55841)); + expect(e.point.distanceDisplayCondition.getValue(documentStopDate)).toEqual(new DistanceDisplayCondition(24270, 29534)); + expect(e.point.disableDepthTestDistance.getValue(documentStartDate)).toEqual(30881.0); + expect(e.point.disableDepthTestDistance.getValue(documentStopDate)).toEqual(6667.0); + expect(e.polygon.height.getValue(documentStartDate)).toEqual(64265.0); + expect(e.polygon.height.getValue(documentStopDate)).toEqual(19257.0); + expect(e.polygon.extrudedHeight.getValue(documentStartDate)).toEqual(12315.0); + expect(e.polygon.extrudedHeight.getValue(documentStopDate)).toEqual(4797.0); + expect(e.polygon.stRotation.getValue(documentStartDate)).toEqual(24959.0); + expect(e.polygon.stRotation.getValue(documentStopDate)).toEqual(32341.0); + expect(e.polygon.granularity.getValue(documentStartDate)).toEqual(51922.0); + expect(e.polygon.granularity.getValue(documentStopDate)).toEqual(9185.0); + expect(e.polygon.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(19, 40, 12, 31)); + expect(e.polygon.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(179, 204, 8, 194)); + expect(e.polygon.outlineColor.getValue(documentStartDate)).toEqual(Color.fromBytes(187, 223, 120, 26)); + expect(e.polygon.outlineColor.getValue(documentStopDate)).toEqual(Color.fromBytes(20, 135, 105, 81)); + expect(e.polygon.outlineWidth.getValue(documentStartDate)).toEqual(48428.0); + expect(e.polygon.outlineWidth.getValue(documentStopDate)).toEqual(41508.0); + expect(e.polygon.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(22140, 31962)); + expect(e.polygon.distanceDisplayCondition.getValue(documentStopDate)).toEqual(new DistanceDisplayCondition(3927, 22422)); + expect(e.polygon.zIndex.getValue(documentStartDate)).toEqual(37357); + expect(e.polygon.zIndex.getValue(documentStopDate)).toEqual(64769); + expect(e.polyline.width.getValue(documentStartDate)).toEqual(60367.0); + expect(e.polyline.width.getValue(documentStopDate)).toEqual(31077.0); + expect(e.polyline.granularity.getValue(documentStartDate)).toEqual(62537.0); + expect(e.polyline.granularity.getValue(documentStopDate)).toEqual(14676.0); + expect(e.polyline.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(90, 30, 195, 220)); + expect(e.polyline.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(39, 17, 221, 74)); + expect(e.polyline.depthFailMaterial.color.getValue(documentStartDate)).toEqual(Color.fromBytes(217, 122, 10, 152)); + expect(e.polyline.depthFailMaterial.color.getValue(documentStopDate)).toEqual(Color.fromBytes(76, 105, 5, 67)); + expect(e.polyline.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(4857, 10258)); + expect(e.polyline.distanceDisplayCondition.getValue(documentStopDate)).toEqual(new DistanceDisplayCondition(36588, 47246)); + expect(e.polyline.zIndex.getValue(documentStartDate)).toEqual(55130); + expect(e.polyline.zIndex.getValue(documentStopDate)).toEqual(15491); + expect(e.polylineVolume.granularity.getValue(documentStartDate)).toEqual(9144.0); + expect(e.polylineVolume.granularity.getValue(documentStopDate)).toEqual(5282.0); + expect(e.polylineVolume.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(3, 0, 198, 193)); + expect(e.polylineVolume.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(210, 44, 29, 16)); + expect(e.polylineVolume.outlineColor.getValue(documentStartDate)).toEqual(Color.fromBytes(248, 163, 212, 115)); + expect(e.polylineVolume.outlineColor.getValue(documentStopDate)).toEqual(Color.fromBytes(22, 27, 199, 98)); + expect(e.polylineVolume.outlineWidth.getValue(documentStartDate)).toEqual(17507.0); + expect(e.polylineVolume.outlineWidth.getValue(documentStopDate)).toEqual(55396.0); + expect(e.polylineVolume.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(20986, 34897)); + expect(e.polylineVolume.distanceDisplayCondition.getValue(documentStopDate)).toEqual(new DistanceDisplayCondition(14877, 46650)); + expect(e.rectangle.coordinates.getValue(documentStartDate)).toEqual(new Rectangle(0.392205830501108, 1.04907471338688, 0.00211010473645246, 0.064281089310235)); + expect(e.rectangle.coordinates.getValue(documentStopDate)).toEqual(new Rectangle(0.523469985903937, 0.229690388867811, 0.399550037703662, 0.48478405941078)); + expect(e.rectangle.height.getValue(documentStartDate)).toEqual(56388.0); + expect(e.rectangle.height.getValue(documentStopDate)).toEqual(59991.0); + expect(e.rectangle.extrudedHeight.getValue(documentStartDate)).toEqual(39796.0); + expect(e.rectangle.extrudedHeight.getValue(documentStopDate)).toEqual(33335.0); + expect(e.rectangle.rotation.getValue(documentStartDate)).toEqual(26921.0); + expect(e.rectangle.rotation.getValue(documentStopDate)).toEqual(46937.0); + expect(e.rectangle.stRotation.getValue(documentStartDate)).toEqual(65255.0); + expect(e.rectangle.stRotation.getValue(documentStopDate)).toEqual(12220.0); + expect(e.rectangle.granularity.getValue(documentStartDate)).toEqual(6948.0); + expect(e.rectangle.granularity.getValue(documentStopDate)).toEqual(2204.0); + expect(e.rectangle.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(106, 81, 64, 152)); + expect(e.rectangle.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(94, 108, 96, 154)); + expect(e.rectangle.outlineColor.getValue(documentStartDate)).toEqual(Color.fromBytes(6, 244, 49, 131)); + expect(e.rectangle.outlineColor.getValue(documentStopDate)).toEqual(Color.fromBytes(87, 190, 148, 55)); + expect(e.rectangle.outlineWidth.getValue(documentStartDate)).toEqual(41576.0); + expect(e.rectangle.outlineWidth.getValue(documentStopDate)).toEqual(33933.0); + expect(e.rectangle.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(24813, 30560)); + expect(e.rectangle.distanceDisplayCondition.getValue(documentStopDate)).toEqual(new DistanceDisplayCondition(34617, 40071)); + expect(e.rectangle.zIndex.getValue(documentStartDate)).toEqual(27256); + expect(e.rectangle.zIndex.getValue(documentStopDate)).toEqual(53581); + expect(e.tileset.maximumScreenSpaceError.getValue(documentStartDate)).toEqual(17401.0); + expect(e.tileset.maximumScreenSpaceError.getValue(documentStopDate)).toEqual(7930.0); + expect(e.wall.granularity.getValue(documentStartDate)).toEqual(64428.0); + expect(e.wall.granularity.getValue(documentStopDate)).toEqual(25333.0); + expect(e.wall.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(31, 188, 250, 46)); + expect(e.wall.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(78, 91, 199, 227)); + expect(e.wall.outlineColor.getValue(documentStartDate)).toEqual(Color.fromBytes(241, 39, 105, 205)); + expect(e.wall.outlineColor.getValue(documentStopDate)).toEqual(Color.fromBytes(184, 17, 208, 44)); + expect(e.wall.outlineWidth.getValue(documentStartDate)).toEqual(62000.0); + expect(e.wall.outlineWidth.getValue(documentStopDate)).toEqual(40549.0); + expect(e.wall.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(12470, 36912)); + expect(e.wall.distanceDisplayCondition.getValue(documentStopDate)).toEqual(new DistanceDisplayCondition(35574, 63040)); + expect(e = dataSource.entities.getById('sampled_position_cartographicRadians')).toBeDefined(); + expect(e.position.getValue(documentStartDate)).toEqual(Cartesian3.fromRadians(1.00319530145806, 0.889718921347432, 16911)); + expect(e.position.getValue(documentStopDate)).toEqual(Cartesian3.fromRadians(0.828301545608097, 0.517994728610812, 62937)); + expect(e = dataSource.entities.getById('sampled_position_cartographicDegrees')).toBeDefined(); + expect(e.position.getValue(documentStartDate)).toEqual(Cartesian3.fromDegrees(43, 23, 63733)); + expect(e.position.getValue(documentStopDate)).toEqual(Cartesian3.fromDegrees(28, 12, 9806)); + expect(e = dataSource.entities.getById('sampled_position_cartesianVelocity')).toBeDefined(); + expect(e.position.getValue(documentStartDate)).toEqual(new Cartesian3(40342, 23709, 14940)); + expect(e.position.getValue(documentStopDate)).toEqual(new Cartesian3(25648, 55396, 53208)); + expect(e = dataSource.entities.getById('sampled_billboard_color_rgbaf')).toBeDefined(); + expect(e.billboard.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.0235294117647059, 0.427450980392157, 0.658823529411765, 0.0980392156862745), 1e-14); + expect(e.billboard.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.968627450980392, 0.752941176470588, 0.843137254901961, 0.164705882352941), 1e-14); + expect(e = dataSource.entities.getById('sampled_billboard_alignedAxis_unitSpherical')).toBeDefined(); + expect(e.billboard.alignedAxis.getValue(documentStartDate)).toEqualEpsilon(Cartesian3.fromSpherical(new Spherical(57328, 53471)), 1e-14); + expect(e.billboard.alignedAxis.getValue(documentStopDate)).toEqualEpsilon(Cartesian3.fromSpherical(new Spherical(51360, 27848)), 1e-14); + expect(e = dataSource.entities.getById('sampled_box_material_solidColor_color')).toBeDefined(); + expect(e.box.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.556862745098039, 0.541176470588235, 0.956862745098039, 0.317647058823529), 1e-14); + expect(e.box.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.792156862745098, 0.92156862745098, 0.125490196078431, 0.784313725490196), 1e-14); + expect(e = dataSource.entities.getById('sampled_box_material_image')).toBeDefined(); + expect(e.box.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(21562, 11604)); + expect(e.box.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(56719, 11741)); + expect(e.box.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(146, 124, 215, 53)); + expect(e.box.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(229, 219, 61, 100)); + expect(e = dataSource.entities.getById('sampled_box_material_grid')).toBeDefined(); + expect(e.box.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(111, 151, 56, 118)); + expect(e.box.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(178, 77, 41, 86)); + expect(e.box.material.cellAlpha.getValue(documentStartDate)).toEqual(10400.0); + expect(e.box.material.cellAlpha.getValue(documentStopDate)).toEqual(10941.0); + expect(e.box.material.lineCount.getValue(documentStartDate)).toEqual(new Cartesian2(3433, 28173)); + expect(e.box.material.lineCount.getValue(documentStopDate)).toEqual(new Cartesian2(53350, 6864)); + expect(e.box.material.lineThickness.getValue(documentStartDate)).toEqual(new Cartesian2(36990, 37264)); + expect(e.box.material.lineThickness.getValue(documentStopDate)).toEqual(new Cartesian2(38412, 45974)); + expect(e.box.material.lineOffset.getValue(documentStartDate)).toEqual(new Cartesian2(38761, 46487)); + expect(e.box.material.lineOffset.getValue(documentStopDate)).toEqual(new Cartesian2(62553, 37876)); + expect(e = dataSource.entities.getById('sampled_box_material_stripe')).toBeDefined(); + expect(e.box.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(251, 59, 84, 41)); + expect(e.box.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(20, 214, 81, 152)); + expect(e.box.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(233, 71, 17, 115)); + expect(e.box.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(20, 178, 40, 30)); + expect(e.box.material.offset.getValue(documentStartDate)).toEqual(46979.0); + expect(e.box.material.offset.getValue(documentStopDate)).toEqual(1457.0); + expect(e.box.material.repeat.getValue(documentStartDate)).toEqual(10283.0); + expect(e.box.material.repeat.getValue(documentStopDate)).toEqual(63419.0); + expect(e = dataSource.entities.getById('sampled_box_material_checkerboard')).toBeDefined(); + expect(e.box.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(2, 215, 87, 218)); + expect(e.box.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(164, 235, 142, 227)); + expect(e.box.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(117, 88, 89, 243)); + expect(e.box.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(104, 182, 78, 49)); + expect(e.box.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(6238, 42520)); + expect(e.box.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(34685, 17543)); + expect(e = dataSource.entities.getById('sampled_box_material_image_color')).toBeDefined(); + expect(e.box.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.149019607843137, 0.929411764705882, 0.462745098039216, 0.764705882352941), 1e-14); + expect(e.box.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.890196078431372, 0.262745098039216, 0.866666666666667, 0.792156862745098), 1e-14); + expect(e = dataSource.entities.getById('sampled_box_material_grid_color')).toBeDefined(); + expect(e.box.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.501960784313725, 0.447058823529412, 0.72156862745098, 0.392156862745098), 1e-14); + expect(e.box.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.890196078431372, 0.505882352941176, 0.56078431372549, 0.674509803921569), 1e-14); + expect(e = dataSource.entities.getById('sampled_box_material_stripe_evenColor')).toBeDefined(); + expect(e.box.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.980392156862745, 0.345098039215686, 0.929411764705882, 0.533333333333333), 1e-14); + expect(e.box.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.988235294117647, 0.372549019607843, 0.713725490196078, 0.466666666666667), 1e-14); + expect(e = dataSource.entities.getById('sampled_box_material_stripe_oddColor')).toBeDefined(); + expect(e.box.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.545098039215686, 0.168627450980392, 0.654901960784314, 0.196078431372549), 1e-14); + expect(e.box.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.407843137254902, 0.450980392156863, 0.874509803921569, 0.603921568627451), 1e-14); + expect(e = dataSource.entities.getById('sampled_box_material_checkerboard_evenColor')).toBeDefined(); + expect(e.box.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.137254901960784, 0.937254901960784, 0.513725490196078, 0.87843137254902), 1e-14); + expect(e.box.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.72156862745098, 0.0666666666666667, 0.274509803921569, 0.207843137254902), 1e-14); + expect(e = dataSource.entities.getById('sampled_box_material_checkerboard_oddColor')).toBeDefined(); + expect(e.box.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.352941176470588, 0.274509803921569, 0.850980392156863, 0.00784313725490196), 1e-14); + expect(e.box.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.83921568627451, 0.780392156862745, 0.796078431372549, 0.384313725490196), 1e-14); + expect(e = dataSource.entities.getById('sampled_box_outlineColor_rgbaf')).toBeDefined(); + expect(e.box.outlineColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.215686274509804, 0.498039215686275, 0.274509803921569, 0.129411764705882), 1e-14); + expect(e.box.outlineColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.854901960784314, 0.729411764705882, 0.172549019607843, 0.956862745098039), 1e-14); + expect(e = dataSource.entities.getById('sampled_corridor_material_solidColor_color')).toBeDefined(); + expect(e.corridor.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.858823529411765, 0.988235294117647, 0.733333333333333, 0.690196078431373), 1e-14); + expect(e.corridor.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.549019607843137, 0.368627450980392, 0.964705882352941, 0.133333333333333), 1e-14); + expect(e = dataSource.entities.getById('sampled_corridor_material_image')).toBeDefined(); + expect(e.corridor.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(14885, 62522)); + expect(e.corridor.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(45129, 25776)); + expect(e.corridor.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(57, 37, 208, 54)); + expect(e.corridor.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(24, 80, 140, 151)); + expect(e = dataSource.entities.getById('sampled_corridor_material_grid')).toBeDefined(); + expect(e.corridor.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(130, 99, 15, 168)); + expect(e.corridor.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(246, 60, 236, 5)); + expect(e.corridor.material.cellAlpha.getValue(documentStartDate)).toEqual(22161.0); + expect(e.corridor.material.cellAlpha.getValue(documentStopDate)).toEqual(55997.0); + expect(e.corridor.material.lineCount.getValue(documentStartDate)).toEqual(new Cartesian2(7285, 25116)); + expect(e.corridor.material.lineCount.getValue(documentStopDate)).toEqual(new Cartesian2(18095, 8262)); + expect(e.corridor.material.lineThickness.getValue(documentStartDate)).toEqual(new Cartesian2(31150, 55929)); + expect(e.corridor.material.lineThickness.getValue(documentStopDate)).toEqual(new Cartesian2(40043, 22428)); + expect(e.corridor.material.lineOffset.getValue(documentStartDate)).toEqual(new Cartesian2(41105, 52128)); + expect(e.corridor.material.lineOffset.getValue(documentStopDate)).toEqual(new Cartesian2(2387, 32009)); + expect(e = dataSource.entities.getById('sampled_corridor_material_stripe')).toBeDefined(); + expect(e.corridor.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(8, 64, 254, 66)); + expect(e.corridor.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(47, 28, 112, 168)); + expect(e.corridor.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(17, 233, 150, 181)); + expect(e.corridor.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(171, 148, 181, 68)); + expect(e.corridor.material.offset.getValue(documentStartDate)).toEqual(21351.0); + expect(e.corridor.material.offset.getValue(documentStopDate)).toEqual(20709.0); + expect(e.corridor.material.repeat.getValue(documentStartDate)).toEqual(25188.0); + expect(e.corridor.material.repeat.getValue(documentStopDate)).toEqual(19705.0); + expect(e = dataSource.entities.getById('sampled_corridor_material_checkerboard')).toBeDefined(); + expect(e.corridor.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(135, 211, 180, 110)); + expect(e.corridor.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(44, 134, 8, 155)); + expect(e.corridor.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(212, 71, 156, 47)); + expect(e.corridor.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(34, 36, 157, 104)); + expect(e.corridor.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(62107, 62450)); + expect(e.corridor.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(51782, 25290)); + expect(e = dataSource.entities.getById('sampled_corridor_material_image_color')).toBeDefined(); + expect(e.corridor.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.949019607843137, 0.666666666666667, 0.0588235294117647, 0.784313725490196), 1e-14); + expect(e.corridor.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.388235294117647, 0.262745098039216, 0.764705882352941, 0.882352941176471), 1e-14); + expect(e = dataSource.entities.getById('sampled_corridor_material_grid_color')).toBeDefined(); + expect(e.corridor.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.290196078431373, 0.83921568627451, 0.588235294117647, 0.525490196078431), 1e-14); + expect(e.corridor.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.266666666666667, 0.00392156862745098, 0.180392156862745, 0.701960784313725), 1e-14); + expect(e = dataSource.entities.getById('sampled_corridor_material_stripe_evenColor')).toBeDefined(); + expect(e.corridor.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.517647058823529, 0.282352941176471, 0.709803921568627, 0.737254901960784), 1e-14); + expect(e.corridor.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.564705882352941, 0.407843137254902, 0.945098039215686, 0.666666666666667), 1e-14); + expect(e = dataSource.entities.getById('sampled_corridor_material_stripe_oddColor')).toBeDefined(); + expect(e.corridor.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.137254901960784, 0.4, 0.356862745098039, 0.501960784313725), 1e-14); + expect(e.corridor.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.992156862745098, 0.431372549019608, 0.301960784313725, 0.254901960784314), 1e-14); + expect(e = dataSource.entities.getById('sampled_corridor_material_checkerboard_evenColor')).toBeDefined(); + expect(e.corridor.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.294117647058824, 0.0588235294117647, 0.149019607843137, 0.756862745098039), 1e-14); + expect(e.corridor.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.243137254901961, 0.56078431372549, 0.254901960784314, 0.83921568627451), 1e-14); + expect(e = dataSource.entities.getById('sampled_corridor_material_checkerboard_oddColor')).toBeDefined(); + expect(e.corridor.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.768627450980392, 0.650980392156863, 0.529411764705882, 0.372549019607843), 1e-14); + expect(e.corridor.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.12156862745098, 0.780392156862745, 0.745098039215686, 0.725490196078431), 1e-14); + expect(e = dataSource.entities.getById('sampled_corridor_outlineColor_rgbaf')).toBeDefined(); + expect(e.corridor.outlineColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.882352941176471, 0.262745098039216, 0.247058823529412, 0.937254901960784), 1e-14); + expect(e.corridor.outlineColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.701960784313725, 0.262745098039216, 0.0627450980392157, 0.627450980392157), 1e-14); + expect(e = dataSource.entities.getById('sampled_cylinder_material_solidColor_color')).toBeDefined(); + expect(e.cylinder.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.117647058823529, 0.349019607843137, 0.411764705882353, 0.105882352941176), 1e-14); + expect(e.cylinder.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.513725490196078, 0.513725490196078, 0.666666666666667, 0.596078431372549), 1e-14); + expect(e = dataSource.entities.getById('sampled_cylinder_material_image')).toBeDefined(); + expect(e.cylinder.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(42846, 26023)); + expect(e.cylinder.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(19184, 35658)); + expect(e.cylinder.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(59, 239, 245, 44)); + expect(e.cylinder.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(77, 93, 176, 39)); + expect(e = dataSource.entities.getById('sampled_cylinder_material_grid')).toBeDefined(); + expect(e.cylinder.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(211, 199, 71, 148)); + expect(e.cylinder.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(142, 126, 167, 247)); + expect(e.cylinder.material.cellAlpha.getValue(documentStartDate)).toEqual(12751.0); + expect(e.cylinder.material.cellAlpha.getValue(documentStopDate)).toEqual(16373.0); + expect(e.cylinder.material.lineCount.getValue(documentStartDate)).toEqual(new Cartesian2(11469, 5164)); + expect(e.cylinder.material.lineCount.getValue(documentStopDate)).toEqual(new Cartesian2(8167, 36383)); + expect(e.cylinder.material.lineThickness.getValue(documentStartDate)).toEqual(new Cartesian2(22021, 38742)); + expect(e.cylinder.material.lineThickness.getValue(documentStopDate)).toEqual(new Cartesian2(45350, 43441)); + expect(e.cylinder.material.lineOffset.getValue(documentStartDate)).toEqual(new Cartesian2(23237, 58970)); + expect(e.cylinder.material.lineOffset.getValue(documentStopDate)).toEqual(new Cartesian2(62223, 62963)); + expect(e = dataSource.entities.getById('sampled_cylinder_material_stripe')).toBeDefined(); + expect(e.cylinder.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(131, 133, 216, 18)); + expect(e.cylinder.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(78, 238, 32, 231)); + expect(e.cylinder.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(209, 149, 133, 207)); + expect(e.cylinder.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(53, 207, 16, 210)); + expect(e.cylinder.material.offset.getValue(documentStartDate)).toEqual(49593.0); + expect(e.cylinder.material.offset.getValue(documentStopDate)).toEqual(25216.0); + expect(e.cylinder.material.repeat.getValue(documentStartDate)).toEqual(16819.0); + expect(e.cylinder.material.repeat.getValue(documentStopDate)).toEqual(12539.0); + expect(e = dataSource.entities.getById('sampled_cylinder_material_checkerboard')).toBeDefined(); + expect(e.cylinder.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(199, 80, 86, 158)); + expect(e.cylinder.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(207, 161, 23, 187)); + expect(e.cylinder.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(175, 210, 242, 198)); + expect(e.cylinder.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(116, 91, 127, 24)); + expect(e.cylinder.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(27893, 32108)); + expect(e.cylinder.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(57420, 52960)); + expect(e = dataSource.entities.getById('sampled_cylinder_material_image_color')).toBeDefined(); + expect(e.cylinder.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.76078431372549, 0.133333333333333, 0.231372549019608, 0.631372549019608), 1e-14); + expect(e.cylinder.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.882352941176471, 0.0823529411764706, 0.8, 0.0823529411764706), 1e-14); + expect(e = dataSource.entities.getById('sampled_cylinder_material_grid_color')).toBeDefined(); + expect(e.cylinder.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.176470588235294, 0.407843137254902, 0.623529411764706, 0.729411764705882), 1e-14); + expect(e.cylinder.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.43921568627451, 0.0745098039215686, 0.603921568627451, 0.713725490196078), 1e-14); + expect(e = dataSource.entities.getById('sampled_cylinder_material_stripe_evenColor')).toBeDefined(); + expect(e.cylinder.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.380392156862745, 0.149019607843137, 0.8, 0.658823529411765), 1e-14); + expect(e.cylinder.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.462745098039216, 0.172549019607843, 0.325490196078431, 0.854901960784314), 1e-14); + expect(e = dataSource.entities.getById('sampled_cylinder_material_stripe_oddColor')).toBeDefined(); + expect(e.cylinder.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.207843137254902, 0.466666666666667, 0.427450980392157, 0.109803921568627), 1e-14); + expect(e.cylinder.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.313725490196078, 0.498039215686275, 0.2, 0.423529411764706), 1e-14); + expect(e = dataSource.entities.getById('sampled_cylinder_material_checkerboard_evenColor')).toBeDefined(); + expect(e.cylinder.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.52156862745098, 0.72156862745098, 0.294117647058824, 0.513725490196078), 1e-14); + expect(e.cylinder.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.964705882352941, 0.411764705882353, 0.0549019607843137, 0.0392156862745098), 1e-14); + expect(e = dataSource.entities.getById('sampled_cylinder_material_checkerboard_oddColor')).toBeDefined(); + expect(e.cylinder.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.784313725490196, 0.309803921568627, 0.0666666666666667, 0.403921568627451), 1e-14); + expect(e.cylinder.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.643137254901961, 0.737254901960784, 0.337254901960784, 0.925490196078431), 1e-14); + expect(e = dataSource.entities.getById('sampled_cylinder_outlineColor_rgbaf')).toBeDefined(); + expect(e.cylinder.outlineColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.780392156862745, 0.658823529411765, 0.235294117647059, 0.0705882352941176), 1e-14); + expect(e.cylinder.outlineColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.643137254901961, 0.372549019607843, 0.16078431372549, 0.588235294117647), 1e-14); + expect(e = dataSource.entities.getById('sampled_ellipse_material_solidColor_color')).toBeDefined(); + expect(e.ellipse.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.67843137254902, 0.807843137254902, 0.541176470588235, 0.290196078431373), 1e-14); + expect(e.ellipse.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.749019607843137, 0.258823529411765, 0.733333333333333, 0.247058823529412), 1e-14); + expect(e = dataSource.entities.getById('sampled_ellipse_material_image')).toBeDefined(); + expect(e.ellipse.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(41027, 32928)); + expect(e.ellipse.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(30513, 54647)); + expect(e.ellipse.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(243, 25, 233, 224)); + expect(e.ellipse.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(230, 62, 9, 20)); + expect(e = dataSource.entities.getById('sampled_ellipse_material_grid')).toBeDefined(); + expect(e.ellipse.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(103, 140, 88, 233)); + expect(e.ellipse.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(224, 133, 210, 4)); + expect(e.ellipse.material.cellAlpha.getValue(documentStartDate)).toEqual(39159.0); + expect(e.ellipse.material.cellAlpha.getValue(documentStopDate)).toEqual(47494.0); + expect(e.ellipse.material.lineCount.getValue(documentStartDate)).toEqual(new Cartesian2(40987, 3488)); + expect(e.ellipse.material.lineCount.getValue(documentStopDate)).toEqual(new Cartesian2(5066, 58131)); + expect(e.ellipse.material.lineThickness.getValue(documentStartDate)).toEqual(new Cartesian2(11466, 25388)); + expect(e.ellipse.material.lineThickness.getValue(documentStopDate)).toEqual(new Cartesian2(17761, 21317)); + expect(e.ellipse.material.lineOffset.getValue(documentStartDate)).toEqual(new Cartesian2(478, 18945)); + expect(e.ellipse.material.lineOffset.getValue(documentStopDate)).toEqual(new Cartesian2(25914, 29541)); + expect(e = dataSource.entities.getById('sampled_ellipse_material_stripe')).toBeDefined(); + expect(e.ellipse.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(218, 225, 186, 34)); + expect(e.ellipse.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(109, 193, 18, 44)); + expect(e.ellipse.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(119, 198, 180, 58)); + expect(e.ellipse.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(79, 137, 65, 31)); + expect(e.ellipse.material.offset.getValue(documentStartDate)).toEqual(16964.0); + expect(e.ellipse.material.offset.getValue(documentStopDate)).toEqual(16523.0); + expect(e.ellipse.material.repeat.getValue(documentStartDate)).toEqual(50015.0); + expect(e.ellipse.material.repeat.getValue(documentStopDate)).toEqual(64942.0); + expect(e = dataSource.entities.getById('sampled_ellipse_material_checkerboard')).toBeDefined(); + expect(e.ellipse.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(65, 135, 226, 200)); + expect(e.ellipse.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(70, 33, 98, 112)); + expect(e.ellipse.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(246, 224, 230, 224)); + expect(e.ellipse.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(110, 127, 138, 204)); + expect(e.ellipse.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(24670, 352)); + expect(e.ellipse.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(16830, 33857)); + expect(e = dataSource.entities.getById('sampled_ellipse_material_image_color')).toBeDefined(); + expect(e.ellipse.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.207843137254902, 0.0392156862745098, 0.12156862745098, 0.611764705882353), 1e-14); + expect(e.ellipse.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.611764705882353, 0.0117647058823529, 0.694117647058824, 0.576470588235294), 1e-14); + expect(e = dataSource.entities.getById('sampled_ellipse_material_grid_color')).toBeDefined(); + expect(e.ellipse.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.580392156862745, 0.0313725490196078, 0.27843137254902, 0.203921568627451), 1e-14); + expect(e.ellipse.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.0509803921568627, 0.870588235294118, 0.117647058823529, 0.588235294117647), 1e-14); + expect(e = dataSource.entities.getById('sampled_ellipse_material_stripe_evenColor')).toBeDefined(); + expect(e.ellipse.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.0549019607843137, 0.117647058823529, 0.623529411764706, 0.929411764705882), 1e-14); + expect(e.ellipse.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.266666666666667, 0.113725490196078, 0.937254901960784, 0.168627450980392), 1e-14); + expect(e = dataSource.entities.getById('sampled_ellipse_material_stripe_oddColor')).toBeDefined(); + expect(e.ellipse.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.262745098039216, 0.172549019607843, 0.282352941176471, 0.129411764705882), 1e-14); + expect(e.ellipse.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.968627450980392, 0.635294117647059, 0.525490196078431, 0.831372549019608), 1e-14); + expect(e = dataSource.entities.getById('sampled_ellipse_material_checkerboard_evenColor')).toBeDefined(); + expect(e.ellipse.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.207843137254902, 0.156862745098039, 0.952941176470588, 0.717647058823529), 1e-14); + expect(e.ellipse.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.635294117647059, 0.835294117647059, 0.76078431372549, 0.235294117647059), 1e-14); + expect(e = dataSource.entities.getById('sampled_ellipse_material_checkerboard_oddColor')).toBeDefined(); + expect(e.ellipse.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.890196078431372, 0.141176470588235, 0.231372549019608, 0.623529411764706), 1e-14); + expect(e.ellipse.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.192156862745098, 0.294117647058824, 0.741176470588235, 0.0274509803921569), 1e-14); + expect(e = dataSource.entities.getById('sampled_ellipse_outlineColor_rgbaf')).toBeDefined(); + expect(e.ellipse.outlineColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.76078431372549, 0.36078431372549, 0.223529411764706, 0.611764705882353), 1e-14); + expect(e.ellipse.outlineColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.16078431372549, 0.83921568627451, 0.752941176470588, 0.647058823529412), 1e-14); + expect(e = dataSource.entities.getById('sampled_ellipsoid_material_solidColor_color')).toBeDefined(); + expect(e.ellipsoid.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.592156862745098, 0.976470588235294, 0.207843137254902, 0.501960784313725), 1e-14); + expect(e.ellipsoid.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.0901960784313725, 0.662745098039216, 0.819607843137255, 0.235294117647059), 1e-14); + expect(e = dataSource.entities.getById('sampled_ellipsoid_material_image')).toBeDefined(); + expect(e.ellipsoid.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(63583, 15096)); + expect(e.ellipsoid.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(48977, 60351)); + expect(e.ellipsoid.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(49, 50, 177, 104)); + expect(e.ellipsoid.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(131, 27, 208, 157)); + expect(e = dataSource.entities.getById('sampled_ellipsoid_material_grid')).toBeDefined(); + expect(e.ellipsoid.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(121, 105, 70, 72)); + expect(e.ellipsoid.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(204, 122, 157, 57)); + expect(e.ellipsoid.material.cellAlpha.getValue(documentStartDate)).toEqual(39442.0); + expect(e.ellipsoid.material.cellAlpha.getValue(documentStopDate)).toEqual(463.0); + expect(e.ellipsoid.material.lineCount.getValue(documentStartDate)).toEqual(new Cartesian2(33778, 30083)); + expect(e.ellipsoid.material.lineCount.getValue(documentStopDate)).toEqual(new Cartesian2(5202, 18708)); + expect(e.ellipsoid.material.lineThickness.getValue(documentStartDate)).toEqual(new Cartesian2(44058, 37804)); + expect(e.ellipsoid.material.lineThickness.getValue(documentStopDate)).toEqual(new Cartesian2(34449, 3718)); + expect(e.ellipsoid.material.lineOffset.getValue(documentStartDate)).toEqual(new Cartesian2(33149, 21889)); + expect(e.ellipsoid.material.lineOffset.getValue(documentStopDate)).toEqual(new Cartesian2(35482, 10122)); + expect(e = dataSource.entities.getById('sampled_ellipsoid_material_stripe')).toBeDefined(); + expect(e.ellipsoid.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(153, 245, 201, 196)); + expect(e.ellipsoid.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(245, 113, 5, 131)); + expect(e.ellipsoid.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(99, 151, 174, 111)); + expect(e.ellipsoid.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(188, 89, 18, 1)); + expect(e.ellipsoid.material.offset.getValue(documentStartDate)).toEqual(44961.0); + expect(e.ellipsoid.material.offset.getValue(documentStopDate)).toEqual(5690.0); + expect(e.ellipsoid.material.repeat.getValue(documentStartDate)).toEqual(3351.0); + expect(e.ellipsoid.material.repeat.getValue(documentStopDate)).toEqual(44332.0); + expect(e = dataSource.entities.getById('sampled_ellipsoid_material_checkerboard')).toBeDefined(); + expect(e.ellipsoid.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(147, 239, 19, 56)); + expect(e.ellipsoid.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(5, 32, 143, 178)); + expect(e.ellipsoid.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(131, 51, 246, 186)); + expect(e.ellipsoid.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(214, 117, 149, 89)); + expect(e.ellipsoid.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(28116, 51821)); + expect(e.ellipsoid.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(60296, 50923)); + expect(e = dataSource.entities.getById('sampled_ellipsoid_material_image_color')).toBeDefined(); + expect(e.ellipsoid.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.654901960784314, 0.517647058823529, 0.858823529411765, 0.486274509803922), 1e-14); + expect(e.ellipsoid.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.862745098039216, 0.713725490196078, 0.564705882352941, 0.0901960784313725), 1e-14); + expect(e = dataSource.entities.getById('sampled_ellipsoid_material_grid_color')).toBeDefined(); + expect(e.ellipsoid.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.6, 0.427450980392157, 0.203921568627451, 0.223529411764706), 1e-14); + expect(e.ellipsoid.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.525490196078431, 0.305882352941176, 0.16078431372549, 0.819607843137255), 1e-14); + expect(e = dataSource.entities.getById('sampled_ellipsoid_material_stripe_evenColor')).toBeDefined(); + expect(e.ellipsoid.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.301960784313725, 0.572549019607843, 0.87843137254902, 0.219607843137255), 1e-14); + expect(e.ellipsoid.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.337254901960784, 0.835294117647059, 0.964705882352941, 0.909803921568627), 1e-14); + expect(e = dataSource.entities.getById('sampled_ellipsoid_material_stripe_oddColor')).toBeDefined(); + expect(e.ellipsoid.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.647058823529412, 0.635294117647059, 0.258823529411765, 0.250980392156863), 1e-14); + expect(e.ellipsoid.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.917647058823529, 0.262745098039216, 0.666666666666667, 0.980392156862745), 1e-14); + expect(e = dataSource.entities.getById('sampled_ellipsoid_material_checkerboard_evenColor')).toBeDefined(); + expect(e.ellipsoid.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.819607843137255, 0.282352941176471, 0.929411764705882, 0.501960784313725), 1e-14); + expect(e.ellipsoid.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.850980392156863, 0.294117647058824, 0.498039215686275, 0.956862745098039), 1e-14); + expect(e = dataSource.entities.getById('sampled_ellipsoid_material_checkerboard_oddColor')).toBeDefined(); + expect(e.ellipsoid.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.227450980392157, 0.862745098039216, 0.890196078431372, 0.207843137254902), 1e-14); + expect(e.ellipsoid.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.796078431372549, 0.0470588235294118, 0.843137254901961, 0.388235294117647), 1e-14); + expect(e = dataSource.entities.getById('sampled_ellipsoid_outlineColor_rgbaf')).toBeDefined(); + expect(e.ellipsoid.outlineColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.552941176470588, 0.549019607843137, 0.431372549019608, 0.568627450980392), 1e-14); + expect(e.ellipsoid.outlineColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.435294117647059, 0.698039215686274, 0.396078431372549, 0.772549019607843), 1e-14); + expect(e = dataSource.entities.getById('sampled_label_backgroundColor_rgbaf')).toBeDefined(); + expect(e.label.backgroundColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.96078431372549, 0.188235294117647, 0.870588235294118, 0.270588235294118), 1e-14); + expect(e.label.backgroundColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.882352941176471, 0.796078431372549, 0.603921568627451, 0.823529411764706), 1e-14); + expect(e = dataSource.entities.getById('sampled_label_fillColor_rgbaf')).toBeDefined(); + expect(e.label.fillColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.709803921568627, 0.556862745098039, 0.337254901960784, 0.247058823529412), 1e-14); + expect(e.label.fillColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.43921568627451, 0.694117647058824, 0.901960784313726, 0.0823529411764706), 1e-14); + expect(e = dataSource.entities.getById('sampled_label_outlineColor_rgbaf')).toBeDefined(); + expect(e.label.outlineColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.631372549019608, 0.709803921568627, 0.270588235294118, 0.792156862745098), 1e-14); + expect(e.label.outlineColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.435294117647059, 0.176470588235294, 0.235294117647059, 0.631372549019608), 1e-14); + expect(e = dataSource.entities.getById('sampled_model_silhouetteColor_rgbaf')).toBeDefined(); + expect(e.model.silhouetteColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.231372549019608, 0.866666666666667, 0.266666666666667, 0.635294117647059), 1e-14); + expect(e.model.silhouetteColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.749019607843137, 0.227450980392157, 0.807843137254902, 0.0823529411764706), 1e-14); + expect(e = dataSource.entities.getById('sampled_model_color_rgbaf')).toBeDefined(); + expect(e.model.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.0509803921568627, 0.83921568627451, 0.470588235294118, 0.956862745098039), 1e-14); + expect(e.model.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.435294117647059, 0.945098039215686, 0.431372549019608, 0.619607843137255), 1e-14); + expect(e = dataSource.entities.getById('sampled_path_material_solidColor_color')).toBeDefined(); + expect(e.path.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.517647058823529, 0.56078431372549, 0.254901960784314, 0.494117647058824), 1e-14); + expect(e.path.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.905882352941176, 0.152941176470588, 0.854901960784314, 0.890196078431372), 1e-14); + expect(e = dataSource.entities.getById('sampled_path_material_polylineOutline')).toBeDefined(); + expect(e.path.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(209, 154, 35, 76)); + expect(e.path.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(186, 25, 242, 140)); + expect(e.path.material.outlineColor.getValue(documentStartDate)).toEqual(Color.fromBytes(218, 241, 216, 157)); + expect(e.path.material.outlineColor.getValue(documentStopDate)).toEqual(Color.fromBytes(70, 200, 183, 199)); + expect(e.path.material.outlineWidth.getValue(documentStartDate)).toEqual(2699.0); + expect(e.path.material.outlineWidth.getValue(documentStopDate)).toEqual(1320.0); + expect(e = dataSource.entities.getById('sampled_path_material_polylineArrow')).toBeDefined(); + expect(e.path.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(150, 221, 161, 136)); + expect(e.path.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(19, 231, 68, 117)); + expect(e = dataSource.entities.getById('sampled_path_material_polylineDash')).toBeDefined(); + expect(e.path.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(140, 167, 151, 119)); + expect(e.path.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(65, 100, 228, 104)); + expect(e.path.material.gapColor.getValue(documentStartDate)).toEqual(Color.fromBytes(154, 198, 168, 151)); + expect(e.path.material.gapColor.getValue(documentStopDate)).toEqual(Color.fromBytes(16, 23, 0, 42)); + expect(e.path.material.dashLength.getValue(documentStartDate)).toEqual(38294.0); + expect(e.path.material.dashLength.getValue(documentStopDate)).toEqual(33057.0); + expect(e.path.material.dashPattern.getValue(documentStartDate)).toEqual(58660); + expect(e.path.material.dashPattern.getValue(documentStopDate)).toEqual(3340); + expect(e = dataSource.entities.getById('sampled_path_material_polylineGlow')).toBeDefined(); + expect(e.path.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(197, 117, 196, 254)); + expect(e.path.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(18, 17, 195, 230)); + expect(e.path.material.glowPower.getValue(documentStartDate)).toEqual(5579.0); + expect(e.path.material.glowPower.getValue(documentStopDate)).toEqual(59951.0); + expect(e.path.material.taperPower.getValue(documentStartDate)).toEqual(30159.0); + expect(e.path.material.taperPower.getValue(documentStopDate)).toEqual(35636.0); + expect(e = dataSource.entities.getById('sampled_path_material_image')).toBeDefined(); + expect(e.path.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(25033, 47457)); + expect(e.path.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(30413, 15734)); + expect(e.path.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(225, 149, 237, 92)); + expect(e.path.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(234, 146, 229, 9)); + expect(e = dataSource.entities.getById('sampled_path_material_grid')).toBeDefined(); + expect(e.path.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(99, 177, 19, 203)); + expect(e.path.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(231, 169, 202, 127)); + expect(e.path.material.cellAlpha.getValue(documentStartDate)).toEqual(63572.0); + expect(e.path.material.cellAlpha.getValue(documentStopDate)).toEqual(26232.0); + expect(e.path.material.lineCount.getValue(documentStartDate)).toEqual(new Cartesian2(34101, 5509)); + expect(e.path.material.lineCount.getValue(documentStopDate)).toEqual(new Cartesian2(11991, 23086)); + expect(e.path.material.lineThickness.getValue(documentStartDate)).toEqual(new Cartesian2(39225, 58265)); + expect(e.path.material.lineThickness.getValue(documentStopDate)).toEqual(new Cartesian2(60443, 36332)); + expect(e.path.material.lineOffset.getValue(documentStartDate)).toEqual(new Cartesian2(25536, 59747)); + expect(e.path.material.lineOffset.getValue(documentStopDate)).toEqual(new Cartesian2(43164, 57256)); + expect(e = dataSource.entities.getById('sampled_path_material_stripe')).toBeDefined(); + expect(e.path.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(252, 51, 215, 123)); + expect(e.path.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(164, 66, 75, 80)); + expect(e.path.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(192, 190, 37, 99)); + expect(e.path.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(196, 81, 62, 248)); + expect(e.path.material.offset.getValue(documentStartDate)).toEqual(45320.0); + expect(e.path.material.offset.getValue(documentStopDate)).toEqual(41173.0); + expect(e.path.material.repeat.getValue(documentStartDate)).toEqual(42078.0); + expect(e.path.material.repeat.getValue(documentStopDate)).toEqual(11633.0); + expect(e = dataSource.entities.getById('sampled_path_material_checkerboard')).toBeDefined(); + expect(e.path.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(29, 130, 90, 174)); + expect(e.path.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(42, 131, 191, 181)); + expect(e.path.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(32, 82, 30, 56)); + expect(e.path.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(161, 13, 144, 118)); + expect(e.path.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(14368, 54840)); + expect(e.path.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(58386, 2276)); + expect(e = dataSource.entities.getById('sampled_path_material_polylineOutline_color')).toBeDefined(); + expect(e.path.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.490196078431373, 0.498039215686275, 0.819607843137255, 0.72156862745098), 1e-14); + expect(e.path.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.309803921568627, 0.329411764705882, 0.807843137254902, 0.368627450980392), 1e-14); + expect(e = dataSource.entities.getById('sampled_path_material_polylineOutline_outlineColor')).toBeDefined(); + expect(e.path.material.outlineColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.427450980392157, 0.96078431372549, 0.996078431372549, 0.662745098039216), 1e-14); + expect(e.path.material.outlineColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.917647058823529, 0.635294117647059, 0.674509803921569, 0.298039215686275), 1e-14); + expect(e = dataSource.entities.getById('sampled_path_material_polylineArrow_color')).toBeDefined(); + expect(e.path.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.0666666666666667, 0.972549019607843, 0.686274509803922, 0.325490196078431), 1e-14); + expect(e.path.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.2, 0.482352941176471, 0.498039215686275, 0.219607843137255), 1e-14); + expect(e = dataSource.entities.getById('sampled_path_material_polylineDash_color')).toBeDefined(); + expect(e.path.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.803921568627451, 0.67843137254902, 0.176470588235294, 0.709803921568627), 1e-14); + expect(e.path.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.674509803921569, 0.0980392156862745, 0.447058823529412, 0.803921568627451), 1e-14); + expect(e = dataSource.entities.getById('sampled_path_material_polylineDash_gapColor')).toBeDefined(); + expect(e.path.material.gapColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.231372549019608, 0.745098039215686, 0.772549019607843, 0.901960784313726), 1e-14); + expect(e.path.material.gapColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.713725490196078, 0.180392156862745, 0.317647058823529, 0.309803921568627), 1e-14); + expect(e = dataSource.entities.getById('sampled_path_material_polylineGlow_color')).toBeDefined(); + expect(e.path.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.63921568627451, 0.2, 0.0196078431372549, 0.984313725490196), 1e-14); + expect(e.path.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.376470588235294, 0.815686274509804, 0.933333333333333, 0.0235294117647059), 1e-14); + expect(e = dataSource.entities.getById('sampled_path_material_image_color')).toBeDefined(); + expect(e.path.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.898039215686275, 0.772549019607843, 0.294117647058824, 0.0431372549019608), 1e-14); + expect(e.path.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.815686274509804, 0.0901960784313725, 0.898039215686275, 0.309803921568627), 1e-14); + expect(e = dataSource.entities.getById('sampled_path_material_grid_color')).toBeDefined(); + expect(e.path.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.890196078431372, 0, 0.717647058823529, 0.329411764705882), 1e-14); + expect(e.path.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.474509803921569, 0.690196078431373, 0.0431372549019608, 0.258823529411765), 1e-14); + expect(e = dataSource.entities.getById('sampled_path_material_stripe_evenColor')).toBeDefined(); + expect(e.path.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.368627450980392, 0.584313725490196, 0.831372549019608, 0.541176470588235), 1e-14); + expect(e.path.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.317647058823529, 0.4, 0.83921568627451, 0.537254901960784), 1e-14); + expect(e = dataSource.entities.getById('sampled_path_material_stripe_oddColor')).toBeDefined(); + expect(e.path.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.145098039215686, 0.588235294117647, 0.917647058823529, 0.607843137254902), 1e-14); + expect(e.path.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.117647058823529, 0.0705882352941176, 0.901960784313726, 0.525490196078431), 1e-14); + expect(e = dataSource.entities.getById('sampled_path_material_checkerboard_evenColor')).toBeDefined(); + expect(e.path.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.631372549019608, 0.741176470588235, 0.282352941176471, 0.196078431372549), 1e-14); + expect(e.path.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.250980392156863, 0.109803921568627, 0.188235294117647, 0.796078431372549), 1e-14); + expect(e = dataSource.entities.getById('sampled_path_material_checkerboard_oddColor')).toBeDefined(); + expect(e.path.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.388235294117647, 0.129411764705882, 0.333333333333333, 0.658823529411765), 1e-14); + expect(e.path.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.156862745098039, 0.631372549019608, 0.290196078431373, 0.713725490196078), 1e-14); + expect(e = dataSource.entities.getById('sampled_point_color_rgbaf')).toBeDefined(); + expect(e.point.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.67843137254902, 0.356862745098039, 0.588235294117647, 0.796078431372549), 1e-14); + expect(e.point.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.968627450980392, 0.298039215686275, 0.513725490196078, 0.631372549019608), 1e-14); + expect(e = dataSource.entities.getById('sampled_point_outlineColor_rgbaf')).toBeDefined(); + expect(e.point.outlineColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.427450980392157, 0.894117647058824, 0.168627450980392, 0.768627450980392), 1e-14); + expect(e.point.outlineColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.458823529411765, 0.466666666666667, 0.388235294117647, 0.792156862745098), 1e-14); + expect(e = dataSource.entities.getById('sampled_polygon_material_solidColor_color')).toBeDefined(); + expect(e.polygon.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.305882352941176, 0.615686274509804, 0.337254901960784, 0.894117647058824), 1e-14); + expect(e.polygon.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.184313725490196, 0.619607843137255, 0.352941176470588, 0.0313725490196078), 1e-14); + expect(e = dataSource.entities.getById('sampled_polygon_material_image')).toBeDefined(); + expect(e.polygon.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(19536, 17484)); + expect(e.polygon.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(46291, 28852)); + expect(e.polygon.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(157, 5, 231, 29)); + expect(e.polygon.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(53, 2, 148, 36)); + expect(e = dataSource.entities.getById('sampled_polygon_material_grid')).toBeDefined(); + expect(e.polygon.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(179, 243, 247, 124)); + expect(e.polygon.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(15, 128, 159, 42)); + expect(e.polygon.material.cellAlpha.getValue(documentStartDate)).toEqual(11565.0); + expect(e.polygon.material.cellAlpha.getValue(documentStopDate)).toEqual(42611.0); + expect(e.polygon.material.lineCount.getValue(documentStartDate)).toEqual(new Cartesian2(47065, 65463)); + expect(e.polygon.material.lineCount.getValue(documentStopDate)).toEqual(new Cartesian2(29170, 16497)); + expect(e.polygon.material.lineThickness.getValue(documentStartDate)).toEqual(new Cartesian2(62674, 26868)); + expect(e.polygon.material.lineThickness.getValue(documentStopDate)).toEqual(new Cartesian2(22008, 39509)); + expect(e.polygon.material.lineOffset.getValue(documentStartDate)).toEqual(new Cartesian2(28793, 1648)); + expect(e.polygon.material.lineOffset.getValue(documentStopDate)).toEqual(new Cartesian2(44991, 42159)); + expect(e = dataSource.entities.getById('sampled_polygon_material_stripe')).toBeDefined(); + expect(e.polygon.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(113, 233, 143, 146)); + expect(e.polygon.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(106, 138, 115, 44)); + expect(e.polygon.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(104, 146, 138, 244)); + expect(e.polygon.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(161, 95, 25, 36)); + expect(e.polygon.material.offset.getValue(documentStartDate)).toEqual(4711.0); + expect(e.polygon.material.offset.getValue(documentStopDate)).toEqual(65087.0); + expect(e.polygon.material.repeat.getValue(documentStartDate)).toEqual(44013.0); + expect(e.polygon.material.repeat.getValue(documentStopDate)).toEqual(7595.0); + expect(e = dataSource.entities.getById('sampled_polygon_material_checkerboard')).toBeDefined(); + expect(e.polygon.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(167, 56, 202, 219)); + expect(e.polygon.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(231, 169, 74, 125)); + expect(e.polygon.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(88, 174, 167, 35)); + expect(e.polygon.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(12, 69, 69, 23)); + expect(e.polygon.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(32132, 20093)); + expect(e.polygon.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(31300, 27514)); + expect(e = dataSource.entities.getById('sampled_polygon_material_image_color')).toBeDefined(); + expect(e.polygon.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.501960784313725, 0.0823529411764706, 0.282352941176471, 0.305882352941176), 1e-14); + expect(e.polygon.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.0745098039215686, 0.654901960784314, 0.6, 0.886274509803922), 1e-14); + expect(e = dataSource.entities.getById('sampled_polygon_material_grid_color')).toBeDefined(); + expect(e.polygon.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.192156862745098, 0.709803921568627, 0.807843137254902, 0.737254901960784), 1e-14); + expect(e.polygon.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.674509803921569, 0.0235294117647059, 0.764705882352941, 0.976470588235294), 1e-14); + expect(e = dataSource.entities.getById('sampled_polygon_material_stripe_evenColor')).toBeDefined(); + expect(e.polygon.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.568627450980392, 0.352941176470588, 0.396078431372549, 0.435294117647059), 1e-14); + expect(e.polygon.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.274509803921569, 0.43921568627451, 0.686274509803922, 0.419607843137255), 1e-14); + expect(e = dataSource.entities.getById('sampled_polygon_material_stripe_oddColor')).toBeDefined(); + expect(e.polygon.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.325490196078431, 0.349019607843137, 0.580392156862745, 0.725490196078431), 1e-14); + expect(e.polygon.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.568627450980392, 0.690196078431373, 0.00392156862745098, 0.858823529411765), 1e-14); + expect(e = dataSource.entities.getById('sampled_polygon_material_checkerboard_evenColor')).toBeDefined(); + expect(e.polygon.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.831372549019608, 0.454901960784314, 0.882352941176471, 0.270588235294118), 1e-14); + expect(e.polygon.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.494117647058824, 0.384313725490196, 0.345098039215686, 0.16078431372549), 1e-14); + expect(e = dataSource.entities.getById('sampled_polygon_material_checkerboard_oddColor')).toBeDefined(); + expect(e.polygon.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.0117647058823529, 0.905882352941176, 0.592156862745098, 0.784313725490196), 1e-14); + expect(e.polygon.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.427450980392157, 0.701960784313725, 0.0901960784313725, 0.643137254901961), 1e-14); + expect(e = dataSource.entities.getById('sampled_polygon_outlineColor_rgbaf')).toBeDefined(); + expect(e.polygon.outlineColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.674509803921569, 0.556862745098039, 0.113725490196078, 0.6), 1e-14); + expect(e.polygon.outlineColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.650980392156863, 0.827450980392157, 0.537254901960784, 0.713725490196078), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_material_solidColor_color')).toBeDefined(); + expect(e.polyline.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.976470588235294, 0.949019607843137, 0.450980392156863, 0.466666666666667), 1e-14); + expect(e.polyline.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.262745098039216, 0.509803921568627, 0.537254901960784, 0.850980392156863), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_material_polylineOutline')).toBeDefined(); + expect(e.polyline.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(245, 92, 109, 218)); + expect(e.polyline.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(241, 96, 196, 167)); + expect(e.polyline.material.outlineColor.getValue(documentStartDate)).toEqual(Color.fromBytes(174, 2, 11, 244)); + expect(e.polyline.material.outlineColor.getValue(documentStopDate)).toEqual(Color.fromBytes(31, 126, 140, 138)); + expect(e.polyline.material.outlineWidth.getValue(documentStartDate)).toEqual(33279.0); + expect(e.polyline.material.outlineWidth.getValue(documentStopDate)).toEqual(26855.0); + expect(e = dataSource.entities.getById('sampled_polyline_material_polylineArrow')).toBeDefined(); + expect(e.polyline.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(141, 137, 252, 157)); + expect(e.polyline.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(8, 236, 198, 57)); + expect(e = dataSource.entities.getById('sampled_polyline_material_polylineDash')).toBeDefined(); + expect(e.polyline.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(77, 159, 238, 158)); + expect(e.polyline.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(206, 194, 234, 158)); + expect(e.polyline.material.gapColor.getValue(documentStartDate)).toEqual(Color.fromBytes(232, 145, 15, 164)); + expect(e.polyline.material.gapColor.getValue(documentStopDate)).toEqual(Color.fromBytes(173, 151, 118, 138)); + expect(e.polyline.material.dashLength.getValue(documentStartDate)).toEqual(41757.0); + expect(e.polyline.material.dashLength.getValue(documentStopDate)).toEqual(10126.0); + expect(e.polyline.material.dashPattern.getValue(documentStartDate)).toEqual(33948); + expect(e.polyline.material.dashPattern.getValue(documentStopDate)).toEqual(16892); + expect(e = dataSource.entities.getById('sampled_polyline_material_polylineGlow')).toBeDefined(); + expect(e.polyline.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(174, 178, 78, 176)); + expect(e.polyline.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(79, 191, 38, 195)); + expect(e.polyline.material.glowPower.getValue(documentStartDate)).toEqual(55378.0); + expect(e.polyline.material.glowPower.getValue(documentStopDate)).toEqual(60643.0); + expect(e.polyline.material.taperPower.getValue(documentStartDate)).toEqual(50068.0); + expect(e.polyline.material.taperPower.getValue(documentStopDate)).toEqual(2516.0); + expect(e = dataSource.entities.getById('sampled_polyline_material_image')).toBeDefined(); + expect(e.polyline.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(50957, 35783)); + expect(e.polyline.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(59533, 65000)); + expect(e.polyline.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(174, 154, 113, 185)); + expect(e.polyline.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(123, 236, 118, 155)); + expect(e = dataSource.entities.getById('sampled_polyline_material_grid')).toBeDefined(); + expect(e.polyline.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(26, 89, 33, 224)); + expect(e.polyline.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(215, 131, 203, 1)); + expect(e.polyline.material.cellAlpha.getValue(documentStartDate)).toEqual(34343.0); + expect(e.polyline.material.cellAlpha.getValue(documentStopDate)).toEqual(63863.0); + expect(e.polyline.material.lineCount.getValue(documentStartDate)).toEqual(new Cartesian2(52308, 51660)); + expect(e.polyline.material.lineCount.getValue(documentStopDate)).toEqual(new Cartesian2(45338, 51633)); + expect(e.polyline.material.lineThickness.getValue(documentStartDate)).toEqual(new Cartesian2(47738, 52154)); + expect(e.polyline.material.lineThickness.getValue(documentStopDate)).toEqual(new Cartesian2(42674, 38822)); + expect(e.polyline.material.lineOffset.getValue(documentStartDate)).toEqual(new Cartesian2(29194, 52338)); + expect(e.polyline.material.lineOffset.getValue(documentStopDate)).toEqual(new Cartesian2(25319, 28514)); + expect(e = dataSource.entities.getById('sampled_polyline_material_stripe')).toBeDefined(); + expect(e.polyline.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(141, 205, 78, 73)); + expect(e.polyline.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(107, 159, 97, 34)); + expect(e.polyline.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(19, 76, 127, 197)); + expect(e.polyline.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(214, 222, 19, 168)); + expect(e.polyline.material.offset.getValue(documentStartDate)).toEqual(51126.0); + expect(e.polyline.material.offset.getValue(documentStopDate)).toEqual(10891.0); + expect(e.polyline.material.repeat.getValue(documentStartDate)).toEqual(25313.0); + expect(e.polyline.material.repeat.getValue(documentStopDate)).toEqual(22020.0); + expect(e = dataSource.entities.getById('sampled_polyline_material_checkerboard')).toBeDefined(); + expect(e.polyline.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(94, 152, 152, 31)); + expect(e.polyline.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(76, 129, 223, 102)); + expect(e.polyline.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(71, 237, 5, 172)); + expect(e.polyline.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(209, 132, 204, 160)); + expect(e.polyline.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(19943, 17997)); + expect(e.polyline.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(55528, 16856)); + expect(e = dataSource.entities.getById('sampled_polyline_material_polylineOutline_color')).toBeDefined(); + expect(e.polyline.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.384313725490196, 0.168627450980392, 0.443137254901961, 0.658823529411765), 1e-14); + expect(e.polyline.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.0274509803921569, 0.647058823529412, 0.396078431372549, 0.105882352941176), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_material_polylineOutline_outlineColor')).toBeDefined(); + expect(e.polyline.material.outlineColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.0823529411764706, 0.0549019607843137, 0.149019607843137, 0.580392156862745), 1e-14); + expect(e.polyline.material.outlineColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.733333333333333, 0.792156862745098, 0.63921568627451, 0.564705882352941), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_material_polylineArrow_color')).toBeDefined(); + expect(e.polyline.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.52156862745098, 0.725490196078431, 0.87843137254902, 0.823529411764706), 1e-14); + expect(e.polyline.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.772549019607843, 0.862745098039216, 0.325490196078431, 0), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_material_polylineDash_color')).toBeDefined(); + expect(e.polyline.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.525490196078431, 0.992156862745098, 0.964705882352941, 0.364705882352941), 1e-14); + expect(e.polyline.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.27843137254902, 0.133333333333333, 0.447058823529412, 0.192156862745098), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_material_polylineDash_gapColor')).toBeDefined(); + expect(e.polyline.material.gapColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.498039215686275, 0.776470588235294, 0.803921568627451, 0.690196078431373), 1e-14); + expect(e.polyline.material.gapColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.376470588235294, 0.898039215686275, 0.168627450980392, 0.898039215686275), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_material_polylineGlow_color')).toBeDefined(); + expect(e.polyline.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.705882352941177, 0.901960784313726, 0.0784313725490196, 0.356862745098039), 1e-14); + expect(e.polyline.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.517647058823529, 0.207843137254902, 0.701960784313725, 0.105882352941176), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_material_image_color')).toBeDefined(); + expect(e.polyline.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.796078431372549, 0.741176470588235, 0.741176470588235, 0.349019607843137), 1e-14); + expect(e.polyline.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.925490196078431, 0.266666666666667, 0.0941176470588235, 0.556862745098039), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_material_grid_color')).toBeDefined(); + expect(e.polyline.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.545098039215686, 0.847058823529412, 0.341176470588235, 0.101960784313725), 1e-14); + expect(e.polyline.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.431372549019608, 0.952941176470588, 0.184313725490196, 0.184313725490196), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_material_stripe_evenColor')).toBeDefined(); + expect(e.polyline.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.807843137254902, 0.262745098039216, 0.898039215686275, 0.811764705882353), 1e-14); + expect(e.polyline.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.415686274509804, 0.968627450980392, 0.0980392156862745, 0.423529411764706), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_material_stripe_oddColor')).toBeDefined(); + expect(e.polyline.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.427450980392157, 0.407843137254902, 0.470588235294118, 0.874509803921569), 1e-14); + expect(e.polyline.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.509803921568627, 0.427450980392157, 0.976470588235294, 0), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_material_checkerboard_evenColor')).toBeDefined(); + expect(e.polyline.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.313725490196078, 0.415686274509804, 0.0823529411764706, 0.576470588235294), 1e-14); + expect(e.polyline.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.0196078431372549, 0.309803921568627, 0.23921568627451, 0.933333333333333), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_material_checkerboard_oddColor')).toBeDefined(); + expect(e.polyline.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.784313725490196, 0.235294117647059, 0.525490196078431, 0.180392156862745), 1e-14); + expect(e.polyline.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.356862745098039, 0.125490196078431, 0.243137254901961, 0.788235294117647), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_solidColor_color')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.568627450980392, 0.243137254901961, 0.43921568627451, 0.541176470588235), 1e-14); + expect(e.polyline.depthFailMaterial.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.729411764705882, 0.505882352941176, 0.282352941176471, 0.0274509803921569), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_polylineOutline')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(documentStartDate)).toEqual(Color.fromBytes(247, 124, 164, 106)); + expect(e.polyline.depthFailMaterial.color.getValue(documentStopDate)).toEqual(Color.fromBytes(91, 114, 116, 82)); + expect(e.polyline.depthFailMaterial.outlineColor.getValue(documentStartDate)).toEqual(Color.fromBytes(35, 216, 157, 243)); + expect(e.polyline.depthFailMaterial.outlineColor.getValue(documentStopDate)).toEqual(Color.fromBytes(111, 11, 143, 175)); + expect(e.polyline.depthFailMaterial.outlineWidth.getValue(documentStartDate)).toEqual(45494.0); + expect(e.polyline.depthFailMaterial.outlineWidth.getValue(documentStopDate)).toEqual(8666.0); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_polylineArrow')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(documentStartDate)).toEqual(Color.fromBytes(143, 46, 33, 146)); + expect(e.polyline.depthFailMaterial.color.getValue(documentStopDate)).toEqual(Color.fromBytes(1, 147, 34, 93)); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_polylineDash')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(documentStartDate)).toEqual(Color.fromBytes(64, 52, 179, 199)); + expect(e.polyline.depthFailMaterial.color.getValue(documentStopDate)).toEqual(Color.fromBytes(251, 205, 86, 110)); + expect(e.polyline.depthFailMaterial.gapColor.getValue(documentStartDate)).toEqual(Color.fromBytes(98, 214, 1, 23)); + expect(e.polyline.depthFailMaterial.gapColor.getValue(documentStopDate)).toEqual(Color.fromBytes(108, 132, 28, 207)); + expect(e.polyline.depthFailMaterial.dashLength.getValue(documentStartDate)).toEqual(59636.0); + expect(e.polyline.depthFailMaterial.dashLength.getValue(documentStopDate)).toEqual(9250.0); + expect(e.polyline.depthFailMaterial.dashPattern.getValue(documentStartDate)).toEqual(33949); + expect(e.polyline.depthFailMaterial.dashPattern.getValue(documentStopDate)).toEqual(58673); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_polylineGlow')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(documentStartDate)).toEqual(Color.fromBytes(253, 71, 171, 138)); + expect(e.polyline.depthFailMaterial.color.getValue(documentStopDate)).toEqual(Color.fromBytes(112, 154, 76, 178)); + expect(e.polyline.depthFailMaterial.glowPower.getValue(documentStartDate)).toEqual(8542.0); + expect(e.polyline.depthFailMaterial.glowPower.getValue(documentStopDate)).toEqual(54440.0); + expect(e.polyline.depthFailMaterial.taperPower.getValue(documentStartDate)).toEqual(61950.0); + expect(e.polyline.depthFailMaterial.taperPower.getValue(documentStopDate)).toEqual(36891.0); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_image')).toBeDefined(); + expect(e.polyline.depthFailMaterial.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(59796, 25065)); + expect(e.polyline.depthFailMaterial.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(38054, 9108)); + expect(e.polyline.depthFailMaterial.color.getValue(documentStartDate)).toEqual(Color.fromBytes(32, 24, 155, 151)); + expect(e.polyline.depthFailMaterial.color.getValue(documentStopDate)).toEqual(Color.fromBytes(9, 142, 253, 92)); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_grid')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(documentStartDate)).toEqual(Color.fromBytes(206, 138, 53, 173)); + expect(e.polyline.depthFailMaterial.color.getValue(documentStopDate)).toEqual(Color.fromBytes(20, 11, 131, 253)); + expect(e.polyline.depthFailMaterial.cellAlpha.getValue(documentStartDate)).toEqual(36676.0); + expect(e.polyline.depthFailMaterial.cellAlpha.getValue(documentStopDate)).toEqual(5143.0); + expect(e.polyline.depthFailMaterial.lineCount.getValue(documentStartDate)).toEqual(new Cartesian2(55344, 11736)); + expect(e.polyline.depthFailMaterial.lineCount.getValue(documentStopDate)).toEqual(new Cartesian2(20410, 11343)); + expect(e.polyline.depthFailMaterial.lineThickness.getValue(documentStartDate)).toEqual(new Cartesian2(22967, 31065)); + expect(e.polyline.depthFailMaterial.lineThickness.getValue(documentStopDate)).toEqual(new Cartesian2(59168, 51431)); + expect(e.polyline.depthFailMaterial.lineOffset.getValue(documentStartDate)).toEqual(new Cartesian2(59000, 31974)); + expect(e.polyline.depthFailMaterial.lineOffset.getValue(documentStopDate)).toEqual(new Cartesian2(65334, 48383)); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_stripe')).toBeDefined(); + expect(e.polyline.depthFailMaterial.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(166, 16, 249, 230)); + expect(e.polyline.depthFailMaterial.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(250, 177, 111, 216)); + expect(e.polyline.depthFailMaterial.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(210, 161, 181, 206)); + expect(e.polyline.depthFailMaterial.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(194, 73, 70, 224)); + expect(e.polyline.depthFailMaterial.offset.getValue(documentStartDate)).toEqual(43239.0); + expect(e.polyline.depthFailMaterial.offset.getValue(documentStopDate)).toEqual(47157.0); + expect(e.polyline.depthFailMaterial.repeat.getValue(documentStartDate)).toEqual(58315.0); + expect(e.polyline.depthFailMaterial.repeat.getValue(documentStopDate)).toEqual(45308.0); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_checkerboard')).toBeDefined(); + expect(e.polyline.depthFailMaterial.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(0, 159, 59, 160)); + expect(e.polyline.depthFailMaterial.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(202, 33, 125, 165)); + expect(e.polyline.depthFailMaterial.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(19, 37, 14, 24)); + expect(e.polyline.depthFailMaterial.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(66, 150, 238, 84)); + expect(e.polyline.depthFailMaterial.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(15034, 58938)); + expect(e.polyline.depthFailMaterial.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(62661, 23796)); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_polylineOutline_color')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.611764705882353, 0.407843137254902, 0.807843137254902, 0.380392156862745), 1e-14); + expect(e.polyline.depthFailMaterial.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.52156862745098, 0.654901960784314, 0.756862745098039, 0.368627450980392), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_polylineOutline_outlineColor')).toBeDefined(); + expect(e.polyline.depthFailMaterial.outlineColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.670588235294118, 0.211764705882353, 0.607843137254902, 0.388235294117647), 1e-14); + expect(e.polyline.depthFailMaterial.outlineColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.611764705882353, 0.611764705882353, 0.298039215686275, 0.749019607843137), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_polylineArrow_color')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.874509803921569, 0.541176470588235, 0.231372549019608, 0.596078431372549), 1e-14); + expect(e.polyline.depthFailMaterial.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.729411764705882, 0.533333333333333, 0.411764705882353, 0.454901960784314), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_polylineDash_color')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.776470588235294, 0.0823529411764706, 0.96078431372549, 0.776470588235294), 1e-14); + expect(e.polyline.depthFailMaterial.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.0941176470588235, 0.643137254901961, 0.717647058823529, 0.890196078431372), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_polylineDash_gapColor')).toBeDefined(); + expect(e.polyline.depthFailMaterial.gapColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.219607843137255, 0.403921568627451, 0.815686274509804, 0.803921568627451), 1e-14); + expect(e.polyline.depthFailMaterial.gapColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.294117647058824, 0.615686274509804, 0.172549019607843, 0.0235294117647059), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_polylineGlow_color')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.168627450980392, 0.847058823529412, 0.968627450980392, 0.431372549019608), 1e-14); + expect(e.polyline.depthFailMaterial.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.2, 0.603921568627451, 0.941176470588235, 0.0901960784313725), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_image_color')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.980392156862745, 0.450980392156863, 0.329411764705882, 0.670588235294118), 1e-14); + expect(e.polyline.depthFailMaterial.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.556862745098039, 0.63921568627451, 0.156862745098039, 0.705882352941177), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_grid_color')).toBeDefined(); + expect(e.polyline.depthFailMaterial.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.623529411764706, 0.607843137254902, 0.913725490196078, 0.596078431372549), 1e-14); + expect(e.polyline.depthFailMaterial.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.423529411764706, 0.968627450980392, 0.815686274509804, 0.968627450980392), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_stripe_evenColor')).toBeDefined(); + expect(e.polyline.depthFailMaterial.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.854901960784314, 0.843137254901961, 0.701960784313725, 0.113725490196078), 1e-14); + expect(e.polyline.depthFailMaterial.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.941176470588235, 0.890196078431372, 0.933333333333333, 0.588235294117647), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_stripe_oddColor')).toBeDefined(); + expect(e.polyline.depthFailMaterial.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.427450980392157, 0.870588235294118, 0.96078431372549, 0.219607843137255), 1e-14); + expect(e.polyline.depthFailMaterial.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.219607843137255, 0.847058823529412, 0.752941176470588, 0.172549019607843), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e.polyline.depthFailMaterial.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.96078431372549, 0.0941176470588235, 0.725490196078431, 0.819607843137255), 1e-14); + expect(e.polyline.depthFailMaterial.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.0588235294117647, 0.447058823529412, 0.572549019607843, 0.0549019607843137), 1e-14); + expect(e = dataSource.entities.getById('sampled_polyline_depthFailMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e.polyline.depthFailMaterial.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.333333333333333, 0.0431372549019608, 0.886274509803922, 0.384313725490196), 1e-14); + expect(e.polyline.depthFailMaterial.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.235294117647059, 0.733333333333333, 0.752941176470588, 0.537254901960784), 1e-14); + expect(e = dataSource.entities.getById('sampled_polylineVolume_material_solidColor_color')).toBeDefined(); + expect(e.polylineVolume.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.0235294117647059, 0.87843137254902, 0.0549019607843137, 0.76078431372549), 1e-14); + expect(e.polylineVolume.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.407843137254902, 0.788235294117647, 0.580392156862745, 0.701960784313725), 1e-14); + expect(e = dataSource.entities.getById('sampled_polylineVolume_material_image')).toBeDefined(); + expect(e.polylineVolume.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(54883, 39382)); + expect(e.polylineVolume.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(42188, 27300)); + expect(e.polylineVolume.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(145, 236, 4, 141)); + expect(e.polylineVolume.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(126, 69, 220, 191)); + expect(e = dataSource.entities.getById('sampled_polylineVolume_material_grid')).toBeDefined(); + expect(e.polylineVolume.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(98, 87, 231, 46)); + expect(e.polylineVolume.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(222, 91, 113, 105)); + expect(e.polylineVolume.material.cellAlpha.getValue(documentStartDate)).toEqual(32451.0); + expect(e.polylineVolume.material.cellAlpha.getValue(documentStopDate)).toEqual(49677.0); + expect(e.polylineVolume.material.lineCount.getValue(documentStartDate)).toEqual(new Cartesian2(14089, 52279)); + expect(e.polylineVolume.material.lineCount.getValue(documentStopDate)).toEqual(new Cartesian2(59996, 36842)); + expect(e.polylineVolume.material.lineThickness.getValue(documentStartDate)).toEqual(new Cartesian2(49037, 8639)); + expect(e.polylineVolume.material.lineThickness.getValue(documentStopDate)).toEqual(new Cartesian2(59785, 47337)); + expect(e.polylineVolume.material.lineOffset.getValue(documentStartDate)).toEqual(new Cartesian2(40768, 50335)); + expect(e.polylineVolume.material.lineOffset.getValue(documentStopDate)).toEqual(new Cartesian2(6098, 48919)); + expect(e = dataSource.entities.getById('sampled_polylineVolume_material_stripe')).toBeDefined(); + expect(e.polylineVolume.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(206, 34, 152, 54)); + expect(e.polylineVolume.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(182, 38, 96, 39)); + expect(e.polylineVolume.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(84, 117, 45, 107)); + expect(e.polylineVolume.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(79, 76, 73, 177)); + expect(e.polylineVolume.material.offset.getValue(documentStartDate)).toEqual(18479.0); + expect(e.polylineVolume.material.offset.getValue(documentStopDate)).toEqual(19855.0); + expect(e.polylineVolume.material.repeat.getValue(documentStartDate)).toEqual(36294.0); + expect(e.polylineVolume.material.repeat.getValue(documentStopDate)).toEqual(34071.0); + expect(e = dataSource.entities.getById('sampled_polylineVolume_material_checkerboard')).toBeDefined(); + expect(e.polylineVolume.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(185, 168, 171, 241)); + expect(e.polylineVolume.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(111, 194, 153, 164)); + expect(e.polylineVolume.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(84, 96, 248, 117)); + expect(e.polylineVolume.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(129, 55, 81, 196)); + expect(e.polylineVolume.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(45209, 63152)); + expect(e.polylineVolume.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(42552, 3238)); + expect(e = dataSource.entities.getById('sampled_polylineVolume_material_image_color')).toBeDefined(); + expect(e.polylineVolume.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.52156862745098, 0.745098039215686, 0.537254901960784, 0.227450980392157), 1e-14); + expect(e.polylineVolume.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.792156862745098, 0.192156862745098, 0.564705882352941, 0.0705882352941176), 1e-14); + expect(e = dataSource.entities.getById('sampled_polylineVolume_material_grid_color')).toBeDefined(); + expect(e.polylineVolume.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.274509803921569, 0.545098039215686, 0.203921568627451, 0.650980392156863), 1e-14); + expect(e.polylineVolume.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.384313725490196, 0.384313725490196, 0.670588235294118, 0.36078431372549), 1e-14); + expect(e = dataSource.entities.getById('sampled_polylineVolume_material_stripe_evenColor')).toBeDefined(); + expect(e.polylineVolume.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.0588235294117647, 0.341176470588235, 0.83921568627451, 0.823529411764706), 1e-14); + expect(e.polylineVolume.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.83921568627451, 0.247058823529412, 0.568627450980392, 0.905882352941176), 1e-14); + expect(e = dataSource.entities.getById('sampled_polylineVolume_material_stripe_oddColor')).toBeDefined(); + expect(e.polylineVolume.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.850980392156863, 0.309803921568627, 0.823529411764706, 0.12156862745098), 1e-14); + expect(e.polylineVolume.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.976470588235294, 0.564705882352941, 0.776470588235294, 0.607843137254902), 1e-14); + expect(e = dataSource.entities.getById('sampled_polylineVolume_material_checkerboard_evenColor')).toBeDefined(); + expect(e.polylineVolume.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.396078431372549, 0.717647058823529, 0.976470588235294, 0.564705882352941), 1e-14); + expect(e.polylineVolume.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.388235294117647, 0.568627450980392, 0.0235294117647059, 0.807843137254902), 1e-14); + expect(e = dataSource.entities.getById('sampled_polylineVolume_material_checkerboard_oddColor')).toBeDefined(); + expect(e.polylineVolume.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.0666666666666667, 0.796078431372549, 0.576470588235294, 0.180392156862745), 1e-14); + expect(e.polylineVolume.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.576470588235294, 0.52156862745098, 0.623529411764706, 0.384313725490196), 1e-14); + expect(e = dataSource.entities.getById('sampled_polylineVolume_outlineColor_rgbaf')).toBeDefined(); + expect(e.polylineVolume.outlineColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.454901960784314, 0.674509803921569, 0.368627450980392, 0.850980392156863), 1e-14); + expect(e.polylineVolume.outlineColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.23921568627451, 0.525490196078431, 0.133333333333333, 0.949019607843137), 1e-14); + expect(e = dataSource.entities.getById('sampled_rectangle_coordinates_wsenDegrees')).toBeDefined(); + expect(e.rectangle.coordinates.getValue(documentStartDate)).toEqual(Rectangle.fromDegrees(35, 18, 38, 15)); + expect(e.rectangle.coordinates.getValue(documentStopDate)).toEqual(Rectangle.fromDegrees(38, 1, 12, 30)); + expect(e = dataSource.entities.getById('sampled_rectangle_material_solidColor_color')).toBeDefined(); + expect(e.rectangle.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.203921568627451, 0.243137254901961, 0.576470588235294, 0.0980392156862745), 1e-14); + expect(e.rectangle.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.913725490196078, 0.831372549019608, 0.76078431372549, 0.952941176470588), 1e-14); + expect(e = dataSource.entities.getById('sampled_rectangle_material_image')).toBeDefined(); + expect(e.rectangle.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(3711, 44302)); + expect(e.rectangle.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(52318, 60108)); + expect(e.rectangle.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(49, 142, 97, 190)); + expect(e.rectangle.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(189, 250, 238, 118)); + expect(e = dataSource.entities.getById('sampled_rectangle_material_grid')).toBeDefined(); + expect(e.rectangle.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(95, 53, 115, 82)); + expect(e.rectangle.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(204, 71, 209, 187)); + expect(e.rectangle.material.cellAlpha.getValue(documentStartDate)).toEqual(48813.0); + expect(e.rectangle.material.cellAlpha.getValue(documentStopDate)).toEqual(21269.0); + expect(e.rectangle.material.lineCount.getValue(documentStartDate)).toEqual(new Cartesian2(22945, 32857)); + expect(e.rectangle.material.lineCount.getValue(documentStopDate)).toEqual(new Cartesian2(55972, 34522)); + expect(e.rectangle.material.lineThickness.getValue(documentStartDate)).toEqual(new Cartesian2(37146, 39825)); + expect(e.rectangle.material.lineThickness.getValue(documentStopDate)).toEqual(new Cartesian2(64636, 13052)); + expect(e.rectangle.material.lineOffset.getValue(documentStartDate)).toEqual(new Cartesian2(8882, 38690)); + expect(e.rectangle.material.lineOffset.getValue(documentStopDate)).toEqual(new Cartesian2(8857, 21794)); + expect(e = dataSource.entities.getById('sampled_rectangle_material_stripe')).toBeDefined(); + expect(e.rectangle.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(243, 96, 246, 5)); + expect(e.rectangle.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(74, 28, 207, 87)); + expect(e.rectangle.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(147, 18, 134, 10)); + expect(e.rectangle.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(59, 151, 72, 114)); + expect(e.rectangle.material.offset.getValue(documentStartDate)).toEqual(57328.0); + expect(e.rectangle.material.offset.getValue(documentStopDate)).toEqual(2602.0); + expect(e.rectangle.material.repeat.getValue(documentStartDate)).toEqual(29729.0); + expect(e.rectangle.material.repeat.getValue(documentStopDate)).toEqual(30206.0); + expect(e = dataSource.entities.getById('sampled_rectangle_material_checkerboard')).toBeDefined(); + expect(e.rectangle.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(142, 184, 89, 24)); + expect(e.rectangle.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(200, 249, 166, 224)); + expect(e.rectangle.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(237, 53, 233, 244)); + expect(e.rectangle.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(101, 61, 234, 150)); + expect(e.rectangle.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(44089, 8876)); + expect(e.rectangle.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(60682, 18669)); + expect(e = dataSource.entities.getById('sampled_rectangle_material_image_color')).toBeDefined(); + expect(e.rectangle.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.552941176470588, 0.101960784313725, 0.772549019607843, 0.00392156862745098), 1e-14); + expect(e.rectangle.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.0156862745098039, 0.964705882352941, 0.592156862745098, 0.396078431372549), 1e-14); + expect(e = dataSource.entities.getById('sampled_rectangle_material_grid_color')).toBeDefined(); + expect(e.rectangle.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.490196078431373, 0.384313725490196, 0.937254901960784, 0.168627450980392), 1e-14); + expect(e.rectangle.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.392156862745098, 0.756862745098039, 0.454901960784314, 0.529411764705882), 1e-14); + expect(e = dataSource.entities.getById('sampled_rectangle_material_stripe_evenColor')).toBeDefined(); + expect(e.rectangle.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.32156862745098, 0.776470588235294, 0.227450980392157, 0.0823529411764706), 1e-14); + expect(e.rectangle.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.929411764705882, 0.725490196078431, 0.00392156862745098, 0.364705882352941), 1e-14); + expect(e = dataSource.entities.getById('sampled_rectangle_material_stripe_oddColor')).toBeDefined(); + expect(e.rectangle.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.984313725490196, 0.831372549019608, 0.827450980392157, 0.925490196078431), 1e-14); + expect(e.rectangle.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.145098039215686, 0.0156862745098039, 0.380392156862745, 0.490196078431373), 1e-14); + expect(e = dataSource.entities.getById('sampled_rectangle_material_checkerboard_evenColor')).toBeDefined(); + expect(e.rectangle.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.286274509803922, 0.831372549019608, 0.184313725490196, 0.172549019607843), 1e-14); + expect(e.rectangle.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.596078431372549, 0.603921568627451, 0.694117647058824, 0.235294117647059), 1e-14); + expect(e = dataSource.entities.getById('sampled_rectangle_material_checkerboard_oddColor')).toBeDefined(); + expect(e.rectangle.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.929411764705882, 0.92156862745098, 0.270588235294118, 0.0666666666666667), 1e-14); + expect(e.rectangle.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.411764705882353, 0.125490196078431, 0.505882352941176, 0.509803921568627), 1e-14); + expect(e = dataSource.entities.getById('sampled_rectangle_outlineColor_rgbaf')).toBeDefined(); + expect(e.rectangle.outlineColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.980392156862745, 0.466666666666667, 0.752941176470588, 0.709803921568627), 1e-14); + expect(e.rectangle.outlineColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.549019607843137, 0.949019607843137, 0.545098039215686, 0.380392156862745), 1e-14); + expect(e = dataSource.entities.getById('sampled_wall_material_solidColor_color')).toBeDefined(); + expect(e.wall.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.384313725490196, 0.964705882352941, 0.827450980392157, 0.815686274509804), 1e-14); + expect(e.wall.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.00784313725490196, 0.325490196078431, 0.952941176470588, 0.0549019607843137), 1e-14); + expect(e = dataSource.entities.getById('sampled_wall_material_image')).toBeDefined(); + expect(e.wall.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(13369, 38196)); + expect(e.wall.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(36874, 55696)); + expect(e.wall.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(1, 152, 139, 83)); + expect(e.wall.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(127, 110, 56, 69)); + expect(e = dataSource.entities.getById('sampled_wall_material_grid')).toBeDefined(); + expect(e.wall.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(243, 153, 88, 43)); + expect(e.wall.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(169, 159, 82, 75)); + expect(e.wall.material.cellAlpha.getValue(documentStartDate)).toEqual(32179.0); + expect(e.wall.material.cellAlpha.getValue(documentStopDate)).toEqual(55901.0); + expect(e.wall.material.lineCount.getValue(documentStartDate)).toEqual(new Cartesian2(46941, 30391)); + expect(e.wall.material.lineCount.getValue(documentStopDate)).toEqual(new Cartesian2(51565, 6089)); + expect(e.wall.material.lineThickness.getValue(documentStartDate)).toEqual(new Cartesian2(35543, 16778)); + expect(e.wall.material.lineThickness.getValue(documentStopDate)).toEqual(new Cartesian2(32904, 18048)); + expect(e.wall.material.lineOffset.getValue(documentStartDate)).toEqual(new Cartesian2(2955, 19723)); + expect(e.wall.material.lineOffset.getValue(documentStopDate)).toEqual(new Cartesian2(58723, 15333)); + expect(e = dataSource.entities.getById('sampled_wall_material_stripe')).toBeDefined(); + expect(e.wall.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(204, 233, 122, 70)); + expect(e.wall.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(215, 44, 132, 84)); + expect(e.wall.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(20, 6, 10, 253)); + expect(e.wall.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(96, 118, 90, 117)); + expect(e.wall.material.offset.getValue(documentStartDate)).toEqual(63629.0); + expect(e.wall.material.offset.getValue(documentStopDate)).toEqual(38486.0); + expect(e.wall.material.repeat.getValue(documentStartDate)).toEqual(41791.0); + expect(e.wall.material.repeat.getValue(documentStopDate)).toEqual(56258.0); + expect(e = dataSource.entities.getById('sampled_wall_material_checkerboard')).toBeDefined(); + expect(e.wall.material.evenColor.getValue(documentStartDate)).toEqual(Color.fromBytes(38, 200, 78, 42)); + expect(e.wall.material.evenColor.getValue(documentStopDate)).toEqual(Color.fromBytes(115, 149, 62, 135)); + expect(e.wall.material.oddColor.getValue(documentStartDate)).toEqual(Color.fromBytes(79, 103, 165, 56)); + expect(e.wall.material.oddColor.getValue(documentStopDate)).toEqual(Color.fromBytes(201, 220, 190, 217)); + expect(e.wall.material.repeat.getValue(documentStartDate)).toEqual(new Cartesian2(30510, 28535)); + expect(e.wall.material.repeat.getValue(documentStopDate)).toEqual(new Cartesian2(22105, 29014)); + expect(e = dataSource.entities.getById('sampled_wall_material_image_color')).toBeDefined(); + expect(e.wall.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.584313725490196, 0.752941176470588, 0.588235294117647, 0.733333333333333), 1e-14); + expect(e.wall.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.309803921568627, 0.988235294117647, 0.0784313725490196, 0.458823529411765), 1e-14); + expect(e = dataSource.entities.getById('sampled_wall_material_grid_color')).toBeDefined(); + expect(e.wall.material.color.getValue(documentStartDate)).toEqualEpsilon(new Color(0.27843137254902, 0.549019607843137, 0.964705882352941, 0.96078431372549), 1e-14); + expect(e.wall.material.color.getValue(documentStopDate)).toEqualEpsilon(new Color(0.709803921568627, 0.831372549019608, 0.67843137254902, 0.407843137254902), 1e-14); + expect(e = dataSource.entities.getById('sampled_wall_material_stripe_evenColor')).toBeDefined(); + expect(e.wall.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.0901960784313725, 0.243137254901961, 0.537254901960784, 0.168627450980392), 1e-14); + expect(e.wall.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.388235294117647, 0.847058823529412, 0.258823529411765, 0.113725490196078), 1e-14); + expect(e = dataSource.entities.getById('sampled_wall_material_stripe_oddColor')).toBeDefined(); + expect(e.wall.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.345098039215686, 0.0196078431372549, 0.0549019607843137, 0.662745098039216), 1e-14); + expect(e.wall.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.694117647058824, 0.890196078431372, 0.380392156862745, 0.317647058823529), 1e-14); + expect(e = dataSource.entities.getById('sampled_wall_material_checkerboard_evenColor')).toBeDefined(); + expect(e.wall.material.evenColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.670588235294118, 0.462745098039216, 0.443137254901961, 0.23921568627451), 1e-14); + expect(e.wall.material.evenColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.313725490196078, 0.0901960784313725, 0.623529411764706, 0.933333333333333), 1e-14); + expect(e = dataSource.entities.getById('sampled_wall_material_checkerboard_oddColor')).toBeDefined(); + expect(e.wall.material.oddColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.184313725490196, 0.725490196078431, 0.894117647058824, 0.572549019607843), 1e-14); + expect(e.wall.material.oddColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.745098039215686, 0.435294117647059, 0.611764705882353, 0.776470588235294), 1e-14); + expect(e = dataSource.entities.getById('sampled_wall_outlineColor_rgbaf')).toBeDefined(); + expect(e.wall.outlineColor.getValue(documentStartDate)).toEqualEpsilon(new Color(0.933333333333333, 0.105882352941176, 0.0627450980392157, 0.396078431372549), 1e-14); + expect(e.wall.outlineColor.getValue(documentStopDate)).toEqualEpsilon(new Color(0.901960784313726, 0.435294117647059, 0.352941176470588, 0.713725490196078), 1e-14); + expect(e = dataSource.entities.getById('sampled_conicSensor_intersectionColor_rgbaf')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_lateralSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_lateralSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_lateralSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_lateralSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_lateralSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_lateralSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_lateralSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_lateralSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_lateralSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_lateralSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_lateralSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_domeSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_domeSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_domeSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_domeSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_domeSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_domeSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_domeSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_domeSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_domeSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_domeSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_domeSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_environmentOcclusionMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_environmentOcclusionMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_environmentOcclusionMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_environmentOcclusionMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_environmentOcclusionMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_environmentOcclusionMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_environmentOcclusionMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_environmentOcclusionMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_environmentOcclusionMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_environmentOcclusionMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_environmentOcclusionMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_conicSensor_environmentIntersectionColor_rgbaf')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_intersectionColor_rgbaf')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_lateralSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_lateralSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_lateralSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_lateralSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_lateralSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_lateralSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_lateralSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_lateralSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_lateralSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_lateralSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_lateralSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_domeSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_domeSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_domeSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_domeSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_domeSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_domeSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_domeSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_domeSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_domeSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_domeSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_domeSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_environmentOcclusionMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_environmentOcclusionMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_environmentOcclusionMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_environmentOcclusionMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_environmentOcclusionMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_environmentOcclusionMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_environmentOcclusionMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_environmentOcclusionMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_environmentOcclusionMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_environmentOcclusionMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_environmentOcclusionMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_customPatternSensor_environmentIntersectionColor_rgbaf')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_intersectionColor_rgbaf')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_lateralSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_lateralSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_lateralSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_lateralSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_lateralSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_lateralSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_lateralSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_lateralSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_lateralSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_lateralSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_lateralSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_ellipsoidHorizonSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_domeSurfaceMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_domeSurfaceMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_domeSurfaceMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_domeSurfaceMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_domeSurfaceMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_domeSurfaceMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_domeSurfaceMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_domeSurfaceMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_domeSurfaceMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_domeSurfaceMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_domeSurfaceMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_environmentOcclusionMaterial_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_environmentOcclusionMaterial_image')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_environmentOcclusionMaterial_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_environmentOcclusionMaterial_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_environmentOcclusionMaterial_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_environmentOcclusionMaterial_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_environmentOcclusionMaterial_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_environmentOcclusionMaterial_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_environmentOcclusionMaterial_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_environmentOcclusionMaterial_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_environmentOcclusionMaterial_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_rectangularSensor_environmentIntersectionColor_rgbaf')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_fan_material_solidColor_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_fan_material_image')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_fan_material_grid')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_fan_material_stripe')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_fan_material_checkerboard')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_fan_material_image_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_fan_material_grid_color')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_fan_material_stripe_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_fan_material_stripe_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_fan_material_checkerboard_evenColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_fan_material_checkerboard_oddColor')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_fan_outlineColor_rgbaf')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_vector_color_rgbaf')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_vector_direction_unitSpherical')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_vector_direction_cartesian')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_vector_direction_unitCartesian')).toBeDefined(); + expect(e = dataSource.entities.getById('sampled_custom')).toBeDefined(); + expect(e.properties.custom_boundingRectangle.getValue(documentStartDate)).toEqual(new BoundingRectangle(10924, 3626, 12558, 56113)); + expect(e.properties.custom_boundingRectangle.getValue(documentStopDate)).toEqual(new BoundingRectangle(59127, 45286, 34992, 17032)); + expect(e.properties.custom_cartesian.getValue(documentStartDate)).toEqual(new Cartesian3(59456, 60648, 1004)); + expect(e.properties.custom_cartesian.getValue(documentStopDate)).toEqual(new Cartesian3(37915, 14740, 14905)); + expect(e.properties.custom_cartographicRadians.getValue(documentStartDate)).toEqual(Cartesian3.fromRadians(1.25380297085855, 1.03510976346284, 7102)); + expect(e.properties.custom_cartographicRadians.getValue(documentStopDate)).toEqual(Cartesian3.fromRadians(1.10648839763778, 0.231915563506949, 340)); + expect(e.properties.custom_cartographicDegrees.getValue(documentStartDate)).toEqual(Cartesian3.fromDegrees(44, 31, 55762)); + expect(e.properties.custom_cartographicDegrees.getValue(documentStopDate)).toEqual(Cartesian3.fromDegrees(10, 18, 28847)); + expect(e.properties.custom_cartesian2.getValue(documentStartDate)).toEqual(new Cartesian2(9033, 9251)); + expect(e.properties.custom_cartesian2.getValue(documentStopDate)).toEqual(new Cartesian2(34048, 58501)); + expect(e.properties.custom_unitCartesian.getValue(documentStartDate)).toEqualEpsilon(new Cartesian3(0.0501133095086564, 0.917195967206924, 0.395272328843601), 1e-14); + expect(e.properties.custom_unitCartesian.getValue(documentStopDate)).toEqualEpsilon(new Cartesian3(0.797476048450763, 0.40584478979077, 0.446454878735849), 1e-14); + expect(e.properties.custom_spherical.getValue(documentStartDate)).toEqual(Cartesian3.fromSpherical(new Spherical(47098, 2231, 14088))); + expect(e.properties.custom_spherical.getValue(documentStopDate)).toEqual(Cartesian3.fromSpherical(new Spherical(34883, 48264, 41148))); + expect(e.properties.custom_unitSpherical.getValue(documentStartDate)).toEqualEpsilon(Cartesian3.fromSpherical(new Spherical(48811, 24254)), 1e-14); + expect(e.properties.custom_unitSpherical.getValue(documentStopDate)).toEqualEpsilon(Cartesian3.fromSpherical(new Spherical(44800, 8111)), 1e-14); + expect(e.properties.custom_rgba.getValue(documentStartDate)).toEqual(Color.fromBytes(179, 175, 115, 46)); + expect(e.properties.custom_rgba.getValue(documentStopDate)).toEqual(Color.fromBytes(136, 187, 237, 156)); + expect(e.properties.custom_rgbaf.getValue(documentStartDate)).toEqualEpsilon(new Color(0.890196078431372, 0.450980392156863, 0.588235294117647, 0.72156862745098), 1e-14); + expect(e.properties.custom_rgbaf.getValue(documentStopDate)).toEqualEpsilon(new Color(0.419607843137255, 0.843137254901961, 0.36078431372549, 0.423529411764706), 1e-14); + expect(e.properties.custom_number.getValue(documentStartDate)).toEqual(24561.0); + expect(e.properties.custom_number.getValue(documentStopDate)).toEqual(45446.0); + expect(e.properties.custom_nearFarScalar.getValue(documentStartDate)).toEqual(new NearFarScalar(64112, 15354, 32827, 10368)); + expect(e.properties.custom_nearFarScalar.getValue(documentStopDate)).toEqual(new NearFarScalar(55643, 45785, 33458, 29826)); + expect(e.properties.custom_unitQuaternion.getValue(documentStartDate)).toEqualEpsilon(new Quaternion(0.697299305414108, 0.26496667122144, 0.615947719782462, 0.253327354041402), 1e-14); + expect(e.properties.custom_unitQuaternion.getValue(documentStopDate)).toEqualEpsilon(new Quaternion(0.134764165794432, 0.408681085292446, 0.902060273565587, 0.0332513608247514), 1e-14); + expect(e.properties.custom_wsen.getValue(documentStartDate)).toEqual(new Rectangle(1.4164143530628, 1.2888469381038, 0.679756561409663, 1.29649258884014)); + expect(e.properties.custom_wsen.getValue(documentStopDate)).toEqual(new Rectangle(1.19133054275098, 0.9154648059314, 0.71347968461712, 1.32750822775441)); + expect(e.properties.custom_wsenDegrees.getValue(documentStartDate)).toEqual(Rectangle.fromDegrees(29, 11, 17, 36)); + expect(e.properties.custom_wsenDegrees.getValue(documentStopDate)).toEqual(Rectangle.fromDegrees(37, 16, 25, 23)); + }); }); }); diff --git a/Specs/DataSources/EntityClusterSpec.js b/Specs/DataSources/EntityClusterSpec.js index bb1493f17102..90f013b61bda 100644 --- a/Specs/DataSources/EntityClusterSpec.js +++ b/Specs/DataSources/EntityClusterSpec.js @@ -88,6 +88,7 @@ describe( it("constructor sets default properties", function () { cluster = new EntityCluster(); expect(cluster.enabled).toEqual(false); + expect(cluster.show).toEqual(true); expect(cluster.pixelRange).toEqual(80); expect(cluster.minimumClusterSize).toEqual(2); expect(cluster.clusterBillboards).toEqual(true); @@ -107,6 +108,7 @@ describe( it("constructor sets expected properties", function () { var options = { enabled: true, + show: false, pixelRange: 30, minimumClusterSize: 5, clusterBillboards: false, @@ -115,6 +117,7 @@ describe( }; cluster = new EntityCluster(options); expect(cluster.enabled).toEqual(options.enabled); + expect(cluster.show).toEqual(false); expect(cluster.pixelRange).toEqual(options.pixelRange); expect(cluster.minimumClusterSize).toEqual(options.minimumClusterSize); expect(cluster.clusterBillboards).toEqual(options.clusterBillboards); diff --git a/Specs/MockTerrainProvider.js b/Specs/MockTerrainProvider.js index 3688a8b39663..1e37cbfc8a09 100644 --- a/Specs/MockTerrainProvider.js +++ b/Specs/MockTerrainProvider.js @@ -276,7 +276,11 @@ function createTerrainData(terrainProvider, x, y, level, upsampled) { }; var originalCreateMesh = terrainData.createMesh; - terrainData.createMesh = function (tilingScheme, x, y, level) { + terrainData.createMesh = function (options) { + var x = options.x; + var y = options.y; + var level = options.level; + var willSucceed = terrainProvider._createMeshWillSucceed[createTileKey(x, y, level)]; if (willSucceed === undefined) { diff --git a/Specs/Renderer/BuiltinFunctionsSpec.js b/Specs/Renderer/BuiltinFunctionsSpec.js index 140b0f5c62f7..13d5826a82db 100644 --- a/Specs/Renderer/BuiltinFunctionsSpec.js +++ b/Specs/Renderer/BuiltinFunctionsSpec.js @@ -450,6 +450,7 @@ describe( it("has czm_unpackFloat", function () { var packed = Cartesian4.packFloat(1); + packed = Cartesian4.divideByScalar(packed, 255, packed); var vec4 = "vec4(" + packed.x + diff --git a/Specs/Scene/BillboardCollectionSpec.js b/Specs/Scene/BillboardCollectionSpec.js index bb59ce748a3d..fa9fb87686e6 100644 --- a/Specs/Scene/BillboardCollectionSpec.js +++ b/Specs/Scene/BillboardCollectionSpec.js @@ -352,6 +352,22 @@ describe( expect(scene).toRender([0, 0, 0, 255]); }); + it("does not render billboard if show is false", function () { + billboards.add({ + position: Cartesian3.ZERO, + image: greenImage, + width: 2.0, + height: 2.0, + sizeInMeters: true, + }); + + camera.position = new Cartesian3(2.0, 0.0, 0.0); + expect(scene).toRender([0, 255, 0, 255]); + + billboards.show = false; + expect(scene).toRender([0, 0, 0, 255]); + }); + it("throws scaleByDistance with nearDistance === farDistance", function () { var b = billboards.add(); var scale = new NearFarScalar(2.0e5, 1.0, 2.0e5, 0.0); diff --git a/Specs/Scene/Cesium3DTilesetSpec.js b/Specs/Scene/Cesium3DTilesetSpec.js index 9586e39c8165..27a68cd98693 100644 --- a/Specs/Scene/Cesium3DTilesetSpec.js +++ b/Specs/Scene/Cesium3DTilesetSpec.js @@ -5,7 +5,7 @@ import { Color } from "../../Source/Cesium.js"; import { CullingVolume } from "../../Source/Cesium.js"; import { defined } from "../../Source/Cesium.js"; import { getAbsoluteUri } from "../../Source/Cesium.js"; -import { getStringFromTypedArray } from "../../Source/Cesium.js"; +import { getJsonFromTypedArray } from "../../Source/Cesium.js"; import { HeadingPitchRange } from "../../Source/Cesium.js"; import { HeadingPitchRoll } from "../../Source/Cesium.js"; import { Intersect } from "../../Source/Cesium.js"; @@ -363,7 +363,7 @@ describe( var tileset = new Cesium3DTileset({ url: path, }); - expect(tileset.url).toEqual(path); + expect(tileset.resource.url).toEqual(path); }); it("url and tilesetUrl set up correctly given path with query string", function () { @@ -372,7 +372,7 @@ describe( var tileset = new Cesium3DTileset({ url: path + param, }); - expect(tileset.url).toEqual(path + param); + expect(tileset.resource.url).toEqual(path + param); }); it("resolves readyPromise", function () { @@ -402,7 +402,7 @@ describe( expect(tileset._geometricError).toEqual(240.0); expect(tileset.root).toBeDefined(); - expect(tileset.url).toEqual(tilesetUrl); + expect(tileset.resource.url).toEqual(tilesetUrl); }); }); @@ -719,6 +719,29 @@ describe( ); }); + function loadTilesetAtFullDetail(url) { + return Cesium3DTilesTester.loadTileset(scene, url).then(function ( + tileset + ) { + tileset.maximumScreenSpaceError = 0.0; + return Cesium3DTilesTester.waitForTilesLoaded(scene, tileset); + }); + } + + it("renders pickPrimitive during pick pass if defined", function () { + viewRootOnly(); + return when + .all([ + loadTilesetAtFullDetail(tilesetUrl), + loadTilesetAtFullDetail(withBatchTableUrl), + ]) + .then(function (tilesets) { + tilesets[0].pickPrimitive = tilesets[1]; + expect(tilesets[0].pickPrimitive).toEqual(tilesets[1]); + expect(scene).toPickPrimitive(tilesets[1]); + }); + }); + it("verify statistics", function () { options.url = tilesetUrl; var tileset = scene.primitives.add(new Cesium3DTileset(options)); @@ -2866,6 +2889,40 @@ describe( ); }); + it("doesn't re-evaluate style during the next update", function () { + return Cesium3DTilesTester.loadTileset(scene, withBatchTableUrl).then( + function (tileset) { + tileset.show = false; + tileset.preloadWhenHidden = true; + tileset.style = new Cesium3DTileStyle({ color: 'color("red")' }); + scene.renderForSpecs(); + + var statistics = tileset._statisticsPerPass[Cesium3DTilePass.PRELOAD]; + expect(statistics.numberOfTilesStyled).toBe(1); + + scene.renderForSpecs(); + expect(statistics.numberOfTilesStyled).toBe(0); + } + ); + }); + + it("doesn't re-evaluate style if the style being set is the same as the active style", function () { + return Cesium3DTilesTester.loadTileset(scene, withBatchTableUrl).then( + function (tileset) { + var style = new Cesium3DTileStyle({ color: 'color("red")' }); + tileset.style = style; + scene.renderForSpecs(); + + var statistics = tileset._statisticsPerPass[Cesium3DTilePass.RENDER]; + expect(statistics.numberOfTilesStyled).toBe(1); + + tileset.style = style; + scene.renderForSpecs(); + expect(statistics.numberOfTilesStyled).toBe(0); + } + ); + }); + function testColorBlendMode(url) { return Cesium3DTilesTester.loadTileset(scene, url).then(function ( tileset @@ -3765,11 +3822,10 @@ describe( function modifySubtreeBuffer(arrayBuffer) { var uint8Array = new Uint8Array(arrayBuffer); - var jsonString = getStringFromTypedArray(uint8Array); - var json = JSON.parse(jsonString); + var json = getJsonFromTypedArray(uint8Array); json.root.children.splice(0, 1); - jsonString = JSON.stringify(json); + var jsonString = JSON.stringify(json); var length = jsonString.length; uint8Array = new Uint8Array(length); for (var i = 0; i < length; i++) { diff --git a/Specs/Scene/LabelCollectionSpec.js b/Specs/Scene/LabelCollectionSpec.js index 24bc0ba9075f..03731fef3a96 100644 --- a/Specs/Scene/LabelCollectionSpec.js +++ b/Specs/Scene/LabelCollectionSpec.js @@ -650,6 +650,22 @@ describe( expect(scene).toRender([0, 0, 0, 255]); }); + it("does not render label if show is false", function () { + labels.add({ + position: Cartesian3.ZERO, + text: solidBox, + horizontalOrigin: HorizontalOrigin.CENTER, + verticalOrigin: VerticalOrigin.CENTER, + scaleByDistance: new NearFarScalar(2.0, 1.0, 4.0, 0.0), + }); + + camera.position = new Cartesian3(2.0, 0.0, 0.0); + expect(scene).toRender([255, 255, 255, 255]); + + labels.show = false; + expect(scene).toRender([0, 0, 0, 255]); + }); + it("throws new label with invalid distanceDisplayCondition (near >= far)", function () { var dc = new DistanceDisplayCondition(100.0, 10.0); expect(function () { diff --git a/Specs/Scene/PointPrimitiveCollectionSpec.js b/Specs/Scene/PointPrimitiveCollectionSpec.js index 74c100ad8759..2d1c135587f8 100644 --- a/Specs/Scene/PointPrimitiveCollectionSpec.js +++ b/Specs/Scene/PointPrimitiveCollectionSpec.js @@ -228,6 +228,20 @@ describe( expect(scene).toRender([0, 0, 0, 255]); }); + it("does not render pointPrimitive if show is false", function () { + pointPrimitives.add({ + position: Cartesian3.ZERO, + translucencyByDistance: new NearFarScalar(2.0, 1.0, 4.0, 0.0), + color: Color.LIME, + }); + + camera.position = new Cartesian3(2.0, 0.0, 0.0); + expect(scene).toRender([0, 255, 0, 255]); + + pointPrimitives.show = false; + expect(scene).toRender([0, 0, 0, 255]); + }); + it("throws scaleByDistance with nearDistance === farDistance", function () { var p = pointPrimitives.add(); var scale = new NearFarScalar(2.0e5, 1.0, 2.0e5, 0.0); diff --git a/Specs/Scene/PolylineCollectionSpec.js b/Specs/Scene/PolylineCollectionSpec.js index 99c058feb52c..b1c8ae192906 100644 --- a/Specs/Scene/PolylineCollectionSpec.js +++ b/Specs/Scene/PolylineCollectionSpec.js @@ -511,6 +511,21 @@ describe( expect(scene).notToRender([0, 0, 0, 255]); }); + it("does not render polyline if show is false", function () { + var p = polylines.add(); + p.positions = [ + new Cartesian3(0.0, -1000000.0, 0.0), + new Cartesian3(0.0, 1000000.0, 0.0), + new Cartesian3(0.0, 2000000.0, 0.0), + ]; + + scene.primitives.add(polylines); + expect(scene).notToRender([0, 0, 0, 255]); + + polylines.show = false; + expect(scene).toRender([0, 0, 0, 255]); + }); + it("A polyline that used to cross the IDL but now does not, triggers vertex creation (This code used to crash)", function () { //Need to be in 2D or CV scene.mode = SceneMode.SCENE2D; diff --git a/Specs/Scene/SceneSpec.js b/Specs/Scene/SceneSpec.js index c579c657fe22..142e59b52ddc 100644 --- a/Specs/Scene/SceneSpec.js +++ b/Specs/Scene/SceneSpec.js @@ -664,6 +664,32 @@ describe( }); }); }); + + it("renders a globe with an ElevationBand", function () { + s.globe = new Globe(Ellipsoid.UNIT_SPHERE); + s.globe.material = Material.fromType("ElevationBand"); + s.camera.position = new Cartesian3(1.02, 0.0, 0.0); + s.camera.up = Cartesian3.clone(Cartesian3.UNIT_Z); + s.camera.direction = Cartesian3.negate( + Cartesian3.normalize(s.camera.position, new Cartesian3()), + new Cartesian3() + ); + + // To avoid Jasmine's spec has no expectations error + expect(true).toEqual(true); + + return expect(s).toRenderAndCall(function () { + return pollToPromise(function () { + render(s.frameState, s.globe); + return !jasmine.matchersUtil.equals(s._context.readPixels(), [ + 0, + 0, + 0, + 0, + ]); + }); + }); + }); }); it("renders with multipass OIT if MRT is available", function () { diff --git a/Specs/Scene/TweenCollectionSpec.js b/Specs/Scene/TweenCollectionSpec.js index 5e084023c4d5..62c58036ddb6 100644 --- a/Specs/Scene/TweenCollectionSpec.js +++ b/Specs/Scene/TweenCollectionSpec.js @@ -22,7 +22,7 @@ describe( stopObject: stopObject, duration: 1.0, delay: 0.5, - easingFunction: EasingFunction.QUADRACTIC_IN, + easingFunction: EasingFunction.QUADRATIC_IN, update: update, complete: complete, cancel: cancel, @@ -32,7 +32,7 @@ describe( expect(tween.stopObject).toEqual(stopObject); expect(tween.duration).toEqual(1.0); expect(tween.delay).toEqual(0.5); - expect(tween.easingFunction).toEqual(EasingFunction.QUADRACTIC_IN); + expect(tween.easingFunction).toEqual(EasingFunction.QUADRATIC_IN); expect(tween.update).toBe(update); expect(tween.complete).toBe(complete); expect(tween.cancel).toBe(cancel); diff --git a/Specs/Scene/createElevationBandMaterialSpec.js b/Specs/Scene/createElevationBandMaterialSpec.js new file mode 100644 index 000000000000..0739539311e7 --- /dev/null +++ b/Specs/Scene/createElevationBandMaterialSpec.js @@ -0,0 +1,1210 @@ +import { Cartesian4 } from "../../Source/Cesium.js"; +import { Color } from "../../Source/Cesium.js"; +import { createElevationBandMaterial } from "../../Source/Cesium.js"; +import { Math as CesiumMath } from "../../Source/Cesium.js"; +import { PixelFormat } from "../../Source/Cesium.js"; +import { Texture } from "../../Source/Cesium.js"; +import { TextureMinificationFilter } from "../../Source/Cesium.js"; +import createScene from "../createScene.js"; + +describe("Scene/createElevationBandMaterial", function () { + var scene; + var isHeightDataPacked; + var heightData; + var colorData; + + beforeAll(function () { + scene = createScene(); + + // Color and height textures are differentiated by the sampler filter. + spyOn(Texture, "create").and.callFake(function (options) { + var data = options.source.arrayBufferView; + if ( + options.sampler.minificationFilter === TextureMinificationFilter.NEAREST + ) { + heightData = data; + isHeightDataPacked = options.pixelFormat === PixelFormat.RGBA; + } else if ( + options.sampler.minificationFilter === TextureMinificationFilter.LINEAR + ) { + colorData = data; + } + }); + }); + + afterAll(function () { + scene.destroyForSpecs(); + }); + + function checkTextureDimensions(expectedDimension) { + var colorDimension = colorData.length / 4; + expect(colorDimension).toEqual(expectedDimension); + + var heightDimension = isHeightDataPacked + ? heightData.length / 4 + : heightData.length; + expect(heightDimension).toEqual(expectedDimension); + } + function checkTexel(texel, expectedColor, expectedHeight) { + var r = colorData[texel * 4 + 0]; + var g = colorData[texel * 4 + 1]; + var b = colorData[texel * 4 + 2]; + var a = colorData[texel * 4 + 3]; + var color = [r, g, b, a]; + + // The texture stores colors as premultiplied alpha, so we need to convert + // the expected color to premultiplied alpha before comparing. + var premulipliedColor = Color.clone(expectedColor, new Color()); + premulipliedColor.red *= premulipliedColor.alpha; + premulipliedColor.green *= premulipliedColor.alpha; + premulipliedColor.blue *= premulipliedColor.alpha; + + expect(color).toEqualEpsilon(premulipliedColor.toBytes(), 1); + + var height = isHeightDataPacked + ? Cartesian4.unpackFloat(Cartesian4.unpack(heightData, texel * 4)) + : heightData[texel]; + expect(height).toEqualEpsilon(expectedHeight, CesiumMath.EPSILON5); + } + + it("throws without scene", function () { + expect(function () { + createElevationBandMaterial(); + }).toThrowDeveloperError(); + }); + + it("throws without layers", function () { + expect(function () { + createElevationBandMaterial({ + scene: scene, + }); + }).toThrowDeveloperError(); + + var layers = []; + expect(function () { + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + }).toThrowDeveloperError(); + }); + + it("throws with no entries", function () { + var layers = [ + { + entries: [], + }, + ]; + + expect(function () { + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + }).toThrowDeveloperError(); + }); + + it("throws with no height", function () { + var layers = [ + { + entries: [ + { + color: Color.RED, + }, + ], + }, + ]; + + expect(function () { + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + }).toThrowDeveloperError(); + }); + + it("throws with no color", function () { + var layers = [ + { + entries: [ + { + height: 0.0, + }, + ], + }, + ]; + + expect(function () { + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + }).toThrowDeveloperError(); + }); + + it("creates material with one entry", function () { + var layers = [ + { + entries: [ + { + height: 0.0, + color: Color.RED, + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(2); + checkTexel(1, Color.RED, createElevationBandMaterial._maximumHeight); + checkTexel(0, Color.RED, createElevationBandMaterial._minimumHeight); + }); + + it("creates material with one entry that extends upwards", function () { + var layers = [ + { + entries: [ + { + height: 0.0, + color: Color.RED, + }, + ], + extendUpwards: true, + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(2); + checkTexel(1, Color.RED, createElevationBandMaterial._maximumHeight); + checkTexel(0, Color.RED, 0.0); + }); + + it("creates material with one entry that extends downwards", function () { + var layers = [ + { + entries: [ + { + height: 0.0, + color: Color.RED, + }, + ], + extendDownwards: true, + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(2); + checkTexel(1, Color.RED, 0.0); + checkTexel(0, Color.RED, createElevationBandMaterial._minimumHeight); + }); + + it("creates material with one entry that extends upwards and downwards", function () { + var layers = [ + { + entries: [ + { + height: 0.0, + color: Color.RED, + }, + ], + extendUpwards: true, + extendDownwards: true, + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(2); + checkTexel(1, Color.RED, createElevationBandMaterial._maximumHeight); + checkTexel(0, Color.RED, createElevationBandMaterial._minimumHeight); + }); + + it("removes unused entries", function () { + var layers = [ + { + entries: [ + { + height: 3.0, + color: new Color(1, 0, 0, 1), + }, + { + height: 3.0, + color: new Color(0, 1, 0, 1), + }, + { + height: 2.0, + color: new Color(0, 1, 0, 1), + }, + { + height: 1.0, + color: new Color(0, 1, 0, 1), + }, + { + height: 0.0, + color: new Color(0, 1, 0, 1), + }, + { + height: 0.0, + color: new Color(1, 0, 0, 1), + }, + { + height: 0.0, + color: new Color(0, 1, 0, 1), + }, + { + height: 0.0, + color: new Color(1, 0, 0, 1), + }, + { + height: 0.0, + color: new Color(1, 0, 0, 1), + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(2); + checkTexel(1, new Color(0, 1, 0, 1), 3.0); + checkTexel(0, new Color(0, 1, 0, 1), 0.0); + }); + + it("sorts entries", function () { + var layers = [ + { + entries: [ + { + height: 1.0, + color: new Color(0, 1, 0, 1), + }, + { + height: 2.0, + color: new Color(0, 0, 1, 1), + }, + { + height: 0.0, + color: new Color(1, 0, 0, 1), + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(3); + checkTexel(2, new Color(0, 0, 1, 1), 2.0); + checkTexel(1, new Color(0, 1, 0, 1), 1.0); + checkTexel(0, new Color(1, 0, 0, 1), 0.0); + }); + + it("creates material with antialiased band", function () { + var layers = [ + { + entries: [ + { + height: +1.0, + color: new Color(1, 0, 0, 0), + }, + { + height: +0.9, + color: new Color(1, 0, 0, 1), + }, + { + height: -0.9, + color: new Color(1, 0, 0, 1), + }, + { + height: -1.0, + color: new Color(1, 0, 0, 0), + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(4); + checkTexel(3, new Color(1, 0, 0, 0), +1.0); + checkTexel(2, new Color(1, 0, 0, 1), +0.9); + checkTexel(1, new Color(1, 0, 0, 1), -0.9); + checkTexel(0, new Color(1, 0, 0, 0), -1.0); + }); + + it("creates material with one layer completely before another", function () { + var layers = [ + { + entries: [ + { + height: 1.0, + color: Color.RED, + }, + { + height: 2.0, + color: Color.RED, + }, + ], + }, + { + entries: [ + { + height: -1.0, + color: Color.BLUE, + }, + { + height: -2.0, + color: Color.BLUE, + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(6); + checkTexel(5, Color.RED, +2.0); + checkTexel(4, Color.RED, +1.0); + checkTexel(3, createElevationBandMaterial._emptyColor, +1.0); + checkTexel(2, createElevationBandMaterial._emptyColor, -1.0); + checkTexel(1, Color.BLUE, -1.0); + checkTexel(0, Color.BLUE, -2.0); + }); + + it("creates material with one layer completely after another", function () { + var layers = [ + { + entries: [ + { + height: -1.0, + color: Color.BLUE, + }, + { + height: -2.0, + color: Color.BLUE, + }, + ], + }, + { + entries: [ + { + height: +1.0, + color: Color.RED, + }, + { + height: +2.0, + color: Color.RED, + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(6); + checkTexel(5, Color.RED, +2.0); + checkTexel(4, Color.RED, +1.0); + checkTexel(3, createElevationBandMaterial._emptyColor, +1.0); + checkTexel(2, createElevationBandMaterial._emptyColor, -1.0); + checkTexel(1, Color.BLUE, -1.0); + checkTexel(0, Color.BLUE, -2.0); + }); + + it("creates material with larger transparent layer on top of solid color layer", function () { + var layers = [ + { + entries: [ + { + height: +1.0, + color: new Color(1.0, 1.0, 1.0, 1.0), + }, + { + height: -1.0, + color: new Color(1.0, 1.0, 1.0, 1.0), + }, + ], + }, + { + entries: [ + { + height: +2.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + { + height: -2.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(6); + checkTexel(5, new Color(1.0, 0.0, 0.0, 0.5), +2.0); + checkTexel(4, new Color(1.0, 0.0, 0.0, 0.5), +1.0); + checkTexel(3, new Color(1.0, 0.5, 0.5, 1.0), +1.0); + checkTexel(2, new Color(1.0, 0.5, 0.5, 1.0), -1.0); + checkTexel(1, new Color(1.0, 0.0, 0.0, 0.5), -1.0); + checkTexel(0, new Color(1.0, 0.0, 0.0, 0.5), -2.0); + }); + + it("creates material with smaller transparent layer on top of solid color layer", function () { + var layers = [ + { + entries: [ + { + height: +2.0, + color: new Color(1.0, 1.0, 1.0, 1.0), + }, + { + height: -2.0, + color: new Color(1.0, 1.0, 1.0, 1.0), + }, + ], + }, + { + entries: [ + { + height: +1.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + { + height: -1.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(6); + checkTexel(5, new Color(1.0, 1.0, 1.0, 1.0), +2.0); + checkTexel(4, new Color(1.0, 1.0, 1.0, 1.0), +1.0); + checkTexel(3, new Color(1.0, 0.5, 0.5, 1.0), +1.0); + checkTexel(2, new Color(1.0, 0.5, 0.5, 1.0), -1.0); + checkTexel(1, new Color(1.0, 1.0, 1.0, 1.0), -1.0); + checkTexel(0, new Color(1.0, 1.0, 1.0, 1.0), -2.0); + }); + + it("creates material with transparent bi-color layer on top of bi-color layer", function () { + var layers = [ + { + entries: [ + { + height: +1.0, + color: new Color(1.0, 1.0, 1.0, 1.0), + }, + { + height: 0.0, + color: new Color(1.0, 1.0, 1.0, 1.0), + }, + { + height: 0.0, + color: new Color(0.0, 0.0, 0.0, 1.0), + }, + { + height: -1.0, + color: new Color(0.0, 0.0, 0.0, 1.0), + }, + ], + }, + { + entries: [ + { + height: +1.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + { + height: 0.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + { + height: 0.0, + color: new Color(0.0, 1.0, 0.0, 0.5), + }, + { + height: -1.0, + color: new Color(0.0, 1.0, 0.0, 0.5), + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(4); + checkTexel(3, new Color(1.0, 0.5, 0.5, 1.0), +1.0); + checkTexel(2, new Color(1.0, 0.5, 0.5, 1.0), 0.0); + checkTexel(1, new Color(0.0, 0.5, 0.0, 1.0), 0.0); + checkTexel(0, new Color(0.0, 0.5, 0.0, 1.0), -1.0); + }); + + it("creates material with transparent bi-color layer on top of gradient layer", function () { + var layers = [ + { + entries: [ + { + height: +1.0, + color: new Color(0.0, 0.0, 0.0, 1.0), + }, + { + height: 0.0, + color: new Color(1.0, 1.0, 1.0, 1.0), + }, + { + height: -1.0, + color: new Color(0.0, 0.0, 0.0, 1.0), + }, + ], + }, + { + entries: [ + { + height: +1.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + { + height: 0.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + { + height: 0.0, + color: new Color(0.0, 1.0, 0.0, 0.5), + }, + { + height: -1.0, + color: new Color(0.0, 1.0, 0.0, 0.5), + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(4); + checkTexel(3, new Color(0.5, 0.0, 0.0, 1.0), +1.0); + checkTexel(2, new Color(1.0, 0.5, 0.5, 1.0), 0.0); + checkTexel(1, new Color(0.5, 1.0, 0.5, 1.0), 0.0); + checkTexel(0, new Color(0.0, 0.5, 0.0, 1.0), -1.0); + }); + + it("creates material with transparent gradient layer on top of bi-color layer", function () { + var layers = [ + { + entries: [ + { + height: +1.0, + color: new Color(1.0, 1.0, 1.0, 1.0), + }, + { + height: 0.0, + color: new Color(1.0, 1.0, 1.0, 1.0), + }, + { + height: 0.0, + color: new Color(0.0, 0.0, 0.0, 1.0), + }, + { + height: -1.0, + color: new Color(0.0, 0.0, 0.0, 1.0), + }, + ], + }, + { + entries: [ + { + height: +1.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + { + height: 0.0, + color: new Color(0.0, 1.0, 0.0, 0.5), + }, + { + height: -1.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(4); + checkTexel(3, new Color(1.0, 0.5, 0.5, 1.0), +1.0); + checkTexel(2, new Color(0.5, 1.0, 0.5, 1.0), 0.0); + checkTexel(1, new Color(0.0, 0.5, 0.0, 1.0), 0.0); + checkTexel(0, new Color(0.5, 0.0, 0.0, 1.0), -1.0); + }); + + it("creates material with transparent gradient layer on top of gradient layer", function () { + var layers = [ + { + entries: [ + { + height: +1.0, + color: new Color(1.0, 1.0, 1.0, 1.0), + }, + { + height: 0.0, + color: new Color(0.0, 0.0, 0.0, 1.0), + }, + { + height: -1.0, + color: new Color(1.0, 1.0, 1.0, 1.0), + }, + ], + }, + { + entries: [ + { + height: +1.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + { + height: 0.0, + color: new Color(0.0, 1.0, 0.0, 0.5), + }, + { + height: -1.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(3); + checkTexel(2, new Color(1.0, 0.5, 0.5, 1.0), +1.0); + checkTexel(1, new Color(0.0, 0.5, 0.0, 1.0), 0.0); + checkTexel(0, new Color(1.0, 0.5, 0.5, 1.0), -1.0); + }); + + it("creates material with transparent gradient layer on top of solid color layer", function () { + var layers = [ + { + entries: [ + { + height: +1.0, + color: new Color(1.0, 1.0, 1.0, 1.0), + }, + { + height: -1.0, + color: new Color(1.0, 1.0, 1.0, 1.0), + }, + ], + }, + { + entries: [ + { + height: +1.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + { + height: 0.0, + color: new Color(0.0, 1.0, 0.0, 0.5), + }, + { + height: -1.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(3); + checkTexel(2, new Color(1.0, 0.5, 0.5, 1.0), +1.0); + checkTexel(1, new Color(0.5, 1.0, 0.5, 1.0), 0.0); + checkTexel(0, new Color(1.0, 0.5, 0.5, 1.0), -1.0); + }); + + it("creates material with transparent layer on top of gradient layer", function () { + var layers = [ + { + entries: [ + { + height: +1.0, + color: new Color(1.0, 0.0, 0.0, 1.0), + }, + { + height: 0.0, + color: new Color(0.0, 1.0, 0.0, 1.0), + }, + { + height: -1.0, + color: new Color(1.0, 0.0, 0.0, 1.0), + }, + ], + }, + { + entries: [ + { + height: +1.0, + color: new Color(1.0, 1.0, 1.0, 0.5), + }, + { + height: -1.0, + color: new Color(1.0, 1.0, 1.0, 0.5), + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(3); + checkTexel(2, new Color(1.0, 0.5, 0.5, 1.0), +1.0); + checkTexel(1, new Color(0.5, 1.0, 0.5, 1.0), 0.0); + checkTexel(0, new Color(1.0, 0.5, 0.5, 1.0), -1.0); + }); + + it("creates material with higher layer starting and ending on middle of lower layer", function () { + var layers = [ + { + entries: [ + { + height: +1.0, + color: new Color(1.0, 1.0, 1.0, 1.0), + }, + { + height: +0.5, + color: new Color(1.0, 1.0, 1.0, 1.0), + }, + { + height: -0.5, + color: new Color(0.0, 0.0, 0.0, 1.0), + }, + { + height: -1.0, + color: new Color(0.0, 0.0, 0.0, 1.0), + }, + ], + }, + { + entries: [ + { + height: +0.5, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + { + height: -0.5, + color: new Color(0.0, 1.0, 0.0, 0.5), + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(6); + checkTexel(5, new Color(1.0, 1.0, 1.0, 1.0), +1.0); + checkTexel(4, new Color(1.0, 1.0, 1.0, 1.0), +0.5); + checkTexel(3, new Color(1.0, 0.5, 0.5, 1.0), +0.5); + checkTexel(2, new Color(0.0, 0.5, 0.0, 1.0), -0.5); + checkTexel(1, new Color(0.0, 0.0, 0.0, 1.0), -0.5); + checkTexel(0, new Color(0.0, 0.0, 0.0, 1.0), -1.0); + }); + + it("creates material with lower layer starting and ending on middle of higher layer", function () { + var layers = [ + { + entries: [ + { + height: +1.0, + color: Color.WHITE, + }, + { + height: -1.0, + color: Color.WHITE, + }, + ], + }, + { + entries: [ + { + height: +2.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + { + height: +1.0, + color: new Color(0.0, 1.0, 0.0, 0.5), + }, + { + height: -1.0, + color: new Color(0.0, 1.0, 0.0, 0.5), + }, + { + height: -2.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(6); + checkTexel(5, new Color(1.0, 0.0, 0.0, 0.5), +2.0); + checkTexel(4, new Color(0.0, 1.0, 0.0, 0.5), +1.0); + checkTexel(3, new Color(0.5, 1.0, 0.5, 1.0), +1.0); + checkTexel(2, new Color(0.5, 1.0, 0.5, 1.0), -1.0); + checkTexel(1, new Color(0.0, 1.0, 0.0, 0.5), -1.0); + checkTexel(0, new Color(1.0, 0.0, 0.0, 0.5), -2.0); + }); + + it("creates multi-layered material", function () { + var layers = [ + { + entries: [ + { + height: +1.0, + color: Color.BLACK, + }, + { + height: 0.0, + color: Color.WHITE, + }, + { + height: -1.0, + color: Color.BLACK, + }, + ], + }, + { + entries: [ + { + height: +2.0, + color: new Color(1.0, 0.0, 0.0, 1.0), + }, + { + height: +1.0, + color: new Color(1.0, 0.0, 0.0, 1.0), + }, + ], + }, + { + entries: [ + { + height: -1.0, + color: new Color(1.0, 0.0, 0.0, 1.0), + }, + { + height: -2.0, + color: new Color(1.0, 0.0, 0.0, 1.0), + }, + ], + }, + { + entries: [ + { + height: +0.5, + color: new Color(0.0, 1.0, 0.0, 0.5), + }, + { + height: 0.0, + color: new Color(0.0, 1.0, 0.0, 0.5), + }, + ], + }, + { + entries: [ + { + height: 0.0, + color: new Color(0.0, 0.0, 1.0, 0.5), + }, + { + height: -0.5, + color: new Color(0.0, 0.0, 1.0, 0.5), + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(12); + checkTexel(11, new Color(1.0, 0.0, 0.0, 1.0), +2.0); + checkTexel(10, new Color(1.0, 0.0, 0.0, 1.0), +1.0); + checkTexel(9, new Color(0.0, 0.0, 0.0, 1.0), +1.0); + checkTexel(8, new Color(0.5, 0.5, 0.5, 1.0), +0.5); + checkTexel(7, new Color(0.25, 0.75, 0.25, 1.0), +0.5); + checkTexel(6, new Color(0.5, 1.0, 0.5, 1.0), 0.0); + checkTexel(5, new Color(0.5, 0.5, 1.0, 1.0), 0.0); + checkTexel(4, new Color(0.25, 0.25, 0.75, 1.0), -0.5); + checkTexel(3, new Color(0.5, 0.5, 0.5, 1.0), -0.5); + checkTexel(2, new Color(0.0, 0.0, 0.0, 1.0), -1.0); + checkTexel(1, new Color(1.0, 0.0, 0.0, 1.0), -1.0); + checkTexel(0, new Color(1.0, 0.0, 0.0, 1.0), -2.0); + }); + + it("creates another multi-layered material", function () { + var layers = [ + { + entries: [ + { + height: +1.0, + color: Color.BLACK, + }, + { + height: 0.0, + color: Color.BLACK, + }, + { + height: 0.0, + color: Color.WHITE, + }, + { + height: -1.0, + color: Color.WHITE, + }, + ], + }, + { + entries: [ + { + height: 0.5, + color: new Color(0.0, 0.0, 1.0, 1.0), + }, + { + height: 0.0, + color: new Color(0.0, 0.0, 1.0, 1.0), + }, + ], + }, + { + entries: [ + { + height: +1.1, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + { + height: +1.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + { + height: +1.0, + color: new Color(0.0, 1.0, 0.0, 0.5), + }, + { + height: +0.9, + color: new Color(0.0, 1.0, 0.0, 0.5), + }, + ], + }, + { + entries: [ + { + height: -0.9, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + { + height: -1.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + { + height: -1.0, + color: new Color(0.0, 1.0, 0.0, 0.5), + }, + { + height: -1.1, + color: new Color(0.0, 1.0, 0.0, 0.5), + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(14); + checkTexel(13, new Color(1.0, 0.0, 0.0, 0.5), +1.1); + checkTexel(12, new Color(1.0, 0.0, 0.0, 0.5), +1.0); + checkTexel(11, new Color(0.0, 0.5, 0.0, 1.0), +1.0); + checkTexel(10, new Color(0.0, 0.5, 0.0, 1.0), +0.9); + checkTexel(9, new Color(0.0, 0.0, 0.0, 1.0), +0.9); + checkTexel(8, new Color(0.0, 0.0, 0.0, 1.0), 0.5); + checkTexel(7, new Color(0.0, 0.0, 1.0, 1.0), 0.5); + checkTexel(6, new Color(0.0, 0.0, 1.0, 1.0), 0.0); + checkTexel(5, new Color(1.0, 1.0, 1.0, 1.0), 0.0); + checkTexel(4, new Color(1.0, 1.0, 1.0, 1.0), -0.9); + checkTexel(3, new Color(1.0, 0.5, 0.5, 1.0), -0.9); + checkTexel(2, new Color(1.0, 0.5, 0.5, 1.0), -1.0); + checkTexel(1, new Color(0.0, 1.0, 0.0, 0.5), -1.0); + checkTexel(0, new Color(0.0, 1.0, 0.0, 0.5), -1.1); + }); + + it("creates material with complex layers", function () { + var layers = [ + { + entries: [ + { + height: +1000.0, + color: Color.WHITE, + }, + { + height: -1000.0, + color: Color.BLACK, + }, + ], + extendDownwards: true, + }, + { + entries: [ + { + height: +500.0, + color: new Color(1.0, 0.0, 0.0, 1.0), + }, + { + height: -500.0, + color: new Color(1.0, 0.0, 0.0, 0.5), + }, + ], + }, + ]; + + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(7); + checkTexel(6, new Color(1, 1, 1, 1), +1000.0); + checkTexel(5, new Color(0.75, 0.75, 0.75, 1), +500.0); + checkTexel(4, new Color(1, 0, 0, 1), +500.0); + checkTexel(3, new Color(0.625, 0.125, 0.125, 1), -500.0); + checkTexel(2, new Color(0.25, 0.25, 0.25, 1), -500.0); + checkTexel(1, new Color(0, 0, 0, 1), -1000.0); + checkTexel( + 0, + new Color(0, 0, 0, 1), + createElevationBandMaterial._minimumHeight + ); + }); + + it("creates material with unpacked height", function () { + var layers = [ + { + entries: [ + { + height: 0.0, + color: Color.RED, + }, + { + height: 1.0, + color: Color.RED, + }, + ], + }, + ]; + + spyOn(createElevationBandMaterial, "_useFloatTexture").and.returnValue( + false + ); + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(2); + checkTexel(1, Color.RED, 1.0); + checkTexel(0, Color.RED, 0.0); + }); + + it("creates material with packed height", function () { + var layers = [ + { + entries: [ + { + height: 0.0, + color: Color.RED, + }, + { + height: 1.0, + color: Color.RED, + }, + ], + }, + ]; + + spyOn(createElevationBandMaterial, "_useFloatTexture").and.returnValue( + true + ); + createElevationBandMaterial({ + scene: scene, + layers: layers, + }); + + checkTextureDimensions(2); + checkTexel(1, Color.RED, 1.0); + checkTexel(0, Color.RED, 0.0); + }); +}); diff --git a/Specs/TypeScript/index.ts b/Specs/TypeScript/index.ts index 8c4aab8d4ea1..b91e9159f9cb 100644 --- a/Specs/TypeScript/index.ts +++ b/Specs/TypeScript/index.ts @@ -11,6 +11,7 @@ import { CheckerboardMaterialProperty, CircleGeometry, CircleOutlineGeometry, + Color, ColorMaterialProperty, CompositeMaterialProperty, CompositePositionProperty, @@ -96,6 +97,7 @@ import { WallOutlineGeometry, WebMapServiceImageryProvider, WebMapTileServiceImageryProvider, + writeTextToCanvas, } from "cesium"; // Verify ImageryProvider instances conform to the expected interface @@ -105,7 +107,11 @@ imageryProvider = new ArcGisMapServerImageryProvider({ url: "" }); imageryProvider = new BingMapsImageryProvider({ url: "", key: "" }); imageryProvider = new OpenStreetMapImageryProvider({ url: "" }); imageryProvider = new TileMapServiceImageryProvider({ url: "" }); -imageryProvider = new GridImageryProvider({ url: "" }); +imageryProvider = new GridImageryProvider({ + tileWidth: 256, + tileHeight: 256, + color: new Color(1.0, 1.0, 1.0, 0.4), +}); imageryProvider = new IonImageryProvider({ assetId: 2 }); imageryProvider = new MapboxImageryProvider({ mapId: "", accessToken: "" }); imageryProvider = new MapboxStyleImageryProvider({ @@ -379,3 +385,5 @@ geometryInstance = new GeometryInstance({ positions: [], }), }); + +const canvas: HTMLCanvasElement | undefined = writeTextToCanvas("test"); diff --git a/Tools/jsdoc/cesium_template/static/styles/jsdoc-default.css b/Tools/jsdoc/cesium_template/static/styles/jsdoc-default.css index 7bbda2ddc887..9005b700696b 100644 --- a/Tools/jsdoc/cesium_template/static/styles/jsdoc-default.css +++ b/Tools/jsdoc/cesium_template/static/styles/jsdoc-default.css @@ -176,6 +176,7 @@ div.menu { div.nav { overflow-x: hidden; overflow-y: auto; + background: #f8f8f8; /* Can be any color, but is needed for horizontal scrolling of main content. */ } @media (max-width: 839px) { diff --git a/gulpfile.cjs b/gulpfile.cjs index 6f543cda527c..bfb7e26dd80b 100644 --- a/gulpfile.cjs +++ b/gulpfile.cjs @@ -1,70 +1,71 @@ /*eslint-env node*/ "use strict"; -var fs = require("fs"); -var path = require("path"); -var os = require("os"); -var child_process = require("child_process"); -var crypto = require("crypto"); -var zlib = require("zlib"); -var readline = require("readline"); -var request = require("request"); - -var globby = require("globby"); -var gulpTap = require("gulp-tap"); -var gulpUglify = require("gulp-uglify"); -var open = require("open"); -var rimraf = require("rimraf"); -var glslStripComments = require("glsl-strip-comments"); -var mkdirp = require("mkdirp"); -var mergeStream = require("merge-stream"); -var streamToPromise = require("stream-to-promise"); -var gulp = require("gulp"); -var gulpInsert = require("gulp-insert"); -var gulpZip = require("gulp-zip"); -var gulpRename = require("gulp-rename"); -var gulpReplace = require("gulp-replace"); -var Promise = require("bluebird"); -var Karma = require("karma"); -var yargs = require("yargs"); -var AWS = require("aws-sdk"); -var mime = require("mime"); -var rollup = require("rollup"); -var rollupPluginStripPragma = require("rollup-plugin-strip-pragma"); -var rollupPluginExternalGlobals = require("rollup-plugin-external-globals"); -var rollupPluginUglify = require("rollup-plugin-uglify"); -var cleanCSS = require("gulp-clean-css"); -var typescript = require("typescript"); - -var packageJson = require("./package.json"); -var version = packageJson.version; +const fs = require("fs"); +const path = require("path"); +const os = require("os"); +const child_process = require("child_process"); +const crypto = require("crypto"); +const zlib = require("zlib"); +const readline = require("readline"); +const request = require("request"); + +const globby = require("globby"); +const gulpTap = require("gulp-tap"); +const gulpUglify = require("gulp-uglify"); +const open = require("open"); +const rimraf = require("rimraf"); +const glslStripComments = require("glsl-strip-comments"); +const mkdirp = require("mkdirp"); +const mergeStream = require("merge-stream"); +const streamToPromise = require("stream-to-promise"); +const gulp = require("gulp"); +const gulpInsert = require("gulp-insert"); +const gulpZip = require("gulp-zip"); +const gulpRename = require("gulp-rename"); +const gulpReplace = require("gulp-replace"); +const Promise = require("bluebird"); +const Karma = require("karma"); +const yargs = require("yargs"); +const AWS = require("aws-sdk"); +const mime = require("mime"); +const rollup = require("rollup"); +const rollupPluginStripPragma = require("rollup-plugin-strip-pragma"); +const rollupPluginExternalGlobals = require("rollup-plugin-external-globals"); +const rollupPluginUglify = require("rollup-plugin-uglify"); +const cleanCSS = require("gulp-clean-css"); +const typescript = require("typescript"); + +const packageJson = require("./package.json"); +let version = packageJson.version; if (/\.0$/.test(version)) { version = version.substring(0, version.length - 2); } -var karmaConfigFile = path.join(__dirname, "Specs/karma.conf.cjs"); -var travisDeployUrl = +const karmaConfigFile = path.join(__dirname, "Specs/karma.conf.cjs"); +const travisDeployUrl = "http://cesium-dev.s3-website-us-east-1.amazonaws.com/cesium/"; //Gulp doesn't seem to have a way to get the currently running tasks for setting //per-task variables. We use the command line argument here to detect which task is being run. -var taskName = process.argv[2]; -var noDevelopmentGallery = taskName === "release" || taskName === "makeZipFile"; -var minifyShaders = +const taskName = process.argv[2]; +const noDevelopmentGallery = + taskName === "release" || taskName === "makeZipFile"; +const minifyShaders = taskName === "minify" || taskName === "minifyRelease" || taskName === "release" || taskName === "makeZipFile" || taskName === "buildApps"; -var verbose = yargs.argv.verbose; +const verbose = yargs.argv.verbose; -var concurrency = yargs.argv.concurrency; +let concurrency = yargs.argv.concurrency; if (!concurrency) { concurrency = os.cpus().length; } -var sourceFiles = [ +const sourceFiles = [ "Source/**/*.js", "!Source/*.js", "!Source/Workers/**", @@ -76,7 +77,7 @@ var sourceFiles = [ "!Source/ThirdParty/crunch.js", ]; -var watchedFiles = [ +const watchedFiles = [ "Source/**/*.js", "!Source/Cesium.js", "!Source/Build/**", @@ -90,7 +91,7 @@ var watchedFiles = [ "!Specs/SpecList.js", ]; -var filesToClean = [ +const filesToClean = [ "Source/Cesium.js", "Source/Shaders/**/*.js", "Source/Workers/**", @@ -105,7 +106,7 @@ var filesToClean = [ "cesium-*.tgz", ]; -var filesToConvertES6 = [ +const filesToConvertES6 = [ "Source/**/*.js", "Specs/**/*.js", "!Source/ThirdParty/**", @@ -132,7 +133,7 @@ function rollupWarning(message) { console.log(message); } -var copyrightHeader = fs.readFileSync( +const copyrightHeader = fs.readFileSync( path.join("Source", "copyrightHeader.js"), "utf8" ); @@ -150,7 +151,7 @@ function createWorkers() { rimraf.sync(file); }); - var workers = globby.sync(["Source/WorkersES6/**"]); + const workers = globby.sync(["Source/WorkersES6/**"]); return rollup .rollup({ @@ -205,18 +206,18 @@ gulp.task("buildApps", function () { }); gulp.task("build-specs", function buildSpecs() { - var externalCesium = rollupPluginExternalGlobals({ + const externalCesium = rollupPluginExternalGlobals({ "../Source/Cesium.js": "Cesium", "../../Source/Cesium.js": "Cesium", "../../../Source/Cesium.js": "Cesium", "../../../../Source/Cesium.js": "Cesium", }); - var removePragmas = rollupPluginStripPragma({ + const removePragmas = rollupPluginStripPragma({ pragmas: ["debug"], }); - var promise = Promise.join( + const promise = Promise.join( rollup .rollup({ input: "Specs/SpecList.js", @@ -271,10 +272,10 @@ gulp.task("clean", function (done) { }); function cloc() { - var cmdLine; + let cmdLine; //Run cloc on primary Source files only - var source = new Promise(function (resolve, reject) { + const source = new Promise(function (resolve, reject) { cmdLine = "npx cloc" + " --quiet --progress-rate=0" + @@ -314,7 +315,7 @@ function cloc() { gulp.task("cloc", gulp.series("clean", cloc)); function combine() { - var outputDirectory = path.join("Build", "CesiumUnminified"); + const outputDirectory = path.join("Build", "CesiumUnminified"); return combineJavaScript({ removePragmas: false, optimizer: "none", @@ -326,7 +327,7 @@ gulp.task("combine", gulp.series("build", combine)); gulp.task("default", gulp.series("combine")); function combineRelease() { - var outputDirectory = path.join("Build", "CesiumUnminified"); + const outputDirectory = path.join("Build", "CesiumUnminified"); return combineJavaScript({ removePragmas: true, optimizer: "none", @@ -343,7 +344,7 @@ function generateDocumentation() { env: Object.assign({}, process.env, { CESIUM_VERSION: version }), }); - var stream = gulp + const stream = gulp .src("Documentation/Images/**") .pipe(gulp.dest("Build/Documentation/Images")); @@ -376,18 +377,19 @@ gulp.task( //See https://github.com/CesiumGS/cesium/pull/3106#discussion_r42793558 for discussion. glslToJavaScript(false, "Build/minifyShaders.state"); - var builtSrc = gulp.src( + const builtSrc = gulp.src( [ "Build/Cesium/**", "Build/CesiumUnminified/**", "Build/Documentation/**", + "Build/package.json", ], { base: ".", } ); - var staticSrc = gulp.src( + const staticSrc = gulp.src( [ "Apps/**", "!Apps/Sandcastle/gallery/development/**", @@ -397,6 +399,7 @@ gulp.task( "favicon.ico", "gulpfile.cjs", "server.cjs", + "index.cjs", "package.json", "LICENSE.md", "CHANGES.md", @@ -408,7 +411,7 @@ gulp.task( } ); - var indexSrc = gulp + const indexSrc = gulp .src("index.release.html") .pipe(gulpRename("index.html")); @@ -463,13 +466,13 @@ gulp.task("deploy-s3", function (done) { return; } - var argv = yargs + const argv = yargs .usage("Usage: deploy-s3 -b [Bucket Name] -d [Upload Directory]") .demand(["b", "d"]).argv; - var uploadDirectory = argv.d; - var bucketName = argv.b; - var cacheControl = argv.c ? argv.c : "max-age=3600"; + const uploadDirectory = argv.d; + const bucketName = argv.b; + const cacheControl = argv.c ? argv.c : "max-age=3600"; if (argv.confirm) { // skip prompt for travis @@ -477,7 +480,7 @@ gulp.task("deploy-s3", function (done) { return; } - var iface = readline.createInterface({ + const iface = readline.createInterface({ input: process.stdin, output: process.stdout, }); @@ -501,24 +504,24 @@ gulp.task("deploy-s3", function (done) { // Deploy cesium to s3 function deployCesium(bucketName, uploadDirectory, cacheControl, done) { - var readFile = Promise.promisify(fs.readFile); - var gzip = Promise.promisify(zlib.gzip); - var concurrencyLimit = 2000; + const readFile = Promise.promisify(fs.readFile); + const gzip = Promise.promisify(zlib.gzip); + const concurrencyLimit = 2000; - var s3 = new AWS.S3({ + const s3 = new AWS.S3({ maxRetries: 10, retryDelayOptions: { base: 500, }, }); - var existingBlobs = []; - var totalFiles = 0; - var uploaded = 0; - var skipped = 0; - var errors = []; + const existingBlobs = []; + let totalFiles = 0; + let uploaded = 0; + let skipped = 0; + const errors = []; - var prefix = uploadDirectory + "/"; + const prefix = uploadDirectory + "/"; return listAll(s3, bucketName, prefix, existingBlobs) .then(function () { return globby( @@ -547,12 +550,12 @@ function deployCesium(bucketName, uploadDirectory, cacheControl, done) { return Promise.map( files, function (file) { - var blobName = uploadDirectory + "/" + file; - var mimeLookup = getMimeType(blobName); - var contentType = mimeLookup.type; - var compress = mimeLookup.compress; - var contentEncoding = compress ? "gzip" : undefined; - var etag; + const blobName = uploadDirectory + "/" + file; + const mimeLookup = getMimeType(blobName); + const contentType = mimeLookup.type; + const compress = mimeLookup.compress; + const contentEncoding = compress ? "gzip" : undefined; + let etag; totalFiles++; @@ -562,7 +565,7 @@ function deployCesium(bucketName, uploadDirectory, cacheControl, done) { return content; } - var alreadyCompressed = + const alreadyCompressed = content[0] === 0x1f && content[1] === 0x8b; if (alreadyCompressed) { console.log( @@ -575,10 +578,13 @@ function deployCesium(bucketName, uploadDirectory, cacheControl, done) { }) .then(function (content) { // compute hash and etag - var hash = crypto.createHash("md5").update(content).digest("hex"); + const hash = crypto + .createHash("md5") + .update(content) + .digest("hex"); etag = crypto.createHash("md5").update(content).digest("base64"); - var index = existingBlobs.indexOf(blobName); + const index = existingBlobs.indexOf(blobName); if (index <= -1) { return content; } @@ -619,7 +625,7 @@ function deployCesium(bucketName, uploadDirectory, cacheControl, done) { if (verbose) { console.log("Uploading " + blobName + "..."); } - var params = { + const params = { Bucket: bucketName, Key: blobName, Body: content, @@ -657,7 +663,7 @@ function deployCesium(bucketName, uploadDirectory, cacheControl, done) { return; } - var objectsToDelete = []; + const objectsToDelete = []; existingBlobs.forEach(function (file) { //Don't delete generate zip files. if (!/\.(zip|tgz)$/.test(file)) { @@ -669,7 +675,7 @@ function deployCesium(bucketName, uploadDirectory, cacheControl, done) { console.log("Cleaning " + objectsToDelete.length + " files..."); // If more than 1000 files, we must issue multiple requests - var batches = []; + const batches = []; while (objectsToDelete.length > 1000) { batches.push(objectsToDelete.splice(0, 1000)); } @@ -714,10 +720,10 @@ function deployCesium(bucketName, uploadDirectory, cacheControl, done) { } function getMimeType(filename) { - var mimeType = mime.getType(filename); + const mimeType = mime.getType(filename); if (mimeType) { //Compress everything except zipfiles, binary images, and video - var compress = !/^(image\/|video\/|application\/zip|application\/gzip)/i.test( + let compress = !/^(image\/|video\/|application\/zip|application\/gzip)/i.test( mimeType ); if (mimeType === "image/svg+xml") { @@ -736,7 +742,7 @@ function getMimeType(filename) { } // Handle dotfiles, such as .jshintrc - var baseName = path.basename(filename); + const baseName = path.basename(filename); if (baseName[0] === "." || baseName.indexOf(".") === -1) { return { type: "text/plain", compress: true }; } @@ -761,8 +767,8 @@ function listAll(s3, bucketName, prefix, files, marker) { }) .promise() .then(function (data) { - var items = data.Contents; - for (var i = 0; i < items.length; i++) { + const items = data.Contents; + for (let i = 0; i < items.length; i++) { files.push(items[i].Key); } @@ -774,7 +780,7 @@ function listAll(s3, bucketName, prefix, files, marker) { } gulp.task("deploy-set-version", function (done) { - var buildVersion = yargs.argv.buildVersion; + const buildVersion = yargs.argv.buildVersion; if (buildVersion) { // NPM versions can only contain alphanumeric and hyphen characters packageJson.version += "-" + buildVersion.replace(/[^[0-9A-Za-z-]/g, ""); @@ -789,13 +795,13 @@ gulp.task("deploy-status", function () { return Promise.resolve(); } - var status = yargs.argv.status; - var message = yargs.argv.message; + const status = yargs.argv.status; + const message = yargs.argv.message; - var deployUrl = travisDeployUrl + process.env.TRAVIS_BRANCH + "/"; - var zipUrl = deployUrl + "Cesium-" + packageJson.version + ".zip"; - var npmUrl = deployUrl + "cesium-" + packageJson.version + ".tgz"; - var coverageUrl = + const deployUrl = travisDeployUrl + process.env.TRAVIS_BRANCH + "/"; + const zipUrl = deployUrl + "Cesium-" + packageJson.version + ".zip"; + const npmUrl = deployUrl + "cesium-" + packageJson.version + ".tgz"; + const coverageUrl = travisDeployUrl + process.env.TRAVIS_BRANCH + "/Build/Coverage/index.html"; return Promise.join( @@ -812,7 +818,7 @@ function setStatus(state, targetUrl, description, context) { return; } - var requestPost = Promise.promisify(request.post); + const requestPost = Promise.promisify(request.post); return requestPost({ url: "https://api.github.com/repos/" + @@ -834,18 +840,18 @@ function setStatus(state, targetUrl, description, context) { } gulp.task("coverage", function (done) { - var argv = yargs.argv; - var webglStub = argv.webglStub ? argv.webglStub : false; - var suppressPassed = argv.suppressPassed ? argv.suppressPassed : false; - var failTaskOnError = argv.failTaskOnError ? argv.failTaskOnError : false; + const argv = yargs.argv; + const webglStub = argv.webglStub ? argv.webglStub : false; + const suppressPassed = argv.suppressPassed ? argv.suppressPassed : false; + const failTaskOnError = argv.failTaskOnError ? argv.failTaskOnError : false; - var folders = []; - var browsers = ["Chrome"]; + const folders = []; + let browsers = ["Chrome"]; if (argv.browsers) { browsers = argv.browsers.split(","); } - var karma = new Karma.Server( + const karma = new Karma.Server( { configFile: karmaConfigFile, browsers: browsers, @@ -882,7 +888,7 @@ gulp.task("coverage", function (done) { }, }, function (e) { - var html = "<!doctype html><html><body><ul>"; + let html = "<!doctype html><html><body><ul>"; folders.forEach(function (folder) { html += '<li><a href="' + @@ -906,23 +912,23 @@ gulp.task("coverage", function (done) { }); gulp.task("test", function (done) { - var argv = yargs.argv; - - var enableAllBrowsers = argv.all ? true : false; - var includeCategory = argv.include ? argv.include : ""; - var excludeCategory = argv.exclude ? argv.exclude : ""; - var webglValidation = argv.webglValidation ? argv.webglValidation : false; - var webglStub = argv.webglStub ? argv.webglStub : false; - var release = argv.release ? argv.release : false; - var failTaskOnError = argv.failTaskOnError ? argv.failTaskOnError : false; - var suppressPassed = argv.suppressPassed ? argv.suppressPassed : false; - - var browsers = ["Chrome"]; + const argv = yargs.argv; + + const enableAllBrowsers = argv.all ? true : false; + const includeCategory = argv.include ? argv.include : ""; + const excludeCategory = argv.exclude ? argv.exclude : ""; + const webglValidation = argv.webglValidation ? argv.webglValidation : false; + const webglStub = argv.webglStub ? argv.webglStub : false; + const release = argv.release ? argv.release : false; + const failTaskOnError = argv.failTaskOnError ? argv.failTaskOnError : false; + const suppressPassed = argv.suppressPassed ? argv.suppressPassed : false; + + let browsers = ["Chrome"]; if (argv.browsers) { browsers = argv.browsers.split(","); } - var files = [ + let files = [ { pattern: "Specs/karma-main.js", included: true, type: "module" }, { pattern: "Source/**", included: false, type: "module" }, { pattern: "Specs/*.js", included: true, type: "module" }, @@ -948,7 +954,7 @@ gulp.task("test", function (done) { ]; } - var karma = new Karma.Server( + const karma = new Karma.Server( { configFile: karmaConfigFile, browsers: browsers, @@ -982,14 +988,14 @@ gulp.task("test", function (done) { }); gulp.task("convertToModules", function () { - var requiresRegex = /([\s\S]*?(define|defineSuite|require)\((?:{[\s\S]*}, )?\[)([\S\s]*?)]([\s\S]*?function\s*)\(([\S\s]*?)\) {([\s\S]*)/; - var noModulesRegex = /([\s\S]*?(define|defineSuite|require)\((?:{[\s\S]*}, )?\[?)([\S\s]*?)]?([\s\S]*?function\s*)\(([\S\s]*?)\) {([\s\S]*)/; - var splitRegex = /,\s*/; + const requiresRegex = /([\s\S]*?(define|defineSuite|require)\((?:{[\s\S]*}, )?\[)([\S\s]*?)]([\s\S]*?function\s*)\(([\S\s]*?)\) {([\s\S]*)/; + const noModulesRegex = /([\s\S]*?(define|defineSuite|require)\((?:{[\s\S]*}, )?\[?)([\S\s]*?)]?([\s\S]*?function\s*)\(([\S\s]*?)\) {([\s\S]*)/; + const splitRegex = /,\s*/; - var fsReadFile = Promise.promisify(fs.readFile); - var fsWriteFile = Promise.promisify(fs.writeFile); + const fsReadFile = Promise.promisify(fs.readFile); + const fsWriteFile = Promise.promisify(fs.writeFile); - var files = globby.sync(filesToConvertES6); + const files = globby.sync(filesToConvertES6); return Promise.map(files, function (file) { return fsReadFile(file).then(function (contents) { @@ -998,7 +1004,7 @@ gulp.task("convertToModules", function () { return; } - var result = requiresRegex.exec(contents); + let result = requiresRegex.exec(contents); if (result === null) { result = noModulesRegex.exec(contents); @@ -1007,13 +1013,12 @@ gulp.task("convertToModules", function () { } } - var names = result[3].split(splitRegex); + const names = result[3].split(splitRegex); if (names.length === 1 && names[0].trim() === "") { names.length = 0; } - var i; - for (i = 0; i < names.length; ++i) { + for (let i = 0; i < names.length; ++i) { if (names[i].indexOf("//") >= 0 || names[i].indexOf("/*") >= 0) { console.log( file + @@ -1023,12 +1028,12 @@ gulp.task("convertToModules", function () { } } - var identifiers = result[5].split(splitRegex); + const identifiers = result[5].split(splitRegex); if (identifiers.length === 1 && identifiers[0].trim() === "") { identifiers.length = 0; } - for (i = 0; i < identifiers.length; ++i) { + for (let i = 0; i < identifiers.length; ++i) { if ( identifiers[i].indexOf("//") >= 0 || identifiers[i].indexOf("/*") >= 0 @@ -1041,9 +1046,9 @@ gulp.task("convertToModules", function () { } } - var requires = []; + const requires = []; - for (i = 0; i < names.length && i < identifiers.length; ++i) { + for (let i = 0; i < names.length && i < identifiers.length; ++i) { requires.push({ name: names[i].trim(), identifier: identifiers[i].trim(), @@ -1052,30 +1057,30 @@ gulp.task("convertToModules", function () { // Convert back to separate lists for the names and identifiers, and add // any additional names or identifiers that don't have a corresponding pair. - var sortedNames = requires.map(function (item) { + const sortedNames = requires.map(function (item) { return item.name.slice(0, -1) + ".js'"; }); - for (i = sortedNames.length; i < names.length; ++i) { + for (let i = sortedNames.length; i < names.length; ++i) { sortedNames.push(names[i].trim()); } - var sortedIdentifiers = requires.map(function (item) { + const sortedIdentifiers = requires.map(function (item) { return item.identifier; }); - for (i = sortedIdentifiers.length; i < identifiers.length; ++i) { + for (let i = sortedIdentifiers.length; i < identifiers.length; ++i) { sortedIdentifiers.push(identifiers[i].trim()); } contents = ""; if (sortedNames.length > 0) { - for (var q = 0; q < sortedNames.length; q++) { - var modulePath = sortedNames[q]; + for (let q = 0; q < sortedNames.length; q++) { + let modulePath = sortedNames[q]; if (file.startsWith("Specs")) { modulePath = modulePath.substring(1, modulePath.length - 1); - var sourceDir = path.dirname(file); + const sourceDir = path.dirname(file); if (modulePath.startsWith("Specs") || modulePath.startsWith(".")) { - var importPath = modulePath; + let importPath = modulePath; if (modulePath.startsWith("Specs")) { importPath = path.relative(sourceDir, modulePath); if (importPath[0] !== ".") { @@ -1121,21 +1126,21 @@ gulp.task("convertToModules", function () { } } - var code; - var codeAndReturn = result[6]; + let code; + const codeAndReturn = result[6]; if (file.endsWith("Spec.js")) { - var indi = codeAndReturn.lastIndexOf("});"); + const indi = codeAndReturn.lastIndexOf("});"); code = codeAndReturn.slice(0, indi); code = code.trim().replace("'use strict';" + os.EOL, ""); contents += code + os.EOL; } else { - var returnIndex = codeAndReturn.lastIndexOf("return"); + const returnIndex = codeAndReturn.lastIndexOf("return"); code = codeAndReturn.slice(0, returnIndex); code = code.trim().replace("'use strict';" + os.EOL, ""); contents += code + os.EOL; - var returnStatement = codeAndReturn.slice(returnIndex); + const returnStatement = codeAndReturn.slice(returnIndex); contents += returnStatement.split(";")[0].replace("return ", "export default ") + ";" + @@ -1148,7 +1153,7 @@ gulp.task("convertToModules", function () { }); function combineCesium(debug, optimizer, combineOutput) { - var plugins = []; + const plugins = []; if (!debug) { plugins.push( @@ -1183,7 +1188,7 @@ function combineWorkers(debug, optimizer, combineOutput) { // Copy files that are already minified return globby(["Source/ThirdParty/Workers/draco*.js"]) .then(function (files) { - var stream = gulp + const stream = gulp .src(files, { base: "Source" }) .pipe(gulp.dest(combineOutput)); return streamToPromise(stream); @@ -1221,7 +1226,7 @@ function combineWorkers(debug, optimizer, combineOutput) { return globby(["Source/WorkersES6/*.js"]); }) .then(function (files) { - var plugins = []; + const plugins = []; if (!debug) { plugins.push( @@ -1270,29 +1275,29 @@ function minifyModules(outputDirectory) { } function combineJavaScript(options) { - var optimizer = options.optimizer; - var outputDirectory = options.outputDirectory; - var removePragmas = options.removePragmas; + const optimizer = options.optimizer; + const outputDirectory = options.outputDirectory; + const removePragmas = options.removePragmas; - var combineOutput = path.join("Build", "combineOutput", optimizer); + const combineOutput = path.join("Build", "combineOutput", optimizer); - var promise = Promise.join( + const promise = Promise.join( combineCesium(!removePragmas, optimizer, combineOutput), combineWorkers(!removePragmas, optimizer, combineOutput), minifyModules(outputDirectory) ); return promise.then(function () { - var promises = []; + const promises = []; //copy to build folder with copyright header added at the top - var stream = gulp + let stream = gulp .src([combineOutput + "/**"]) .pipe(gulp.dest(outputDirectory)); promises.push(streamToPromise(stream)); - var everythingElse = ["Source/**", "!**/*.js", "!**/*.glsl"]; + const everythingElse = ["Source/**", "!**/*.js", "!**/*.glsl"]; if (optimizer === "uglify2") { promises.push(minifyCSS(outputDirectory)); everythingElse.push("!**/*.css"); @@ -1311,13 +1316,13 @@ function combineJavaScript(options) { function glslToJavaScript(minify, minifyStateFilePath) { fs.writeFileSync(minifyStateFilePath, minify.toString()); - var minifyStateFileLastModified = fs.existsSync(minifyStateFilePath) + const minifyStateFileLastModified = fs.existsSync(minifyStateFilePath) ? fs.statSync(minifyStateFilePath).mtime.getTime() : 0; // collect all currently existing JS files into a set, later we will remove the ones // we still are using from the set, then delete any files remaining in the set. - var leftOverJsFiles = {}; + const leftOverJsFiles = {}; globby .sync(["Source/Shaders/**/*.js", "Source/ThirdParty/Shaders/*.js"]) @@ -1325,21 +1330,21 @@ function glslToJavaScript(minify, minifyStateFilePath) { leftOverJsFiles[path.normalize(file)] = true; }); - var builtinFunctions = []; - var builtinConstants = []; - var builtinStructs = []; + const builtinFunctions = []; + const builtinConstants = []; + const builtinStructs = []; - var glslFiles = globby.sync([ + const glslFiles = globby.sync([ "Source/Shaders/**/*.glsl", "Source/ThirdParty/Shaders/*.glsl", ]); glslFiles.forEach(function (glslFile) { glslFile = path.normalize(glslFile); - var baseName = path.basename(glslFile, ".glsl"); - var jsFile = path.join(path.dirname(glslFile), baseName) + ".js"; + const baseName = path.basename(glslFile, ".glsl"); + const jsFile = path.join(path.dirname(glslFile), baseName) + ".js"; // identify built in functions, structs, and constants - var baseDir = path.join("Source", "Shaders", "Builtin"); + const baseDir = path.join("Source", "Shaders", "Builtin"); if ( glslFile.indexOf(path.normalize(path.join(baseDir, "Functions"))) === 0 ) { @@ -1356,9 +1361,11 @@ function glslToJavaScript(minify, minifyStateFilePath) { delete leftOverJsFiles[jsFile]; - var jsFileExists = fs.existsSync(jsFile); - var jsFileModified = jsFileExists ? fs.statSync(jsFile).mtime.getTime() : 0; - var glslFileModified = fs.statSync(glslFile).mtime.getTime(); + const jsFileExists = fs.existsSync(jsFile); + const jsFileModified = jsFileExists + ? fs.statSync(jsFile).mtime.getTime() + : 0; + const glslFileModified = fs.statSync(glslFile).mtime.getTime(); if ( jsFileExists && @@ -1368,11 +1375,11 @@ function glslToJavaScript(minify, minifyStateFilePath) { return; } - var contents = fs.readFileSync(glslFile, "utf8"); + let contents = fs.readFileSync(glslFile, "utf8"); contents = contents.replace(/\r\n/gm, "\n"); - var copyrightComments = ""; - var extractedCopyrightComments = contents.match( + let copyrightComments = ""; + const extractedCopyrightComments = contents.match( /\/\*\*(?:[^*\/]|\*(?!\/)|\n)*?@license(?:.|\n)*?\*\//gm ); if (extractedCopyrightComments) { @@ -1405,9 +1412,9 @@ export default "' + rimraf.sync(filepath); }); - var generateBuiltinContents = function (contents, builtins, path) { - for (var i = 0; i < builtins.length; i++) { - var builtin = builtins[i]; + const generateBuiltinContents = function (contents, builtins, path) { + for (let i = 0; i < builtins.length; i++) { + const builtin = builtins[i]; contents.imports.push( "import czm_" + builtin + " from './" + path + "/" + builtin + ".js'" ); @@ -1416,7 +1423,7 @@ export default "' + }; //generate the JS file for Built-in GLSL Functions, Structs, and Constants - var contents = { + const contents = { imports: [], builtinLookup: [], }; @@ -1424,7 +1431,7 @@ export default "' + generateBuiltinContents(contents, builtinStructs, "Structs"); generateBuiltinContents(contents, builtinFunctions, "Functions"); - var fileContents = + const fileContents = "//This file is automatically rebuilt by the Cesium build process.\n" + contents.imports.join("\n") + "\n\nexport default {\n " + @@ -1438,14 +1445,14 @@ export default "' + } function createCesiumJs() { - var contents = `export var VERSION = '${version}';\n`; + let contents = `export const VERSION = '${version}';\n`; globby.sync(sourceFiles).forEach(function (file) { file = path.relative("Source", file); - var moduleId = file; + let moduleId = file; moduleId = filePathToModuleId(moduleId); - var assignmentName = path.basename(file, path.extname(file)); + let assignmentName = path.basename(file, path.extname(file)); if (moduleId.indexOf("Shaders/") === 0) { assignmentName = "_shaders" + assignmentName; } @@ -1468,7 +1475,7 @@ function createTypeScriptDefinitions() { stdio: "inherit", }); - var source = fs.readFileSync("Source/Cesium.d.ts").toString(); + let source = fs.readFileSync("Source/Cesium.d.ts").toString(); // All of our enum assignments that alias to WebGLConstants, such as PixelDatatype.js // end up as enum strings instead of actually mapping values to WebGLConstants. @@ -1521,9 +1528,9 @@ function createTypeScriptDefinitions() { // The next step is to find the list of Cesium modules exported by the Cesium API // So that we can map these modules with a link back to their original source file. - var regex = /^declare (function|class|namespace|enum) (.+)/gm; - var matches; - var publicModules = new Set(); + const regex = /^declare (function|class|namespace|enum) (.+)/gm; + let matches; + const publicModules = new Set(); //eslint-disable-next-line no-cond-assign while ((matches = regex.exec(source))) { const moduleName = matches[2].match(/([^\s|\(]+)/); @@ -1552,6 +1559,7 @@ function createTypeScriptDefinitions() { .replace(/<Object>/gm, "<object>") .replace( /= "WebGLConstants\.(.+)"/gm, + // eslint-disable-next-line no-unused-vars (match, p1) => `= WebGLConstants.${p1}` ); @@ -1576,10 +1584,10 @@ ${source} globby.sync(sourceFiles).forEach(function (file) { file = path.relative("Source", file); - var moduleId = file; + let moduleId = file; moduleId = filePathToModuleId(moduleId); - var assignmentName = path.basename(file, path.extname(file)); + const assignmentName = path.basename(file, path.extname(file)); if (publicModules.has(assignmentName)) { publicModules.delete(assignmentName); source += `declare module "cesium/Source/${moduleId}" { import { ${assignmentName} } from 'cesium'; export default ${assignmentName}; }\n`; @@ -1615,9 +1623,9 @@ ${source} } function createSpecList() { - var specFiles = globby.sync(["Specs/**/*Spec.js"]); + const specFiles = globby.sync(["Specs/**/*Spec.js"]); - var contents = ""; + let contents = ""; specFiles.forEach(function (file) { contents += "import './" + filePathToModuleId(file).replace("Specs/", "") + ".js';\n"; @@ -1627,25 +1635,25 @@ function createSpecList() { } function createGalleryList() { - var demoObjects = []; - var demoJSONs = []; - var output = path.join("Apps", "Sandcastle", "gallery", "gallery-index.js"); + const demoObjects = []; + const demoJSONs = []; + const output = path.join("Apps", "Sandcastle", "gallery", "gallery-index.js"); - var fileList = ["Apps/Sandcastle/gallery/**/*.html"]; + const fileList = ["Apps/Sandcastle/gallery/**/*.html"]; if (noDevelopmentGallery) { fileList.push("!Apps/Sandcastle/gallery/development/**/*.html"); } // On travis, the version is set to something like '1.43.0-branch-name-travisBuildNumber' // We need to extract just the Major.Minor version - var majorMinor = packageJson.version.match(/^(.*)\.(.*)\./); - var major = majorMinor[1]; - var minor = Number(majorMinor[2]) - 1; // We want the last release, not current release - var tagVersion = major + "." + minor; + const majorMinor = packageJson.version.match(/^(.*)\.(.*)\./); + const major = majorMinor[1]; + const minor = Number(majorMinor[2]) - 1; // We want the last release, not current release + const tagVersion = major + "." + minor; // Get an array of demos that were added since the last release. // This includes newly staged local demos as well. - var newDemos = []; + let newDemos = []; try { newDemos = child_process .execSync( @@ -1661,13 +1669,13 @@ function createGalleryList() { // On a Cesium fork, tags don't exist so we can't generate the list. } - var helloWorld; + let helloWorld; globby.sync(fileList).forEach(function (file) { - var demo = filePathToModuleId( + const demo = filePathToModuleId( path.relative("Apps/Sandcastle/gallery", file) ); - var demoObject = { + const demoObject = { name: demo, isNew: newDemos.includes(file), }; @@ -1692,26 +1700,25 @@ function createGalleryList() { return 0; }); - var helloWorldIndex = Math.max(demoObjects.indexOf(helloWorld), 0); + const helloWorldIndex = Math.max(demoObjects.indexOf(helloWorld), 0); - var i; - for (i = 0; i < demoObjects.length; ++i) { + for (let i = 0; i < demoObjects.length; ++i) { demoJSONs[i] = JSON.stringify(demoObjects[i], null, 2); } - var contents = + const contents = "\ // This file is automatically rebuilt by the Cesium build process.\n\ -var hello_world_index = " + +const hello_world_index = " + helloWorldIndex + ";\n\ -var VERSION = '" + +const VERSION = '" + version + "';\n\ -var gallery_demos = [" + +const gallery_demos = [" + demoJSONs.join(", ") + "];\n\ -var has_new_gallery_demos = " + +const has_new_gallery_demos = " + (newDemos.length > 0 ? "true;" : "false;") + "\n"; @@ -1733,10 +1740,10 @@ var has_new_gallery_demos = " + } function createJsHintOptions() { - var primary = JSON.parse( + const primary = JSON.parse( fs.readFileSync(path.join("Apps", ".jshintrc"), "utf8") ); - var gallery = JSON.parse( + const gallery = JSON.parse( fs.readFileSync(path.join("Apps", "Sandcastle", ".jshintrc"), "utf8") ); primary.jasmine = false; @@ -1744,10 +1751,10 @@ function createJsHintOptions() { primary.unused = gallery.unused; primary.esversion = gallery.esversion; - var contents = + const contents = "\ // This file is automatically rebuilt by the Cesium build process.\n\ -var sandcastleJsHintOptions = " + +const sandcastleJsHintOptions = " + JSON.stringify(primary, null, 4) + ";\n"; @@ -1758,7 +1765,7 @@ var sandcastleJsHintOptions = " + } function buildSandcastle() { - var appStream = gulp + const appStream = gulp .src([ "Apps/Sandcastle/**", "!Apps/Sandcastle/load-cesium-es6.js", @@ -1782,14 +1789,14 @@ function buildSandcastle() { .pipe(gulpReplace("Build/Documentation", "Documentation")) .pipe(gulp.dest("Build/Apps/Sandcastle")); - var imageStream = gulp + const imageStream = gulp .src(["Apps/Sandcastle/gallery/**.jpg", "Apps/Sandcastle/images/**"], { base: "Apps/Sandcastle", buffer: false, }) .pipe(gulp.dest("Build/Apps/Sandcastle")); - var standaloneStream = gulp + const standaloneStream = gulp .src(["Apps/Sandcastle/standalone.html"]) .pipe( gulpReplace( @@ -1805,10 +1812,10 @@ function buildSandcastle() { } function buildCesiumViewer() { - var cesiumViewerOutputDirectory = "Build/Apps/CesiumViewer"; + const cesiumViewerOutputDirectory = "Build/Apps/CesiumViewer"; mkdirp.sync(cesiumViewerOutputDirectory); - var promise = Promise.join( + let promise = Promise.join( rollup .rollup({ input: "Apps/CesiumViewer/CesiumViewer.js", @@ -1832,7 +1839,7 @@ function buildCesiumViewer() { ); promise = promise.then(function () { - var stream = mergeStream( + const stream = mergeStream( gulp .src("Build/Apps/CesiumViewer/CesiumViewer.js") .pipe(gulpInsert.prepend(copyrightHeader)) diff --git a/index.cjs b/index.cjs index 0fcc8a7a5513..01788d101da0 100644 --- a/index.cjs +++ b/index.cjs @@ -1,10 +1,11 @@ /*eslint-env node*/ "use strict"; -var path = require("path"); +const path = require("path"); // If in 'production' mode, use the combined/minified/optimized version of Cesium if (process.env.NODE_ENV === "production") { + // eslint-disable-next-line global-require module.exports = require(path.join(__dirname, "Build/Cesium/Cesium")); return; } diff --git a/package.json b/package.json index 731e9ff683ce..9637c2bca107 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cesium", - "version": "1.73.0", + "version": "1.79.1", "description": "CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin.", "homepage": "http://cesium.com/cesiumjs/", "license": "Apache-2.0", @@ -47,6 +47,7 @@ "compression": "^1.6.2", "eslint": "^7.5.0", "eslint-config-prettier": "^6.10.1", + "eslint-plugin-es": "^4.1.0", "eslint-plugin-html": "^6.0.0", "express": "^4.15.0", "globby": "^11.0.0", @@ -70,7 +71,7 @@ "karma-edge-launcher": "^0.4.2", "karma-firefox-launcher": "^1.0.0", "karma-ie-launcher": "^1.0.0", - "karma-jasmine": "^3.1.1", + "karma-jasmine": "^4.0.1", "karma-longest-reporter": "^1.1.0", "karma-safari-launcher": "^1.0.0", "karma-spec-reporter": "^0.0.32", @@ -78,18 +79,18 @@ "mime": "^2.0.3", "mkdirp": "^1.0.0", "open": "^7.0.0", - "prettier": "2.1.1", - "pretty-quick": "^2.0.1", + "prettier": "2.1.2", + "pretty-quick": "^3.0.2", "request": "^2.79.0", "rimraf": "^3.0.0", "rollup": "^2.22.1", - "rollup-plugin-external-globals": "^0.5.0", + "rollup-plugin-external-globals": "^0.6.0", "rollup-plugin-strip-pragma": "^1.0.0", "rollup-plugin-uglify": "^6.0.3", "stream-to-promise": "^3.0.0", "tsd-jsdoc": "^2.5.0", "typescript": "^3.9.2", - "yargs": "^15.0.1" + "yargs": "^16.0.3" }, "husky": { "hooks": { @@ -111,7 +112,7 @@ "coverage": "gulp coverage", "generateDocumentation": "gulp generateDocumentation", "generateDocumentation-watch": "gulp generateDocumentation-watch", - "eslint": "eslint \"./**/*.js\" \"./**/*.html\" --cache --quiet", + "eslint": "eslint \"./**/*.js\" \"./**/*.cjs\" \"./**/*.html\" --cache --quiet", "makeZipFile": "gulp makeZipFile", "minify": "gulp minify", "minifyRelease": "gulp minifyRelease", diff --git a/server.cjs b/server.cjs index 2c48004c1d44..2ded8466d84f 100644 --- a/server.cjs +++ b/server.cjs @@ -1,15 +1,17 @@ /*eslint-env node*/ +/* eslint-disable no-unused-vars */ +/* eslint-disable global-require */ "use strict"; (function () { - var express = require("express"); - var compression = require("compression"); - var fs = require("fs"); - var url = require("url"); - var request = require("request"); + const express = require("express"); + const compression = require("compression"); + const fs = require("fs"); + const url = require("url"); + const request = require("request"); - var gzipHeader = Buffer.from("1F8B08", "hex"); + const gzipHeader = Buffer.from("1F8B08", "hex"); - var yargs = require("yargs").options({ + const yargs = require("yargs").options({ port: { default: 8080, description: "Port to listen on.", @@ -32,7 +34,7 @@ description: "Show this help.", }, }); - var argv = yargs.argv; + const argv = yargs.argv; if (argv.help) { return yargs.showHelp(); @@ -41,7 +43,7 @@ // eventually this mime type configuration will need to change // https://github.com/visionmedia/send/commit/d2cb54658ce65948b0ed6e5fb5de69d022bef941 // *NOTE* Any changes you make here must be mirrored in web.config. - var mime = express.static.mime; + const mime = express.static.mime; mime.define( { "application/json": ["czml", "json", "geojson", "topojson"], @@ -63,7 +65,7 @@ true ); - var app = express(); + const app = express(); app.use(compression()); app.use(function (req, res, next) { res.header("Access-Control-Allow-Origin", "*"); @@ -75,10 +77,10 @@ }); function checkGzipAndNext(req, res, next) { - var reqUrl = url.parse(req.url, true); - var filePath = reqUrl.pathname.substring(1); + const reqUrl = url.parse(req.url, true); + const filePath = reqUrl.pathname.substring(1); - var readStream = fs.createReadStream(filePath, { start: 0, end: 2 }); + const readStream = fs.createReadStream(filePath, { start: 0, end: 2 }); readStream.on("error", function (err) { next(); }); @@ -91,7 +93,7 @@ }); } - var knownTilesetFormats = [ + const knownTilesetFormats = [ /\.b3dm/, /\.pnts/, /\.i3dm/, @@ -106,7 +108,7 @@ app.use(express.static(__dirname)); function getRemoteUrlFromParam(req) { - var remoteUrl = req.params[0]; + let remoteUrl = req.params[0]; if (remoteUrl) { // add http:// to the URL if no protocol is present if (!/^https?:\/\//.test(remoteUrl)) { @@ -119,10 +121,10 @@ return remoteUrl; } - var dontProxyHeaderRegex = /^(?:Host|Proxy-Connection|Connection|Keep-Alive|Transfer-Encoding|TE|Trailer|Proxy-Authorization|Proxy-Authenticate|Upgrade)$/i; + const dontProxyHeaderRegex = /^(?:Host|Proxy-Connection|Connection|Keep-Alive|Transfer-Encoding|TE|Trailer|Proxy-Authorization|Proxy-Authenticate|Upgrade)$/i; function filterHeaders(req, headers) { - var result = {}; + const result = {}; // filter out headers that are listed in the regex above Object.keys(headers).forEach(function (name) { if (!dontProxyHeaderRegex.test(name)) { @@ -132,8 +134,8 @@ return result; } - var upstreamProxy = argv["upstream-proxy"]; - var bypassUpstreamProxyHosts = {}; + const upstreamProxy = argv["upstream-proxy"]; + const bypassUpstreamProxyHosts = {}; if (argv["bypass-upstream-proxy-hosts"]) { argv["bypass-upstream-proxy-hosts"].split(",").forEach(function (host) { bypassUpstreamProxyHosts[host.toLowerCase()] = true; @@ -142,7 +144,7 @@ app.get("/proxy/*", function (req, res, next) { // look for request like http://localhost:8080/proxy/http://example.com/file?query=1 - var remoteUrl = getRemoteUrlFromParam(req); + let remoteUrl = getRemoteUrlFromParam(req); if (!remoteUrl) { // look for request like http://localhost:8080/proxy/?http%3A%2F%2Fexample.com%2Ffile%3Fquery%3D1 remoteUrl = Object.keys(req.query)[0]; @@ -159,7 +161,7 @@ remoteUrl.protocol = "http:"; } - var proxy; + let proxy; if (upstreamProxy && !(remoteUrl.host in bypassUpstreamProxyHosts)) { proxy = upstreamProxy; } @@ -174,7 +176,7 @@ proxy: proxy, }, function (error, response, body) { - var code = 500; + let code = 500; if (response) { code = response.statusCode; @@ -186,7 +188,7 @@ ); }); - var server = app.listen( + const server = app.listen( argv.port, argv.public ? undefined : "localhost", function () { @@ -228,7 +230,7 @@ console.log("Cesium development server stopped."); }); - var isFirstSig = true; + let isFirstSig = true; process.on("SIGINT", function () { if (isFirstSig) { console.log("Cesium development server shutting down.");